/* 확률.com — luxury midnight probability gallery */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --midnight-deep: #08101e;
  --midnight-mid: #0e1a30;
  --navy: #1a2a48;
  --blue: #3a6aaa;
  --blue-light: #68a0d8;
  --text: #d8e0ec;
  --muted: #6880a0;
  --gold: #c8a860;
  --teal: #2a5868;
}

html, body {
  background: var(--midnight-deep);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

body {
  position: relative;
  background-image:
    radial-gradient(ellipse at top, rgba(58, 106, 170, 0.08), transparent 60%),
    radial-gradient(ellipse at bottom, rgba(42, 88, 104, 0.08), transparent 60%);
}

/* Background blobs */
.blob-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.bb {
  position: absolute;
  width: 60vmin;
  height: 60vmin;
  filter: blur(8px);
}
.bb-1 { top: -10%; left: -10%; animation: bb-drift-1 38s ease-in-out infinite; }
.bb-2 { bottom: -10%; right: -12%; animation: bb-drift-2 44s ease-in-out infinite; }
@keyframes bb-drift-1 {
  0%,100% { transform: translate(0,0) rotate(0deg); }
  50% { transform: translate(20vw,15vh) rotate(180deg); }
}
@keyframes bb-drift-2 {
  0%,100% { transform: translate(0,0) rotate(0deg); }
  50% { transform: translate(-25vw,-15vh) rotate(-180deg); }
}

/* ENTRANCE */
.entrance {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
  overflow: hidden;
}
.entrance-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Space Mono', ui-monospace, monospace;
  font-weight: 700;
  font-size: 50vmin;
  color: var(--midnight-mid);
  opacity: 0.45;
  pointer-events: none;
  user-select: none;
  line-height: 1;
}

.entrance-meta {
  position: relative;
  z-index: 2;
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.32em;
  color: var(--gold);
  margin-bottom: 32px;
}

.entrance-h {
  position: relative;
  z-index: 2;
  font-family: 'Space Mono', ui-monospace, monospace;
  font-weight: 700;
  font-size: clamp(56px, 9vw, 140px);
  line-height: 1;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  text-shadow: 0 0 24px rgba(58, 106, 170, 0.24);
}

.entrance-en {
  position: relative;
  z-index: 2;
  font-family: 'Space Mono', ui-monospace, monospace;
  font-weight: 400;
  font-size: clamp(13px, 1.5vw, 18px);
  letter-spacing: 0.32em;
  color: var(--muted);
  margin-bottom: 60px;
}

.bell {
  position: relative;
  z-index: 2;
  width: min(600px, 90vw);
  height: 220px;
}
#bell-path {
  stroke-dasharray: 1100;
  stroke-dashoffset: 1100;
  animation: draw-bell 2s ease-out 0.4s forwards;
}
@keyframes draw-bell {
  to { stroke-dashoffset: 0; }
}

/* GALLERY */
.gallery {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  margin: 80px auto;
  padding: 60px 32px;
}
.gallery-h {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-weight: 700;
  font-size: clamp(22px, 2.6vw, 30px);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 36px;
  border-bottom: 1px solid var(--navy);
  padding-bottom: 18px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 880px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .grid { grid-template-columns: 1fr; } }

.card {
  background: var(--midnight-mid);
  border: 1px solid var(--navy);
  border-top: 2px solid var(--gold);
  padding: 32px 28px 30px;
  display: flex;
  flex-direction: column;
  aspect-ratio: 1 / 1.18;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.card.in { opacity: 1; transform: translateY(0); }

.card-num {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 12px;
}

.card-h {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-weight: 700;
  font-size: clamp(18px, 2vw, 22px);
  color: var(--text);
  margin-bottom: 16px;
  letter-spacing: 0.01em;
}

.card-art {
  width: 100%;
  height: 100px;
  display: block;
  margin-bottom: 14px;
}

.card-formula {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 13px;
  color: var(--gold);
  background: rgba(200, 168, 96, 0.06);
  padding: 8px 12px;
  border-left: 2px solid var(--gold);
  margin-bottom: 14px;
  word-break: break-word;
}

.card p:last-child {
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  color: var(--muted);
  flex: 1;
  line-height: 1.55;
}

/* INTERACTIVE */
.interactive {
  position: relative;
  z-index: 2;
  max-width: 1080px;
  margin: 80px auto;
  padding: 60px 32px;
  background: var(--midnight-mid);
  border: 1px solid var(--navy);
  text-align: center;
}
.int-h {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-weight: 700;
  font-size: clamp(22px, 2.6vw, 30px);
  color: var(--text);
  margin-bottom: 12px;
}
.int-tag {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 11.5px;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 36px;
}
.walk {
  width: 100%;
  height: auto;
  max-width: 700px;
  margin: 0 auto;
  display: block;
}

/* AXIOMS */
.axioms {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  margin: 0 auto;
  padding: 60px 32px 80px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.axiom {
  background: var(--midnight-mid);
  border-top: 2px solid var(--gold);
  padding: 28px 24px;
  border-left: 1px solid var(--navy);
  border-right: 1px solid var(--navy);
  border-bottom: 1px solid var(--navy);
}
.ax-num {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-weight: 700;
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 0.22em;
  margin-bottom: 10px;
  display: block;
}
.axiom h4 {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  margin-bottom: 14px;
}
.ax-formula {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 14px;
  color: var(--blue-light);
  margin-bottom: 14px;
}
.ax-text {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.55;
}

.foot-meta {
  grid-column: 1 / -1;
  text-align: center;
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 11.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--navy);
}

@media (max-width: 720px) {
  .axioms { grid-template-columns: 1fr; }
}
