/* Kalpurush — the Bangla face, self-hosted (SIL OFL 1.0, see assets/kalpurush-license.md).
   The unicode-range confines it to the Bengali block, so Latin inside a Bangla
   sentence (Pflegeling, A1, B2, Aufnahmebericht) still renders in the site's
   own faces rather than Kalpurush's weaker Latin. */
@font-face {
  font-family: "Kalpurush";
  src: url("assets/kalpurush.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0980-09FF, U+200C-200D, U+20B9, U+25CC, U+00A0;
}

/* Pflegeling — one stylesheet for the whole site.
   Direction: "Night Ward" — dark-dominant, gold light, Instrument Serif display.
   ponytail: single dark theme on purpose; the design is the theme. */

:root {
  color-scheme: dark;

  --bg:         #070B14;
  --surface:    #0C1220;
  --surface-2:  #10182A;
  --ink:        #E9E5DC;
  --muted:      #A7B2C8;
  --dim:        #8E9AB4;
  --dimmer:     #6E7A92;
  --gold:       #D6B675;
  --gold-soft:  #E8CE96;
  --rule:       rgba(233, 229, 220, .12);
  --rule-soft:  rgba(233, 229, 220, .07);
  --glass:      rgba(233, 229, 220, .05);

  --glow-gold:  0 0 90px -20px rgba(214, 182, 117, .28);
  --shadow:     0 50px 90px -30px rgba(0, 0, 0, .9);

  --r-sm: 10px;
  --r:    18px;
  --r-lg: 26px;

  --wrap: 72rem;

  /* the generator swaps --script per locale (Bengali, Devanagari, Nastaliq …) */
  --script: Georgia;
  --serif: "Instrument Serif", var(--script), Georgia, "Times New Roman", serif;
  --sans: "Public Sans", var(--script), -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.68 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--gold-soft); }
::selection { background: var(--gold); color: #0A101D; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -.02em;
  margin: 0 0 1rem;
  color: #fff;
}
h1 { font-size: clamp(2.6rem, 5.6vw, 5.2rem); }
h2 { font-size: clamp(2rem, 3.8vw, 2.9rem); line-height: 1.06; }
h3 { font-size: 1.4rem; line-height: 1.15; margin-bottom: .45rem; }
p  { margin: 0 0 1.1rem; }
p:last-child { margin-bottom: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 1.5rem; }
.muted { color: var(--muted); }
.lede { font-size: 1.1rem; line-height: 1.7; color: var(--muted); }

.kicker {
  font: 500 .7rem/1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1.1rem;
}
.section-head { max-width: 38rem; margin-bottom: 2.75rem; }
section { padding: clamp(3.5rem, 7vw, 5.5rem) 0; }

/* ─────────────────────────── header ─────────────────────────── */

.site-head {
  position: sticky; top: 0; z-index: 40;
  background: rgba(7, 11, 20, .72);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--rule-soft);
}
.site-head .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 70px; }
.brand {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--serif); font-size: 1.4rem; font-weight: 400;
  color: #fff; text-decoration: none; letter-spacing: .005em;
}
.brand img { width: 30px; height: 30px; border-radius: 9px; }
.site-head nav { display: flex; gap: 1.5rem; align-items: center; margin-inline-start: auto; }
.site-head nav a { color: var(--dim); text-decoration: none; font-size: .94rem; white-space: nowrap; }
.site-head nav a:hover, .site-head nav a[aria-current] { color: var(--ink); }

.langs { display: flex; gap: .2rem; align-items: center; }
.langs a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.2rem; height: 1.9rem; padding-inline: .5rem;
  border-radius: 999px; font: 500 .72rem/1 var(--mono); letter-spacing: .04em;
  color: var(--dim); text-decoration: none; border: 1px solid transparent;
}
.langs a:hover { color: var(--ink); border-color: var(--rule); }
.langs a[aria-current] { background: var(--gold); color: #070B14; }

@media (max-width: 1080px) { .site-head nav .anchor { display: none; } }
@media (max-width: 640px) {
  .site-head .wrap { flex-wrap: wrap; gap: .5rem 1rem; padding-block: .7rem; min-height: 0; }
  .site-head nav { margin-inline-start: auto; gap: 1.1rem; }
  .langs { width: 100%; order: 3; }
}

/* ─────────────────────────── buttons ─────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.7rem; border-radius: 999px;
  font: 600 .97rem/1 var(--sans); text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary, .btn-gold { background: var(--gold); color: #0A101D; }
.btn-primary:hover, .btn-gold:hover { background: var(--gold-soft); color: #0A101D; }
.btn-ghost, .btn-ghost-dark { border-color: rgba(233,229,220,.26); color: var(--ink); }
.btn-ghost:hover, .btn-ghost-dark:hover { border-color: var(--gold); color: #fff; }
.btn-sm { padding: .55rem 1.15rem; font-size: .86rem; }
@media (max-width: 480px) { .btn-head { display: none; } }

/* ─────────────────────────── hero ─────────────────────────── */

.hero {
  position: relative;
  padding: clamp(3rem, 6vw, 4.5rem) 0 clamp(2.5rem, 5vw, 3.5rem);
  overflow: hidden;
  background:
    radial-gradient(900px 520px at 78% 6%, rgba(214,182,117,.16), transparent 62%),
    radial-gradient(760px 520px at 2% 74%, rgba(44,70,124,.55), transparent 66%),
    linear-gradient(180deg, #070B14 0%, #0A101D 62%, #070B14 100%);
}
.hero > .wrap { position: relative; display: grid; gap: clamp(2rem, 4vw, 3.5rem);
  grid-template-columns: 1.08fr .92fr; align-items: center; }

/* the eyebrow becomes a lit badge in this direction */
.hero .kicker {
  display: inline-flex; align-items: center; gap: .6rem;
  border: 1px solid rgba(214,182,117,.4); border-radius: 999px;
  padding: .5rem 1rem; margin-bottom: 1.9rem;
}
.hero .kicker::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 10px 1px rgba(214,182,117,.8);
}
.hero h1 { margin-bottom: 1.6rem; }
.hero h1 .hl { color: var(--gold); font-style: italic; }
.hero p.lede { max-width: 33rem; }
.hero-cta { display: flex; gap: .75rem; flex-wrap: wrap; margin: 2rem 0 1rem; }
.hero-note { font-size: .84rem; color: var(--dimmer); margin: 0; }

.ribbon { display: flex; gap: .5rem; flex-wrap: wrap; margin: 0 0 1.7rem; }
.chip {
  display: inline-flex; align-items: baseline; gap: .45rem;
  padding: .4rem .85rem; border-radius: 999px;
  border: 1px solid var(--rule); background: var(--glass);
  font-size: .82rem; color: var(--muted);
}
.chip b { font: 500 .78rem/1 var(--mono); color: var(--gold); letter-spacing: .05em; }

.phones { display: flex; justify-content: center; gap: 1.4rem; align-items: flex-start; }
.phones img {
  width: 47%; max-width: 250px; border-radius: var(--r-lg);
  border: 1px solid rgba(233,229,220,.16);
  box-shadow: var(--shadow), var(--glow-gold);
}
.phones img:last-child { margin-top: 3.4rem; box-shadow: var(--shadow); }
@media (max-width: 900px) {
  .hero > .wrap { grid-template-columns: 1fr; }
  .phones { justify-content: flex-start; }
}

/* ─────────────────────────── stats rail ─────────────────────────── */

.stats { padding: 0; }
.stats .wrap {
  display: flex; align-items: center; gap: 2.6rem; flex-wrap: wrap;
  padding-block: 1.5rem;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.stat { display: flex; align-items: baseline; gap: .6rem; font-size: .95rem; color: var(--dim); }
.stat b { font: 400 1.9rem/1 var(--serif); color: var(--gold); }
@media (max-width: 720px) { .stats .wrap { gap: 1.1rem 2rem; } .stat { font-size: .88rem; } }

/* ─────────────────────────── cards & grids ─────────────────────────── */

.grid-4 { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.grid-3 { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.card {
  background: var(--glass); border: 1px solid var(--rule); border-radius: var(--r);
  padding: 1.5rem;
}
.card .de {
  font: 500 .68rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 .9rem;
}
.card h3 { font-size: 1.5rem; margin-bottom: .5rem; }
.card p { font-size: .95rem; line-height: 1.62; color: var(--muted); }

/* ─────────────────────────── AI feedback ─────────────────────────── */

.feedback { background: var(--surface); border-block: 1px solid var(--rule); }
.feedback .wrap { display: grid; gap: clamp(2rem, 5vw, 3.5rem);
  grid-template-columns: 1fr 1fr; align-items: center; }
@media (max-width: 900px) { .feedback .wrap { grid-template-columns: 1fr; } }

.grade {
  background: var(--surface-2); border: 1px solid var(--rule);
  border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow);
}
.grade-top {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .95rem 1.3rem; border-bottom: 1px solid var(--rule);
}
.grade-top span { font: 500 .7rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.grade-top b { font: 400 1.35rem/1 var(--serif); color: var(--gold); }
.grade-body { padding: 1.4rem; display: grid; gap: 1.3rem; }
.grade h4 {
  font: 500 .68rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase;
  margin: 0 0 .7rem; color: var(--dim);
}
.grade ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .5rem; }
.grade li { position: relative; padding-inline-start: 1.6rem; font-size: .93rem; line-height: 1.55; color: var(--ink); }
.grade li::before {
  content: "✓"; position: absolute; inset-inline-start: 0; top: -.05em;
  font-size: .9rem; color: #5FBF98;
}
.grade .fix li::before { content: "→"; color: var(--gold); }
.correction {
  font-family: var(--serif); font-size: 1.15rem; line-height: 1.75;
  background: rgba(0,0,0,.28); border: 1px dashed var(--rule);
  border-radius: var(--r-sm); padding: .9rem 1rem; color: var(--ink);
}
.correction del { color: #E38578; text-decoration-thickness: 1px; margin-inline-end: .3rem; }
.correction ins { color: #6FCBA3; text-decoration: none; }

/* ─────────────────────────── path ─────────────────────────── */

.path-list { display: grid; }
.step {
  display: grid; grid-template-columns: 6rem 1fr; gap: 1.6rem; align-items: baseline;
  padding: 1.7rem 0; border-top: 1px solid var(--rule);
}
.step:last-child { border-bottom: 1px solid var(--rule); }
.step p.step-badge {
  font: 400 2.1rem/1 var(--serif); color: var(--gold);
  display: flex; align-items: baseline; gap: .6rem; margin: 0;
}
.step-badge i { display: none; }
.step h3 { margin-bottom: .35rem; }
.step p { color: var(--muted); font-size: .96rem; margin: 0; }
@media (max-width: 560px) { .step { grid-template-columns: 1fr; gap: .4rem; } }

/* ─────────────────────────── screens ─────────────────────────── */

.shots { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.shot { margin: 0; }
.shot img {
  border-radius: 22px; border: 1px solid rgba(233,229,220,.14);
  box-shadow: var(--shadow);
}
.shot p { margin: 1.1rem 0 0; font-size: .93rem; color: var(--muted); }

/* ─────────────────────────── languages ─────────────────────────── */

.langband { background: var(--surface); border-block: 1px solid var(--rule); }
.scripts { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 2rem; }
.scripts a {
  display: inline-flex; align-items: center; padding: .65rem 1.2rem;
  border: 1px solid var(--rule); border-radius: 999px;
  color: var(--ink); text-decoration: none; font-size: 1rem;
}
.scripts a:hover { border-color: var(--gold); color: #fff; }
.scripts a[aria-current] { background: var(--gold); color: #070B14; border-color: var(--gold); }

/* ─────────────────────────── FAQ ─────────────────────────── */

.faq { max-width: 46rem; margin-inline: auto; }
.faq h2 { margin-bottom: 2rem; }
.faq details { border-top: 1px solid var(--rule); padding: 1.2rem 0; }
.faq details:last-of-type { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer; list-style: none; display: flex; gap: 1rem; align-items: baseline;
  font-family: var(--serif); font-size: 1.35rem; color: #fff;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; margin-inline-start: auto; color: var(--gold);
  font: 400 1.5rem/1 var(--sans);
}
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: .9rem 0 0; color: var(--muted); font-size: .97rem; }

/* ─────────────────────────── final CTA ─────────────────────────── */

.cta {
  text-align: center; position: relative; overflow: hidden;
  background: radial-gradient(44rem 24rem at 50% 118%, rgba(214,182,117,.22), transparent 65%), #05080F;
}
.cta .wrap { position: relative; max-width: 44rem; }
.cta p { color: var(--muted); }
.cta .btn { margin: 1.9rem 0 1rem; font-family: var(--mono); font-size: .92rem; letter-spacing: .02em; }
.cta .note { font-size: .84rem; color: var(--dimmer); }

/* ─────────────────────────── footer ─────────────────────────── */

.site-foot { border-top: 1px solid var(--rule); padding: 3rem 0 3.5rem; font-size: .92rem; color: var(--dim); }
.site-foot .wrap { display: grid; gap: 2rem; grid-template-columns: 1.3fr 1fr; align-items: start; }
.site-foot .brand { font-size: 1.2rem; margin-bottom: .7rem; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; margin-bottom: 1rem; }
.site-foot a { color: var(--dim); text-decoration: none; }
.site-foot a:hover { color: var(--ink); text-decoration: underline; }
.site-foot .fine { font-size: .81rem; line-height: 1.65; color: var(--dimmer); }
@media (max-width: 720px) { .site-foot .wrap { grid-template-columns: 1fr; } }

/* ─────────────────── prose (blog + legal) ───────────────────
   Long-form on near-black is the one real cost of this direction, so reading
   pages sit on the lighter surface with a tighter measure and looser leading. */

body.reading { background: var(--surface); }
.prose {
  max-width: 42rem; margin-inline: auto; padding: 3.5rem 1.5rem 4.5rem;
  font-size: 1.04rem; line-height: 1.78; color: #DCD9D0;
}
.prose h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); line-height: 1.04; margin-bottom: 1.4rem; }
.prose h2 { font-size: 1.75rem; margin: 2.8rem 0 .8rem; }
.prose h3 { font-size: 1.25rem; margin: 2rem 0 .5rem; }
.prose ul, .prose ol { padding-inline-start: 1.3rem; margin: 0 0 1.2rem; }
.prose li { margin-bottom: .6rem; }
.prose strong { color: #fff; font-weight: 600; }
.prose code {
  background: rgba(233,229,220,.08); padding: .12em .4em; border-radius: .3rem;
  font: .86em var(--mono); color: var(--gold-soft);
}
.prose blockquote {
  margin: 1.9rem 0; padding: 1rem 1.3rem;
  border-inline-start: 2px solid var(--gold); background: rgba(233,229,220,.04);
  border-radius: 0 var(--r-sm) var(--r-sm) 0; color: var(--muted);
}
.prose blockquote p { font-size: .99rem; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.9rem 0; font-size: .95rem; }
.prose th, .prose td { text-align: start; padding: .75rem .6rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.prose th { font-family: var(--serif); font-size: 1.05rem; color: #fff; font-weight: 400; }
.table-scroll { overflow-x: auto; }
.meta {
  color: var(--gold); font: 500 .74rem/1 var(--mono); letter-spacing: .12em;
  text-transform: uppercase; margin-bottom: 1.5rem;
}

.posts { display: grid; gap: 1rem; }
.post-link { display: block; text-decoration: none; color: inherit; }
.post-link .card { transition: transform .15s ease, border-color .15s ease; }
.post-link:hover .card { border-color: var(--gold); transform: translateY(-2px); }
.post-link h3 { font-size: 1.45rem; }
.post-link .card p { color: var(--muted); }

/* ─────────────── scripts that need more room than the Latin defaults ─────────────── */

html[lang="bn"] { font-size: 108%; }          /* Kalpurush runs small next to Latin */
/* Bangla sets wider than Latin at the same size, so the display sizes come down
   a step to keep the hero from running to six lines. */
html[lang="bn"] h1 { font-size: clamp(1.9rem, 3.8vw, 2.9rem); }
html[lang="bn"] h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); }
html[lang="bn"] .faq summary { font-size: 1.15rem; }
html[lang="bn"] h1, html[lang="hi"] h1 { line-height: 1.3; }
html[lang="bn"] h2, html[lang="hi"] h2,
html[lang="bn"] h3, html[lang="hi"] h3 { line-height: 1.36; }
html[lang="bn"] .kicker, html[lang="hi"] .kicker { letter-spacing: .06em; }

/* Nastaliq sits on a steep baseline: it needs roughly double leading, no tracking,
   and a smaller display size than a Latin face at the same optical weight. */
html[lang="ur"] body { line-height: 2.05; }
html[lang="ur"] h1 { font-size: clamp(1.9rem, 3.4vw, 2.9rem); line-height: 2; letter-spacing: 0; }
html[lang="ur"] h2 { font-size: clamp(1.5rem, 2.8vw, 2.2rem); line-height: 1.95; letter-spacing: 0; }
html[lang="ur"] h3 { font-size: 1.25rem; line-height: 1.9; letter-spacing: 0; }
html[lang="ur"] .kicker { font-family: var(--sans); letter-spacing: .04em; }
html[lang="ur"] .faq summary { font-size: 1.15rem; line-height: 1.9; }
html[lang="ur"] .grade li { line-height: 1.95; }
html[lang="ur"] .step-badge, html[lang="ur"] .stat b { font-family: "Public Sans", sans-serif; font-weight: 600; }

/* ─────────────────────────── RTL ─────────────────────────── */

[dir="rtl"] .correction { direction: ltr; text-align: start; }
[dir="rtl"] .chip b, [dir="rtl"] .step-badge { direction: ltr; }

/* Instrument Serif's italic has no counterpart in the script faces — a synthesised
   slant on Bengali, Devanagari or Nastaliq looks broken, so those locales stay upright. */
html[lang="bn"] .hero h1 .hl,
html[lang="hi"] .hero h1 .hl,
html[lang="ur"] .hero h1 .hl { font-style: normal; }
