/* ============================================================
   Cap of Crowns — landing page
   Palette mirrors the in-game UI tokens (Global.uss)
   ============================================================ */

:root {
  --ink: rgb(240, 238, 232);
  --ink-soft: rgb(178, 173, 163);
  --ink-mute: rgb(124, 119, 112);

  --night: rgb(14, 12, 18);
  --night-2: rgb(20, 18, 25);
  --card: rgb(30, 28, 38);
  --card-edge: rgb(58, 52, 68);

  --gold: rgb(220, 185, 85);
  --gold-deep: rgb(175, 145, 65);
  --gold-dim: rgb(120, 100, 50);

  --display: "Lilita One", "Trebuchet MS", sans-serif;
  --royal: "Cinzel", "Times New Roman", serif;
  --body: "Nunito", "Segoe UI", sans-serif;

  --maxw: 1080px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--night);
  background-image:
    radial-gradient(1200px 700px at 50% -10%, rgba(220, 185, 85, 0.10), transparent 60%),
    radial-gradient(900px 600px at 85% 35%, rgba(50, 82, 135, 0.10), transparent 60%),
    radial-gradient(800px 700px at 10% 75%, rgba(175, 145, 65, 0.06), transparent 60%),
    linear-gradient(rgb(16, 14, 21), rgb(12, 10, 16));
  background-attachment: fixed;
  overflow-x: hidden;
}

/* faint grain so large dark areas don't band */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--gold); }

/* ---------- type ---------- */

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.12; letter-spacing: 0.01em; }
h2 { font-size: clamp(2rem, 4.5vw, 3rem); }
h3 { font-size: 1.35rem; }

.eyebrow {
  font-family: var(--royal);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.eyebrow::before, .eyebrow::after { content: "—"; color: var(--gold-dim); margin: 0 0.6em; }

.gild {
  background: linear-gradient(175deg, #f4d77b 20%, #dcb955 55%, #a8842f 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  padding: 0.78em 1.7em;
  border-radius: 14px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.btn:active { transform: translateY(2px); }

.btn--gold {
  color: rgb(46, 32, 8);
  background: linear-gradient(180deg, #f3d97e, #dcb955 45%, #c19a3e);
  box-shadow:
    0 3px 0 #8a6a26,
    0 10px 24px rgba(220, 185, 85, 0.22),
    inset 0 1px 0 rgba(255, 245, 200, 0.8);
  text-shadow: 0 1px 0 rgba(255, 240, 190, 0.5);
}
.btn--gold:hover { transform: translateY(-2px); box-shadow: 0 5px 0 #8a6a26, 0 16px 32px rgba(220, 185, 85, 0.3), inset 0 1px 0 rgba(255, 245, 200, 0.8); }

.btn--ghost {
  color: var(--ink);
  border: 2px solid var(--card-edge);
  background: rgba(34, 32, 42, 0.6);
}
.btn--ghost:hover { border-color: var(--gold-deep); color: var(--gold); transform: translateY(-2px); }

.btn--sm { font-size: 0.92rem; padding: 0.55em 1.2em; }

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1.6rem;
  padding: 0.7rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(14, 12, 18, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(220, 185, 85, 0.14);
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--display);
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}
.nav__brand img { border-radius: 9px; box-shadow: 0 0 0 1px rgba(220, 185, 85, 0.35); }
.nav__links { display: flex; gap: 1.4rem; }
.nav__links a {
  font-family: var(--royal);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.15s ease;
}
.nav__links a:hover { color: var(--gold); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: clamp(3rem, 7vw, 5.5rem) 1.25rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__glow {
  position: absolute;
  top: -8%;
  left: 50%;
  transform: translateX(-50%);
  width: min(920px, 130vw);
  aspect-ratio: 1.4;
  background: radial-gradient(closest-side, rgba(220, 185, 85, 0.16), rgba(220, 185, 85, 0.05) 55%, transparent 75%);
  pointer-events: none;
}

.hero__sparks span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 7px;
  height: 7px;
  background: var(--gold);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: twinkle 3.4s ease-in-out var(--d) infinite;
  pointer-events: none;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.12; transform: scale(0.7) rotate(0deg); }
  50% { opacity: 0.9; transform: scale(1.25) rotate(45deg); }
}

.hero__logo {
  width: clamp(240px, 42vw, 420px);
  height: auto;
  margin-top: 1.2rem;
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 60px rgba(220, 185, 85, 0.18));
  animation: heroFloat 7s ease-in-out infinite;
}
@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero__tagline {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  margin-top: 0.5rem;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.6);
}
.hero__tagline em {
  font-style: normal;
  background: linear-gradient(175deg, #f4d77b 20%, #dcb955 55%, #a8842f 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__sub {
  max-width: 600px;
  margin-top: 1.1rem;
  color: var(--ink-soft);
  font-size: 1.08rem;
}

.hero__cta { display: flex; flex-wrap: wrap; gap: 0.9rem; justify-content: center; margin-top: 1.9rem; }

.hero__note {
  margin-top: 1.1rem;
  font-family: var(--royal);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.hero__castle { position: relative; margin-top: 1.5rem; }
.hero__castle img {
  width: clamp(250px, 38vw, 380px);
  animation: castleBob 6s ease-in-out infinite;
  filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.55));
}
@keyframes castleBob {
  0%, 100% { transform: translateY(0) rotate(-0.4deg); }
  50% { transform: translateY(-14px) rotate(0.4deg); }
}
.hero__castle-shadow {
  width: 58%;
  height: 26px;
  margin: -30px auto 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.5), transparent 70%);
  animation: shadowPulse 6s ease-in-out infinite;
}
@keyframes shadowPulse {
  0%, 100% { transform: scaleX(1); opacity: 0.85; }
  50% { transform: scaleX(0.82); opacity: 0.55; }
}

/* ---------- sections ---------- */

.section {
  position: relative;
  z-index: 2;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(4rem, 9vw, 7rem) 1.25rem 0;
}
.section__head { text-align: center; margin-bottom: 2.8rem; }
.section__head h2 { margin-top: 0.7rem; }

/* features grid */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.2rem;
}
.card {
  position: relative;
  background: linear-gradient(180deg, rgb(36, 34, 45), rgb(26, 24, 33));
  border: 1px solid var(--card-edge);
  border-radius: 18px;
  padding: 1.8rem 1.6rem 1.7rem;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(220, 185, 85, 0.55), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.card:hover {
  transform: translateY(-5px);
  border-color: rgba(185, 160, 95, 0.7);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.45), 0 0 36px rgba(220, 185, 85, 0.08);
}
.card:hover::before { opacity: 1; }

.card__icon {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin-bottom: 1rem;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.45));
}
.card__icon--glyph {
  display: grid;
  place-items: center;
  font-size: 2.4rem;
  width: 72px;
  height: 72px;
  margin-bottom: 1rem;
  border-radius: 16px;
  background: rgba(220, 185, 85, 0.1);
  border: 1px solid rgba(220, 185, 85, 0.25);
}
.card h3 { color: var(--gold); margin-bottom: 0.55rem; }
.card p { color: var(--ink-soft); font-size: 0.98rem; }

/* characters */
.section--characters { text-align: center; }
.chars {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(1rem, 4vw, 3rem);
}
.char { width: clamp(150px, 22vw, 220px); }
.char--mid { width: clamp(170px, 25vw, 250px); }
.char img {
  transition: transform 0.25s ease;
  filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.5));
}
.char:hover img { transform: translateY(-8px) scale(1.04) rotate(-1deg); }
.char figcaption { margin-top: 0.8rem; }
.char figcaption strong { display: block; font-family: var(--display); font-weight: 400; font-size: 1.15rem; color: var(--gold); }
.char figcaption span { font-size: 0.88rem; color: var(--ink-mute); font-style: italic; }

/* latest update */
.update {
  background:
    linear-gradient(180deg, rgba(220, 185, 85, 0.07), transparent 40%),
    linear-gradient(180deg, rgb(34, 32, 42), rgb(24, 22, 30));
  border: 1px solid var(--card-edge);
  border-radius: 22px;
  padding: clamp(1.8rem, 5vw, 3.2rem);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}
.update__head { margin-bottom: 1.6rem; }
.update__head h2 { margin-top: 0.5rem; }
.update__list { list-style: none; display: grid; gap: 0.7rem; }
.update__list li {
  position: relative;
  padding-left: 1.9rem;
  color: var(--ink-soft);
}
.update__list li::before {
  content: "♦";
  position: absolute;
  left: 0.2rem;
  color: var(--gold-deep);
}
.update__note {
  margin-top: 1.6rem;
  font-size: 0.9rem;
  color: var(--ink-mute);
  border-top: 1px solid var(--card-edge);
  padding-top: 1.1rem;
}

/* ---------- beta / decree ---------- */

.section--beta { padding-bottom: clamp(4rem, 8vw, 6rem); }

.decree {
  position: relative;
  text-align: center;
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(220, 185, 85, 0.1), transparent 70%),
    linear-gradient(180deg, rgb(36, 34, 45), rgb(22, 20, 28));
  border: 1px solid rgba(185, 160, 95, 0.45);
  border-radius: 26px;
  padding: clamp(3.2rem, 6vw, 4.5rem) clamp(1.4rem, 5vw, 4rem) clamp(2.2rem, 5vw, 3.2rem);
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.5),
    inset 0 0 0 1px rgba(0, 0, 0, 0.4),
    inset 0 0 60px rgba(220, 185, 85, 0.04);
}
.decree__seal {
  position: absolute;
  top: -38px;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px;
  border-radius: 50%;
  background: linear-gradient(180deg, #f3d97e, #a8842f);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.55);
}
.decree__seal img { border-radius: 50%; }
.decree h2 { margin-top: 0.7rem; }
.decree__lead { max-width: 560px; margin: 1rem auto 0; color: var(--ink-soft); }

.steps {
  list-style: none;
  text-align: left;
  max-width: 640px;
  margin: 2.6rem auto 0;
  display: grid;
  gap: 1.4rem;
}
.step {
  display: flex;
  gap: 1.3rem;
  background: rgba(14, 12, 18, 0.55);
  border: 1px solid var(--card-edge);
  border-radius: 18px;
  padding: 1.5rem 1.6rem;
}
.step__num {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-family: var(--royal);
  font-weight: 700;
  font-size: 1.3rem;
  color: rgb(46, 32, 8);
  background: linear-gradient(180deg, #f3d97e, #c19a3e);
  box-shadow: 0 4px 12px rgba(220, 185, 85, 0.3);
}
.step h3 { color: var(--ink); margin-bottom: 0.4rem; }
.step p { color: var(--ink-soft); font-size: 0.97rem; }
.step .btn { margin-top: 0.9rem; }
.step__fine { margin-top: 0.7rem; font-size: 0.82rem !important; color: var(--ink-mute) !important; }

.decree__fine { margin-top: 2.2rem; font-size: 0.9rem; color: var(--ink-mute); }

/* ---------- footer ---------- */

.footer {
  position: relative;
  z-index: 2;
  margin-top: clamp(3rem, 7vw, 5rem);
  border-top: 1px solid rgba(220, 185, 85, 0.14);
  padding: 2.8rem 1.25rem 2.4rem;
  text-align: center;
  background: rgba(10, 9, 13, 0.6);
}
.footer__brand { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; }
.footer__brand img { opacity: 0.9; }
.footer__brand p { font-family: var(--royal); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-mute); }
.footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.6rem; margin-top: 1.4rem; }
.footer__links a { color: var(--ink-soft); text-decoration: none; font-size: 0.9rem; }
.footer__links a:hover { color: var(--gold); }
.footer__fine { margin-top: 1.4rem; font-size: 0.78rem; color: var(--ink-mute); max-width: 560px; margin-inline: auto; }

/* ---------- legal pages ---------- */

.nav__back {
  font-family: var(--royal);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  margin-left: auto;
  transition: color 0.15s ease;
}
.nav__back:hover { color: var(--gold); }

.legal {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(2.6rem, 6vw, 4.5rem) 1.25rem clamp(3rem, 6vw, 4.5rem);
}

.legal__head { text-align: center; margin-bottom: 2.4rem; }
.legal__head h1 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: 0.01em;
  font-size: clamp(1.7rem, 3.5vw, 2.3rem);
  margin-top: 0.6rem;
}

.legal__meta {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.4rem;
  margin: 1.4rem auto 0;
  padding: 0.9rem 1.4rem;
  border: 1px solid var(--card-edge);
  border-radius: 14px;
  background: rgba(14, 12, 18, 0.5);
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.legal__meta strong { color: var(--gold-deep); font-weight: 800; }

/* prose body */
.legal__body { font-size: 0.94rem; line-height: 1.7; }
.legal__body h2 {
  font-family: var(--royal);
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: 0.02em;
  color: var(--gold);
  margin: 2.2rem 0 0.6rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--card-edge);
}
.legal__body p { margin: 0.75rem 0; color: var(--ink); }
.legal__body ul, .legal__body ol { margin: 0.75rem 0; padding-left: 1.5rem; }
.legal__body li { margin: 0.4rem 0; color: var(--ink-soft); }
.legal__body li::marker { color: var(--gold-dim); }
.legal__body strong { color: var(--ink); font-weight: 800; }
.legal__body a { color: var(--gold); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--gold-dim); }
.legal__body a:hover { text-decoration-color: var(--gold); }

/* ---------- reveal-on-scroll ---------- */

.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 0.9, 0.3, 1); }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__logo, .hero__castle img, .hero__castle-shadow, .hero__sparks span { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */

@media (max-width: 720px) {
  .nav__links { display: none; }
  .step { flex-direction: column; gap: 0.9rem; }
  .step__num { width: 44px; height: 44px; font-size: 1.1rem; }
}
