/* ============================================================
   Dev Switch site theme

   Type is the app's own face, Poppins, so a page opened from the
   app looks native. Colour comes from the app too: --primary is the Material
   primary in app/src/main/java/.../config/theme/AppColors.kt
   (light 1E7D55 on white, dark 95D3BA on 003829). Type, radii
   and layout follow the KodeElite brand (kodeelite-site repo,
   BRAND.md), so the site still reads as part of kodeelite.com.

   --primary is the fill for buttons, toggles and icons and always
   pairs with --on-primary text. --accent is the same hue used as
   ink for links, eyebrows and tags.

   Light is the default. Dark follows the system preference, or an
   explicit data-theme on <html>, which the app sets through ?theme=
   so the page matches the theme the user chose in Settings.
   Components use these tokens only; no colour literals below.
   ============================================================ */

:root {
  color-scheme: light dark;
  --bg: #FFFFFF;
  --bg-alt: #F6F6F2;
  --surface: #FFFFFF;
  --surface-deep: #F4F4F0;
  --ink: #0A0A0A;
  --ink-2: #52525B;
  --muted: #71717A;
  --faint: #8A8A93;
  --line: rgba(0, 0, 0, .10);
  --line-2: rgba(0, 0, 0, .14);
  --primary: #1E7D55;
  --primary-hover: #23905F;
  --on-primary: #FFFFFF;
  --accent: #1E7D55;
  --accent-soft: rgba(30, 125, 85, .10);
  --accent-line: rgba(30, 125, 85, .45);
  --grid-line: rgba(0, 0, 0, .045);
  --glow: rgba(30, 125, 85, .22);
  --shadow-card: 0 20px 60px rgba(0, 0, 0, .06);
  --shadow-lift: 0 20px 40px rgba(0, 0, 0, .08), 0 0 24px rgba(30, 125, 85, .10);
  --shadow-btn: 0 10px 36px rgba(30, 125, 85, .35);
  --shadow-btn-hover: 0 14px 44px rgba(30, 125, 85, .45);
  --code-bg: #0A0A0A;
  --code-ink: #FFFFFF;
  --code-accent: #95D3BA;
  --r-card: 24px;
  --r-panel: 20px;
  --r-field: 12px;
  --r-pill: 999px;
  --body: "Poppins", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #050505;
    --bg-alt: #080808;
    --surface: #101010;
    --surface-deep: #0B0B0B;
    --ink: #FFFFFF;
    --ink-2: #A1A1AA;
    --muted: #71717A;
    --faint: #5D5D66;
    --line: rgba(255, 255, 255, .07);
    --line-2: rgba(255, 255, 255, .10);
    --primary: #95D3BA;
    --primary-hover: #A8E0CA;
    --on-primary: #003829;
    --accent: #95D3BA;
    --accent-soft: rgba(149, 211, 186, .12);
    --accent-line: rgba(149, 211, 186, .45);
    --grid-line: rgba(255, 255, 255, .045);
    --glow: rgba(149, 211, 186, .14);
    --shadow-card: 0 20px 60px rgba(0, 0, 0, .5);
    --shadow-lift: 0 20px 40px rgba(0, 0, 0, .5), 0 0 24px rgba(149, 211, 186, .08);
    --shadow-btn: 0 10px 36px rgba(149, 211, 186, .25);
    --shadow-btn-hover: 0 14px 44px rgba(149, 211, 186, .35);
    --code-bg: #101010;
  }
}
:root[data-theme="dark"] {
  --bg: #050505;
  --bg-alt: #080808;
  --surface: #101010;
  --surface-deep: #0B0B0B;
  --ink: #FFFFFF;
  --ink-2: #A1A1AA;
  --muted: #71717A;
  --faint: #5D5D66;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .10);
  --primary: #95D3BA;
  --primary-hover: #A8E0CA;
  --on-primary: #003829;
  --accent: #95D3BA;
  --accent-soft: rgba(149, 211, 186, .12);
  --accent-line: rgba(149, 211, 186, .45);
  --grid-line: rgba(255, 255, 255, .045);
  --glow: rgba(149, 211, 186, .14);
  --shadow-card: 0 20px 60px rgba(0, 0, 0, .5);
  --shadow-lift: 0 20px 40px rgba(0, 0, 0, .5), 0 0 24px rgba(149, 211, 186, .08);
  --shadow-btn: 0 10px 36px rgba(149, 211, 186, .25);
  --shadow-btn-hover: 0 14px 44px rgba(149, 211, 186, .35);
  --code-bg: #101010;
  }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { max-width: 100%; overflow-x: hidden; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-weight: 600; letter-spacing: -.02em; }
h1 em, h2 em { font-style: normal; color: var(--accent); }
a { color: var(--accent); }
code { font: .9em var(--mono); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* layout */
main { max-width: 42rem; margin: 0 auto; padding: 0 1.25rem 4rem; }
.wide { max-width: 64rem; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 0; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 650; letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 9px; }
.nav-links { display: flex; gap: .25rem; font-size: .92rem; }
.nav-links a { color: var(--ink-2); text-decoration: none; padding: .4rem .8rem; border-radius: var(--r-pill); transition: color .15s, background .15s; }
.nav-links a:hover { color: var(--ink); background: var(--surface-deep); }
.nav-links a[aria-current] { color: var(--ink); background: var(--surface-deep); }
.nav-links { align-items: center; }
.theme-toggle { margin-left: .25rem; width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); color: var(--ink-2); cursor: pointer; transition: color .15s, border-color .15s; }
.theme-toggle:hover { color: var(--ink); border-color: var(--line-2); }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .sun { display: none; }
: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; }
}

/* document pages */
header { margin: 2rem 0 2.5rem; }
.eyebrow { font: 500 .75rem/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 0 0 .75rem; }
h1 { font-size: clamp(2rem, 4vw, 2.6rem); line-height: 1.1; margin: 0 0 .5rem; text-wrap: balance; }
.meta { color: var(--muted); margin: 0; }
h2 { font-size: 1.25rem; margin: 2.25rem 0 .75rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
p, li { max-width: 65ch; }
ul { padding-left: 1.25rem; }
li { margin: .35rem 0; }
.summary { background: var(--surface-deep); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 1.1rem 1.4rem; margin: 0; }
.summary p { margin: .25rem 0; }
dl { margin: 0; border-top: 1px solid var(--line); }
dl > div { display: grid; grid-template-columns: 12rem 1fr; gap: .25rem 1.25rem; padding: .85rem 0; border-bottom: 1px solid var(--line); }
dt { font-weight: 600; }
dd { margin: 0; overflow-wrap: anywhere; }
dd + dd { color: var(--muted); }
details { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; padding: 1rem 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font: 400 1.2rem/1 var(--mono); color: var(--accent); transition: transform .3s cubic-bezier(.2,.7,.2,1); }
details.is-open summary::after { transform: rotate(45deg); }
.faq-body { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .32s cubic-bezier(.2,.7,.2,1), opacity .25s ease; }
details.is-open .faq-body { grid-template-rows: 1fr; opacity: 1; }
.faq-inner { min-height: 0; overflow: hidden; }
.faq-group { margin-top: 2.5rem; }
.faq-group h2 { margin: 0 0 .5rem; padding: 0; border: 0; font-size: 1.25rem; }
.faq-group details:first-of-type { border-top: 1px solid var(--line); }
details p { margin: 0; padding-bottom: 1.1rem; color: var(--ink-2); max-width: 65ch; }

/* landing */
.hero { position: relative; padding: 3.5rem 0 3rem; display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; }
.hero::before { content: ""; position: absolute; top: -6rem; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%); z-index: -1; pointer-events: none;
  background:
    radial-gradient(38rem 20rem at 18% 0%, var(--glow), transparent 70%),
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: auto, 48px 48px, 48px 48px;
  mask-image: linear-gradient(#000 40%, transparent); -webkit-mask-image: linear-gradient(#000 40%, transparent); }
.hero h1 { font-size: clamp(2.3rem, 4.8vw, 3.5rem); line-height: 1.05; margin: 0 0 1.1rem; }
.hero .lead { font-size: 1.15rem; color: var(--ink-2); margin: 0 0 1.6rem; max-width: 34rem; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.cta { display: inline-flex; align-items: center; gap: .55rem; background: var(--primary); color: var(--on-primary); padding: .85rem 1.35rem; border-radius: var(--r-pill); font-weight: 600; text-decoration: none; box-shadow: var(--shadow-btn); transition: transform .15s, box-shadow .15s, background .15s; }
.cta:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: var(--shadow-btn-hover); }
.cta svg { width: 18px; height: 18px; }
.cta.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-2); box-shadow: none; }
.cta.ghost:hover { background: var(--surface-deep); transform: none; }
.facts { display: flex; flex-wrap: wrap; gap: .5rem .6rem; margin: 1.6rem 0 0; padding: 0; list-style: none; font: 500 .78rem var(--mono); letter-spacing: .02em; color: var(--ink-2); }
.facts li { display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .8rem; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); }
.facts li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--primary); }

/* phone mockup: the app's own Home screen, in miniature. Everything inside is sized in cqw
   against the phone's own width, so the whole thing scales as one; the height comes from the
   content, so a row can never be clipped at a narrower width. */
.phone { position: relative; justify-self: center; container-type: inline-size; width: 310px; background: #0d0d0c; border: 1px solid rgba(255, 255, 255, .12); border-radius: 30px; padding: 8px; animation: float 7s ease-in-out infinite; }
.phone::before, .phone::after { content: ""; position: absolute; left: calc(100% + 1px); width: 3px; border-radius: 0 2px 2px 0; background: #1c1c1a; }
.phone::before { top: 19%; height: 7%; }
.phone::after { top: 29%; height: 12%; }
.screen { border-radius: 23px; background: var(--bg-alt); padding: 8.4cqw 3.8cqw 4.5cqw; display: flex; flex-direction: column; gap: 2.65cqw; overflow: hidden; }
.notch { position: absolute; top: 4.2cqw; left: 50%; transform: translateX(-50%); width: 18cqw; height: 3.4cqw; border-radius: var(--r-pill); background: #0d0d0c; }
.screen .bar { display: flex; align-items: center; gap: 3cqw; margin-bottom: 1.1cqw; }
.bar-title { flex: 1; font-size: 4.7cqw; font-weight: 600; }
.ic-menu, .ic-search { flex: none; width: 4.9cqw; height: 4.2cqw; opacity: .55; }
.ic-menu { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); position: relative; }
.ic-menu::after { content: ""; position: absolute; left: 0; right: 0; top: 1.5cqw; border-top: 1px solid var(--ink); }
.ic-search { width: 4.5cqw; height: 4.5cqw; border: 1px solid var(--ink); border-radius: 50%; position: relative; }
.ic-search::after { content: ""; position: absolute; right: -1cqw; bottom: -1cqw; width: 2cqw; border-top: 1px solid var(--ink); transform: rotate(45deg); }
.device { background: var(--surface); border: 1px solid var(--line); border-radius: 5.3cqw; padding: 3.4cqw 3.8cqw; }
.device-top { display: flex; align-items: center; gap: 3cqw; }
.device-top img { width: 9.85cqw; height: 9.85cqw; border-radius: 3cqw; }
.device-top b { display: block; font-size: 4.35cqw; }
.device-top span { font-size: 3.65cqw; color: var(--muted); }
.device-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5cqw; margin-top: 3cqw; padding-top: 3cqw; border-top: 1px solid var(--line); text-align: center; }
.device-stats span { display: block; font: 500 3cqw var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.device-stats b { font-size: 3.9cqw; }
.screen .label { font: 500 3.25cqw var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 1.5cqw .75cqw 0; }
.actions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.9cqw; }
.actions-grid span { background: var(--surface); border: 1px solid var(--line); border-radius: 4.2cqw; padding: 2.65cqw 3cqw; font-size: 3.75cqw; font-weight: 500; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 3cqw; background: var(--surface); border: 1px solid var(--line); border-radius: 4.5cqw; padding: 3cqw 3.8cqw; font-size: 4.25cqw; }
.row b { display: block; font-weight: 600; }
.row span { color: var(--muted); font-size: 3.65cqw; }
.sw { flex: none; width: 12.1cqw; height: 7.2cqw; border-radius: var(--r-pill); background: var(--line-2); position: relative; transition: background .3s; }
.sw::after { content: ""; position: absolute; top: 1.15cqw; left: 1.15cqw; width: 4.9cqw; height: 4.9cqw; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .3s; }
.sw.on { background: var(--primary); }
.sw.on::after { transform: translateX(4.9cqw); background: var(--on-primary); }
.sw.auto { animation: flip 9s ease-in-out infinite; animation-delay: var(--d, 0s); }
.sw.auto::after { animation: knob 9s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes flip { 0%, 30% { background: var(--line-2); } 36%, 78% { background: var(--primary); } 84%, 100% { background: var(--line-2); } }
@keyframes knob { 0%, 30% { transform: translateX(0); background: #fff; } 36%, 78% { transform: translateX(4.9cqw); background: var(--on-primary); } 84%, 100% { transform: translateX(0); background: #fff; } }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-10px) rotate(1deg); } }

/* sections */
.section { padding: 3.5rem 0 0; }
.section > h2 { font-size: clamp(1.6rem, 2.8vw, 2.1rem); margin: 0 0 .5rem; padding: 0; border: 0; }
.section > .sub { color: var(--ink-2); margin: 0 0 1.5rem; max-width: 60ch; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 1.4rem; transition: transform .2s, border-color .2s, box-shadow .2s; }
.card:hover { transform: translateY(-3px); border-color: var(--accent-line); box-shadow: var(--shadow-lift); }
.card .ico { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--primary); color: var(--on-primary); margin-bottom: .9rem; }
.card .ico svg { width: 20px; height: 20px; }
.card h3 { margin: 0 0 .4rem; font-size: 1.08rem; }
.card p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.card .tag { display: inline-block; margin-top: .85rem; font: 500 .72rem var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); border-radius: var(--r-pill); padding: .25rem .65rem; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.steps li { counter-increment: step; display: flex; gap: .75rem; align-items: flex-start; }
.steps li > span { flex: 1; }
.steps li::before { content: counter(step); flex: none; display: grid; place-items: center; width: 1.75rem; height: 1.75rem; margin-top: .1rem; border-radius: 50%; background: var(--primary); color: var(--on-primary); font: 600 .8rem var(--mono); }
.sub-title { font-size: 1.1rem; margin: 2rem 0 .6rem; }
.grant-block { margin-top: 2.25rem; }
.grant-block .sub-title { margin-top: 0; }
.grant-block p { margin: 0 0 1rem; color: var(--ink-2); }
#grant p, #grant li { max-width: none; }
.grant-block .term { margin-top: 1rem; }
.term { margin-top: 1.25rem; background: var(--code-bg); color: var(--code-ink); border: 1px solid var(--line-2); border-radius: var(--r-panel); overflow: hidden; box-shadow: var(--shadow-card); }
.term-bar { display: flex; align-items: center; gap: .75rem; padding: .6rem .8rem .6rem 1rem; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .18); }
.dots i:first-child { background: #FF5F57; } .dots i:nth-child(2) { background: #FEBC2E; } .dots i:last-child { background: #28C840; }
.term-title { flex: 1; font: 500 .72rem var(--mono); letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
.term-body { margin: 0; padding: 1rem 1.25rem 1.1rem; overflow-x: auto; font: .86rem/1.75 var(--mono); white-space: pre; }
.term-body .prompt { color: var(--code-accent); }
.term-body .out { color: rgba(255, 255, 255, .85); }
.term-body .note { color: rgba(255, 255, 255, .42); }
.copy { font: 600 .74rem var(--body); color: var(--on-primary); background: var(--primary); border: 0; border-radius: var(--r-pill); padding: .32rem .75rem; cursor: pointer; }
.copy:hover { background: var(--primary-hover); }
.privacy-strip { margin-top: 3.5rem; background: var(--surface-deep); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 1.2rem 1.4rem; }
.privacy-strip p { margin: .25rem 0; }
.site-footer { margin-top: 3rem; padding: 1.5rem 0 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; }
.site-footer a { color: var(--ink-2); }

/* app mode: opened from inside the app, only the content is wanted */
.app .nav, .app .site-footer, .app .eyebrow { display: none; }
.app header { margin-top: 1.25rem; }

/* reveal on scroll: visible by default, animated only when JS is present */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (max-width: 48rem) {
  main { padding: 0 1rem 3rem; }
  .hero { grid-template-columns: 1fr; padding-top: 2rem; gap: 2rem; }
  .hero h1 { font-size: 2.1rem; }
  .hero .lead { font-size: 1.05rem; }
  .actions .cta { width: 100%; justify-content: center; }
  .phone { width: 100%; max-width: 320px; }
  .grid { grid-template-columns: 1fr; }
  dl > div { grid-template-columns: 1fr; gap: .2rem; }
  .term-body { font-size: .8rem; }
  .site-footer { flex-direction: column; }
}
