/* First-visit prologue for the full-site test. */

body.intro-open { overflow: hidden; }

.topbar__replay {
  padding: 0 0 3px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  cursor: pointer;
  transition: color 0.3s, border-color 0.3s;
}

.topbar__replay:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.replay-fab { display: none; }

body.intro-open .replay-fab {
  opacity: 0;
  pointer-events: none;
}

.intro {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(70vw 70vh at 80% 22%, rgba(183, 166, 255, 0.15), transparent 65%),
    radial-gradient(60vw 60vh at 10% 80%, rgba(217, 178, 111, 0.08), transparent 65%),
    #08070c;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.intro::before {
  content: "";
  position: absolute;
  inset: -12%;
  z-index: 0;
  background:
    radial-gradient(42vw 42vh at 70% 32%, rgba(183, 166, 255, 0.12), transparent 60%),
    radial-gradient(36vw 36vh at 24% 72%, rgba(217, 178, 111, 0.08), transparent 60%);
  opacity: 0.65;
  animation: introAmbient 20s ease-in-out infinite alternate;
  pointer-events: none;
}

.intro:not(.is-hidden) { animation: introFade 1.6s ease both; }

.intro.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  animation: none;
}

body.reduce-motion .intro { transition: none; }

.intro__panel {
  position: relative;
  z-index: 1;
  width: min(1240px, 100%);
  max-height: calc(100svh - 48px);
  overflow: auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(28px, 4vw, 64px);
  padding: 8px;
  scrollbar-width: thin;
}

.intro__photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  align-items: start;
  min-width: 0;
  animation: introMediaIn 1.8s 0.15s ease both;
}

.intro__copy {
  min-width: 0;
  animation: introCopyIn 1.8s 0.35s ease both;
}

@keyframes introFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes introMediaIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes introCopyIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes introAmbient {
  from { transform: translate3d(-1.5%, -1%, 0) scale(1); }
  to { transform: translate3d(1.5%, 1%, 0) scale(1.04); }
}

.intro .photo--2 { grid-column: 1 / -1; grid-row: 1; }
.intro .photo--main { grid-column: 1; grid-row: 2; }
.intro .photo--3 { grid-column: 2; grid-row: 2; }
.intro .photo--4 { grid-column: 3; grid-row: 2; }

.photo {
  position: relative;
  overflow: hidden;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 65% 30%, rgba(255, 255, 255, 0.18), transparent 30%),
    linear-gradient(150deg, #5b4a39, #1a1310 70%);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.photo::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 4px;
  pointer-events: none;
  z-index: 1;
}

.photo img {
  display: block;
  width: 100%;
  height: auto;
}

.photo__caption {
  position: absolute;
  left: 12px;
  bottom: 10px;
  z-index: 2;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.62);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

.intro__copy { min-width: 0; }

.intro__kicker {
  margin: 0;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.28em;
  color: #d9b26f;
}

.intro__title {
  margin: 10px 0 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(86px, 12vw, 150px);
  line-height: 0.8;
  letter-spacing: -0.04em;
  background: linear-gradient(120deg, #f7efe2 15%, #cfc0ff 65%, #f3efe8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.intro__name {
  margin: 16px 0 0;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.intro__body {
  margin-top: 18px;
  max-width: 48ch;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.95;
}

.intro__body p { margin: 0 0 8px; }

.intro__body strong {
  display: inline-block;
  margin-top: 6px;
  color: var(--ink);
  font-weight: 500;
}

.intro__body em {
  font-style: normal;
  color: #d9b26f;
}

.intro__cta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.intro__enter {
  min-height: 50px;
  padding: 0 24px;
  border: 1px solid #d9b26f;
  border-radius: 999px;
  background: #d9b26f;
  color: #0a0910;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.25s, transform 0.25s;
}

.intro__enter:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.intro__skip {
  padding: 4px 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: none;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.intro__skip:hover {
  color: var(--muted);
  border-color: var(--line);
}

.intro__credit {
  margin: 14px 0 0;
  font-family: var(--mono);
  font-size: 7.5px;
  line-height: 1.7;
  color: rgba(243, 239, 232, 0.25);
}

@media (max-width: 900px) {
  .topbar__replay { display: none; }

  .replay-fab {
    position: fixed;
    left: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom));
    z-index: 55;
    display: inline-flex;
    align-items: center;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(14, 12, 21, 0.78);
    color: var(--muted);
    backdrop-filter: blur(10px);
    font-family: var(--mono);
    font-size: 8px;
    letter-spacing: 0.08em;
    transition: color 0.25s, border-color 0.25s, opacity 0.3s;
  }

  .replay-fab:hover {
    color: var(--accent);
    border-color: var(--accent);
  }
}

@media (max-width: 820px) {
  .intro {
    display: block;
    overflow-y: auto;
    padding: 18px 16px calc(20px + env(safe-area-inset-bottom));
  }

  .intro__panel {
    display: block;
    max-height: none;
    padding: 0 0 96px;
  }

  .intro__photos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    align-items: start;
    margin-bottom: 20px;
  }

  .intro .photo--2 { grid-column: 1 / -1; grid-row: 1; }
  .intro .photo--main { grid-column: 1; grid-row: 2; }
  .intro .photo--3 { grid-column: 2; grid-row: 2; }
  .intro .photo--4 { grid-column: 3; grid-row: 2; }

  .intro .photo::before { inset: 6px; }
  .intro .photo__caption { left: 7px; bottom: 5px; font-size: 7px; }

  .intro__title { font-size: clamp(80px, 25vw, 120px); }
  .intro__body { font-size: 13px; line-height: 1.9; }

  .intro__cta {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 0;
    z-index: 3;
    gap: 12px;
    margin: 0;
    padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line-soft);
    background: #08070c;
    box-shadow: 0 -16px 36px #08070c;
  }

  .intro__enter { flex: 1; width: auto; }
  .intro__skip { flex: 0 0 auto; margin: 0; padding: 8px 6px; align-self: center; }
  .intro__credit { margin-top: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .intro,
  .intro__enter { transition: none; }
  .intro::before,
  .intro:not(.is-hidden),
  .intro__photos,
  .intro__copy { animation: none; }
}
