/* ============================================================
   Royalty Coding — landing page styles
   Royal palette: deep indigo/violet canvas, gold + amethyst accents.
   ============================================================ */
:root {
  --bg: #0a0820;
  --bg-2: #140a30;
  --ink: #ece8ff;
  --muted: #a79fce;
  --gold: #f5c451;
  --gold-deep: #d99b2b;
  --violet: #8a6bff;
  --violet-2: #b89bff;
  --card: rgba(255, 255, 255, .04);
  --border: rgba(180, 160, 255, .14);
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, .8);
  --maxw: 1180px;
  --font: "Inter", system-ui, sans-serif;
  --display: "Space Grotesk", var(--font);
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body[data-theme="day"] { --bg: #ece7ff; --bg-2: #dfe4ff; --ink: #1c1640; --muted: #5a5286; --border: rgba(90, 70, 160, .18); --card: rgba(20, 10, 50, .04); }

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.05; margin: 0; }
a { color: inherit; text-decoration: none; }
em { font-style: normal; color: var(--gold); }

/* ----------------------- HERO ----------------------- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 620px;
  overflow: hidden;
  background:
    radial-gradient(1200px 700px at 72% 28%, rgba(138, 107, 255, .35), transparent 60%),
    radial-gradient(900px 600px at 20% 90%, rgba(245, 196, 81, .14), transparent 55%),
    linear-gradient(160deg, var(--bg) 0%, var(--bg-2) 70%, #060417 100%);
}
#scene { position: absolute; inset: 0; z-index: 1; }
#scene canvas { display: block; }
.hero-scrim {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(90deg, rgba(6, 4, 20, .82) 0%, rgba(6, 4, 20, .35) 34%, transparent 56%);
}
body[data-theme="day"] .hero-scrim { background: linear-gradient(90deg, rgba(236, 231, 255, .9) 0%, rgba(236, 231, 255, .4) 34%, transparent 56%); }

/* nav */
.nav {
  position: absolute; z-index: 5; inset: 0 0 auto 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px clamp(18px, 5vw, 54px); gap: 18px;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark { color: var(--gold); display: grid; place-items: center; filter: drop-shadow(0 2px 8px rgba(245, 196, 81, .5)); }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 1.18rem; letter-spacing: -.01em; }
.brand-name span { color: var(--gold); }
.nav-links { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 30px); font-size: .95rem; font-weight: 500; }
.nav-links a { color: var(--muted); transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  color: var(--bg) !important; background: linear-gradient(180deg, #ffe08a, var(--gold) 60%, var(--gold-deep));
  padding: 9px 17px; border-radius: 999px; font-weight: 600;
  box-shadow: 0 8px 22px -8px rgba(245, 196, 81, .7);
}
.nav-cta:hover { filter: brightness(1.06); }

/* hero copy */
.hero-copy {
  position: absolute; z-index: 4; left: clamp(18px, 5vw, 54px); top: 50%;
  transform: translateY(-46%); max-width: min(560px, 80vw);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--violet-2);
  padding: 6px 13px; border: 1px solid var(--border); border-radius: 999px; background: var(--card);
}
.eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 12px var(--gold); }
.hero-copy h1 { font-size: clamp(2.5rem, 6.4vw, 4.6rem); letter-spacing: -.025em; margin: 20px 0 0; }
.hero-copy p { color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.18rem); line-height: 1.6; margin: 20px 0 0; max-width: 30em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 1rem;
  padding: 13px 24px; border-radius: 999px; border: 1px solid transparent; cursor: pointer; transition: transform .18s, box-shadow .25s, filter .2s; white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold { color: #1a1206; background: linear-gradient(180deg, #ffe08a, var(--gold) 55%, var(--gold-deep)); box-shadow: 0 14px 34px -12px rgba(245, 196, 81, .8); }
.btn-ghost { color: var(--ink); border-color: var(--border); background: var(--card); backdrop-filter: blur(6px); }
.btn-ghost:hover { border-color: var(--violet); }
.btn-lg { padding: 16px 30px; font-size: 1.1rem; }

.hero-meta { display: flex; gap: clamp(20px, 4vw, 44px); margin-top: 38px; }
.hero-meta div { display: flex; flex-direction: column; }
.hero-meta strong { font-family: var(--display); font-size: 1.5rem; }
.hero-meta span { color: var(--muted); font-size: .82rem; margin-top: 2px; }

/* stage tools */
.stage-tools {
  position: absolute; z-index: 5; right: clamp(16px, 4vw, 40px); bottom: 84px;
  display: flex; flex-direction: column; gap: 10px; align-items: flex-end;
}
.stage-tools button {
  font-family: var(--font); font-size: .9rem; font-weight: 600; color: var(--ink);
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 15px; cursor: pointer; backdrop-filter: blur(10px);
  display: inline-flex; align-items: center; gap: 8px; transition: border-color .2s, transform .15s, background .2s;
}
.stage-tools button:hover { border-color: var(--gold); transform: translateX(-3px); }
.stage-tools button.active { background: linear-gradient(180deg, rgba(245, 196, 81, .25), rgba(245, 196, 81, .08)); border-color: var(--gold); }
.stage-hint {
  position: absolute; z-index: 5; right: clamp(16px, 4vw, 40px); bottom: 40px;
  font-size: .82rem; color: var(--muted);
}
.stage-hint span { color: var(--gold); font-weight: 600; }

/* loader */
.loader {
  position: absolute; inset: 0; z-index: 20; display: grid; place-content: center; gap: 16px; justify-items: center;
  background: linear-gradient(160deg, var(--bg), #060417); transition: opacity .6s ease, visibility .6s;
}
.loader.hidden { opacity: 0; visibility: hidden; }
.loader-crown { font-size: 3rem; color: var(--gold); animation: bob 1.6s ease-in-out infinite; filter: drop-shadow(0 6px 20px rgba(245, 196, 81, .6)); }
.loader-bar { width: 180px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.loader-bar span { display: block; height: 100%; width: 40%; border-radius: 4px; background: linear-gradient(90deg, var(--violet), var(--gold)); animation: slide 1.2s ease-in-out infinite; }
.loader-text { color: var(--muted); font-size: .88rem; letter-spacing: .04em; }
@keyframes bob { 50% { transform: translateY(-10px); } }
@keyframes slide { 0% { transform: translateX(-120%); } 100% { transform: translateX(360%); } }

/* ----------------------- SECTIONS ----------------------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(70px, 11vw, 140px) clamp(18px, 5vw, 40px); }
.section-head { max-width: 720px; margin-bottom: 46px; }
.kicker { font-size: .8rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--violet-2); }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 3rem); letter-spacing: -.02em; margin-top: 14px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.card { padding: 30px; border: 1px solid var(--border); border-radius: 20px; background: var(--card); transition: transform .25s, border-color .25s; }
.card:hover { transform: translateY(-6px); border-color: var(--gold); }
.card-ico { font-size: 1.8rem; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(160deg, rgba(138, 107, 255, .25), rgba(245, 196, 81, .12)); }
.card h3 { font-size: 1.28rem; margin: 18px 0 8px; }
.card p { color: var(--muted); line-height: 1.6; margin: 0; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; counter-reset: s; }
.steps li { padding: 26px; border-radius: 18px; border: 1px solid var(--border); background: var(--card); }
.steps span { font-family: var(--mono); font-size: 1.1rem; color: var(--gold); }
.steps h3 { font-size: 1.3rem; margin: 12px 0 8px; }
.steps p { color: var(--muted); margin: 0; line-height: 1.6; }

.cta { padding: clamp(70px, 12vw, 150px) clamp(18px, 5vw, 40px); text-align: center; background: radial-gradient(800px 400px at 50% 0%, rgba(138, 107, 255, .22), transparent 60%); }
.cta-inner { max-width: 660px; margin: 0 auto; }
.cta h2 { font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: -.02em; }
.cta p { color: var(--muted); font-size: 1.15rem; margin: 18px auto 32px; max-width: 40em; line-height: 1.6; }

.footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 30px clamp(18px, 5vw, 40px); border-top: 1px solid var(--border); max-width: var(--maxw); margin: 0 auto; }
.footer-copy { color: var(--muted); font-size: .86rem; }

@media (max-width: 780px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .hero-copy { top: auto; bottom: 130px; transform: none; }
  .hero-scrim { background: linear-gradient(0deg, rgba(6, 4, 20, .9) 12%, rgba(6, 4, 20, .35) 50%, transparent 78%); }
  .stage-tools { bottom: auto; top: 76px; }
  .hero-meta { display: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
