/*
 * smartLekh website: draft. Pramilia house theme.
 * Colours: CompanySetup/brand/design-system/tokens.json (house tokens only:
 * brand-*, md-*, sage-*, gold-tone-*, sky-tone-*, foot). No product accent
 * is assigned to this product yet, so it uses house sage (owner question).
 * Type: Space Grotesk (display), Manrope (body), Noto Sans Devanagari (Hindi),
 * all OFL-1.1, self-hosted. No external requests. No inline styles, so the
 * page works under style-src 'self'. Contrast pairs: website/REVIEW-NOTES.md.
 */

@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/SpaceGrotesk-Variable.ttf") format("truetype");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("fonts/Manrope-Variable.ttf") format("truetype");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans Devanagari";
  src: url("fonts/NotoSansDevanagari-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0900-097F, U+1CD0-1CFF, U+200C-200D, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF;
}
@font-face {
  font-family: "Noto Sans Devanagari";
  src: url("fonts/NotoSansDevanagari-Medium.ttf") format("truetype");
  font-weight: 500 600;
  font-display: swap;
  unicode-range: U+0900-097F, U+1CD0-1CFF, U+200C-200D, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF;
}
@font-face {
  font-family: "Noto Sans Devanagari";
  src: url("fonts/NotoSansDevanagari-Bold.ttf") format("truetype");
  font-weight: 700 800;
  font-display: swap;
  unicode-range: U+0900-097F, U+1CD0-1CFF, U+200C-200D, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF;
}

:root {
  color-scheme: light dark;
  /* House tokens, light (tokens.json). */
  --bg: #FCF9F2;              /* brand-bg, Warm Ivory */
  --surface: #FFFFFF;         /* brand-surface-container */
  --header-bg: #FCF9F2;       /* the light lockup's ground */
  --surface-tint: #E4F1EC;    /* sage-tint */
  --text: #263238;            /* brand-text, 12.5:1 on bg */
  --text-2: #4A585E;          /* ink-2, 7.0:1 on bg */
  --link: #254B3E;            /* sage-dark, 9.3:1 on bg (md-primary is 4.43:1) */
  --link-hover: #3B6354;      /* sage-deep, 6.5:1 */
  --primary: #527D6D;         /* md-primary: button fill */
  --on-primary: #FFFFFF;      /* 4.65:1 on primary */
  --primary-hover: #3B6354;   /* sage-deep, 6.8:1 with white */
  --primary-container: #CDE9DC;
  --on-primary-container: #12382D; /* 10.0:1 */
  --gold-container: #F5E2A9;  /* md-tertiary-container */
  --on-gold-container: #291F04; /* 12.6:1 */
  --sky-container: #D0E7F2;   /* md-secondary-container */
  --on-sky-container: #123544; /* 10.1:1 */
  --line: #E3DED2;            /* decorative divider, not a control border */
  --control-border: #3B6354;  /* 6.5:1, WCAG 1.4.11 */
  --focus: #254B3E;
  --foot: #263238;            /* foot */
  --on-foot: #FCF9F2;         /* 12.5:1 */
  --on-foot-2: #B9C4BE;       /* 7.3:1 */
  --on-foot-link: #C4E2D3;    /* 9.5:1 */
  --mark-line: rgba(38, 50, 56, 0.35);
  --mark-r: #7BAE9B;
  --mark-p: #8EB9D4;
  --mark-a: #B6A7D9;
  --mark-l: #E7B8A5;
  --mark-fulcrum: #D8B66A;
  --mark-letter: #263238;
  --illus-paper: #FFFFFF;
  --illus-line: #CDE9DC;
  --illus-ink: #527D6D;

  --font-display: "Space Grotesk", "Noto Sans Devanagari", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Manrope", "Noto Sans Devanagari", "Helvetica Neue", Arial, sans-serif;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 999px;
  --measure: 70ch;
  --page: 75rem;              /* 1200 px at 16 px; grows with the root size */
  --gutter: clamp(1rem, 4vw, 3rem);
}

/* Dark: house dark tokens (brand-bg dark, never pure black). */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101412;
    --surface: #1D2420;
    --header-bg: #161F24;     /* the dark lockup's ground (surface-ivory dark) */
    --surface-tint: #1F2F2A;
    --text: #E4EAE6;          /* 15.2:1 */
    --text-2: #B9C4BE;        /* 10.4:1 */
    --link: #B2D9C7;          /* 12.1:1 */
    --link-hover: #C4E2D3;
    --primary: #B2D9C7;
    --on-primary: #17382C;    /* 8.3:1 */
    --primary-hover: #C4E2D3;
    --primary-container: #315D4D;
    --on-primary-container: #D0EDDF; /* 6.0:1 */
    --gold-container: #4B3C0C; /* gold-tone-20 */
    --on-gold-container: #F5E2A9; /* 8.4:1 */
    --sky-container: #234858;  /* sky-tone-20 */
    --on-sky-container: #D0E7F2; /* 7.7:1 */
    --line: #2C3632;
    --control-border: #B2D9C7;
    --focus: #B2D9C7;
    --foot: #10181C;
    --on-foot: #E4EAE6;
    --on-foot-2: #B9C4BE;
    --on-foot-link: #C4E2D3;
    --mark-line: rgba(228, 234, 230, 0.25);
    --mark-r: #B2D9C7;
    --mark-p: #AED2E3;
    --mark-a: #C7BCE3;
    --mark-l: #F0CBB8;
    --mark-fulcrum: #E8CA7B;
    --mark-letter: #17382C;
    --illus-paper: #F7F4EA;
    --illus-line: #B5DCCB;
    --illus-ink: #3B6354;
  }
}

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

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
/* Large desktop and 4K at 100% scaling: scale everything a little, so the
   centred column is not a narrow strip. Zoom still works on top of this. */
@media (min-width: 2200px) { html { font-size: 112.5%; } }
@media (min-width: 3000px) { html { font-size: 137.5%; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}
/* Hindi: line height at least 1.5 (accessibility A-11), never letter-spaced (A-15). */
:lang(hi) { line-height: 1.7; letter-spacing: normal; }

img, svg { max-width: 100%; height: auto; }
svg { flex-shrink: 0; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--link-hover); text-decoration-thickness: 2px; }
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--surface);
  color: var(--link);
  border: 2px solid var(--control-border);
  border-radius: var(--radius-md);
  font-weight: 700;
}
.skip-link:focus { top: 1rem; }

.wrap {
  width: 100%;
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Header: house mark first, product lockup beneath it (brand-identity §5).
   The background matches the ground colour baked into the approved
   smartLekh lockup SVGs (#FCF9F2 light, #161F24 dark). */
.site-header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-block: 0.75rem;
}
.lockup {
  display: inline-flex;
  flex-direction: column;
  gap: 0.15rem;
  text-decoration: none;
  color: var(--text);
  min-height: 48px;
  justify-content: center;
}
.lockup:hover { color: var(--text); }
.house {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.house svg { width: 2.25rem; height: 2.25rem; }
.wordmark {
  font-family: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.16em;
  line-height: 1;
}
.product {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: -0.35rem;      /* the lockup SVG has its own clear space */
}
.product img { display: block; height: 3rem; width: auto; }
.house .wordmark { font-size: 1rem; }
.house svg { width: 1.75rem; height: 1.75rem; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.125rem 0.625rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
}
.chip svg { width: 1rem; height: 1rem; }
.chip-beta, .chip-planned { background: var(--primary-container); color: var(--on-primary-container); }
.chip-later { background: var(--gold-container); color: var(--on-gold-container); }
.chip-off { background: var(--sky-container); color: var(--on-sky-container); }

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}
.site-nav a:hover { background: var(--surface-tint); color: var(--text); }
.site-nav a[aria-current="page"] {
  background: var(--primary-container);
  color: var(--on-primary-container);
}
.site-nav .lang-switch a {
  border: 1px solid var(--control-border);
}

/* Draft banner on legal pages. Icon + word, not colour alone. */
.draft-banner {
  background: var(--gold-container);
  color: var(--on-gold-container);
  border-bottom: 1px solid var(--line);
}
.draft-banner .wrap {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding-block: 0.75rem;
}
.draft-banner svg { width: 1.5rem; height: 1.5rem; margin-top: 0.1rem; }
.draft-banner p { margin: 0; font-weight: 600; }

main { display: block; }
main:focus { outline: none; }

/* Type scale (tokens.json, made fluid for phones). */
h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--text);
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 2.75rem); line-height: 1.1; font-weight: 600; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); line-height: 1.15; font-weight: 600; }
h3 { font-size: 1.375rem; line-height: 1.2; font-weight: 600; }
:lang(hi) h1, :lang(hi) h2, :lang(hi) h3 {
  font-family: "Noto Sans Devanagari", "Space Grotesk", sans-serif;
  line-height: 1.5;
  font-weight: 700;
}
.hero-title { font-size: clamp(2.25rem, 1.3rem + 4vw, 4.5rem); line-height: 1.02; font-weight: 700; }
:lang(hi) .hero-title { line-height: 1.45; font-size: clamp(2rem, 1.2rem + 3.4vw, 3.75rem); }
p, ul, ol, dl { margin: 0 0 1em; }
.lede { font-size: 1.1875rem; color: var(--text-2); max-width: 42rem; }
.kicker {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--link-hover);
  margin-bottom: 0.75rem;
}
/* Sentence case, no capitals or tracking (accessibility A-15). */
:lang(hi) .kicker { font-size: 0.9375rem; }
.muted { color: var(--text-2); }

/* Hero */
.hero { padding-block: clamp(2.5rem, 6vw, 5.5rem); }
.hero .wrap {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 900px) {
  .hero .wrap { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
}
.hero-art { max-width: 26rem; justify-self: center; width: 100%; }
.hero-art svg { width: 100%; height: auto; display: block; }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.625rem 1.375rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  text-decoration: none;
  border: 2px solid var(--primary);
}
.button svg { width: 1.25rem; height: 1.25rem; }
.button-filled { background: var(--primary); color: var(--on-primary); }
.button-filled:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--on-primary); }
.button-outline { color: var(--link); border-color: var(--control-border); background: transparent; }
.button-outline:hover { background: var(--surface-tint); color: var(--link); }

/* Sections */
.section { padding-block: clamp(2.5rem, 5vw, 4.5rem); }
.section-tint { background: var(--surface-tint); }
.section-head { max-width: 46rem; margin-bottom: 2rem; }

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.card h3 { font-size: 1.1875rem; margin: 0; }
.card p { margin: 0; color: var(--text-2); }
.card .chip { align-self: flex-start; margin-top: auto; }
.card-icon {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-md);
  background: var(--primary-container);
  color: var(--on-primary-container);
  display: grid;
  place-items: center;
}
.card-icon svg { width: 1.75rem; height: 1.75rem; }

.points { display: grid; gap: 1.25rem; padding: 0; margin: 0 0 1.5rem; list-style: none; }
@media (min-width: 900px) { .points { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.points li {
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
}
.points svg { width: 1.75rem; height: 1.75rem; color: var(--link); margin-top: 0.15rem; }
.points strong { display: block; }

.platforms { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); }
.platforms li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}
.platforms svg { width: 1.75rem; height: 1.75rem; color: var(--link); }
.platforms strong { display: block; }

.note {
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  background: var(--sky-container);
  color: var(--on-sky-container);
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  max-width: var(--measure);
}
.note svg { width: 1.5rem; height: 1.5rem; margin-top: 0.1rem; }
.note p:last-child { margin-bottom: 0; }
.note-gold { background: var(--gold-container); color: var(--on-gold-container); }
.note a { color: inherit; }

/* Long-form legal text: readable line length, centred column. */
.doc { padding-block: clamp(2rem, 4vw, 3.5rem); }
.doc .wrap { max-width: calc(48rem + 2 * var(--gutter)); }
.doc h2 { margin-top: 2.25rem; font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem); }
.doc h3 { margin-top: 1.5rem; font-size: 1.1875rem; }
.doc li { margin-bottom: 0.4em; }
.doc .meta { color: var(--text-2); font-size: 0.9375rem; }
.summary {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-block: 1.5rem;
}
.summary h2 { margin-top: 0; }
.summary ul { margin-bottom: 0; }
.toc { border-left: 3px solid var(--primary-container); padding-left: 1rem; }
.toc ol { margin: 0; padding-left: 1.25rem; }

.table-wrap { overflow-x: auto; margin-bottom: 1.25rem; }
code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.875em;
  overflow-wrap: anywhere;
}
table { border-collapse: collapse; width: 100%; font-size: 0.9375rem; }
caption { text-align: left; font-weight: 700; padding-bottom: 0.5rem; }
th, td { text-align: left; vertical-align: top; padding: 0.625rem 0.75rem; border-bottom: 1px solid var(--line); }
thead th { background: var(--surface-tint); }

.contact-card dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.25rem 1rem; margin: 0; }
.contact-card dt { font-weight: 700; }
.contact-card dd { margin: 0; }
@media (max-width: 480px) {
  .contact-card dl { grid-template-columns: 1fr; }
  .contact-card dd { margin-bottom: 0.5rem; }
}
.placeholder {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--gold-container);
  color: var(--on-gold-container);
  border-radius: 4px;
  padding: 0 0.25em;
}

/* Footer band: house block. */
.site-footer {
  background: var(--foot);
  color: var(--on-foot);
  padding-block: 2.5rem 2rem;
  margin-top: 0;
}
.site-footer a { color: var(--on-foot-link); }
.site-footer a:hover { color: var(--on-foot); }
.site-footer :focus-visible { outline-color: var(--on-foot-link); }
.footer-grid {
  display: grid;
  gap: 2rem;
}
@media (min-width: 800px) {
  .footer-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); }
}
.site-footer .house svg { width: 2.25rem; height: 2.25rem; }
.site-footer .wordmark { color: var(--on-foot); }
.tagline { margin: 0.75rem 0 0; color: var(--on-foot-2); font-size: 0.9375rem; }
.site-footer h2 {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--on-foot);
  margin: 0 0 0.5rem;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li a { display: inline-flex; min-height: 44px; align-items: center; }
.footer-legal { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid rgba(185, 196, 190, 0.3); color: var(--on-foot-2); font-size: 0.875rem; }
.footer-legal p { margin: 0 0 0.25rem; }
.site-footer .placeholder { background: rgba(245, 226, 169, 0.16); color: var(--on-foot); }

/* The mark, as inline SVG coloured from tokens. */
.mark-line { stroke: var(--mark-line); }
.mark-r { fill: var(--mark-r); }
.mark-p { fill: var(--mark-p); }
.mark-a { fill: var(--mark-a); }
.mark-l { fill: var(--mark-l); }
.mark-f { fill: var(--mark-fulcrum); }
.mark-t { fill: var(--mark-letter); font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 18px; }
.site-footer .mark-line { stroke: rgba(228, 234, 230, 0.35); }

.illus-paper { fill: var(--illus-paper); stroke: var(--line); }
.illus-line { fill: var(--illus-line); }
.illus-ink { fill: var(--illus-ink); }
.illus-stroke { stroke: var(--illus-ink); fill: none; }
.illus-gold { fill: var(--mark-fulcrum); }

@media (prefers-reduced-motion: no-preference) {
  .button, .site-nav a { transition: background-color 120ms ease, color 120ms ease; }
}

@media print {
  .site-nav, .skip-link, .hero-art { display: none; }
  .site-footer { background: none; color: #000; }
  a { color: #000; }
}
