/* MOJUD: one stylesheet for every page on mojud.life.
   The home page, MOJUD Digital, the WhatsApp page and the policy pages all link it.
   Theme: a lime-plaster wall in afternoon sun. Mojud (maujūd) means "present": the
   shadow on the wall is cast by the MOJUD mark, tiled into a lattice (assets/jaali.svg). */

:root {
  --paper: #F4EBDF;
  --paper-2: #EBDECD;
  --surface: #FBF7F1;
  --ink: #2B2119;
  --ink-2: #4B3D31;
  --muted: #6E5B4B;
  --line: #E2D4C2;
  --line-strong: #CDB9A1;
  --gold: #CE9A3C;
  --gold-ink: #8C5A2B;
  --hl: #8C5A2B;
  --accent: #2B2119;
  --accent-ink: #F4EBDF;
  --pass: #3F7A4F;
  --warn: #9A4F00;

  /* The wall: sunlit patch, the shade around it, and the colour of the lattice shadow */
  --sun: #F0CD9D;
  --sun-hot: #F7DFBA;
  --sun-shade: #DDB68A;
  --sun-shadow: #7B5A40;
  --jaali-o: .36;

  --band: var(--sun);
  --band-raise: #FAF1E4;
  --band-ink: #2B2119;
  --band-muted: #5B4737;
  --band-line: #D7B285;
  --band-accent: #2B2119;
  --band-accent-ink: #F4EBDF;
  --shadow: 0 1px 0 rgba(75, 50, 25, .05), 0 30px 60px -32px rgba(90, 58, 28, .38);

  --f-display: "Hanken Grotesk", "Hind", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-body: "Hanken Grotesk", "Hind", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: var(--f-body); /* one typeface everywhere; kept for page styles that name it */
  --f-dev: "Hind", "Noto Sans Devanagari", sans-serif;
  --f-ar: "Noto Nastaliq Urdu", "Noto Naskh Arabic", serif; /* the same word in its original script */
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --head-h: 68px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
/* Dark is opt-in through the theme button: the same wall at dusk */
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #17120E;
  --paper-2: #1F1813;
  --surface: #1E1712;
  --ink: #F1E6D8;
  --ink-2: #D8CAB8;
  --muted: #A8957F;
  --line: #2F261E;
  --line-strong: #46392D;
  --gold-ink: #E2A867;
  --hl: #E2A867;
  --accent: #F1E6D8;
  --accent-ink: #17120E;
  --pass: #7CC08F;
  --warn: #E0A35F;
  --sun: #3A2B1E;
  --sun-hot: #4B3724;
  --sun-shade: #1D1611;
  --sun-shadow: #0E0A07;
  --jaali-o: .55;
  --band: #2A2018;
  --band-raise: #221A14;
  --band-ink: #F1E6D8;
  --band-muted: #BCA992;
  --band-line: #3D3024;
  --band-accent: #F1E6D8;
  --band-accent-ink: #17120E;
  --shadow: 0 1px 0 rgba(0, 0, 0, .4), 0 30px 60px -30px rgba(0, 0, 0, .8);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--head-h) + 12px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--f-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 400; }
h1, h2 { font-family: var(--f-display); font-weight: 300; line-height: 1.04; letter-spacing: -0.035em; text-wrap: balance; }
h3 { font: 500 1.12rem/1.3 var(--f-body); letter-spacing: -0.01em; }
h1 em, h2 em, .hl { font-style: normal; color: var(--hl); }
.dev { font-family: var(--f-dev); }
.ar { font-family: var(--f-ar); line-height: 1; display: inline-block; vertical-align: -.1em; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 3px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 6px; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- Logo ---------- */
.logo { display: block; height: 22px; width: auto; color: var(--ink); }
.mark { display: block; height: 28px; width: auto; color: var(--ink); }

/* ---------- The lattice shadow, used on the home wall and in sunlit bands ---------- */
.jaali { position: absolute; inset: -6%; filter: blur(var(--jaali-blur, 9px)); pointer-events: none; }
.jaali i { position: absolute; inset: 0; background: var(--sun-shadow);
  -webkit-mask: url(jaali.svg) center / cover no-repeat; mask: url(jaali.svg) center / cover no-repeat; }

/* ---------- Header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in oklab, var(--paper) 86%, transparent);
  backdrop-filter: saturate(1.3) blur(12px); -webkit-backdrop-filter: saturate(1.3) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease;
}
.site-head.is-stuck { border-bottom-color: var(--line); }
.head-row { display: flex; align-items: center; gap: 24px; height: var(--head-h); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); flex: none; }
.brand .logo { height: 20px; }
.brand-unit {
  font: 300 1.3rem/1 var(--f-display); color: var(--ink-2); letter-spacing: -0.02em;
  padding-left: 12px; border-left: 1px solid var(--line-strong);
}
#site-nav { margin-left: auto; }
#site-nav ul { display: flex; gap: 2px; margin: 0; padding: 0; list-style: none; }
#site-nav a {
  display: block; padding: 8px 12px; border-radius: 999px;
  font: 400 .92rem/1.2 var(--f-body); color: var(--ink-2); text-decoration: none;
  transition: color .2s ease, background .2s ease;
}
#site-nav a:hover { color: var(--ink); background: color-mix(in oklab, var(--ink) 6%, transparent); }
#site-nav a[aria-current="page"] { color: var(--ink); background: color-mix(in oklab, var(--ink) 7%, transparent); }
.head-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 38px; height: 38px; padding: 0 10px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  font: 500 .86rem/1 var(--f-body); cursor: pointer;
}
.icon-btn:hover { border-color: var(--line-strong); background: color-mix(in oklab, var(--ink) 5%, transparent); }
.menu-btn { display: none; }
@media (max-width: 980px) {
  .menu-btn { display: inline-flex; }
  .head-actions .head-cta { display: none; }
  #site-nav {
    position: absolute; left: 0; right: 0; top: var(--head-h);
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 18px; display: none;
  }
  #site-nav.open { display: block; }
  #site-nav ul { flex-direction: column; }
  #site-nav a { padding: 13px 4px; border-radius: 0; border-bottom: 1px solid var(--line); font-size: 1.02rem; }
  .head-actions { margin-left: auto; }
}
@media (max-width: 420px) { .brand-unit { font-size: 1.15rem; } .brand .logo { height: 17px; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 46px; padding: 0 22px; border-radius: 999px;
  font: 500 .95rem/1 var(--f-body); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.btn-sm { min-height: 38px; padding: 0 16px; font-size: .88rem; }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: color-mix(in oklab, var(--accent) 84%, var(--gold)); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); }
.btn .arr { transition: transform .3s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }
.btn:hover .arr.ne { transform: translate(2px, -2px); }
.band .btn-accent { background: var(--band-accent); color: var(--band-accent-ink); }
.band .btn-ghost { border-color: color-mix(in oklab, var(--band-ink) 30%, transparent); color: var(--band-ink); }
.band .btn-ghost:hover { border-color: var(--band-ink); }

/* ---------- Type helpers ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 .76rem/1.3 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); flex: none; }
.band .eyebrow { color: var(--band-muted); }
.lead { font-size: clamp(1.08rem, 1.4vw, 1.22rem); line-height: 1.65; color: var(--ink-2); max-width: 58ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(72px, 10vw, 136px); }
.sec-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px 56px; align-items: end; margin-bottom: clamp(36px, 5vw, 64px); }
.sec-head h2 { font-size: clamp(2.1rem, 4.2vw, 3.4rem); margin-top: 16px; }
.sec-intro { color: var(--muted); font-size: 1.04rem; line-height: 1.65; max-width: 56ch; }
.band .sec-intro { color: var(--band-muted); }
@media (max-width: 860px) { .sec-head { grid-template-columns: 1fr; align-items: start; } }

/* A band is a stretch of sunlit wall, with the lattice shadow falling across it */
.band {
  position: relative; isolation: isolate; overflow: hidden;
  background: radial-gradient(90% 120% at 85% 0%, var(--sun-hot), var(--band) 60%);
  color: var(--band-ink);
  --ink: var(--band-ink); --ink-2: var(--band-ink); --muted: var(--band-muted); --line: var(--band-line);
  --line-strong: color-mix(in oklab, var(--band-ink) 30%, transparent); --surface: var(--band-raise);
}
/* build.py puts a .jaali layer first inside every band */
.band > .jaali { z-index: -1; --jaali-blur: 10px; opacity: .2; }
:root[data-theme="dark"] .band > .jaali { opacity: .45; }
.band:has(+ .band) { padding-bottom: 0; }
.band + .band { padding-top: clamp(72px, 10vw, 136px); }
.band-note { margin-top: 22px; font-size: .92rem; color: var(--band-muted); max-width: 70ch; }

/* ---------- Generic hero (WhatsApp page) ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(32px, 5vw, 72px); align-items: center; padding-block: clamp(56px, 9vw, 120px); }
.hero h1 { font-size: clamp(2.5rem, 5.4vw, 4.4rem); margin: 20px 0 24px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 30px 0 0; padding: 0; list-style: none; }
.hero-tags li { font: 400 .82rem/1 var(--f-body); padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; } }

/* ---------- Frames (screens, videos) ---------- */
.frame { margin: 0; border-radius: 12px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.frame-bar { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--surface); }
.frame-bar::before { content: ""; width: 42px; height: 10px; flex: none; background: radial-gradient(circle at 5px 5px, var(--line-strong) 3.5px, transparent 4px) 0 0 / 16px 10px repeat-x; }
.frame-url { font: 400 .78rem/1.2 var(--f-body); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frame-shot img, .frame-video video { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top center; background: var(--paper-2); }
.frame-video video { aspect-ratio: 16 / 9; }
.frame-cap { margin-top: 14px; font-size: .84rem; line-height: 1.55; color: var(--muted); max-width: 70ch; }
.work-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
@media (max-width: 900px) { .work-grid { grid-template-columns: 1fr; } }

/* ---------- Stats and feature lists ---------- */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--line); }
.stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 6px; padding: 18px 18px 18px 0; border-bottom: 1px solid var(--line); }
.stats div:nth-child(2n) { padding-left: 18px; border-left: 1px solid var(--line); }
.stats-3 div:nth-child(2n) { padding-left: 0; border-left: 0; }
.stats-3 div + div { padding-left: 18px; border-left: 1px solid var(--line); }
.stats dd { margin: 0; font: 300 clamp(2rem, 3.2vw, 2.7rem)/1 var(--f-display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stats dd span { font-size: .5em; margin-left: 3px; color: var(--muted); letter-spacing: 0; }
.stats dt { font-size: .86rem; line-height: 1.45; color: var(--muted); }
@media (max-width: 560px) {
  .stats-3 { grid-template-columns: 1fr; }
  .stats-3 div + div { padding-left: 0; border-left: 0; }
}
.feat { margin: 22px 0 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.feat li { position: relative; padding-left: 20px; font-size: .97rem; line-height: 1.55; color: var(--ink-2); }
.feat li::before { content: ""; position: absolute; left: 3px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.work-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

/* ---------- Partner / promises ---------- */
.partner { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.partner h2 { font-size: clamp(2.1rem, 4.2vw, 3.3rem); margin: 16px 0 18px; }
.partner .btn { margin-top: 28px; }
.promises { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.promises div { padding: 18px 0; border-top: 1px solid var(--line); }
.promises dt { font-weight: 600; margin-bottom: 6px; }
.promises dd { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.6; }
@media (max-width: 900px) { .partner { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .promises { grid-template-columns: 1fr; } }

/* ---------- Steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; }
.steps li { padding: 22px 0 28px; border-top: 1px solid var(--line); }
.step-n { font: 500 .74rem/1 var(--f-body); letter-spacing: .14em; color: var(--gold-ink); margin-bottom: 14px; font-variant-numeric: tabular-nums; }
.steps h3 { font: 300 1.75rem/1.1 var(--f-display); letter-spacing: -0.03em; margin-bottom: 8px; }
.steps p { color: var(--muted); font-size: .96rem; line-height: 1.6; }
@media (max-width: 860px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; min-width: 640px; }
th, td { text-align: left; vertical-align: top; padding: 16px 18px; border-bottom: 1px solid var(--line); font-size: .95rem; line-height: 1.55; }
thead th { font: 500 .74rem/1.3 var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
tbody th { font-weight: 600; white-space: nowrap; }
tbody td { color: var(--ink-2); }
tbody tr:last-child > * { border-bottom: 0; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.contact h2 { font-size: clamp(2.4rem, 5vw, 4rem); margin: 16px 0 18px; }
.c-list { margin: 0; }
.c-list div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); }
.c-list div:last-child { border-bottom: 1px solid var(--line); }
.c-list dt { font: 500 .74rem/1.9 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.c-list dd { margin: 0; }
.c-val { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 1.15rem; }
.c-val a { text-decoration: none; }
.c-val a:hover { text-decoration: underline; }
.copy-btn { font: 500 .72rem/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; padding: 7px 11px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: inherit; cursor: pointer; }
.copy-btn.is-done { border-color: var(--ink); }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } .c-list div { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- Footer ---------- */
.site-foot { border-top: 1px solid var(--line); padding-block: 48px 56px; font-size: .9rem; color: var(--muted); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.foot-brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.foot-brand .logo { height: 19px; }
.foot-brand .dev { font-size: 1.12rem; color: var(--ink-2); transform: translateY(2px); }
.foot-brand .ar { font-size: 1.15rem; color: var(--ink-2); margin-left: 6px; }
.foot-brand .brand-unit { font-size: 1.2rem; }
.foot-def { margin-top: 10px; }
.foot-meta p + p { margin-top: 8px; }
.foot-meta a, .foot-nav a { color: var(--ink-2); }
.foot-nav ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: 8px 28px; }
.foot-nav a { text-decoration: none; }
.foot-nav a:hover { color: var(--ink); text-decoration: underline; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr; } }

/* ======================================================================
   Home (mojud.life): three doors on a sunlit wall
   ====================================================================== */
html:has(.home), html:has(.home) body { background: var(--sun-shade); }
.home { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
/* Live sun: site.js sets --sun-shade / --sun-shadow / --ink / --ink-2 on <html> from the sun's
   height where the visitor is, and per layer --tx --ty --s --b --o for the projection.
   Before the script runs, the values below show a plain afternoon. */
html:has(.home) { transition: background-color 1.5s ease, color 1.5s ease; }
.wall { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: var(--sun-shade); transition: background-color 1.5s ease; }
.wall-lamp {
  position: absolute; inset: 0; opacity: var(--lamp, 0); transition: opacity 1.5s ease;
  background: radial-gradient(circle at var(--lx, 72%) var(--ly, 20%), rgba(240, 196, 128, .62), rgba(240, 196, 128, .22) 26%, rgba(240, 196, 128, 0) 60%);
}
.leaf { position: absolute; inset: -25%; animation: breeze var(--sway, 26s) ease-in-out infinite alternate; }
.leaf > div {
  position: absolute; inset: 0; will-change: transform;
  filter: blur(calc(var(--b, 4px) * var(--focus, 1)));
  transform: translate(var(--tx, 1.5%), var(--ty, .8%)) scale(var(--s, 1));
  transform-origin: var(--ox, 64.7%) var(--oy, 30%);
  transition: transform .4s ease-out, filter 1.2s ease;
}
.leaf i { position: absolute; inset: 0; background: var(--sun-shadow); opacity: var(--o, .3); transition: background-color 1.5s ease; }
.leaf.near { --sway: 33s; --b: 1.2px; --o: .42; --tx: .8%; --ty: .4%; animation-delay: -12s; }
.leaf.near i { -webkit-mask: url(leaves-near.svg) center / cover no-repeat; mask: url(leaves-near.svg) center / cover no-repeat; }
.leaf.mid { --sway: 19s; --b: 3.5px; --o: .34; animation-delay: -5s; }
.leaf.mid i { -webkit-mask: url(leaves-mid.svg) center / cover no-repeat; mask: url(leaves-mid.svg) center / cover no-repeat; }
.leaf.far { --sway: 27s; --b: 7px; --o: .26; --tx: 2.2%; --ty: 1.1%; animation-delay: -20s; }
.leaf.far i { -webkit-mask: url(leaves-far.svg) center / cover no-repeat; mask: url(leaves-far.svg) center / cover no-repeat; }
/* The word itself hangs outside the window as a sign; only its shadow reaches the wall */
.leaf.sign { --sway: 33s; --b: 7px; --o: .26; --tx: 2.8%; --ty: 1.4%; }
/* The layer starts 25vw / 25vh outside the viewport, so these put the word's right edge at 92vw and its top at 10vh */
.leaf.sign .dev { position: absolute; right: 33vw; top: 35vh; font: 500 21vw/1 var(--f-dev); white-space: nowrap; color: var(--sun-shadow); opacity: var(--o); transition: color 1.5s ease; }
/* When a door is chosen, the shadow comes into focus */
.home:has(.door:is(:hover, :focus-visible)) .wall { --focus: .45; }
@keyframes breeze { from { transform: translate(-.6%, .4%) rotate(-.25deg); } to { transform: translate(.6%, -.4%) rotate(.25deg); } }

.home-top, .home-main, .home-foot { position: relative; z-index: 1; }
.home-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-block: 30px; }
.home-top .logo { height: 21px; }
.home-word-wrap { display: grid; gap: 5px; justify-items: end; text-align: right; }
.home-word { font-size: .86rem; color: var(--ink-2); letter-spacing: .01em; }
.home-word .dev { font-size: 1rem; margin-right: 4px; }
.home-word .ar { font-size: 1.05rem; margin-inline: 4px; }
.home-stamp { font-size: .76rem; color: var(--ink-2); opacity: .85; letter-spacing: .02em; font-variant-numeric: tabular-nums; min-height: 1.2em; }

.home-main { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; padding-block: 12vh clamp(36px, 7vh, 72px); }
.doors { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(20px, 3.2vw, 44px); }
.door {
  position: relative; display: grid; gap: 10px; padding: 24px 0 4px;
  border-top: 1px solid color-mix(in oklab, var(--ink) 26%, transparent);
  text-decoration: none; color: var(--ink);
}
.door::before { content: ""; position: absolute; left: 0; top: -1px; width: 0; height: 1px; background: var(--ink); transition: width .9s var(--ease); }
.door:is(:hover, :focus-visible)::before { width: 100%; }
.door:focus-visible { outline: none; }
.door-name { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font: 300 clamp(1.9rem, 3vw, 2.75rem)/1.05 var(--f-display); letter-spacing: -0.04em; }
.door-arr { font-size: .55em; letter-spacing: 0; transition: transform .6s var(--ease); }
.door:is(:hover, :focus-visible) .door-arr { transform: translateX(6px); }
.door-line { font-size: 1rem; line-height: 1.5; color: var(--ink-2); }
.door-url { font-size: .84rem; color: var(--ink-2); opacity: .8; }
.doors:has(.door:is(:hover, :focus-visible)) .door:not(:is(:hover, :focus-visible)) { opacity: .55; }
.door { transition: opacity .6s ease; }

.home-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding-block: 20px 28px; font-size: .8rem; color: var(--ink-2); }
.home-foot ul { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0; padding: 0; list-style: none; }
.home-foot a { color: inherit; text-decoration: none; }
.home-foot a:hover { text-decoration: underline; }

@media (max-width: 820px) {
  .home-main { padding-top: 22vh; }
  .doors { grid-template-columns: 1fr; }
  .door { padding: 20px 0 22px; gap: 6px; }
  .door-name { font-size: clamp(1.9rem, 8.5vw, 2.4rem); }
  .door-line { font-size: .95rem; }
}
@media (prefers-reduced-motion: reduce) {
  .leaf { animation: none; }
  .leaf > div, .door, .door::before, .door-arr { transition: none; }
}

/* ======================================================================
   MOJUD Digital
   ====================================================================== */
.d-hero { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: clamp(36px, 5vw, 80px); align-items: end; padding-block: clamp(52px, 8vw, 112px) clamp(64px, 9vw, 120px); }
.d-hero h1 { font-size: clamp(2.8rem, 6.2vw, 5.4rem); line-height: 1; letter-spacing: -0.045em; margin: 22px 0 28px; }
@media (max-width: 960px) { .d-hero { grid-template-columns: 1fr; align-items: start; } }

/* The project index beside the hero */
.p-index { border-top: 1px solid var(--ink); }
.p-index-head { display: flex; justify-content: space-between; padding: 12px 0; font: 500 .74rem/1.3 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.p-index ol { list-style: none; margin: 0; padding: 0; }
.p-index li { border-top: 1px solid var(--line); }
.p-index li:last-child { border-bottom: 1px solid var(--line); }
.p-row {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) 76px; gap: 14px; align-items: center;
  padding: 14px 4px; text-decoration: none; color: var(--ink); transition: background .3s ease, padding .3s var(--ease);
}
.p-row:hover, .p-row:focus-visible { background: color-mix(in oklab, var(--ink) 4%, transparent); padding-inline: 10px; }
.p-no { font: 400 .8rem/1 var(--f-body); color: var(--muted); font-variant-numeric: tabular-nums; }
.p-name { display: block; font: 400 1.3rem/1.15 var(--f-display); letter-spacing: -0.025em; }
.p-tag { display: inline-flex; align-items: center; gap: 7px; margin-top: 5px; font: 400 .8rem/1.2 var(--f-body); color: var(--muted); }
.p-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c, var(--gold)); }
.p-row img { width: 76px; height: 48px; object-fit: cover; object-position: top; border-radius: 5px; border: 1px solid var(--line); }

/* Case studies */
.cases { display: grid; gap: clamp(80px, 11vw, 144px); }
.case { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(28px, 4.5vw, 64px); align-items: center; }
.case:nth-child(even) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
.case:nth-child(even) .case-media { order: 2; }
.case-media { position: relative; }
.case-num { display: none; }
.case-tag { display: inline-flex; align-items: center; gap: 9px; font: 500 .76rem/1.3 var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.case-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.case-tag b { font-weight: 500; color: var(--ink); }
.case h3 { font: 300 clamp(1.9rem, 3.1vw, 2.65rem)/1.08 var(--f-display); letter-spacing: -0.035em; margin: 18px 0 16px; text-wrap: balance; }
.case-sum { color: var(--ink-2); font-size: 1.02rem; line-height: 1.65; }
.case .stats { margin-top: 26px; }
.case .stats dd { font-size: clamp(1.8rem, 2.7vw, 2.3rem); }
@media (max-width: 900px) {
  .case, .case:nth-child(even) { grid-template-columns: 1fr; }
  .case:nth-child(even) .case-media { order: 0; }
}

/* Services */
.svc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; }
.svc-card { display: flex; flex-direction: column; gap: 12px; padding: 24px 0 36px; border-top: 1px solid var(--line); }
.svc-card .step-n { margin: 0; }
.svc-card h3 { font: 300 1.65rem/1.12 var(--f-display); letter-spacing: -0.03em; }
.svc-card p { color: var(--muted); font-size: .96rem; line-height: 1.6; }
.svc-card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.svc-card li { font: 400 .78rem/1 var(--f-body); padding: 7px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); }
.seen { margin-top: auto; padding-top: 12px; font-size: .84rem; color: var(--muted); }
.seen a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.seen a:hover { border-color: var(--ink); }
@media (max-width: 960px) { .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .svc-grid { grid-template-columns: 1fr; } }

/* Team */
.team { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.person { padding: 26px 0 8px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 16px; }
.person-top { display: flex; align-items: center; gap: 16px; }
.mono-av { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--sun); color: var(--ink); font: 400 1.05rem/1 var(--f-display); letter-spacing: .02em; }
.person h3 { font: 300 1.75rem/1.1 var(--f-display); letter-spacing: -0.03em; }
.role { font-size: .86rem; color: var(--muted); margin-top: 3px; }
.person p.bio { color: var(--ink-2); font-size: .98rem; line-height: 1.65; }
.creds { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.creds li { font: 400 .8rem/1 var(--f-body); padding: 8px 11px; border-radius: 999px; border: 1px solid var(--line); }
@media (max-width: 800px) { .team { grid-template-columns: 1fr; gap: 24px; } }

/* Video player dialog */
.player { width: min(1100px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 14px; background: #000; color: #fff; overflow: hidden; }
.player::backdrop { background: rgba(23, 18, 14, .84); backdrop-filter: blur(4px); }
.player-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 16px; font: 400 .84rem/1.3 var(--f-body); color: #ccc; }
.player-bar button { border: 1px solid #444; background: transparent; color: #fff; border-radius: 999px; padding: 7px 12px; font: 500 .8rem/1 var(--f-body); cursor: pointer; }
.player video { width: 100%; aspect-ratio: 16 / 9; background: #000; }

/* ======================================================================
   Digital v3: one type scale, two weights, no ornament.
   Everything inside main.dg uses these seven sizes and nothing else.
   ====================================================================== */
.dg {
  --fs-1: .8125rem;                         /* labels, captions */
  --fs-2: .9375rem;                         /* secondary text */
  --fs-3: 1.0625rem;                        /* body */
  --fs-4: 1.25rem;                          /* lead, item titles */
  --fs-5: 1.75rem;                          /* case titles, figures */
  --fs-6: clamp(2rem, 3.6vw, 2.75rem);      /* section titles */
  --fs-7: clamp(2.5rem, 5vw, 3.75rem);      /* page title */
}
.dg h1, .dg h2, .dg h3, .dg .stats dd, .dg .p-name { font-family: var(--f-body); font-weight: 500; letter-spacing: -0.02em; }
.dg h1 { font-size: var(--fs-7); line-height: 1.08; }
.dg h2 { font-size: var(--fs-6); line-height: 1.12; margin: 12px 0 0; }
.dg h3 { font-size: var(--fs-5); line-height: 1.18; }
.dg .eyebrow, .dg .case-tag, .dg .p-index-head, .dg .c-list dt {
  font: 500 var(--fs-1)/1.3 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.dg .eyebrow::before, .dg .case-tag::before, .dg .p-tag::before { content: none; }
.dg .lead { font-size: var(--fs-4); line-height: 1.55; max-width: 34ch; color: var(--ink-2); }
.dg .sec-intro { font-size: var(--fs-3); max-width: 46ch; }
.dg .sec-head { margin-bottom: 40px; }

/* Hero */
.dg .d-hero { align-items: center; padding-block: clamp(48px, 7vw, 96px); }
.dg .d-hero h1 { font-size: var(--fs-7); line-height: 1.08; letter-spacing: -0.02em; margin: 16px 0 20px; max-width: 18ch; }
.dg .hero-tags { margin-top: 28px; }
.dg .hero-tags li { font-size: var(--fs-1); padding: 8px 12px; }
.dg .p-index { border-top: 1px solid var(--line-strong); }
.dg .p-row { padding: 14px 4px; transition: background .2s ease; }
.dg .p-row:hover, .dg .p-row:focus-visible { padding-inline: 4px; }
.dg .p-no { font-size: var(--fs-1); }
.dg .p-name { font-size: var(--fs-3); line-height: 1.3; letter-spacing: 0; }
.dg .p-tag { font-size: var(--fs-1); margin-top: 2px; }

/* Work: the same layout for every case, screen left and text right */
.dg .section { padding-block: clamp(56px, 8vw, 104px); }
.dg #work { padding-top: 0; }
.dg .cases { gap: clamp(64px, 8vw, 96px); }
.dg .case, .dg .case:nth-child(even) { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.dg .case:nth-child(even) .case-media { order: 0; }
.dg .case h3 { margin: 10px 0 12px; }
.dg .case-sum { font-size: var(--fs-3); line-height: 1.6; color: var(--ink-2); }
.dg .frame-cap { font-size: var(--fs-1); margin-top: 10px; }
.dg .frame-url { font-size: var(--fs-1); }
.dg .stats { margin-top: 24px; }
.dg .stats div { padding-block: 14px; gap: 4px; }
.dg .stats dd, .dg .case .stats dd { font-size: var(--fs-5); line-height: 1.1; }
.dg .stats dd span { font-size: var(--fs-2); font-weight: 400; margin-left: 2px; }
.dg .stats dt { font-size: var(--fs-2); line-height: 1.4; }
.dg .work-links { margin-top: 24px; }
@media (max-width: 900px) { .dg .case, .dg .case:nth-child(even) { grid-template-columns: minmax(0, 1fr); } }

/* Services and team: plain lists */
.dg #services, .dg #team { padding-top: 0; }
.svc-list, .team-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; }
.svc-list li { padding: 20px 0 28px; border-top: 1px solid var(--line); }
.dg .svc-list h3, .dg .team-list h3 { font-size: var(--fs-4); line-height: 1.3; letter-spacing: -0.01em; margin-bottom: 6px; }
.svc-list p, .team-list p { font-size: var(--fs-2); line-height: 1.55; color: var(--muted); }
.svc-list a { color: var(--ink); }
.team-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.team-list li { display: flex; gap: 16px; align-items: flex-start; padding: 20px 0; border-top: 1px solid var(--line); }
.dg .mono-av { width: 44px; height: 44px; font: 500 var(--fs-2)/1 var(--f-body); letter-spacing: .02em; }
@media (max-width: 860px) { .svc-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .svc-list, .team-list { grid-template-columns: 1fr; } }

/* Contact */
.dg .contact h2 { font-size: var(--fs-6); margin: 12px 0 14px; }
.dg .c-val { font-size: var(--fs-4); }
