:root {
  /* Light theme (default) */
  --bg: #ffffff;
  --bg-2: #f5f7fa;
  --card: #ffffff;
  --border: #e6e9ef;
  --text: #10131a;
  --muted: #5b6472;
  --gold: #c9962f;
  --gold-2: #e0aa3c;
  --accent: #2f6bff;
  --danger: #e5484d;
  --nav-bg: rgba(255, 255, 255, 0.78);
  --shadow: 0 30px 60px rgba(20, 30, 60, 0.12);
  --radius: 16px;
}

/* Dark theme: applied on system preference (unless forced light) or explicit toggle */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0d12; --bg-2: #12151d; --card: #161a24; --border: #242a38;
    --text: #f4f6fb; --muted: #9aa3b5; --gold: #e8b84b; --gold-2: #f5c451;
    --accent: #4c8dff; --danger: #ff5c5c;
    --nav-bg: rgba(11, 13, 18, 0.72); --shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
  }
}
:root[data-theme="dark"] {
  --bg: #0b0d12; --bg-2: #12151d; --card: #161a24; --border: #242a38;
  --text: #f4f6fb; --muted: #9aa3b5; --gold: #e8b84b; --gold-2: #f5c451;
  --accent: #4c8dff; --danger: #ff5c5c;
  --nav-bg: rgba(11, 13, 18, 0.72); --shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.wrap { width: 100%; margin: 0; padding: 0 clamp(20px, 5vw, 72px); }
.narrow { max-width: 900px; margin: 0 auto; }

/* Wordmark */
.wordmark {
  font-family: "Caveat", cursive;
  font-weight: 700;
  background: linear-gradient(120deg, var(--gold-2), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}

/* Nav */
header.nav {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(12px);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand .mark { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; display: block; }
.brand .wordmark { font-size: 32px; }
.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a { color: var(--muted); font-size: 15px; }
.nav-links a:hover { color: var(--text); }
.btn {
  display: inline-block; padding: 11px 20px; border-radius: 999px; font-weight: 600; font-size: 15px;
  background: linear-gradient(120deg, var(--gold-2), var(--gold)); color: #1a1406;
  border: none; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 26px rgba(232,184,75,.28); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn.ghost:hover { border-color: var(--gold); box-shadow: none; }

.theme-toggle { width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--border);
  background: transparent; color: var(--text); display: grid; place-items: center; cursor: pointer; transition: border-color .15s ease; }
.theme-toggle:hover { border-color: var(--gold); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .sun { display: none; }
.theme-toggle .moon { display: block; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: none; }
}

/* Hero */
.hero { position: relative; overflow: hidden; padding: 90px 0 60px; }
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto -10%; height: 620px;
  background:
    radial-gradient(600px 300px at 20% 20%, rgba(232,88,59,.18), transparent 70%),
    radial-gradient(600px 320px at 80% 10%, rgba(76,141,255,.18), transparent 70%),
    radial-gradient(500px 300px at 60% 80%, rgba(76,220,120,.10), transparent 70%);
  filter: blur(10px); z-index: 0;
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-block; font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold); border: 1px solid var(--border); padding: 6px 12px; border-radius: 999px; margin-bottom: 22px; }
.hero h1 { font-size: 54px; line-height: 1.05; letter-spacing: -0.02em; margin-bottom: 20px; }
.hero h1 .accent { background: linear-gradient(120deg, var(--gold-2), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 19px; color: var(--muted); max-width: 520px; margin-bottom: 30px; }
.cta-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.store-badge {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 14px;
  background: #000; border: 1px solid var(--border); color: #fff;
}
.store-badge small { display: block; font-size: 11px; color: var(--muted); line-height: 1; }
.store-badge strong { font-size: 17px; }
.soon { font-size: 13px; color: var(--muted); }

/* Real app screenshot in a device frame */
.hero-shot-wrap { display: flex; justify-content: center; }
.hero-shot {
  width: 300px; max-width: 100%; display: block;
  border-radius: 40px; border: 9px solid #05070c;
  box-shadow: 0 40px 80px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.05);
}

/* Phone mock (unused; kept for reference) */
.phone {
  position: relative; width: 280px; height: 570px; margin: 0 auto;
  border-radius: 42px; background: linear-gradient(160deg, #1c2130, #0d1017);
  border: 1px solid var(--border); box-shadow: 0 40px 80px rgba(0,0,0,.5), inset 0 0 0 6px #05070c;
  padding: 18px 14px; overflow: hidden;
}
.phone .notch { width: 120px; height: 26px; background: #05070c; border-radius: 0 0 16px 16px; margin: 0 auto 14px; }
/* The phone is a fixed dark UI regardless of page theme */
.mock-value { text-align: center; margin: 18px 0 22px; }
.mock-value .lbl { color: #9aa3b5; font-size: 12px; }
.mock-value .big { font-size: 38px; font-weight: 800; color: #f4f6fb; }
.mock-value .chg { color: #57d98a; font-size: 14px; }

.mock-cards { display: flex; gap: 9px; padding: 2px; overflow: hidden; }
.mini-card { flex: 0 0 88px; height: 120px; border-radius: 9px; padding: 5px;
  display: flex; flex-direction: column; gap: 4px; position: relative; overflow: hidden;
  border: 1px solid rgba(255,255,255,.16); background: linear-gradient(160deg, #1b2130, #10131c); }
.mini-card .mc-head { display: flex; justify-content: space-between; align-items: center; }
.mini-card .mc-type { width: 13px; height: 13px; border-radius: 50%; display: grid; place-items: center; font-size: 8px; color: #0c0c0c; font-weight: 800; }
.mini-card .mc-hp { font-size: 8px; font-weight: 800; color: #f4f6fb; }
.mini-card .mc-art { flex: 1; border-radius: 5px; position: relative; overflow: hidden; }
.mini-card .mc-art::before { content: ""; position: absolute; inset: 0;
  background: conic-gradient(from 210deg, rgba(255,255,255,.05), rgba(255,255,255,.22), rgba(255,255,255,.05), rgba(255,255,255,.18), rgba(255,255,255,.05)); mix-blend-mode: overlay; }
.mini-card .mc-foot { display: flex; justify-content: space-between; align-items: center; }
.mini-card .mc-grade { font-size: 7px; font-weight: 800; color: #0c0c0c; background: var(--gold-2); border-radius: 3px; padding: 1px 4px; }
.mini-card .mc-price { font-size: 11px; font-weight: 800; color: var(--gold-2); }
.mini-card.g1 { background: linear-gradient(160deg, #3a2a12, #17110a); }
.mini-card.g1 .mc-type { background: #ff7a3c; } .mini-card.g1 .mc-art { background: radial-gradient(circle at 50% 35%, #b3521f, #2a160a); }
.mini-card.g2 { background: linear-gradient(160deg, #12233a, #0a1220); }
.mini-card.g2 .mc-type { background: #4fb0ff; } .mini-card.g2 .mc-art { background: radial-gradient(circle at 50% 35%, #1f5fb3, #0a1622); }
.mini-card.g3 { background: linear-gradient(160deg, #2a1233, #150a1a); }
.mini-card.g3 .mc-type { background: #c77dff; } .mini-card.g3 .mc-art { background: radial-gradient(circle at 50% 35%, #7b2fb3, #1a0a22); }

.mock-row { display: flex; gap: 9px; margin-top: 14px; }
.mock-stat { flex: 1; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: 11px; }
.mock-stat .k { color: #9aa3b5; font-size: 11px; }
.mock-stat .v { font-size: 18px; font-weight: 700; color: #f4f6fb; }

/* Sections */
section { padding: 74px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-head h2 { font-size: 38px; letter-spacing: -0.02em; margin-bottom: 14px; }
.section-head p { color: var(--muted); font-size: 18px; }

/* Features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; transition: border-color .15s ease, transform .15s ease; }
.feature:hover { border-color: var(--gold); transform: translateY(-3px); }
.feature .ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px;
  background: rgba(232,184,75,.12); border: 1px solid rgba(232,184,75,.28); color: var(--gold); }
.feature .ico svg { width: 24px; height: 24px; }
.step .dot svg { width: 24px; height: 24px; color: var(--accent); }
.store-badge svg { width: 22px; height: 22px; }
.feature h3 { font-size: 19px; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 15px; }

/* Layers band */
.band { background: linear-gradient(180deg, var(--bg-2), var(--bg)); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.layers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.layer { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.layer .num { font-family: "Caveat", cursive; font-size: 46px; color: var(--gold); line-height: 1; }
.layer h3 { font-size: 18px; margin: 6px 0 8px; }
.layer p { color: var(--muted); font-size: 15px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.step { text-align: center; }
.step .dot { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 16px;
  background: rgba(76,141,255,.12); border: 1px solid rgba(76,141,255,.3); font-size: 22px; }
.step h3 { font-size: 18px; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 15px; }

/* CTA */
.cta { text-align: center; }
.cta .box { background: linear-gradient(140deg, #1a2030, #12151d); border: 1px solid #2a3142; border-radius: 24px; padding: 56px 32px; }
.cta .box h2 { font-size: 36px; margin-bottom: 12px; color: #f4f6fb; }
.cta .box p { color: #9aa3b5; font-size: 18px; margin-bottom: 28px; }

/* Footer (Kode Foundry standard) */
.footer { background: var(--bg-2); border-top: 1px solid var(--border); padding: 44px 0 34px; }
.footer-inner { display: grid; grid-template-columns: 1fr; gap: 24px; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; }
.footer-brand img { width: 28px; height: 28px; border-radius: 8px; object-fit: cover; }
.footer p { margin: 0; font-size: 13px; color: var(--muted); }
.footer a { color: var(--muted); }
.footer .tagline a { color: var(--gold); }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-links a { font-size: 14px; font-weight: 500; }
.footer-links a:hover, .footer-bottom a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  padding-top: 22px; margin-top: 26px; border-top: 1px solid var(--border); font-size: 13px; }
.disclaimer { margin-top: 22px; font-size: 12px; color: #6b7385; max-width: 820px; }
@media (min-width: 720px) { .footer-inner { grid-template-columns: 1fr auto; align-items: center; } }

/* Legal pages */
.legal { padding: 56px 0 80px; max-width: 860px; margin-left: auto; margin-right: auto; }
.legal h1 { font-size: 40px; margin-bottom: 8px; color: var(--text); }
.legal .updated { color: var(--muted); margin-bottom: 32px; }
.legal h2 { font-size: 22px; margin: 34px 0 12px; color: var(--text); }
.legal p, .legal li { color: var(--text); margin-bottom: 12px; }
.legal ul { padding-left: 22px; }
.legal a { color: var(--gold); }
.back { display: inline-block; margin-bottom: 24px; color: var(--muted); }
.back:hover { color: var(--text); }

@media (max-width: 880px) {
  .hero-grid, .features, .layers, .steps { grid-template-columns: 1fr; }
  .hero h1 { font-size: 40px; }
  .nav-links a:not(.btn) { display: none; }
  .phone { margin-top: 20px; }
}
