/* CELESTIAIS - game presentation for new beta testers (celestiais.com/conheca). Builds on the release
   notes stylesheet (/novidades/styles.css: tokens, fonts, top bar, buttons, cards) and adds the landing
   layout. Static page: no scripts. All motion is CSS and stops under prefers-reduced-motion. */

.wrap.wide { width: min(1180px, 100%); }
.landing section { padding: 0; }
.landing footer { margin-top: 0; }

.kicker {
  margin: 0 0 10px; font-family: var(--display); font-size: 13px; font-weight: 700;
  letter-spacing: 0.24em; text-transform: uppercase; color: var(--accent);
}
.band { padding: clamp(64px, 10vw, 120px) 0 0 !important; }
.band:last-of-type { padding-bottom: clamp(64px, 10vw, 120px) !important; }
.section-head.center { text-align: center; margin: 0 auto 36px; max-width: 720px; }
.section-head.center p { margin-left: auto; margin-right: auto; }
.band h2 { font-size: clamp(28px, 4.4vw, 42px); font-weight: 800; }
.band p { color: var(--muted); }
.band p strong { color: var(--text); }

.btn.glass { background: rgba(6, 11, 31, 0.45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

/* ---- opening ------------------------------------------------------------------------------ */
.opening {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(92svh, 900px); display: flex; align-items: center;
  padding: 96px 0 120px !important;
}
.opening-art, .opening-art img {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2;
}
.opening-art img { object-fit: cover; object-position: 62% 50%; animation: drift 38s ease-in-out infinite alternate; transform-origin: 65% 45%; }
/* Darken the left side and the bottom so the text reads over the art. */
.opening::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(6, 11, 31, 0.92) 0%, rgba(6, 11, 31, 0.7) 34%, rgba(6, 11, 31, 0.08) 64%, transparent 100%),
    linear-gradient(0deg, var(--space-950) 0%, rgba(6, 11, 31, 0) 28%);
}
.stars {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 8% 22%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 26% 68%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 44% 14%, #cfe6ff 50%, transparent 51%),
    radial-gradient(1px 1px at 58% 82%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 81% 12%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 92% 58%, #cfe6ff 50%, transparent 51%);
  animation: twinkle 5s ease-in-out infinite alternate;
}
.opening-content { position: relative; }
.opening .logo { width: min(380px, 80%); height: auto; display: block; margin-bottom: 26px; filter: drop-shadow(0 6px 26px rgba(63, 224, 255, 0.35)); }
.opening h1 { font-size: clamp(34px, 5.4vw, 58px); max-width: 14ch; text-shadow: 0 4px 30px rgba(0, 0, 0, 0.6); }
.opening .lead { color: #c9d8f4; max-width: 46ch; text-shadow: 0 2px 16px rgba(0, 0, 0, 0.7); }
.invite-note { margin: 22px 0 0; font-size: 15px; color: var(--muted); max-width: 48ch; }
.invite-note strong { color: var(--text); }
.opening-content > * { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.opening-content > :nth-child(2) { animation-delay: 0.08s; }
.opening-content > :nth-child(3) { animation-delay: 0.16s; }
.opening-content > :nth-child(4) { animation-delay: 0.24s; }
.opening-content > :nth-child(5) { animation-delay: 0.32s; }
.opening-content > :nth-child(6) { animation-delay: 0.4s; }

.scroll-cue {
  position: absolute; left: 50%; bottom: 28px; translate: -50% 0;
  width: 30px; height: 48px; border-radius: 999px; border: 2px solid var(--border-strong);
  display: grid; justify-items: center; padding-top: 8px;
}
.scroll-cue span { width: 4px; height: 10px; border-radius: 4px; background: var(--accent); animation: cue 1.8s ease-in-out infinite; }

/* Phones in portrait get the tall art: text sits at the top, over the darker sky. */
@media (max-width: 700px) and (orientation: portrait) {
  .opening { align-items: flex-start; min-height: 100svh; padding-top: 40px !important; }
  .opening-art img { object-position: 50% 100%; transform-origin: 50% 80%; }
  .opening::before {
    background:
      linear-gradient(180deg, rgba(6, 11, 31, 0.94) 0%, rgba(6, 11, 31, 0.78) 40%, rgba(6, 11, 31, 0.1) 70%, transparent 100%),
      linear-gradient(0deg, var(--space-950) 0%, rgba(6, 11, 31, 0) 18%);
  }
  .opening .logo { width: min(260px, 70%); margin-bottom: 18px; }
  .opening .lead { margin: 14px 0 22px; }
}
@media (max-width: 700px) {
  .opening::before {
    background:
      linear-gradient(180deg, rgba(6, 11, 31, 0.94) 0%, rgba(6, 11, 31, 0.82) 55%, rgba(6, 11, 31, 0.2) 82%, transparent 100%),
      linear-gradient(0deg, var(--space-950) 0%, rgba(6, 11, 31, 0) 18%);
  }
  .scroll-cue { display: none; }
  .invite-note {
    padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border);
    background: rgba(6, 11, 31, 0.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  }
}

/* ---- what it is --------------------------------------------------------------------------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.split-text h2 { margin-bottom: 18px; max-width: 20ch; }
.split-art { margin: 0; }
.split-art img, .chapter-art img {
  display: block; width: 100%; height: auto; border-radius: var(--radius);
  border: 1px solid var(--border); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(63, 224, 255, 0.06);
}
.pills { list-style: none; margin: 26px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.pills li {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--panel); font-size: 15px; font-weight: 700; color: var(--text);
}
.pills span { color: var(--accent); }

/* ---- races -------------------------------------------------------------------------------- */
.races { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.5vw, 28px); }
@media (max-width: 900px) { .races { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; } }
.race {
  --race: var(--accent);
  position: relative; padding: 0 clamp(18px, 2.4vw, 26px) clamp(20px, 3vw, 28px);
  border-radius: 24px; border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(14, 26, 64, 0.25), var(--panel) 46%);
  transition: border-color 0.3s, translate 0.3s, box-shadow 0.3s;
}
.race:hover { border-color: var(--race); translate: 0 -4px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 40px color-mix(in srgb, var(--race) 25%, transparent); }
.race.florantis { --race: #55e39a; }
.race.ferrox { --race: #ff8a3d; }
.race.astryl { --race: #b48cff; }
.race-art { margin: -8px -6px 6px; aspect-ratio: 1; display: grid; place-items: center; }
.race-art img {
  width: 100%; height: auto; border-radius: 50%;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 58%, transparent 71%);
  mask-image: radial-gradient(circle at 50% 50%, #000 58%, transparent 71%);
}
.race h3 { font-size: 26px; font-weight: 800; color: var(--race); }
.race-tag { margin: 2px 0 14px; font-family: var(--display); font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim) !important; }
.race-traits { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; color: var(--muted); font-size: 16px; }
.race-traits strong { color: var(--text); }

/* ---- journey ------------------------------------------------------------------------------ */
.eras {
  list-style: none; margin: 0 auto clamp(40px, 6vw, 64px); padding: 0; max-width: 900px;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; counter-reset: era;
}
.eras li {
  position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border-radius: 14px; border: 1px solid var(--border); background: var(--panel);
  font-family: var(--display); font-weight: 700; font-size: 15px; line-height: 1.25;
}
.eras span {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(63, 224, 255, 0.12); color: var(--accent); font-size: 14px;
}
.eras li:last-child { border-color: rgba(242, 193, 78, 0.5); }
.eras li:last-child span { background: rgba(242, 193, 78, 0.16); color: var(--gold); }
@media (max-width: 760px) { .eras { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.chapter {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 60px);
  align-items: center; margin-bottom: clamp(48px, 8vw, 96px);
}
.chapter:last-child { margin-bottom: 0; }
.chapter.flip .chapter-art { order: 2; }
@media (max-width: 900px) {
  .chapter { grid-template-columns: 1fr; }
  .chapter.flip .chapter-art { order: 0; }
}
.chapter-art { margin: 0; overflow: hidden; border-radius: var(--radius); }
.chapter-art img { transition: transform 1.2s cubic-bezier(0.2, 0.7, 0.2, 1); }
.chapter:hover .chapter-art img { transform: scale(1.04); }
.chapter-text h3 { font-size: clamp(24px, 3.2vw, 32px); font-weight: 800; margin-bottom: 12px; }

/* ---- more --------------------------------------------------------------------------------- */
.features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.features h3 { font-size: 19px; font-weight: 800; margin: 12px 0 6px; }
.features p { margin: 0; font-size: 16px; }
.f-icon {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(63, 224, 255, 0.18), rgba(122, 75, 255, 0.2));
  color: var(--accent); font-size: 20px; border: 1px solid var(--border);
}

/* ---- first steps -------------------------------------------------------------------------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.steps li {
  display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start;
  padding: 20px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--panel);
}
.steps .n {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--display); font-weight: 800; font-size: 19px; color: var(--space-950);
  background: linear-gradient(180deg, #5ce7ff, var(--accent-strong)); box-shadow: 0 4px 18px var(--glow);
}
.steps h3 { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.steps p { margin: 0; font-size: 16px; }
.center-tip { max-width: 720px; margin: 28px auto 0; }

/* ---- beta --------------------------------------------------------------------------------- */
.beta-card {
  display: grid; grid-template-columns: minmax(0, 1.3fr) auto; gap: 28px; align-items: center;
  padding: clamp(24px, 4vw, 44px); border-radius: 26px; border: 1px solid var(--border-strong);
  background:
    radial-gradient(40rem 20rem at 100% 0%, rgba(122, 75, 255, 0.3), transparent 70%),
    radial-gradient(30rem 20rem at 0% 100%, rgba(63, 224, 255, 0.16), transparent 70%),
    var(--panel-strong);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}
.beta-card h2 { margin-bottom: 12px; }
.beta-card p:last-child { margin-bottom: 0; }
.beta-card .cta { flex-direction: column; align-items: stretch; }
@media (max-width: 820px) { .beta-card { grid-template-columns: 1fr; } .beta-card .cta { flex-direction: row; } }


/* ---- motion ------------------------------------------------------------------------------- */
@keyframes drift { from { transform: scale(1.02) translate(0, 0); } to { transform: scale(1.1) translate(-1.2%, -0.8%); } }
@keyframes twinkle { from { opacity: 0.25; } to { opacity: 0.9; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes cue { 0%, 100% { transform: translateY(0); opacity: 1; } 60% { transform: translateY(14px); opacity: 0; } }
@keyframes bob { from { transform: translateY(-8px) rotate(-0.6deg); } to { transform: translateY(8px) rotate(0.6deg); } }

.float { animation: bob 6s ease-in-out infinite alternate; }
.float.slow { animation-duration: 7.5s; }
.float.delay-1 { animation-delay: -2.5s; }
.float.delay-2 { animation-delay: -5s; }

/* Sections fade in as they scroll into view, where the browser supports scroll-driven animations.
   Elsewhere they are simply visible. */
@supports (animation-timeline: view()) {
  .reveal {
    animation: rise linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 40%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .opening-art img, .stars, .scroll-cue span, .float, .opening-content > *, .reveal { animation: none !important; }
  .race, .chapter-art img { transition: none; }
  .race:hover { translate: none; }
  .chapter:hover .chapter-art img { transform: none; }
}
