/* YeKarlo — website styles.
   The palette is lifted verbatim from the app design tokens
   (apps/mobile/src/design/tokens.ts) so the site and the app read as one
   product. Warm grounds, jade for meaning, saffron once per screen and
   never as decoration. */

:root {
  --ground: #FBF7F2;
  --surface: #FFFFFF;
  --sunk: #F3EEE7;
  --ink: #16201C;
  --ink2: #4B554F;
  --ink3: #6C7671;
  --hairline: #EDE6DC;

  --brand: #1C6B5A;
  --brand-deep: #14513F;
  --brand-tint: #DFEDE7;

  --saffron: #F97316;
  --saffron-ink: #C2540E;

  --positive: #2F6B4F;
  --positive-tint: #E2F0E7;
  --attention: #9A6B18;
  --attention-tint: #FBEFD8;
  --overdue: #B04836;
  --overdue-tint: #FCE6E0;

  --work-bg: #FFEADC;    --work-fg: #A2542A;
  --study-bg: #E2EDFB;   --study-fg: #33608E;
  --manner-bg: #F0E8FB;  --manner-fg: #6A4C9C;
  --routine-bg: #E1F0E6; --routine-fg: #2F6B4F;

  --r-card: 28px;
  --r-tile: 20px;
  --r-control: 16px;

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;

  --shadow-sm: 0 1px 2px rgba(22,32,28,.04), 0 6px 18px rgba(22,32,28,.05);
  --shadow-md: 0 2px 4px rgba(22,32,28,.05), 0 18px 44px rgba(22,32,28,.09);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }

a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-deep); }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.02em; line-height: 1.14; margin: 0; }
h1 { font-size: clamp(2.2rem, 5vw, 3.35rem); }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.18rem; font-family: var(--sans); font-weight: 700; letter-spacing: -.01em; line-height: 1.35; }
p { margin: 0 0 1em; }

.wrap { width: min(1080px, calc(100% - 2.5rem)); margin-inline: auto; }
.narrow { width: min(720px, calc(100% - 2.5rem)); margin-inline: auto; }

section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
/* The header is sticky, so an anchor must stop clear of it. */
section[id], .doc h2[id], .doc h3[id] { scroll-margin-top: 88px; }
.section-sunk { background: var(--sunk); }

.eyebrow {
  font-size: .78rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
  color: var(--brand); margin: 0 0 .85rem;
}
.lede { font-size: clamp(1.05rem, 1.9vw, 1.24rem); color: var(--ink2); max-width: 62ch; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(251,247,242,.86);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--hairline);
}
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 68px; }

.brand { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; color: var(--ink); }
.brand svg { height: 26px; width: auto; display: block; }
.brand .wm { font-weight: 800; font-size: 1.35rem; letter-spacing: -.045em; }
.brand .wm i { font-style: normal; color: var(--saffron-ink); }

.nav { margin-left: auto; display: flex; align-items: center; gap: 1.6rem; }
.nav a { color: var(--ink2); text-decoration: none; font-size: .95rem; font-weight: 600; }
.nav a:hover { color: var(--ink); }
.nav a.btn-primary, .nav a.btn-primary:hover { color: #fff; }
@media (max-width: 860px) { .nav .hide-sm { display: none; } }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .8rem 1.4rem; border-radius: 999px;
  font-weight: 700; font-size: .97rem; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .12s ease, background .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-deep); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--hairline); }
.btn-ghost:hover { border-color: #ddd3c5; color: var(--ink); }
.btn-sm { padding: .58rem 1.05rem; font-size: .9rem; }

/* ---------- Hero ---------- */

.hero { padding-top: clamp(3rem, 6vw, 5rem); padding-bottom: clamp(3rem, 7vw, 5.5rem); }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.hero h1 span { color: var(--saffron-ink); }
.hero .lede { margin-top: 1.15rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.9rem; align-items: center; }
.cta-note { font-size: .87rem; color: var(--ink3); margin: .95rem 0 0; }

.badge-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2rem; }
.badge {
  font-size: .8rem; font-weight: 650; color: var(--ink2);
  background: var(--surface); border: 1px solid var(--hairline);
  padding: .35rem .8rem; border-radius: 999px;
}

/* ---------- Phone mockup ---------- */

.phone-stage { display: flex; justify-content: center; }
.phone {
  width: 312px; max-width: 100%;
  border-radius: 42px; padding: 11px;
  background: #14181A;
  box-shadow: var(--shadow-md);
}
.phone-screen {
  background: var(--ground); border-radius: 32px; overflow: hidden;
  padding: 14px 13px 16px;
  font-size: 13px; line-height: 1.4;
}
.phone-top { display: flex; align-items: center; justify-content: space-between; font-size: 10px; color: var(--ink3); font-weight: 700; margin-bottom: 10px; }
.phone-greet { font-family: var(--serif); font-size: 19px; margin: 2px 0 12px; }

.hero-card {
  border-radius: 24px; padding: 15px 16px 14px; color: #fff;
  background: linear-gradient(135deg, #E24E08 0%, #F97316 44%, #FF9933 100%);
  box-shadow: 0 10px 24px rgba(226,78,8,.24);
}
.ws-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.22); border-radius: 999px;
  padding: 3px 10px 3px 4px; font-size: 10.5px; font-weight: 700;
}
.ws-dot { width: 16px; height: 16px; border-radius: 999px; background: #fff; color: #C2410C; display: grid; place-items: center; font-size: 9px; font-weight: 800; }
.hero-card .lbl { font-size: 11px; opacity: .9; margin: 12px 0 0; font-weight: 600; }
.hero-card .num { font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1.08; }
.hero-card .num sup { font-size: 13px; font-weight: 700; margin-left: 3px; }
.hero-card .meta { font-size: 10.5px; opacity: .92; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 12px; }
.stat { background: rgba(255,255,255,.94); border-radius: 14px; padding: 8px 8px; color: var(--ink); }
.stat b { display: block; font-size: 17px; line-height: 1.15; }
.stat span { font-size: 9.5px; color: var(--ink3); font-weight: 600; }
.stat.attn b { color: var(--attention); }
.stat.over b { color: var(--overdue); }

.mini-head { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink3); margin: 15px 0 7px; }
.row-card {
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 16px;
  padding: 9px 11px; margin-bottom: 7px; display: flex; align-items: center; gap: 9px;
}
.row-card .t { font-weight: 650; font-size: 12.5px; }
.row-card .s { font-size: 10.5px; color: var(--ink3); }
.row-card .amt { margin-left: auto; font-weight: 750; font-size: 12.5px; color: var(--positive); white-space: nowrap; unicode-bidi: isolate; direction: ltr; }
.row-card .amt.neg { color: var(--overdue); }
.check { width: 21px; height: 21px; border-radius: 999px; border: 2px solid var(--hairline); flex: none; }
.check.done { background: var(--positive); border-color: var(--positive); position: relative; }
.check.done::after { content: ""; position: absolute; left: 6px; top: 2.5px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(42deg); }

.pill { font-size: 9.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px; display: inline-block; }
.pill.work { background: var(--work-bg); color: var(--work-fg); }
.pill.study { background: var(--study-bg); color: var(--study-fg); }
.pill.routine { background: var(--routine-bg); color: var(--routine-fg); }
.pill.manner { background: var(--manner-bg); color: var(--manner-fg); }

.tabbar {
  margin-top: 13px; background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 999px; padding: 8px 14px; display: flex; justify-content: space-between;
  font-size: 9.5px; font-weight: 700; color: var(--ink3);
}
.tabbar .on { color: var(--brand); }

/* ---------- Cards & grids ---------- */

.grid { display: grid; gap: 1.15rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 880px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--r-card); padding: 1.6rem 1.55rem;
  box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--ink2); font-size: .97rem; }
.card p:last-child { margin-bottom: 0; }

.icon-badge {
  width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center;
  background: var(--brand-tint); color: var(--brand-deep);
  margin-bottom: 1rem;
}
.icon-badge svg { width: 21px; height: 21px; display: block; }
.icon-badge .rupee { font-size: 22px; font-weight: 800; line-height: 1; font-family: var(--sans); }
.icon-badge.saffron { background: #FFEADC; color: var(--saffron-ink); }
.icon-badge.study { background: var(--study-bg); color: var(--study-fg); }

/* Steps */
.steps { counter-reset: step; display: grid; gap: 1rem; }
.step {
  display: grid; grid-template-columns: 34px 1fr; gap: 1.1rem; align-items: start;
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--r-tile); padding: 1.25rem 1.4rem;
}
.step::before {
  counter-increment: step; content: counter(step);
  width: 34px; height: 34px; border-radius: 999px; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: .95rem; margin-top: 2px;
}
.step h3 { margin-bottom: .3rem; }
.step p { margin: 0; color: var(--ink2); font-size: .97rem; }

/* Feature list */
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.7rem 2.4rem; }
@media (max-width: 820px) { .features { grid-template-columns: 1fr; } }
.feature h3 { margin-bottom: .35rem; }
.feature p { color: var(--ink2); font-size: .97rem; margin: 0; }

/* Panel */
.panel { border-radius: var(--r-card); padding: clamp(1.8rem, 4vw, 2.9rem); background: var(--brand); color: #fff; }
.panel h2 { color: #fff; }
.panel p { color: rgba(255,255,255,.88); }
.panel a { color: #fff; }
.panel .lede { color: rgba(255,255,255,.88); }

/* The marker is an absolutely-positioned pseudo-element rather than a flex
   item: an <li> laid out as a flex container would split its own <strong>
   away from the sentence around it into separate columns. */
.checklist { list-style: none; padding: 0; margin: 1.4rem 0 0; display: grid; gap: .8rem; }
.checklist li { position: relative; padding-left: 1.9rem; color: var(--ink2); font-size: .98rem; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .3em;
  width: 20px; height: 20px; border-radius: 999px;
  background: var(--positive-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232F6B4F' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/12px no-repeat;
}
.checklist li strong { color: var(--ink); }
.checklist.on-brand li { color: rgba(255,255,255,.9); }
.checklist.on-brand li strong { color: #fff; }
.checklist.on-brand li::before {
  background-color: rgba(255,255,255,.2);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}

/* Languages */
.langs { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.6rem; }
.lang {
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 999px;
  padding: .45rem 1rem; font-size: .95rem; font-weight: 600;
}
.lang span { color: var(--ink3); font-weight: 500; font-size: .85rem; margin-left: .35rem; }

/* FAQ */
.faq { display: grid; gap: .6rem; margin-top: 2rem; }
details.qa { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-tile); padding: 1.05rem 1.3rem; }
details.qa summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary::after { content: "+"; color: var(--brand); font-weight: 700; font-size: 1.3rem; line-height: 1; }
details.qa[open] summary::after { content: "\2013"; }
details.qa p { margin: .8rem 0 0; color: var(--ink2); font-size: .97rem; }

/* ---------- Legal / text pages ---------- */

.doc { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(3.5rem, 8vw, 6rem); }
.doc h1 { font-size: clamp(2rem, 4.6vw, 3rem); }
.doc .updated { color: var(--ink3); font-size: .92rem; margin-top: .7rem; }
.doc h2 {
  font-family: var(--sans); font-size: 1rem; font-weight: 750; letter-spacing: .1em;
  text-transform: uppercase; color: var(--brand);
  margin: 2.7rem 0 .9rem; padding-bottom: .55rem; border-bottom: 1px solid var(--hairline);
}
.doc h3 { margin: 1.8rem 0 .5rem; font-size: 1.05rem; }
.doc p, .doc li { color: var(--ink2); }
.doc ul { padding-left: 1.15rem; margin: 0 0 1.1rem; }
.doc li { margin-bottom: .55rem; }
.doc li strong, .doc p strong { color: var(--ink); }
.doc .callout {
  background: var(--surface); border: 1px solid var(--hairline); border-left: 4px solid var(--saffron);
  border-radius: var(--r-control); padding: 1.15rem 1.35rem; margin: 1.6rem 0;
}
.doc .callout p:last-child { margin-bottom: 0; }

.toc { background: var(--sunk); border-radius: var(--r-tile); padding: 1.2rem 1.4rem; margin: 2.2rem 0 0; }
.toc p { font-weight: 700; color: var(--ink); margin: 0 0 .5rem; font-size: .95rem; }
.toc ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.toc a { font-size: .95rem; font-weight: 600; }

.mono-path {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--sunk); border-radius: 8px; padding: .15rem .5rem; font-size: .9em; color: var(--ink);
}

/* ---------- Footer ---------- */

.site-footer { background: var(--surface); border-top: 1px solid var(--hairline); padding: 3rem 0 2.5rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }
.site-footer h4 { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink3); margin: 0 0 .85rem; font-weight: 700; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.site-footer a { color: var(--ink2); text-decoration: none; font-size: .95rem; font-weight: 600; }
.site-footer a:hover { color: var(--brand); }
.site-footer .about { color: var(--ink2); font-size: .95rem; max-width: 40ch; }
.foot-note { color: var(--ink3); font-size: .88rem; margin: 2.5rem 0 0; padding-top: 1.5rem; border-top: 1px solid var(--hairline); }

/* inset-inline-start (not left) so this doesn't blow out the scrollable
   area in RTL, where a literal "left: -9999px" sits in the direction the
   page actually scrolls rather than safely off in the opposite one. */
.skip { position: absolute; inset-inline-start: -9999px; }
.skip:focus { inset-inline-start: 1rem; top: 1rem; position: fixed; background: #fff; padding: .6rem 1rem; border-radius: 8px; z-index: 99; }

/* ---------- Language switcher ---------- */

.lang-switch {
  appearance: none; -webkit-appearance: none;
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 999px;
  padding: .5rem 1.9rem .5rem 1rem; font-size: .88rem; font-weight: 650; color: var(--ink);
  font-family: inherit; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234B554F' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .55rem center; background-size: 13px;
}
[dir="rtl"] .lang-switch { padding: .5rem 1rem .5rem 1.9rem; background-position: left .55rem center; }
.lang-switch:hover { border-color: #ddd3c5; }

/* Language chips on the home page — now links to the other locale homepages. */
a.lang { text-decoration: none; color: inherit; display: inline-flex; align-items: baseline; gap: .35rem; }
a.lang:hover { border-color: #ddd3c5; color: var(--ink); }

/* ---------- Per-script fonts ----------
   The base --sans / --serif stacks already end in a generic sans-serif /
   serif keyword, so every script renders with *something* reasonable even
   without the rules below. These just make weight and style consistent
   with the Latin pages instead of leaving it to whatever the OS picks. */

:lang(hi), :lang(mr) { --sans: "Noto Sans Devanagari", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; --serif: "Noto Sans Devanagari", var(--sans); }
:lang(bn) { --sans: "Noto Sans Bengali", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; --serif: "Noto Sans Bengali", var(--sans); }
:lang(ta) { --sans: "Noto Sans Tamil", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; --serif: "Noto Sans Tamil", var(--sans); }
:lang(te) { --sans: "Noto Sans Telugu", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; --serif: "Noto Sans Telugu", var(--sans); }
:lang(gu) { --sans: "Noto Sans Gujarati", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; --serif: "Noto Sans Gujarati", var(--sans); }
:lang(kn) { --sans: "Noto Sans Kannada", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; --serif: "Noto Sans Kannada", var(--sans); }
:lang(ml) { --sans: "Noto Sans Malayalam", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; --serif: "Noto Sans Malayalam", var(--sans); }
:lang(pa) { --sans: "Noto Sans Gurmukhi", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; --serif: "Noto Sans Gurmukhi", var(--sans); }
:lang(or) { --sans: "Noto Sans Oriya", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; --serif: "Noto Sans Oriya", var(--sans); }
:lang(ur) { --sans: "Noto Naskh Arabic", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; --serif: "Noto Naskh Arabic", var(--sans); }
:lang(ur) body { line-height: 1.85; } /* Arabic-script joins need a little more room */

/* ---------- RTL (Urdu) ----------
   Mirrors the handful of rules that actually read as "left/right" rather
   than "start/end". Everything else (grids, centered text, icons that
   aren't directional) is unaffected by direction and needs no rule here. */

[dir="rtl"] .nav { margin-left: 0; margin-right: auto; }
[dir="rtl"] .step { grid-template-columns: 1fr 34px; }
[dir="rtl"] .step::before { order: 2; }
[dir="rtl"] .doc .callout { border-left: none; border-right: 4px solid var(--saffron); }
[dir="rtl"] .checklist li::before,
[dir="rtl"] a.lang { direction: ltr; }
