/* ============================================================
   DECODE — Landing page design system
   Dark-fantasy temple aesthetic: obsidian + gold, cyan accent.
   Motion is tasteful and mostly one-shot (scroll reveals) — the
   owner is motion-sensitive, so NO fast/continuous/parallax churn.
   ============================================================ */

:root {
  /* Palette (from the game's Theme) */
  --ink:        #0d0a07;   /* deepest obsidian */
  --ink-2:      #14100b;
  --surface:    #1c160f;
  --surface-2:  #271e14;
  --gold:       #d4a84b;
  --gold-deep:  #a8792b;
  --gold-pale:  #ecd8a4;
  --cyan:       #46d3e0;   /* gems / XP — accent, use sparingly */
  --jade:       #5cba7d;
  --ember:      #e0713f;
  --parchment:  #ede0c4;
  --parchment-dim: #b7a888;
  --parchment-faint: #7c715a;

  /* Type */
  --serif: "Cinzel", "Times New Roman", serif;
  --sans: "Inter", -apple-system, system-ui, sans-serif;

  /* Rhythm */
  --maxw: 1180px;
  --pad: clamp(20px, 5vw, 64px);
  --radius: 16px;

  --shadow-lg: 0 24px 60px -20px rgba(0,0,0,.75);
  --glow-gold: 0 0 40px -6px rgba(212,168,75,.45);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--ink);
  color: var(--parchment);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---- Layout helpers ---- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.section { position: relative; padding-block: clamp(72px, 12vw, 150px); }
.section--tight { padding-block: clamp(48px, 8vw, 90px); }

/* ---- Type scale ---- */
.display {
  font-family: var(--serif);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: .01em;
  font-size: clamp(2.6rem, 8vw, 6rem);
  color: var(--gold-pale);
  text-shadow: 0 2px 0 rgba(0,0,0,.6), 0 14px 40px rgba(0,0,0,.7);
}
.h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.9rem, 4.5vw, 3.2rem);
  line-height: 1.08;
  color: var(--gold-pale);
}
.eyebrow {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: .32em;
  text-transform: uppercase;
  font-size: .8rem;
  color: var(--gold);
}
.lead { font-size: clamp(1.05rem, 2.2vw, 1.35rem); color: var(--parchment-dim); }
.muted { color: var(--parchment-dim); }

/* ---- Buttons ---- */
.btn {
  --btn-bg: var(--gold);
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  font-family: var(--sans); font-weight: 700; font-size: 1.02rem;
  padding: 1rem 1.8rem; border-radius: 999px; border: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
  will-change: transform;
}
.btn--gold {
  background: linear-gradient(180deg, var(--gold-pale), var(--gold) 55%, var(--gold-deep));
  color: #211703; box-shadow: var(--glow-gold), 0 8px 20px -6px rgba(0,0,0,.6);
}
.btn--gold:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 0 55px -4px rgba(212,168,75,.6), 0 12px 28px -8px rgba(0,0,0,.7); }
.btn--ghost {
  background: rgba(255,255,255,.04); color: var(--parchment);
  border: 1px solid rgba(212,168,75,.35); backdrop-filter: blur(6px);
}
.btn--ghost:hover { border-color: var(--gold); transform: translateY(-2px); }
.btn--lg { padding: 1.15rem 2.3rem; font-size: 1.12rem; }

/* ---- Surfaces / cards ---- */
.card {
  background: linear-gradient(180deg, rgba(39,30,20,.9), rgba(20,16,11,.92));
  border: 1px solid rgba(212,168,75,.18);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.hair { height: 1px; border: 0; background: linear-gradient(90deg, transparent, rgba(212,168,75,.4), transparent); }

/* Ornamental divider (◆ between rules) */
.ornament { display: flex; align-items: center; gap: 14px; color: var(--gold); justify-content: center; }
.ornament::before, .ornament::after { content: ""; height: 1px; width: min(120px, 22vw); background: linear-gradient(90deg, transparent, var(--gold-deep)); }
.ornament::after { background: linear-gradient(90deg, var(--gold-deep), transparent); }

/* ---- Scroll reveal (one-shot; respects reduced motion) ---- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; }
}

/* Cipher glyph font (bundled from the game) for on-brand symbols */
@font-face {
  font-family: "Glyphs";
  src: url("/assets/Glyphs.ttf") format("truetype");
  font-display: swap;
}
.glyph { font-family: "Glyphs", var(--serif); }

/* Utility */
.center { text-align: center; }
.stack > * + * { margin-top: var(--stack, 1rem); }
.grid { display: grid; gap: clamp(16px, 3vw, 28px); }
