/* Shared look for the home page, login and legal pages. The dashboard carries the same tokens. */
:root {
  --bg: #f3f6fd; --surface: #ffffff; --raised: #eaf0fb; --hair: #e1e8f5; --hair-hi: #c9d4ea;
  --ink: #141b33; --dim: #55607f; --faint: #8590ad; --accent: #3b6bff; --on-accent: #ffffff;
  --pay: #0f8a4b; --live: #22c55e; --danger: #e5484d;
  --c-blue: #3b6bff; --c-amber: #f59e0b; --c-pink: #ec4899; --c-green: #16a34a; --c-violet: #8b5cf6;
  --shadow: 0 1px 2px rgba(30,45,100,.06), 0 8px 24px -10px rgba(30,45,100,.16);
  --shadow-hi: 0 2px 4px rgba(30,45,100,.06), 0 18px 38px -12px rgba(30,45,100,.26);
  --hero: linear-gradient(135deg, #e3ecff 0%, #efe7ff 55%, #ffe9f1 100%);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b0b12; --surface: #15151f; --raised: #1f1f2c; --hair: #262636; --hair-hi: #3a3a50;
  --ink: #f2f2f8; --dim: #b0b0c6; --faint: #7d7d96; --accent: #7c9cff; --on-accent: #0b0b12;
  --pay: #4ade80; --live: #4ade80; --danger: #ff8086;
  --c-blue: #7c9cff; --c-amber: #fbbf24; --c-pink: #f472b6; --c-green: #4ade80; --c-violet: #a78bfa;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 28px -12px rgba(0,0,0,.7);
  --shadow-hi: 0 2px 4px rgba(0,0,0,.4), 0 20px 40px -14px rgba(0,0,0,.85);
  --hero: linear-gradient(135deg, #17203f 0%, #261a45 55%, #3a1830 100%);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif; font-weight: 600; font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; transition: background .25s ease; }
h1, h2, h3 { font-family: "Bricolage Grotesque", "Nunito", sans-serif; margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 2px; border-radius: 8px; }
.wrap { max-width: 72rem; margin-inline: auto; padding-inline: max(16px, 4vw); }

/* nav */
.nav { position: sticky; top: 0; z-index: 30; background: var(--bg); }
.nav .wrap { display: flex; align-items: center; gap: 18px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-family: "Bricolage Grotesque", sans-serif; font-size: 20px; font-weight: 800; letter-spacing: -.02em; text-decoration: none; }
.logo { width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; color: #fff; background: linear-gradient(140deg, #3b6bff, #8b5cf6 70%, #ec4899); box-shadow: 0 6px 16px -6px rgba(99,102,241,.7); }
.logo svg { width: 21px; height: 21px; }
.nav-links { display: flex; gap: 4px; margin-left: 18px; }
.nav-links a { text-decoration: none; color: var(--dim); font-weight: 700; font-size: 15px; padding: 8px 14px; border-radius: 999px; }
.nav-links a:hover { color: var(--ink); background: var(--raised); }
.nav-r { margin-left: auto; display: flex; align-items: center; gap: 10px; }
@media (max-width: 760px) { .nav-links { display: none; } }

/* day / night switch */
.themebtn { position: relative; width: 58px; height: 32px; border-radius: 999px; border: 1px solid var(--hair-hi); background: linear-gradient(135deg, #ffe9a8, #ffd0e0); cursor: pointer; padding: 0; transition: background .25s ease; box-shadow: var(--shadow); flex: none; }
:root[data-theme="dark"] .themebtn { background: linear-gradient(135deg, #2b2f6b, #3b2a63); }
.themebtn .knob { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; display: grid; place-items: center; color: #e8870c; box-shadow: 0 2px 6px rgba(0,0,0,.25); transition: transform .3s cubic-bezier(.3,1.3,.5,1); }
:root[data-theme="dark"] .themebtn .knob { transform: translateX(26px); color: #5b5bd6; }
.themebtn svg { width: 14px; height: 14px; }
.themebtn .i-moon { display: none; }
:root[data-theme="dark"] .themebtn .i-sun { display: none; }
:root[data-theme="dark"] .themebtn .i-moon { display: block; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 22px; border-radius: 999px; font: inherit; font-weight: 800; font-size: 15px; text-decoration: none; cursor: pointer; border: 0; transition: transform .2s cubic-bezier(.3,1.3,.5,1), filter .15s ease, background .15s ease; white-space: nowrap; }
.btn:active { transform: scale(.97); }
.btn.primary { color: var(--on-accent); background: var(--accent); box-shadow: 0 10px 22px -10px color-mix(in srgb, var(--accent) 90%, transparent); }
.btn.primary:hover { filter: brightness(1.07); transform: translateY(-1px); }
.btn.ghost { color: var(--ink); background: var(--surface); border: 1px solid var(--hair-hi); }
.btn.ghost:hover { background: var(--raised); }
.btn.lg { height: 52px; padding: 0 28px; font-size: 16px; }
.btn[hidden] { display: none; }

/* sections */
.sec { padding: clamp(44px, 7vw, 88px) 0; }
.sec-head { display: grid; gap: 10px; margin-bottom: clamp(24px, 4vw, 40px); max-width: 40rem; }
.sec-head h2 { font-size: clamp(28px, 4vw, 42px); font-weight: 800; letter-spacing: -.03em; line-height: 1.08; }
.sec-head p { margin: 0; color: var(--dim); font-size: 17px; }
.card { background: var(--surface); border: 1px solid var(--hair); border-radius: 26px; box-shadow: var(--shadow); }
.pill { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 800; padding: 4px 12px; border-radius: 999px; background: var(--raised); color: var(--dim); }

/* footer */
.foot { border-top: 1px solid var(--hair); padding: 34px 0 48px; color: var(--faint); font-size: 14px; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.foot a { text-decoration: none; color: var(--dim); font-weight: 700; }
.foot a:hover { color: var(--ink); text-decoration: underline; }

/* legal pages */
.prose { max-width: 44rem; margin: 0 auto; padding: clamp(28px, 5vw, 56px) max(16px, 4vw) 80px; }
.prose h1 { font-size: clamp(32px, 5vw, 46px); font-weight: 800; letter-spacing: -.03em; margin: 8px 0 6px; }
.prose h2 { font-size: 21px; font-weight: 800; margin: 32px 0 6px; letter-spacing: -.01em; }
.prose p, .prose li { color: var(--dim); font-weight: 600; }
.prose a { color: var(--accent); }
.prose .muted { color: var(--faint); font-size: 14px; }

/* auth */
.auth { min-height: calc(100vh - 68px); display: grid; place-items: center; padding: 24px 16px 56px; }
.auth-card { width: 100%; max-width: 26rem; padding: 32px 28px; }
.auth-card h1 { font-size: 30px; font-weight: 800; letter-spacing: -.03em; margin-bottom: 6px; }
.auth-card .sub { margin: 0 0 8px; color: var(--dim); }
.auth label { display: block; font-size: 14px; font-weight: 800; color: var(--dim); margin: 16px 0 7px; }
.auth input { width: 100%; font: inherit; font-weight: 600; font-size: 16px; color: var(--ink); background: var(--raised); border: 2px solid transparent; border-radius: 16px; padding: 13px 16px; outline: none; transition: border-color .15s ease, background .15s ease; }
.auth input:focus { border-color: var(--accent); background: var(--surface); }
.auth .btn { width: 100%; margin-top: 22px; height: 50px; }
.auth .btn:disabled { opacity: .6; cursor: wait; }
.err { min-height: 1.3em; margin: 12px 0 0; color: var(--danger); font-size: 14.5px; font-weight: 700; }
.alt { margin: 18px 0 0; font-size: 14.5px; color: var(--dim); text-align: center; }
.alt a { color: var(--accent); text-decoration: none; font-weight: 800; }
.alt a:hover { text-decoration: underline; }

@media (max-width: 520px) {
  .nav .wrap { gap: 8px; }
  .brand { font-size: 16px; white-space: nowrap; }
  .nav-r { gap: 6px; }
  .nav-r .btn { height: 38px; padding: 0 14px; font-size: 14px; white-space: nowrap; }
  .nav-r .btn.ghost { padding: 0 10px; }
}
@media (max-width: 380px) { .brand { font-size: 0; gap: 0; } }
@media (max-width: 440px) { .nav-r .btn.ghost { display: none; } }
