@font-face {
  font-family: "Cormorant Garamond";
  src: url("/display.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #071b3f;
  --deep: #05122e;
  --ivory: #fff5df;
  --gold: #ffda88;
  --muted: #d4e3f7;
  --line: #d4ac6970;
  --display: "Cormorant Garamond", Georgia, serif;
  --body: system-ui, sans-serif;
  background: var(--deep);
  color: var(--ivory);
  font: 100%/1.55 var(--body);
}

* { box-sizing: border-box; }
body, h1, h2, p, dl, dd, figure { margin: 0; }
html { scroll-behavior: smooth; }
a { color: inherit; text-underline-offset: .25em; }
img { display: block; max-width: 100%; }
::selection { background: var(--gold); color: var(--ink); }
:focus-visible { outline: 3px solid #8ceaff; outline-offset: 4px; }

.wrap { width: min(76rem, 100% - 2 * clamp(1.25rem, 5vw, 5rem)); margin-inline: auto; }

.hero {
  --gutter: clamp(2rem, 5vw, 6rem);
  position: relative;
  isolation: isolate;
  overflow: clip;
  display: grid;
  grid-template-columns: minmax(19rem, .81fr) minmax(0, 1.55fr);
  grid-template-rows: .83fr 1.32fr;
  column-gap: clamp(1rem, 3.2vw, 4rem);
  min-height: clamp(42rem, 58vw, 55rem);
  background: #061a44;
}

.hero::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0 auto 0 0;
  width: 46.2%;
  pointer-events: none;
}

/* Só no desktop: dentro do media o celular não baixa esta pintura. */
@media (width > 60rem) {
  .hero::before { background: url("/sky-desktop.webp") left top / 100% 100% no-repeat; }
}

.hero-brand {
  grid-area: 1 / 1;
  align-self: end;
  width: min(24rem, 100% - var(--gutter));
  margin: clamp(2rem, 7vh, 5rem) 0 1.1rem var(--gutter);
  z-index: 2;
}

.hero-brand img { width: 100%; height: auto; filter: drop-shadow(0 .35rem .55rem #020e25a8) drop-shadow(0 .55rem 1rem #2986ab3b); }

.hero-scene {
  position: absolute;
  inset: 0 0 0 20%;
  background: url("/hero-desktop.webp") center / cover no-repeat;
}

.hero-scene picture { position: absolute; inset: 0 -6vw 0 6vw; }

.hero-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 40% 49%;
  mask-image: linear-gradient(90deg, transparent, black 7%);
}

.portal-rim { display: none; }

.hero-content {
  grid-area: 2 / 1;
  z-index: 2;
  margin: 0 0 clamp(2.5rem, 7vh, 5rem) var(--gutter);
  max-width: 32rem;
}

h1, h2 { font-family: var(--display); font-weight: 700; line-height: 1; letter-spacing: -.035em; }
h1 { font-size: clamp(2.65rem, 4.2vw, 5.2rem); color: var(--gold); }
.hero-copy p { max-width: 42ch; margin-top: .85rem; color: var(--muted); }

html { scrollbar-color: #b08a3a #05122e; }

.badge {
  width: fit-content;
  margin-top: clamp(1.5rem, 3.5vw, 2.5rem);
  padding: .55rem 1.1rem;
  border: 1px solid #f4ca75;
  border-radius: 999px;
  background: #061937e8;
  color: var(--gold);
  font: 700 clamp(1.15rem, 1.7vw, 1.45rem)/1.2 var(--display);
  letter-spacing: .04em;
}

/* Abaixo do hero, a página atravessa os Éons: cada capítulo veste a paleta de um bioma do jogo. */
.chapter {
  --gutter: clamp(1.25rem, 5vw, 5rem);
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
  align-items: center;
  column-gap: clamp(2.5rem, 6vw, 6.5rem);
  padding: clamp(4.5rem, 10vw, 9rem) var(--gutter) clamp(4.5rem, 10vw, 9rem) 0;
  background: var(--surface);
  color: var(--text);
}

.chapter ::selection { background: var(--heading); color: var(--surface); }

.chapter-marble {
  --surface: #ebe3d1;
  --text: #2b2a31;
  --heading: #4a3410;
  --rule: #b08a3a;
  --shade: #3d2c0b73;
}

.chapter-boreal {
  --surface: #dde7ef;
  --text: #1f3044;
  --heading: #0e2a46;
  --rule: #1f9fc0;
  --shade: #0e2a4680;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.75fr);
  padding-inline: var(--gutter) 0;
}

.chapter-boreal .chapter-art { order: 2; }

.chapter-art img {
  width: 100%;
  height: auto;
  border-radius: 0 14px 14px 0;
  box-shadow: 0 2rem 3.5rem -1.75rem var(--shade);
}

.chapter-boreal .chapter-art img { border-radius: 14px 0 0 14px; }

.chapter-text { max-width: 30rem; }
.chapter h2 { color: var(--heading); font-size: clamp(2.75rem, 5.2vw, 4.9rem); letter-spacing: -.03em; text-wrap: balance; }
.chapter h2::after { display: block; width: 3.5rem; height: 2px; margin-top: 1.4rem; background: var(--rule); content: ""; }
.chapter p { margin-top: 1.1rem; font-size: clamp(1.05rem, 1.25vw, 1.2rem); line-height: 1.6; text-wrap: pretty; }
.chapter h2 + p { margin-top: 1.6rem; }

.chapter-pair { position: relative; padding-bottom: 16%; }
.chapter-boreal .pair-inset {
  position: absolute;
  bottom: 0;
  left: -7%;
  width: 46%;
  border-radius: 12px;
  box-shadow: 0 0 0 .4rem var(--surface), 0 2.25rem 3rem -1rem var(--shade);
}

.descent {
  --gutter: clamp(1.25rem, 5vw, 5rem);
  padding-top: clamp(5rem, 11vw, 9.5rem);
  background: #170c0f;
  color: #ecd3c2;
}

.descent ::selection { background: #ff8a4c; color: #170c0f; }

.descent-text {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: end;
  gap: 1.5rem clamp(2rem, 6vw, 6rem);
  width: min(76rem, 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.descent h2 { color: #ff8a4c; font-size: clamp(3rem, 6.4vw, 6rem); letter-spacing: -.03em; text-wrap: balance; }
.descent p { max-width: 36ch; font-size: clamp(1.05rem, 1.3vw, 1.25rem); line-height: 1.6; }

.descent-art {
  position: relative;
  overflow: clip;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  view-timeline: --descent block;
}

.descent-art img { width: 100%; height: auto; }

/* Bordas que somem no escuro e a escuridão da entrada ficam em camadas por cima da imagem:
   a camada animada só muda transform, e a de cima só opacity (as duas rodam na GPU). */
.descent-art::before,
.descent-art::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  content: "";
}

.descent-art::before { background: linear-gradient(#170c0f, transparent 14%, transparent 86%, #170c0f); }
.descent-art::after { background: #170c0f; opacity: 0; }

.logos {
  padding: clamp(6rem, 13vw, 11rem) clamp(1.25rem, 5vw, 5rem);
  background: radial-gradient(ellipse 70% 90% at 50% 0%, #3b2d70, #1c1539 72%);
  color: #e4dbfb;
  text-align: center;
}

.logos { position: relative; isolation: isolate; overflow: clip; }
.logos-ring {
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  width: min(44rem, 125vw);
  translate: -50% -50%;
  fill: none;
  stroke: #ffbe42;
  stroke-width: 1;
  opacity: .2;
}

.logos ::selection { background: #ffbe42; color: #1c1539; }
.logos h2 { color: #ffbe42; font-size: clamp(3rem, 7vw, 6rem); letter-spacing: -.03em; }
.logos p {
  max-width: 30ch;
  margin: 1.75rem auto 0;
  font: 500 clamp(1.4rem, 2.4vw, 2.1rem)/1.35 var(--display);
  text-wrap: balance;
}

.closing {
  padding: clamp(14rem, 30vw, 26rem) clamp(1.25rem, 5vw, 5rem) clamp(4.5rem, 9vw, 7rem);
  background:
    linear-gradient(#05122e4d, #05122ed9 38%, var(--deep) 62%),
    url("/hero-desktop.webp") 50% 0 / cover no-repeat,
    var(--deep);
}

.closing-head { display: grid; justify-items: center; gap: 1.25rem; text-align: center; }
.closing-head img { filter: drop-shadow(0 .4rem .8rem #020e25b3); }
.closing h2 { color: var(--gold); font-size: clamp(2.6rem, 5.5vw, 5rem); letter-spacing: -.03em; text-wrap: balance; }

.faq-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.75rem, 4vw, 3.5rem);
  width: min(76rem, 100%);
  margin: clamp(3.5rem, 7vw, 5.5rem) auto 0;
}

.faq-list div { padding-top: 1.25rem; border-top: 1px solid var(--line); }
.faq-list dt { color: var(--ivory); font: 650 clamp(1.4rem, 2vw, 1.75rem)/1.15 var(--display); }
.faq-list dd { margin-top: .6rem; color: var(--muted); line-height: 1.6; }

footer { border-top: 1px solid var(--line); background: #040e25; color: var(--muted); }
.footer-layout { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.4rem; font-size: .875rem; }
.footer-layout p { font: 500 1.1rem/1.4 var(--display); letter-spacing: .02em; }
.brand { display: inline-flex; align-items: center; gap: .45rem; color: var(--gold); font: 700 1.35rem/1 var(--display); letter-spacing: .15em; text-decoration: none; }
.brand img { object-fit: contain; }

@media (max-width: 60rem) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    min-height: 0;
    background: linear-gradient(0deg, #0717378c, transparent 24%),
      url("/sky-mobile.webp") center / 100% 100% no-repeat, #071b48;
  }

  .hero::before { content: none; }

  .hero-brand {
    justify-self: center;
    width: min(66%, 19rem);
    margin: clamp(1.15rem, 4.5vw, 2rem) 0 .9rem;
  }

  .hero-scene { grid-area: 2 / 1; position: relative; inset: auto; background: none; }
  .hero-scene picture {
    --arch-height: clamp(.8rem, 5vw, 2rem);
    position: static;
    display: block;
    overflow: hidden;
    border-top: 1px solid #efc37d;
    border-radius: 50% 50% 0 0 / var(--arch-height) var(--arch-height) 0 0;
    box-shadow: 0 -4px 13px -9px #ebcb9a;
  }

  .hero-art {
    height: clamp(13.5rem, 68vw, 33rem);
    object-fit: cover;
    object-position: 7% 56%;
    mask-image: linear-gradient(0deg, transparent, black 6%);
  }

  .portal-rim {
    display: block;
    position: absolute;
    pointer-events: none;
    left: -3%;
    bottom: -.12rem;
    width: 106%;
    height: 2.65rem;
    border-bottom: 2px solid #ffdc80;
    border-radius: 0 0 50% 50% / 0 0 100% 100%;
    box-shadow: 0 6px 11px -8px #ffd77c;
  }

  .portal-rim::before {
    position: absolute;
    inset: 0 .15rem .17rem;
    content: "";
    border-radius: inherit;
    border-bottom: 2px solid #75eeff;
    box-shadow: 0 5px 10px -6px #1ecbff;
  }

  .portal-rim::after {
    position: absolute;
    left: 50%;
    bottom: -.93rem;
    width: 1.75rem;
    height: 1.95rem;
    content: "";
    transform: translateX(-50%);
    clip-path: polygon(50% 0, 58% 40%, 100% 50%, 58% 58%, 50% 100%, 42% 58%, 0 50%, 42% 40%);
    background: radial-gradient(ellipse, #fff8d5 14%, #ffe083 51%, #e49a39 78%);
  }

  .hero-content {
    grid-area: 3 / 1;
    width: min(31rem, 100% - 2.5rem);
    justify-self: center;
    margin: 1.4rem 0 2.8rem;
    text-align: center;
  }

  h1 { font-size: clamp(2.5rem, 8vw, 3.9rem); }
  .hero-copy p { margin-inline: auto; }
  .badge { margin: 1.3rem auto 0; }

  .chapter,
  .chapter-boreal { grid-template-columns: minmax(0, 1fr); padding: 0 0 clamp(3.5rem, 12vw, 5rem); }
  .chapter-boreal .chapter-art { order: 0; }
  .chapter-art img,
  .chapter-boreal .chapter-art img { border-radius: 0; box-shadow: none; }
  .chapter-text { max-width: 36rem; padding: clamp(2rem, 8vw, 3rem) var(--gutter) 0; }
  .chapter-pair { display: grid; gap: .3rem; padding-bottom: 0; }
  .chapter-boreal .pair-inset { position: static; width: 100%; border-radius: 0; box-shadow: none; }

  .descent-text { grid-template-columns: minmax(0, 1fr); }
  .descent-art img { aspect-ratio: 4 / 3; object-fit: cover; }
  .faq-list { grid-template-columns: minmax(0, 1fr); }
  .closing {
    padding-top: 15rem;
    background:
      linear-gradient(#05122e33, #05122ed9 13rem, var(--deep) 22rem),
      url("/hero-1280.webp") 58% 0 / auto 24rem no-repeat,
      var(--deep);
  }
  .footer-layout { flex-wrap: wrap; }
}

/* Um único momento de movimento: a Câmara Final sai da escuridão enquanto se desce até ela. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .descent-art img,
    .descent-art::after {
      animation: linear both;
      animation-timeline: --descent;
      animation-range: entry 0% cover 45%;
    }

    .descent-art img { animation-name: descend-zoom; will-change: transform; }
    .descent-art::after { animation-name: descend-dark; }
  }
}

@keyframes descend-zoom {
  from { transform: scale(1.12); }
  to { transform: none; }
}

@keyframes descend-dark {
  from { opacity: .55; }
  to { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* 404: a mesma noite do fechamento, sem nada além do caminho de volta. */
.lost {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1.25rem;
  min-height: 100svh;
  padding: 2rem clamp(1.25rem, 5vw, 5rem);
  background:
    linear-gradient(#05122e66, #05122ee6 55%, var(--deep)),
    url("/hero-1280.webp") 58% 0 / cover no-repeat,
    var(--deep);
  text-align: center;
}

.lost img { filter: drop-shadow(0 .4rem .8rem #020e25b3); }
.lost h1 { max-width: 16ch; font-size: clamp(2.4rem, 6vw, 4.5rem); letter-spacing: -.03em; text-wrap: balance; }
.lost p { color: var(--muted); }
.lost-link { margin-top: .5rem; color: var(--gold); font: 700 1.25rem/1.2 var(--display); }
.lost-link:hover { color: var(--ivory); }
