/* Yukti — "Autumn Forest" palette, matching the app (ui/theme/Palette.kt). */

:root {
  --bg: #FFF8EC;
  --bg-alt: #F1F7E4;
  --card: #FFFFFF;
  --sand: #F3E6D3;
  --ink: #3B2314;
  --ink-2: rgba(59, 35, 20, 0.72);
  --ink-3: rgba(59, 35, 20, 0.45);
  --line: rgba(59, 35, 20, 0.12);
  --primary: #CC4A0E;
  --primary-bright: #FF7A1A;
  --primary-shade: #9E3608;
  --leaf: #1E7F3C;
  --leaf-bright: #3DBE5A;
  --leaf-soft: #D4F5DC;
  --gold: #9A6700;
  --gold-bright: #FFC531;
  --berry: #7C3AED;
  --shadow: 0 10px 30px rgba(59, 35, 20, 0.12);
  --sunrise: linear-gradient(135deg, #D9530E 0%, #FF9A2E 55%, #FFC531 100%);
  --radius: 22px;
  --display: "Fredoka", ui-rounded, system-ui, sans-serif;
  --body: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1B1410;
    --bg-alt: #161A12;
    --card: #2A1F18;
    --sand: #3A2D24;
    --ink: #FFF6EA;
    --ink-2: rgba(255, 246, 234, 0.72);
    --ink-3: rgba(255, 246, 234, 0.42);
    --line: rgba(255, 246, 234, 0.14);
    --primary: #E5651C;
    --primary-bright: #FF8A3D;
    --primary-shade: #9E3D0A;
    --leaf: #2FA84F;
    --leaf-bright: #5DD879;
    --leaf-soft: #1F3A26;
    --gold: #FFC531;
    --gold-bright: #FFD45E;
    --berry: #A78BFA;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    --sunrise: linear-gradient(135deg, #8A3A0C 0%, #B8560F 55%, #C98A12 100%);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--body);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); }
h1, h2, h3 { font-family: var(--display); line-height: 1.12; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.6rem, 7vw, 4.4rem); font-weight: 700; }
h2 { font-size: clamp(2rem, 4.6vw, 3rem); font-weight: 700; }
h3 { font-size: 1.35rem; font-weight: 600; }
p { margin: 0 0 1em; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--card); padding: 8px 14px; border-radius: 10px; }
:focus-visible { outline: 3px solid var(--primary-bright); outline-offset: 3px; border-radius: 6px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--primary); font: 700 1.9rem var(--display); }
.brand img { width: 40px; height: 40px; border-radius: 12px; }

/* Chunky buttons, like the app's ChunkyButton */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 16px; border: 0;
  font: 700 1.02rem var(--body); text-decoration: none; cursor: pointer;
  background: var(--primary); color: #fff;
  box-shadow: 0 4px 0 var(--primary-shade);
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.15s;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--primary-shade); }
.btn.small { padding: 9px 18px; font-size: 0.95rem; border-radius: 13px; }
.btn.ghost { background: var(--card); color: var(--ink); box-shadow: 0 4px 0 var(--line), inset 0 0 0 2px var(--line); }
.btn.ghost:active { box-shadow: 0 1px 0 var(--line), inset 0 0 0 2px var(--line); }

/* Phone frame around real app screenshots */
.phone {
  border-radius: 38px; padding: 10px; background: #2B1A10;
  box-shadow: 0 30px 60px rgba(59, 35, 20, 0.25), inset 0 0 0 2px rgba(255, 255, 255, 0.08);
}
.phone img { border-radius: 30px; width: 100%; aspect-ratio: 390 / 844; object-fit: cover; object-position: top; }

/* Pitch sections: lowercase headline + text beside a screen */
section { padding: 80px 0; }
.pitch { border-top: 2px solid var(--line); }
.pitch-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; max-width: 980px; }
.pitch-grid.flip > :first-child { order: 2; }
.pitch h2, h2.center { color: var(--primary); font-size: clamp(2rem, 4.4vw, 3rem); }
h2.center { text-align: center; margin-bottom: 40px; }
.pitch p { color: var(--ink-2); font-size: 1.12rem; }
.pitch-art { display: flex; justify-content: center; position: relative; }
.pitch-art::before {
  content: ""; position: absolute; inset: 8% 4%; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--tint, var(--primary-bright)) 26%, transparent) 0%, transparent 70%);
}
.pitch-art .phone { width: min(260px, 66vw); position: relative; }
@media (max-width: 760px) {
  section { padding: 56px 0; }
  .pitch-grid { grid-template-columns: 1fr; gap: 36px; text-align: center; }
  .pitch-grid.flip > :first-child { order: 0; }
}

/* Get the app band */
.get { background: var(--sunrise); color: #fff; }
.get-grid { display: grid; grid-template-columns: 0.7fr 1.3fr; gap: 48px; align-items: center; max-width: 980px; }
.get-grid img { width: min(300px, 64vw); margin: 0 auto; filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.25)); }
.get h2 { font-size: clamp(2rem, 4.4vw, 3rem); }
.get p { font-size: 1.12rem; opacity: 0.95; }
.get a { color: #fff; font-weight: 700; }
.get-note { margin-top: 22px; font-size: 1rem !important; }
.stores { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 24px; }
.store {
  display: inline-flex; align-items: center; gap: 12px; padding: 12px 22px; border-radius: 14px;
  background: #1B1410; color: #fff; text-decoration: none; font: 700 1.15rem var(--body); line-height: 1.15;
}
.store small { display: block; font-weight: 600; font-size: 0.72rem; opacity: 0.75; }
.store svg { width: 26px; height: 26px; flex: none; }
@media (max-width: 760px) { .get-grid { grid-template-columns: 1fr; text-align: center; } .stores { justify-content: center; } }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--card); border-radius: 18px; padding: 4px 22px; box-shadow: 0 2px 0 var(--line); }
.faq summary { cursor: pointer; list-style: none; font: 600 1.1rem var(--display); padding: 16px 30px 16px 0; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 12px; font-size: 1.5rem; color: var(--primary); transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-2); padding-bottom: 8px; }

/* Footer */
.site-footer { padding: 56px 0 36px; background: #1E7F3C; color: #fff; }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 32px; }
.footer-cols h3 { font-size: 1.1rem; margin-bottom: 12px; }
.footer-cols a { display: block; color: rgba(255, 255, 255, 0.85); text-decoration: none; font-weight: 600; padding: 4px 0; }
.footer-cols a:hover { color: #fff; text-decoration: underline; }
.fineprint { margin-top: 36px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, 0.25); color: rgba(255, 255, 255, 0.75); font-size: 0.88rem; }

/* Legal and help pages */
.doc { padding: 56px 0 96px; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(2.2rem, 6vw, 3.2rem); }
.doc h2 { font-size: 1.6rem; margin-top: 2em; }
.doc h3 { margin-top: 1.4em; }
.doc .updated { color: var(--ink-3); font-weight: 600; margin-bottom: 2em; }
.doc li { margin-bottom: 0.5em; }
.doc table { width: 100%; border-collapse: collapse; margin: 1em 0 1.5em; font-size: 0.95rem; }
.doc th, .doc td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { font-family: var(--display); font-weight: 600; }
.table-scroll { overflow-x: auto; }
.callout { background: var(--card); border-radius: 18px; padding: 20px 24px; box-shadow: 0 2px 0 var(--line); margin: 1.5em 0; }
.callout.leaf { background: var(--leaf-soft); box-shadow: none; }
.callout p:last-child { margin: 0; }

/* Nav links and actions */
.nav-links { display: flex; gap: 26px; margin-left: 20px; }
.nav-links a, .nav-login { color: var(--ink-2); text-decoration: none; font-weight: 700; font-size: 0.98rem; }
.nav-links a:hover, .nav-login:hover { color: var(--primary); }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 18px; }
@media (max-width: 860px) { .nav-links { display: none; } }
@media (max-width: 420px) { .nav-login { display: none; } .brand { font-size: 1.6rem; } }

/* Signed in (js/nav.js adds .signed-in to <html>): Profile and Go to Learn replace Log in */
html:not(.signed-in) .when-in, .signed-in .when-out { display: none !important; }
.nav-profile { display: flex; align-items: center; gap: 8px; color: var(--ink-2); text-decoration: none; font-weight: 700; font-size: 0.98rem; }
.nav-profile:hover { color: var(--primary); }
.nav-profile .avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--sunrise); color: #fff; font-weight: 800; font-size: 0.95rem; }
@media (max-width: 420px) { .nav-profile .label { display: none; } }

/* Hero: promise left, a sample question right */
.hero { padding: 72px 0 84px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-block; font: 700 0.82rem var(--body); text-transform: uppercase; letter-spacing: 0.08em; color: var(--leaf); background: var(--leaf-soft); padding: 6px 12px; border-radius: 999px; margin-bottom: 20px; }
.hero-copy h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); margin-bottom: 18px; }
.hl { color: var(--primary); position: relative; white-space: nowrap; isolation: isolate; }
.hl::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0.06em; height: 0.18em; border-radius: 999px; background: var(--gold-bright); opacity: 0.7; z-index: -1; }
.lead { font-size: 1.2rem; color: var(--ink-2); max-width: 520px; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero-buttons .btn.wide { width: auto; }
.btn.wide { width: 100%; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.95rem; padding: 16px 24px; }
.hero-note { margin-top: 18px; color: var(--ink-3); font-weight: 600; font-size: 0.95rem; }

/* The sample question in a browser window */
.try { position: relative; }
.window { position: relative; z-index: 1; background: var(--card); border-radius: 20px; box-shadow: 0 30px 60px rgba(59, 35, 20, 0.18), 0 0 0 1px var(--line); overflow: hidden; }
.window-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; background: var(--sand); }
.window-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--ink-3); opacity: 0.5; }
.window-bar span { margin-left: 12px; flex: 1; background: var(--card); border-radius: 8px; padding: 3px 12px; font-size: 0.82rem; color: var(--ink-3); font-weight: 600; }
.window-body { padding: 26px 26px 28px; }
.try-label { font: 700 0.8rem var(--body); text-transform: uppercase; letter-spacing: 0.07em; color: var(--leaf); margin-bottom: 10px; }
.try-prompt { font: 600 1.3rem/1.35 var(--display); margin-bottom: 18px; }
.try-options { display: grid; gap: 10px; }
.opt {
  text-align: left; font: 600 1.02rem var(--body); color: var(--ink); background: var(--card); cursor: pointer;
  padding: 14px 18px; border-radius: 14px; border: 2px solid var(--line); box-shadow: 0 3px 0 var(--line);
  transition: border-color 0.15s, background 0.15s, transform 0.08s;
}
.opt:hover:not(:disabled) { border-color: var(--primary-bright); }
.opt:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.opt:disabled { cursor: default; opacity: 0.6; }
.opt.right { opacity: 1; border-color: var(--leaf-bright); background: var(--leaf-soft); }
.opt.wrong { opacity: 1; border-color: #E5484D; background: color-mix(in srgb, #E5484D 12%, var(--card)); }
.try-feedback { margin-top: 16px; padding: 16px 18px; border-radius: 14px; background: var(--leaf-soft); }
.try-feedback.is-wrong { background: color-mix(in srgb, #E5484D 12%, var(--card)); }
.try-feedback p { margin-bottom: 10px; color: var(--ink-2); }
.try-verdict { font: 700 1.1rem var(--display); color: var(--leaf) !important; }
.try-feedback.is-wrong .try-verdict { color: #C62F34 !important; }
.try-yuki { position: absolute; z-index: 2; width: 150px; right: -46px; top: -96px; filter: drop-shadow(0 12px 18px rgba(59, 35, 20, 0.2)); animation: bob 3.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-8px); } }
@media (max-width: 960px) {
  .hero { padding: 40px 0 56px; }
  .hero-grid { grid-template-columns: 1fr; gap: 72px; }
  .try { max-width: 560px; margin-inline: auto; width: 100%; }
  .try-yuki { width: 110px; right: -4px; top: -78px; }
}

/* Numbers strip */
.stats { border-block: 2px solid var(--line); padding: 26px 0; }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stats b { display: block; font: 700 2rem var(--display); color: var(--primary); }
.stats span { color: var(--ink-2); font-weight: 600; font-size: 0.95rem; }
@media (max-width: 640px) { .stats-row { grid-template-columns: repeat(2, 1fr); row-gap: 24px; } }

/* Course catalog */
.section-lead { text-align: center; color: var(--ink-2); font-size: 1.12rem; max-width: 620px; margin: -24px auto 40px; }
.course-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.course-grid + .level-title { margin-top: 48px; }
.level-title { font: 800 0.9rem var(--body); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-2); margin: 0 0 16px; }
.course {
  display: flex; flex-direction: column; background: var(--card); border-radius: var(--radius); padding: 22px;
  border: 2px solid var(--line); box-shadow: 0 4px 0 var(--line); transition: transform 0.15s, border-color 0.15s;
}
.course:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--tint) 55%, transparent); }
.course.live { border-color: color-mix(in srgb, var(--tint) 45%, transparent); }
.course-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.course-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 1.8rem; background: color-mix(in srgb, var(--tint) 16%, transparent); }
.tag { font: 700 0.72rem var(--body); text-transform: uppercase; letter-spacing: 0.07em; padding: 4px 10px; border-radius: 999px; background: var(--sand); color: var(--ink-2); }
.tag.live-tag { background: var(--leaf-soft); color: var(--leaf); }
.course-section { font: 700 0.8rem var(--body); text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-3); margin-bottom: 4px; }
.course h3 { font-size: 1.45rem; margin-bottom: 8px; }
.course > p:not(.course-section) { color: var(--ink-2); font-size: 0.98rem; flex: 1; }
.course-meta { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 6px; }
.course-meta li { font-size: 0.82rem; font-weight: 700; color: var(--ink-2); background: var(--bg); border: 1px solid var(--line); padding: 3px 10px; border-radius: 999px; }
.course .btn.wide { font-size: 0.85rem; padding: 13px 18px; }

/* How it works */
.how { background: var(--bg-alt); }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.steps li { background: var(--card); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.step-num { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--primary); color: #fff; font: 700 1.3rem var(--display); margin-bottom: 16px; box-shadow: 0 3px 0 var(--primary-shade); }
.steps p { color: var(--ink-2); margin: 0; }
.center-cta { text-align: center; margin: 40px 0 0; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* Web badge beside the store badge */
.store.web { background: #fff; color: #1B1410; }

/* Final call to action */
.final { border-top: 2px solid var(--line); }
.final-inner { text-align: center; max-width: 640px; }
.final h2 { color: var(--primary); }
.final .btn.wide { width: auto; margin-top: 12px; }
