/* gcse.lagari.app. Tokens follow the app (src/core/theme/tokens.css): warm paper, ink, Iris, marigold. */
@font-face { font-family: 'Bricolage Grotesque'; font-weight: 200 800; font-style: normal; font-display: swap; src: url('/assets/fonts/bricolage-grotesque-latin-wght-normal.woff2') format('woff2'); }
@font-face { font-family: 'Figtree'; font-weight: 300 900; font-style: normal; font-display: swap; src: url('/assets/fonts/figtree-latin-wght-normal.woff2') format('woff2'); }

:root {
  color-scheme: light dark;
  --bg: #FAF7F2; --surface: #FFFFFF; --sunk: #F3EEE5; --line: #E6DFD3;
  --ink: #1B1530; --muted: #4A4360; --soft: #6B6482;
  --iris: #5B3DF5; --iris-ink: #4527D9; --iris-soft: #ECE8FF;
  --hl: #FFC53D; --hl-soft: #FFF1CC; --hl-ink: #7A4D00;
  --night: #17122B; --night-ink: #F4F1FB; --night-muted: #BDB5D3;
  --radius: 22px; --shadow: 0 1px 2px rgba(27, 21, 48, .06), 0 12px 32px -16px rgba(27, 21, 48, .18);
  --display: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #100C1D; --surface: #1A1530; --sunk: #150F27; --line: #2C2548;
    --ink: #F4F1FB; --muted: #BDB5D3; --soft: #9C94B6;
    --iris: #8C76FF; --iris-ink: #C4B8FF; --iris-soft: #241C48;
    --hl: #FFD166; --hl-soft: #3B2E0A; --hl-ink: #FFD166;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -16px rgba(0, 0, 0, .6);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--body); }
img, svg { display: block; max-width: 100%; }
a { color: var(--iris-ink); text-underline-offset: 3px; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--iris); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; letter-spacing: -0.025em; margin: 0; text-wrap: balance; }
p { margin: 0; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 10; background: var(--surface); padding: 8px 12px; border-radius: 10px; }
.ico { width: 22px; height: 22px; flex: none; }

/* Header */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.top .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand .tile { width: 34px; height: 34px; }
.wm { font-family: var(--display); font-weight: 800; letter-spacing: -0.035em; font-size: 24px; line-height: 1; }
.wm b { position: relative; font-weight: inherit; z-index: 0; }
.wm b::before { content: ''; position: absolute; left: -2px; right: -3px; top: 52%; bottom: -2px; background: var(--hl); transform: rotate(-3deg); border-radius: 3px; z-index: -1; }
.nav { display: none; gap: 22px; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; }
.nav a:hover { color: var(--ink); }
@media (min-width: 820px) { .nav { display: flex; } }

/* Buttons */
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 20px 8px 16px; border-radius: 16px; background: var(--ink); color: var(--bg); text-decoration: none; font-weight: 700; line-height: 1.15; }
.btn .ico { width: 24px; height: 24px; }
.btn small { display: block; font-size: 11px; font-weight: 600; opacity: .8; letter-spacing: .02em; }
.btn[aria-disabled='true'] { background: var(--sunk); color: var(--muted); border: 1px solid var(--line); cursor: default; }

/* Hero */
.hero { padding: 40px 0 56px; overflow: hidden; }
.hero .wrap { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .hero { padding: 72px 0 88px; } .hero .wrap { grid-template-columns: 1.15fr .85fr; } }
.eyebrow { display: inline-block; font-weight: 700; font-size: 14px; color: var(--iris-ink); background: var(--iris-soft); padding: 6px 12px; border-radius: 999px; margin-bottom: 18px; }
.hero h1 { font-size: clamp(40px, 7vw, 72px); font-weight: 800; }
.hero h1 em { font-style: normal; position: relative; z-index: 0; white-space: nowrap; }
.hero h1 em::before { content: ''; position: absolute; left: -4px; right: -6px; top: 55%; bottom: 2px; background: var(--hl); transform: rotate(-2deg); border-radius: 6px; z-index: -1; }
.lead { font-size: clamp(18px, 2.2vw, 20px); color: var(--muted); margin: 20px 0 28px; max-width: 36em; }
.fine { font-size: 14px; color: var(--soft); margin-top: 14px; }
.gift { display: flex; gap: 12px; align-items: flex-start; margin-top: 24px; padding: 14px 16px; border-radius: 16px; background: var(--hl-soft); color: var(--ink); max-width: 34em; }
.gift strong { color: var(--hl-ink); }

/* 3D mark (mirrors the app splash). No filter/opacity on 3D containers: they would flatten preserve-3d. */
.stage { display: grid; place-items: center; min-height: 300px; border-radius: 32px; background: radial-gradient(120% 90% at 30% 20%, #2A2150 0%, var(--night) 60%); box-shadow: var(--shadow); }
.m3 { perspective: 800px; }
.m3-sway { transform-style: preserve-3d; animation: m3Sway 5s ease-in-out 1.6s infinite; }
.m3-mark { position: relative; width: 200px; height: 200px; transform-style: preserve-3d; transform: rotateX(8deg) rotateY(-14deg); animation: m3Spin 1.2s cubic-bezier(.2, .9, .25, 1) both; }
.m3-mark svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.m3-ribbon { animation: m3Sweep .4s cubic-bezier(.2, 0, 0, 1) .25s both; }
.m3-depth path { animation: m3Fade .3s ease-out .7s both; }
.m3-front path { stroke-dasharray: 1 2; animation: m3Draw .45s cubic-bezier(.2, 0, 0, 1) .4s both; }
.m3-shadow { width: 140px; height: 18px; margin: 18px auto 0; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .55), transparent); animation: m3ShadowSway 5s ease-in-out 1.6s infinite; }
.zm6 { transform: translateZ(-6px); } .zm4 { transform: translateZ(-4px); } .zm2 { transform: translateZ(-2px); } .z0 { transform: none; }
.z2 { transform: translateZ(2px); } .z4 { transform: translateZ(4px); } .z6 { transform: translateZ(6px); } .z8 { transform: translateZ(8px); } .z10 { transform: translateZ(10px); }
.z12 { transform: translateZ(12px); } .z14 { transform: translateZ(14px); } .z16 { transform: translateZ(16px); } .z18 { transform: translateZ(18px); } .z20 { transform: translateZ(20px); }
@keyframes m3Spin { 0% { transform: translateZ(-260px) rotateX(38deg) rotateY(-150deg) scale(.55); } 60% { transform: translateZ(10px) rotateX(-6deg) rotateY(12deg) scale(1.05); } 100% { transform: rotateX(8deg) rotateY(-14deg); } }
@keyframes m3Sway { 0%, 100% { transform: rotateY(0) translateY(0); } 50% { transform: rotateY(24deg) translateY(-6px); } }
@keyframes m3ShadowSway { 0%, 100% { transform: none; } 50% { transform: scale(.86, .8); opacity: .75; } }
@keyframes m3Sweep { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes m3Fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes m3Draw { 0% { stroke-dashoffset: 1; opacity: 0; } 8% { opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .m3-sway, .m3-mark, .m3-ribbon, .m3-depth path, .m3-front path, .m3-shadow { animation: none; }
}

/* Stats */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stats li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.stats b { display: block; font-family: var(--display); font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.stats span { color: var(--muted); font-size: 15px; }

/* Sections */
.sec { padding: 64px 0; }
.sec-head { max-width: 40em; margin-bottom: 32px; }
.sec-head h2 { font-size: clamp(30px, 4.4vw, 46px); font-weight: 800; }
.sec-head p { color: var(--muted); margin-top: 12px; font-size: 18px; }
.alt { background: var(--sunk); }

.courses { display: grid; gap: 16px; }
@media (min-width: 760px) { .courses { grid-template-columns: 1fr 1fr; } }
.course { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.course h3 { font-size: 24px; }
.course .sub { color: var(--soft); font-size: 15px; margin: 4px 0 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chips li { padding: 6px 12px; border-radius: 999px; background: var(--iris-soft); color: var(--iris-ink); font-weight: 600; font-size: 15px; }

.grid { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 980px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card .badge { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--iris-soft); color: var(--iris-ink); margin-bottom: 14px; }
.card h3 { font-size: 20px; margin-bottom: 6px; }
.card p { color: var(--muted); font-size: 16px; }

.plans { display: grid; gap: 16px; }
@media (min-width: 760px) { .plans { grid-template-columns: 1fr 1fr; } }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.plan.pro { background: var(--night); color: var(--night-ink); border-color: transparent; }
.plan h3 { font-size: 26px; display: flex; align-items: center; gap: 10px; }
.plan .tag { font-family: var(--body); font-size: 13px; font-weight: 700; letter-spacing: 0; padding: 4px 10px; border-radius: 999px; background: var(--hl); color: #3A2600; }
.plan ul { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; }
.plan li .ico { color: var(--iris); margin-top: 2px; width: 20px; height: 20px; }
.plan.pro li .ico { color: var(--hl); }
.plan-note { color: var(--muted); font-size: 15px; margin-top: 20px; max-width: 46em; }

.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 0 20px; }
.faq summary { cursor: pointer; list-style: none; font-weight: 700; padding: 18px 28px 18px 0; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 0; top: 14px; font-size: 24px; font-weight: 400; color: var(--soft); }
.faq details[open] summary::after { content: '−'; }
.faq details p { color: var(--muted); padding-bottom: 18px; }

.contact { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; background: var(--night); color: var(--night-ink); border-radius: 28px; padding: 32px; }
.contact h2 { font-size: clamp(26px, 3.6vw, 36px); }
.contact p { color: var(--night-muted); margin-top: 8px; }
.contact a.btn { background: var(--hl); color: #3A2600; }

/* Footer */
.foot { padding: 40px 0 56px; color: var(--soft); font-size: 14px; }
.foot .row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-bottom: 18px; }
.foot .row a { color: var(--muted); font-weight: 600; text-decoration: none; }
.foot .row a:hover { color: var(--ink); }
.foot p + p { margin-top: 8px; }

/* Legal pages (content from the app's public/privacy.html and terms.html) */
.legal { max-width: 800px; padding-top: 40px; padding-bottom: 24px; }
.legal h1 { font-size: clamp(34px, 5vw, 48px); font-weight: 800; }
.legal h2 { font-size: 21px; margin: 22px 0 8px; letter-spacing: -0.015em; }
.legal h3 { font-size: 17px; margin: 16px 0 4px; letter-spacing: 0; font-family: var(--body); font-weight: 700; }
.legal p, .legal li, .legal td { color: var(--muted); }
.legal p + p { margin-top: 10px; }
.legal ul { padding-left: 22px; }
.legal li { margin: 4px 0; }
.legal .meta { font-size: 15px; color: var(--soft); margin: 10px 0 8px; }
.legal section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 22px 18px; margin-top: 18px; overflow-wrap: anywhere; }
.legal .summary { background: var(--hl-soft); border-color: transparent; }
.legal .summary p, .legal .summary li { color: var(--ink); }
.legal table { width: 100%; border-collapse: collapse; font-size: 15px; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 8px 6px; border-top: 1px solid var(--line); }
.legal th { color: var(--ink); }
.legal .ph { background: var(--hl-soft); color: var(--hl-ink); border-radius: 6px; padding: 0 4px; font-weight: 600; }

.nf { text-align: center; padding: 96px 0; }
.nf h1 { font-size: clamp(40px, 6vw, 64px); font-weight: 800; }
.nf p { color: var(--muted); margin: 14px 0 26px; }
.nf .btns { justify-content: center; }
