
:root {
  --bg: #FFFFFF;
  --ink: #0B0C0C;
  --muted: #5E6463;
  --surface: #F2F4F3;
  --kashi: #087A76;
  --hair: #D7DDDB;
  --faint: #BCC5C3;
  --sans: "Recursive", ui-sans-serif, system-ui, sans-serif;
  --nast: "Noto Nastaliq Urdu", serif;
  --pad: clamp(20px, 4.4vw, 72px);
  --ease: cubic-bezier(.7, 0, .2, 1);
  --out: cubic-bezier(.16, 1, .3, 1);
}
html { background: var(--bg); color: var(--ink); font-family: var(--sans); font-variation-settings: "MONO" 0; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body { font-size: 18px; line-height: 1.5; font-weight: 400; }
em, i { font-style: normal; }
button, input { font-variation-settings: "MONO" 0; }
p, h1, h2, h3, figure { margin: 0; }
::selection { background: var(--kashi); color: #fff; }
.mono { font-variation-settings: "MONO" 1; }
.ur { font-family: var(--nast); font-weight: 400; line-height: 2.3; }
.muted { color: var(--muted); }
.k { color: var(--kashi); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wrap { width: 100%; max-width: 1480px; margin-inline: auto; padding-inline: var(--pad); }
.label { font-size: 12px; line-height: 1.4; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-variation-settings: "MONO" 1; }

/* Ruled baseline (takhti): a 1px rule under every line box, placed on the text baseline from the font metrics.
   Recursive: ascent .95, descent .25. Nastaliq: ascent 1.904, descent .596. */
.ruled { --rc: var(--hair); position: relative; isolation: isolate; }
.ruled > .rl { position: absolute; inset: 0; z-index: -1; pointer-events: none; background-image: linear-gradient(to bottom, transparent var(--b), var(--rc) var(--b), var(--rc) calc(var(--b) + 1px), transparent calc(var(--b) + 1px)); background-size: 100% var(--lh); background-repeat: repeat-y; }

/* ---------- Buttons (kit wipe only) ---------- */
.btn { --k-fill: var(--ink); --k-fill-ink: #fff; display: inline-flex; align-items: center; gap: 12px; height: 50px; padding: 0 20px 0 24px; border-radius: 12px; border: 0; background: var(--kashi); color: #fff; font: 500 16px/1 var(--sans); font-variation-settings: "MONO" 0; text-decoration: none; white-space: nowrap; transition: transform .25s var(--out), color .45s var(--ease); }
.btn svg { width: 15px; height: 15px; }
.btn:active, .chipbtn:active, .vn-play:active, .copy:active, .tab:active { transform: scale(.97); }
.btn:focus-visible, .chipbtn:focus-visible, .vn-play:focus-visible, .copy:focus-visible, .tab:focus-visible, a:focus-visible, pre:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.btn--sm { height: 44px; padding: 0 16px 0 20px; font-size: 15px; border-radius: 11px; }

/* ---------- Nav ---------- */
.nav { position: absolute; top: 0; left: 0; right: 0; z-index: 20; }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 92px; }
.brand { display: inline-flex; align-items: baseline; gap: 10px; text-decoration: none; }
.brand-lat { font-weight: 600; font-size: 24px; letter-spacing: -.03em; line-height: 1; }
.brand-ur { font-size: 19px; line-height: 2.2; color: var(--kashi); }
.nav-right { display: flex; align-items: center; gap: clamp(20px, 2.6vw, 40px); }
.nav-links { display: flex; gap: clamp(20px, 2.4vw, 36px); }
.nav-links a { font-size: 15px; text-decoration: none; padding: 10px 0; color: var(--ink); background-position: 100% 78%; }
.nav-links a:is(:hover, :focus-visible) { background-position: 0 78%; }

/* ---------- Hero ---------- */
.hero { min-height: 100svh; display: flex; flex-direction: column; padding-top: 92px; padding-bottom: clamp(40px, 7vh, 80px); }
.hero-head { padding-top: clamp(40px, 10vh, 120px); }
.h1 { font-weight: 500; font-size: clamp(46px, 8vw, 128px); line-height: 1; letter-spacing: -.048em; max-width: 9em; }
.h1 .split-line { padding-bottom: .16em; margin-bottom: -.16em; }
.lede { margin-top: clamp(22px, 2.4vw, 34px); font-size: clamp(17px, 1.35vw, 21px); line-height: 1.5; color: var(--muted); max-width: 30em; text-wrap: balance; }

.pad { --ur-fs: clamp(36px, 3.6vw, 60px); --lat-fs: clamp(18px, 2vw, 30px); --seam: clamp(40px, 5vw, 88px); margin-top: auto; padding-top: clamp(64px, 11vh, 140px); }
.pad-line { position: relative; display: flex; align-items: flex-start; gap: var(--seam); }
.half { position: relative; flex: 1 1 0; min-width: 0; }
.half .label { display: block; height: 17px; line-height: 17px; margin-bottom: 18px; }
.urd .label { text-align: right; }
.line { position: relative; }
.lat .line { padding-top: max(0px, calc(var(--ur-fs) * 1.804 - var(--lat-fs) * .962)); }
.pad-input { display: block; width: 100%; height: calc(var(--lat-fs) * 1.3); line-height: calc(var(--lat-fs) * 1.3); margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--ink); font: 400 var(--lat-fs) var(--sans); font-variation-settings: "MONO" 0; letter-spacing: 0; caret-color: transparent; outline: none; -webkit-appearance: none; appearance: none; }
.pad-input::placeholder { color: var(--muted); opacity: 1; }
.urdu-out { height: calc(var(--ur-fs) * 2.3); font-size: var(--ur-fit, var(--ur-fs)); line-height: calc(var(--ur-fs) * 2.3); padding-top: calc(var(--ur-fs) * .654 - var(--ur-fit, var(--ur-fs)) * .654); white-space: nowrap; text-align: right; color: var(--ink); }
.w { display: inline-block; padding: .4em .2em; margin: -.4em -.2em; }
.rule { position: absolute; height: 1px; background: var(--ink); top: calc(var(--ur-fs) * 1.804); }
.lat .rule { left: 0; right: calc(var(--seam) / -2); transform-origin: 0 50%; }
.urd .rule { right: 0; left: calc(var(--seam) / -2); transform-origin: 100% 50%; }
.lat:focus-within .rule { background: var(--kashi); height: 2px; }
.seam { position: absolute; left: 50%; top: calc(35px + var(--ur-fs) * 1.804 - 7px); width: 1px; height: 15px; background: var(--ink); }
.mirror { position: absolute; left: 0; right: 0; top: 0; overflow: hidden; visibility: hidden; white-space: pre; font: 400 var(--lat-fs) var(--sans); font-variation-settings: "MONO" 0; letter-spacing: 0; pointer-events: none; }
.nib { position: absolute; left: 0; top: calc(var(--ur-fs) * 1.804 - 27px); width: 12px; height: 28px; color: var(--kashi); pointer-events: none; transition: transform .14s var(--out); }
.nib svg { width: 12px; height: 28px; transform-origin: 47% 97%; transform: rotate(24deg); }
.nib.is-idle svg { animation: blink 1.15s ease-in-out infinite; }
@keyframes blink { 0%, 45% { opacity: 1; } 60%, 85% { opacity: .15; } 100% { opacity: 1; } }
.pad-foot { display: flex; justify-content: center; margin-top: 14px; min-height: 40px; }
.intent { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; padding: 9px 16px; border: 1px solid var(--hair); border-radius: 999px; font-size: 13px; line-height: 1.4; color: var(--ink); font-variation-settings: "MONO" 1; transition: opacity .4s var(--ease), transform .5s var(--out); }
.intent .ck { color: var(--muted); }
.intent .cs { color: var(--faint); }
.intent.is-off { opacity: 0; transform: translateY(6px); }

/* ---------- Section rhythm ---------- */
.sec { padding-block: clamp(120px, 15vw, 230px); }
.h2 { font-weight: 500; font-size: clamp(38px, 5vw, 80px); line-height: 1.02; letter-spacing: -.04em; }
.h3 { font-weight: 500; font-size: clamp(28px, 3vw, 46px); line-height: 1.16; letter-spacing: -.032em; max-width: 21em; }

/* ---------- Readings ---------- */
.readings { padding-block: clamp(100px, 12vw, 180px); }
.readings-inner { display: grid; grid-template-rows: auto 1fr auto; row-gap: clamp(56px, 8vh, 110px); }
.readings.is-pinned { padding-block: 0; }
.readings.is-pinned .readings-inner { height: 100vh; padding-top: clamp(96px, 14vh, 150px); padding-bottom: clamp(40px, 7vh, 72px); }
.readings-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.r-count { font-size: 13px; color: var(--muted); font-variation-settings: "MONO" 1; }
.r-count b { font-weight: 500; color: var(--ink); }
.stage { display: grid; align-items: center; }
.panel { grid-area: 1 / 1; opacity: 0; visibility: hidden; transform: translateY(14px); transition: opacity .45s var(--ease), transform .6s var(--out), visibility 0s linear .45s; }
.panel.is-on { opacity: 1; visibility: visible; transform: none; transition: opacity .6s var(--ease) .08s, transform .8s var(--out) .08s, visibility 0s; }
.panel .label { margin-bottom: 30px; }
.panel--ur .label { text-align: right; }
.rd-lat { --b: 1em; --lh: 1.3em; font-size: clamp(30px, 3.7vw, 58px); line-height: 1.3; letter-spacing: -.02em; max-width: 20em; padding-bottom: .1em; }
.rd-ur { --b: 1.804em; --lh: 2.3em; font-size: clamp(36px, 4.2vw, 68px); text-align: right; }
.rd-json { margin: 0; font-size: clamp(16px, 1.4vw, 20px); line-height: 1.8; color: var(--ink); font-family: var(--sans); font-variation-settings: "MONO" 1; white-space: pre; overflow-x: auto; }
.rd-json .jk { color: var(--muted); }
.rd-json .js { color: var(--kashi); }
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(10px, 2vw, 32px); }
.tab { --k-fill: var(--surface); --k-fill-ink: var(--ink); display: grid; justify-items: start; gap: 6px; padding: 14px 14px 0; border: 0; border-radius: 12px 12px 0 0; background: transparent; text-align: left; color: var(--muted); transition: transform .25s var(--out), color .45s var(--ease); }
.tab-n { font-size: 13px; font-variation-settings: "MONO" 1; }
.tab-l { font-size: 17px; font-weight: 500; }
.tab[aria-selected="true"] { color: var(--ink); }
.tab[aria-selected="true"] .tab-n { color: var(--kashi); }
.tab-bar { position: relative; justify-self: stretch; height: 2px; margin-top: 16px; background: var(--hair); overflow: hidden; }
.tab-fill { position: absolute; inset: 0; background: var(--kashi); transform: scaleX(0); transform-origin: 0 50%; }

/* ---------- Photo ---------- */
.photo-fig { position: relative; margin-top: clamp(48px, 6vw, 96px); }
.photo-frame { width: 84%; aspect-ratio: 16 / 10; border-radius: 24px; overflow: hidden; background: var(--surface); }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 58%; }
.read-card { position: absolute; right: 0; bottom: 11%; width: clamp(260px, 22vw, 320px); padding: 22px 26px 22px; background: #fff; border: 1px solid var(--hair); border-radius: 20px; }
.rc-top { display: flex; justify-content: space-between; }
.rc-ur { --b: 1.754em; --lh: 2.2em; --rc: var(--ink); font-size: 46px; line-height: 2.2; text-align: right; margin-top: 2px; }
.rc-rom { margin-top: 12px; font-size: 22px; font-weight: 500; letter-spacing: -.02em; line-height: 1.2; }
.rc-en { margin-top: 4px; font-size: 16px; color: var(--muted); }
.rc-conf { display: flex; justify-content: space-between; align-items: baseline; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--hair); font-size: 13px; font-variation-settings: "MONO" 1; }
.rc-conf b { font-weight: 500; color: var(--ink); }

/* ---------- Voice ---------- */
.voice-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: center; }
.voice-photo { grid-column: 1 / span 6; aspect-ratio: 5 / 6; border-radius: 24px; overflow: hidden; background: var(--surface); }
.voice-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 16% 50%; }
.voice-side { grid-column: 8 / span 5; }
.vn { margin-top: clamp(36px, 4vw, 56px); padding: clamp(22px, 2.2vw, 32px); background: var(--surface); border-radius: 24px; }
.vn-row { display: flex; align-items: center; gap: 18px; }
.vn-play { --k-fill: var(--ink); --k-fill-ink: #fff; flex: none; display: grid; place-items: center; width: 56px; height: 56px; padding: 0; border: 0; border-radius: 50%; background: var(--kashi); color: #fff; transition: transform .25s var(--out), color .45s var(--ease); }
.vn-play svg { width: 18px; height: 18px; }
.vn-play .i-stop { display: none; }
.vn-play[aria-pressed="true"] .i-play { display: none; }
.vn-play[aria-pressed="true"] .i-stop { display: block; }
.vn-wave { flex: 1 1 auto; min-width: 0; height: 44px; }
.vn-wave rect { transition: fill .25s linear; }
.vn-time { flex: none; font-size: 13px; color: var(--muted); font-variation-settings: "MONO" 1; min-width: 2.8em; text-align: right; }
.vn-text { margin-top: 26px; }
.vn-ur { --b: 1.804em; --lh: 2.3em; font-size: clamp(26px, 2.3vw, 36px); text-align: right; min-height: 2.3em; }
.vn-rom { margin-top: 6px; min-height: 1.5em; font-size: 16px; color: var(--muted); }
.vn-rom span { display: inline-block; }
.vn-langs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--hair); }
.chipbtn { --k-fill: var(--ink); --k-fill-ink: #fff; height: 40px; padding: 0 16px; border: 1px solid var(--faint); border-radius: 999px; background: var(--surface); color: var(--ink); font: 400 14px/1 var(--sans); font-variation-settings: "MONO" 1; transition: transform .25s var(--out), color .45s var(--ease), border-color .45s var(--ease); }
.chipbtn[aria-pressed="true"] { background: var(--kashi); border-color: var(--kashi); color: #fff; }

/* ---------- Build ---------- */
.build-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }
.build-head { grid-column: 1 / span 4; }
.build-head p { margin-top: 22px; color: var(--muted); max-width: 18em; }
.code { grid-column: 6 / span 7; background: var(--surface); border-radius: 20px; overflow: hidden; }
.code-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 14px 12px 24px; border-bottom: 1px solid var(--hair); }
.copy { --k-fill: var(--ink); --k-fill-ink: #fff; height: 38px; padding: 0 16px; border: 1px solid var(--faint); border-radius: 10px; background: #fff; color: var(--ink); font: 400 13px/1 var(--sans); font-variation-settings: "MONO" 1; transition: transform .25s var(--out), color .45s var(--ease), border-color .45s var(--ease); }
.code pre { margin: 0; padding: 26px 24px 30px; overflow-x: auto; font: 400 15px/1.8 var(--sans); font-variation-settings: "MONO" 1; color: var(--ink); }
.code .c-f { color: var(--muted); }
.code .c-s { color: var(--kashi); }
.price { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; margin-top: clamp(96px, 11vw, 170px); }
.price-line { --b: 1em; --lh: 1.3em; --rc: var(--ink); font-size: clamp(28px, 3.5vw, 56px); font-weight: 500; line-height: 1.3; letter-spacing: -.032em; max-width: 17em; padding-bottom: .12em; }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--hair); padding-block: clamp(56px, 7vw, 104px) clamp(28px, 3.4vw, 44px); }
.foot-grid { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; }
.foot-left { display: grid; gap: 22px; padding-bottom: 8px; }
.foot-mean { font-size: 20px; font-weight: 500; letter-spacing: -.02em; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.foot-links a { font-size: 15px; text-decoration: none; padding: 6px 0; background-position: 100% 82%; }
.foot-links a:is(:hover, :focus-visible) { background-position: 0 82%; }
.foot-concept { font-size: 13px; color: var(--muted); }
.foot-word { --b: 1.754em; --lh: 2.2em; --rc: var(--ink); font-size: clamp(120px, 16vw, 250px); line-height: 2.2; margin: -.72em 0 -.36em; padding-left: .42em; }
@media (hover: none) { .tab[data-hover]::before { display: none; } }
.foot-nib { display: inline-block; width: .085em; margin-right: .12em; color: var(--kashi); vertical-align: baseline; }
.foot-nib svg { width: 100%; height: auto; transform-origin: 47% 97%; transform: rotate(24deg); }

/* ---------- Intro states (motion mode only) ---------- */
.kit-js:not(.is-static):not(.no-anim) .pad .rule { transform: scaleX(0); }
.kit-js:not(.is-static):not(.no-anim) :is(.pad .label, .seam, .nib) { opacity: 0; }

/* ---------- Tablet and phone ---------- */
@media (max-width: 1100px) {
  .build-head { grid-column: 1 / -1; margin-bottom: 48px; }
  .code { grid-column: 1 / -1; }
  .voice-photo { grid-column: 1 / span 6; }
  .voice-side { grid-column: 7 / span 6; }
}
@media (max-width: 899px) {
  .nav .wrap { height: 76px; }
  .nav-links { display: none; }
  .hero { padding-top: 76px; }
  .pad { --ur-fs: clamp(30px, 8.6vw, 44px); --lat-fs: 18px; }
  .pad-line { flex-direction: column; align-items: stretch; gap: 36px; }
  .lat .line { padding-top: 0; }
  .lat .rule { top: calc(var(--lat-fs) * .962); right: 0; }
  .urd .rule { left: 0; }
  .nib { top: calc(var(--lat-fs) * .962 - 27px); }
  .seam { display: none; }
  .pad-foot { justify-content: flex-start; margin-top: 10px; }
  .intent { border-radius: 14px; padding: 9px 14px; font-size: 12px; }
  .readings-inner { grid-template-rows: auto auto auto; }
  .tabs { order: 2; }
  .stage { order: 3; }
  .readings-top { order: 1; }
  .tabs { gap: 6px; }
  .tab { padding: 10px 4px 0; }
  .tab-l { font-size: 13px; line-height: 1.25; }
  .photo-frame { width: 100%; aspect-ratio: 4 / 3; border-radius: 20px; }
  .read-card { position: relative; right: auto; bottom: auto; width: auto; margin: -64px 16px 0; }
  .voice-photo, .voice-side { grid-column: 1 / -1; }
  .voice-photo { aspect-ratio: 4 / 3; border-radius: 20px; order: 2; margin-top: 40px; }
  .voice-photo img { object-position: 24% 50%; }
  .voice-side { order: 1; display: contents; }
  .voice-side .h3 { order: 1; grid-column: 1 / -1; }
  .vn { order: 3; grid-column: 1 / -1; margin-top: -48px; margin-inline: 12px; position: relative; }
  .chipbtn { height: 44px; }
  .copy { height: 44px; }
  .price { flex-direction: column; align-items: flex-start; gap: 36px; }
  .foot-grid { flex-direction: column-reverse; align-items: stretch; gap: 8px; }
  .foot-word { text-align: right; margin-bottom: -.3em; }
}
@media (max-width: 480px) {
  .body-sm { font-size: 17px; }
  .code pre { font-size: 13px; padding: 22px 18px 26px; }
  .code-head { padding-left: 18px; }
  .vn-row { gap: 14px; }
  .vn-play { width: 52px; height: 52px; }
  .vn-langs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .chipbtn { padding: 0 4px; font-size: 13px; }
}
