/* =====================================================================
   NahanKav — Beyond the Visible
   Design system · flat, editorial, dark-first, RTL/LTR via logical props
   ===================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --brand: #A61932;
  --brand-deep: #7E1226;
  --on-brand: #FFFFFF;

  --bg: #0A0A0B;
  --bg-2: #101012;
  --bg-3: #17171A;
  --ink: #EEEAE4;
  --ink-2: rgba(238, 234, 228, .66);
  --ink-3: rgba(238, 234, 228, .40);
  --ink-4: rgba(238, 234, 228, .14);
  --line: rgba(238, 234, 228, .10);
  --line-2: rgba(238, 234, 228, .22);
  --brand-ink: #E9566E;           /* readable red on dark surfaces */
  --brand-soft: rgba(166, 25, 50, .16);
  --sel: rgba(166, 25, 50, .55);

  --font-head: system-ui, sans-serif;
  --font-body: system-ui, sans-serif;
  --w-head: 700;
  --w-body: 400;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --gutter: clamp(20px, 4.2vw, 72px);
  --max: 1480px;
  --header-h: 76px;
  --radius: 2px;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --dur: .9s;

  /* script-aware typography (overridden per language below) */
  --lh-display: .98;
  --lh-head: 1.08;
  --lh-body: 1.7;
  --track-display: -.035em;
  --track-label: .14em;
  --fs-display: clamp(3.1rem, 9.2vw, 10.5rem);
  --fs-h1: clamp(2.5rem, 6.2vw, 6.4rem);
  --fs-h2: clamp(2rem, 4.4vw, 4.4rem);
  --fs-h3: clamp(1.35rem, 2.1vw, 2rem);
  --fs-lead: clamp(1.12rem, 1.45vw, 1.42rem);
  --fs-body: 1.0625rem;
  --fs-small: .875rem;
  --fs-label: .72rem;

  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #F2EFE9;
  --bg-2: #EAE6DE;
  --bg-3: #E0DBD1;
  --ink: #131213;
  --ink-2: rgba(19, 18, 19, .68);
  --ink-3: rgba(19, 18, 19, .46);
  --ink-4: rgba(19, 18, 19, .12);
  --line: rgba(19, 18, 19, .11);
  --line-2: rgba(19, 18, 19, .24);
  --brand-ink: #A61932;
  --brand-soft: rgba(166, 25, 50, .09);
  --sel: rgba(166, 25, 50, .28);
  color-scheme: light;
}

/* Arabic-script languages: taller glyphs, no negative tracking, no caps */
:lang(fa), :lang(ar) {
  --lh-display: 1.28;
  --lh-head: 1.42;
  --lh-body: 2.0;
  --track-display: 0;
  --track-label: 0;
  --fs-display: clamp(2.7rem, 8.2vw, 9.2rem);
  --fs-h1: clamp(2.2rem, 5.4vw, 5.6rem);
  --fs-h2: clamp(1.85rem, 3.9vw, 3.9rem);
  --fs-label: .8rem;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: var(--w-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  transition: background-color .5s var(--ease-io), color .5s var(--ease-io);
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-family: var(--font-head); font-weight: var(--w-head); line-height: var(--lh-head); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--sel); color: var(--ink); }
:focus-visible { outline: 2px solid var(--brand-ink); outline-offset: 3px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; inset-inline-start: 16px; top: -60px; z-index: 200; background: var(--brand); color: var(--on-brand); padding: 10px 16px; transition: top .2s; }
.skip-link:focus { top: 12px; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
bdi { unicode-bidi: isolate; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 32px); }

/* ---------- 3. Type primitives ---------- */
.label {
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex; align-items: center; gap: .7em;
}
:lang(fa) .label, :lang(ar) .label { text-transform: none; }
.label .dm { width: 6px; height: 6px; background: var(--brand); transform: rotate(45deg); flex: none; }
.label--brand { color: var(--brand-ink); }
.display { font-size: var(--fs-display); line-height: var(--lh-display); letter-spacing: var(--track-display); font-weight: var(--w-head); }
.h1 { font-size: var(--fs-h1); line-height: var(--lh-display); letter-spacing: var(--track-display); }
.h2 { font-size: var(--fs-h2); line-height: var(--lh-head); letter-spacing: calc(var(--track-display) * .6); }
.h3 { font-size: var(--fs-h3); line-height: var(--lh-head); }
.lead { font-size: var(--fs-lead); line-height: 1.65; color: var(--ink-2); }
:lang(fa) .lead, :lang(ar) .lead { line-height: 1.95; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.accent { color: var(--brand-ink); }
.num { font-family: var(--font-head); font-weight: 300; font-feature-settings: "tnum" 1; }
.mono { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .04em; direction: ltr; unicode-bidi: isolate; }

/* ---------- 4. Header ---------- */
.site-header {
  position: fixed; inset-inline: 0; top: 0; z-index: 60;
  height: var(--header-h);
  transition: transform .55s var(--ease-out), background-color .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled { background: color-mix(in srgb, var(--bg) 88%, transparent); border-bottom-color: var(--line); -webkit-backdrop-filter: saturate(1.2) blur(10px); backdrop-filter: saturate(1.2) blur(10px); }
.site-header.is-hidden { transform: translateY(-100%); }
.site-header .wrap { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; flex: none; }
.brand img { height: 44px; width: auto; }
@media (max-width: 960px) { .brand img { height: 36px; } }
.brand .logo-light { display: none; }
[data-theme="light"] .brand .logo-dark { display: none; }
[data-theme="light"] .brand .logo-light { display: block; }

.nav { margin-inline: auto; display: flex; gap: clamp(18px, 2.4vw, 40px); }
.nav a { position: relative; font-size: .9rem; color: var(--ink-2); padding-block: 8px; transition: color .3s; }
.nav a::after { content: ""; position: absolute; inset-inline: 0; bottom: 2px; height: 1px; background: var(--brand-ink); transform: scaleX(0); transform-origin: var(--origin-start, left); transition: transform .5s var(--ease-out); }
[dir="rtl"] { --origin-start: right; --origin-end: left; }
[dir="ltr"] { --origin-start: left; --origin-end: right; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }

.tools { display: flex; align-items: center; gap: 6px; flex: none; }
.tool-btn { height: 38px; min-width: 38px; padding-inline: 10px; display: inline-grid; place-items: center; border: 1px solid transparent; color: var(--ink-2); transition: color .3s, border-color .3s; border-radius: var(--radius); }
.tool-btn:hover { color: var(--ink); border-color: var(--line-2); }
.tool-btn svg { width: 18px; height: 18px; }

/* language switcher — native <details>, works without JS */
.lang { position: relative; }
.lang > summary { list-style: none; cursor: pointer; gap: 8px; display: inline-flex; align-items: center; font-size: .82rem; letter-spacing: .06em; }
.lang > summary::-webkit-details-marker { display: none; }
.lang__menu {
  position: absolute; top: calc(100% + 10px); inset-inline-end: 0; min-width: 190px;
  background: var(--bg-2); border: 1px solid var(--line-2); padding: 6px;
  display: grid; z-index: 5;
  animation: menuIn .35s var(--ease-out);
}
@keyframes menuIn { from { opacity: 0; transform: translateY(-6px); } }
.lang__menu a { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 10px 12px; font-size: .92rem; color: var(--ink-2); transition: background-color .25s, color .25s; }
.lang__menu a:hover { background: var(--bg-3); color: var(--ink); }
.lang__menu a[aria-current="true"] { color: var(--ink); }
.lang__menu a[aria-current="true"]::after { content: ""; width: 6px; height: 6px; background: var(--brand); transform: rotate(45deg); }
.lang__menu small { font-family: var(--font-mono); font-size: .66rem; color: var(--ink-3); letter-spacing: .1em; }

.theme-toggle .ic-sun { display: none; }
[data-theme="light"] .theme-toggle .ic-sun { display: block; }
[data-theme="light"] .theme-toggle .ic-moon { display: none; }

.menu-btn { display: none; }
.menu-btn span { display: block; width: 22px; height: 1px; background: currentColor; transition: transform .45s var(--ease-out); }
.menu-btn span + span { margin-top: 7px; width: 14px; margin-inline-start: auto; }
.menu-open .menu-btn span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-open .menu-btn span:last-child { width: 22px; transform: translateY(-4px) rotate(-45deg); }

/* mobile menu overlay */
.mnav {
  position: fixed; inset: 0; z-index: 55; background: var(--bg);
  padding: calc(var(--header-h) + 24px) var(--gutter) 32px;
  display: flex; flex-direction: column; justify-content: space-between;
  clip-path: polygon(0 100%, 0 100%, 0 100%);
  visibility: hidden;
  transition: clip-path .8s var(--ease-io), visibility 0s linear .8s;
}
.menu-open .mnav { clip-path: polygon(0 100%, 0 -110%, 210% 100%); visibility: visible; transition: clip-path .8s var(--ease-io), visibility 0s; }
.mnav ol { counter-reset: m; }
.mnav li { overflow: hidden; border-bottom: 1px solid var(--line); }
.mnav a { display: flex; align-items: baseline; gap: 16px; padding-block: 14px; font-family: var(--font-head); font-weight: var(--w-head); font-size: clamp(2rem, 9vw, 3.2rem); line-height: 1.25; transform: translateY(105%); transition: transform .8s var(--ease-out); transition-delay: calc(.12s + var(--i, 0) * .06s); }
.mnav a small { font-family: var(--font-mono); font-size: .7rem; color: var(--brand-ink); font-weight: 400; }
.menu-open .mnav a { transform: none; }
.mnav__foot { display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--ink-2); font-size: .9rem; }
.mnav__foot a { font: inherit; transform: none; padding: 0; }
.mnav__langs { display: flex; gap: 6px; }
.mnav__langs a { padding: 6px 12px; border: 1px solid var(--line-2); }
.mnav__langs a[aria-current="true"] { border-color: var(--brand); color: var(--ink); }

@media (max-width: 960px) {
  .nav, .tools .lang, .tools .theme-toggle { display: none; }
  .menu-btn { display: inline-grid; }
  .tools { margin-inline-start: auto; }
}
@media (min-width: 961px) { .mnav { display: none; } }

/* ---------- 5. Buttons & links ---------- */
.btn {
  --bc: var(--line-2);
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; gap: 14px;
  min-height: 52px; padding: 0 26px;
  border: 1px solid var(--bc); border-radius: var(--radius);
  font-size: .95rem; font-weight: 500; letter-spacing: .01em;
  color: var(--ink);
  transition: color .45s var(--ease-out), border-color .45s;
}
.btn::before {
  content: ""; position: absolute; inset: -1px; z-index: -1;
  background: var(--brand);
  clip-path: polygon(0 100%, 0 100%, 0 100%);
  transition: clip-path .6s var(--ease-io);
}
.btn:hover { color: var(--on-brand); border-color: var(--brand); }
.btn:hover::before { clip-path: polygon(0 100%, 0 -110%, 210% 100%); }
.btn--solid { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn--solid::before { background: var(--ink); }
.btn--solid:hover { color: var(--bg); border-color: var(--ink); }
.btn svg { width: 18px; height: 18px; transition: transform .5s var(--ease-out); }
.btn:hover svg { transform: translateX(var(--nudge, 4px)); }
[dir="rtl"] { --nudge: -4px; }
.ic-dir { transform: scaleX(var(--flip, 1)); }
[dir="rtl"] .ic-dir { --flip: -1; }
.btn:hover .ic-dir { transform: scaleX(var(--flip, 1)) translateX(4px); }

.link {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); padding-block: 4px;
  background: linear-gradient(var(--brand-ink), var(--brand-ink)) no-repeat;
  background-size: 0 1px; background-position: var(--origin-start, left) 100%;
  transition: background-size .55s var(--ease-out);
}
.link:hover { background-size: 100% 1px; }
.link svg { width: 16px; height: 16px; }

/* ---------- 6. Sections ---------- */
main { display: block; }
.section { padding-block: 72px; position: relative; }
.section--tight { padding-block: 56px; }
@media (min-width: 761px) { .section { padding-block: clamp(96px, 14vw, 200px); } .section--tight { padding-block: clamp(64px, 9vw, 120px); } }
.section-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 32px); align-items: end; margin-bottom: 32px; }
@media (min-width: 761px) { .section-head { margin-bottom: clamp(48px, 7vw, 96px); } }
.section-head .label { grid-column: 1 / span 3; align-self: start; padding-top: .9em; }
.section-head .h2 { grid-column: 4 / span 9; }
.section-head .lead { grid-column: 4 / span 7; margin-top: 28px; }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }
@media (max-width: 860px) {
  .section-head { display: block; }
  .section-head .label { margin-bottom: 22px; padding: 0; }
  .section-head .lead { margin-top: 20px; }
}

/* ---------- 7. HERO · the diamond lens ---------- */
.hero {
  position: relative; min-height: 100svh; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-top: calc(var(--header-h) + 40px);
  --lx: 50vw; --ly: 50vh; --lr: 0px;
}
.hero__layer { position: absolute; inset: 0; pointer-events: none; }
.hero__dots {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at center, var(--ink-4) 1px, transparent 1.4px);
  background-size: 36px 36px;
  mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 70%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 70%, transparent);
  opacity: .55;
}
.hero__hidden {
  z-index: 3;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-top: calc(var(--header-h) + 40px);
  background: var(--bg-2);
  clip-path: polygon(var(--lx) calc(var(--ly) - var(--lr)), calc(var(--lx) + var(--lr)) var(--ly), var(--lx) calc(var(--ly) + var(--lr)), calc(var(--lx) - var(--lr)) var(--ly));
  will-change: clip-path;
}
.hero__hidden .hero__dots { background-image: radial-gradient(circle at center, var(--brand) 1px, transparent 1.5px); opacity: .55; }
.hero__field { position: absolute; inset: 0; }
.hero__field span {
  position: absolute; white-space: nowrap; transform: translate(-50%, -50%);
  font-size: clamp(.72rem, .9vw, .86rem); color: var(--ink-2); letter-spacing: .02em;
  display: inline-flex; align-items: center; gap: 8px;
}
.hero__field span { opacity: .75; }
.hero__field span.is-key { color: var(--ink); opacity: 1; }
.hero__field span.is-key::before { content: ""; width: 7px; height: 7px; background: var(--brand); transform: rotate(45deg); }
.hero__field svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__field line { stroke: var(--brand); stroke-width: 1; stroke-dasharray: 3 5; opacity: .7; }

.hero__lens {
  position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; z-index: 4;
  transform: translate(var(--lx), var(--ly));
}
.hero__lens::before {
  content: ""; position: absolute;
  width: calc(var(--lr) * 1.4142); height: calc(var(--lr) * 1.4142);
  left: 0; top: 0; transform: translate(-50%, -50%) rotate(45deg);
  border: 1px solid var(--brand);
}
.hero__lens .mono { position: absolute; top: calc(var(--lr) + 14px); left: 0; transform: translateX(-50%); color: var(--brand-ink); white-space: nowrap; }

.hero__content { position: relative; z-index: 2; pointer-events: none; }
.hero__content a, .hero__content button { pointer-events: auto; }
.hero__kicker { margin-bottom: clamp(24px, 4vw, 48px); }
.hero__title { font-size: var(--fs-display); line-height: var(--lh-display); letter-spacing: var(--track-display); max-width: 14ch; }
:lang(fa) .hero__title, :lang(ar) .hero__title { max-width: 13ch; }
.hero__title .hl { color: var(--ink); }
.hero__hidden .hero__content { z-index: 1; }
.hero__hidden .hero__title, .hero__hidden .hero__title .hl { color: var(--brand); }
.hero__hidden .hero__sub { color: var(--ink); }
.js .is-clone [data-reveal], .js .is-clone [data-split] .w > span { opacity: 1; transform: none; transition: none; }
.hero__foot {
  margin-top: clamp(40px, 6vw, 80px); padding-block: 26px 34px; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 32px); align-items: start;
}
.hero__sub { grid-column: 1 / span 6; font-size: var(--fs-lead); color: var(--ink-2); line-height: 1.6; max-width: 46ch; }
:lang(fa) .hero__sub, :lang(ar) .hero__sub { line-height: 1.95; }
.hero__actions { grid-column: 8 / span 5; display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
.hero__scroll { position: absolute; inset-inline-end: var(--gutter); top: calc(var(--header-h) + 36px); z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 14px; color: var(--ink-3); }
.hero__scroll i { width: 1px; height: 84px; background: var(--line-2); position: relative; overflow: hidden; }
.hero__scroll i::after { content: ""; position: absolute; left: -3px; top: 0; width: 7px; height: 7px; background: var(--brand); transform: rotate(45deg); animation: drip 2.6s var(--ease-io) infinite; }
@keyframes drip { 0% { top: -10px; } 70%, 100% { top: 92px; } }
@media (max-width: 860px) {
  .hero__lens .mono { display: none; }
  .hero__sub, .hero__actions { grid-column: 1 / -1; }
  .hero__actions { justify-content: flex-start; margin-top: 26px; }
  .hero__scroll { display: none; }
}

/* ---------- 8. Philosophy · scrubbed statement ---------- */
.statement { font-family: var(--font-head); font-weight: var(--w-head); font-size: clamp(1.8rem, 4.1vw, 4.1rem); line-height: 1.22; letter-spacing: calc(var(--track-display) * .5); }
:lang(fa) .statement, :lang(ar) .statement { line-height: 1.6; font-size: clamp(1.6rem, 3.6vw, 3.6rem); }
.statement .w { transition: color .35s linear; }
.js .statement[data-scrub] .w { color: var(--ink-4); }
.js .statement[data-scrub] .w.on { color: var(--ink); }
.statement em { font-style: normal; color: var(--brand-ink); }
.js .statement[data-scrub] em .w.on, .statement em .w.on { color: var(--brand-ink); }
.philo { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 32px); }
.philo .label { grid-column: 1 / span 3; padding-top: 1.2em; }
.philo .statement { grid-column: 4 / span 9; }
.philo__body { grid-column: 4 / span 6; margin-top: clamp(40px, 5vw, 64px); color: var(--ink-2); font-size: var(--fs-lead); line-height: 1.75; }
:lang(fa) .philo__body, :lang(ar) .philo__body { line-height: 2; }
@media (max-width: 860px) { .philo { display: block; } .philo .label { display: flex; margin-bottom: 26px; padding: 0; } }

/* ---------- 9. The seam · split stage ---------- */
.seam { position: relative; height: 240vh; }
.seam__sticky { position: sticky; top: 0; height: 100svh; display: grid; place-items: center; overflow: hidden; }
.seam__stage { position: relative; width: min(72vh, 82vw); aspect-ratio: 100 / 90; --k: 0; --ku: 0; --p: 0; }
.seam__stage svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.seam__half { fill: var(--brand); transition: fill .5s; }
.seam__a { transform: translate(calc(var(--ku, 0) * -1px), calc(var(--ku, 0) * -1px)); }
.seam__b { transform: translate(calc(var(--ku, 0) * 1px), calc(var(--ku, 0) * 1px)); }
.seam__core { transform-box: fill-box; transform-origin: center; transform: scale(var(--core, 0)); fill: var(--ink); }
.seam__title { position: absolute; color: var(--on-brand); font-family: var(--font-head); font-weight: var(--w-head); font-size: clamp(1.3rem, 3.3vh, 2.4rem); line-height: 1.2; }
.seam__title small { display: block; font-family: var(--font-body); font-weight: 400; font-size: .5em; opacity: .7; margin-bottom: .5em; letter-spacing: .08em; }
.seam__title--a { left: 9%; top: 11%; transform: translate(calc(var(--k) * -1px), calc(var(--k) * -1px)); }
.seam__title--b { right: 9%; bottom: 11%; text-align: end; transform: translate(calc(var(--k) * 1px), calc(var(--k) * 1px)); }
[dir="rtl"] .seam__title--b { text-align: start; }
.seam__insight {
  position: absolute; left: 49.2%; top: 50.5%; transform: translate(-50%, -50%);
  font-family: var(--font-head); font-weight: var(--w-head); font-size: clamp(1rem, 2.6vh, 1.7rem);
  color: var(--bg); opacity: var(--io, 0); white-space: nowrap; text-align: center; line-height: 1.2;
}
.seam__caption { position: absolute; bottom: 7vh; inset-inline: var(--gutter); display: flex; justify-content: space-between; gap: 24px; color: var(--ink-3); }
.seam__caption p { max-width: 40ch; font-size: var(--fs-small); opacity: var(--co, 0); transform: translateY(calc((1 - var(--co, 0)) * 12px)); color: var(--ink-2); }
.seam__progress { position: absolute; top: calc(var(--header-h) + 24px); inset-inline-start: var(--gutter); display: flex; align-items: center; gap: 12px; }
.seam__progress i { width: 120px; height: 1px; background: var(--line-2); position: relative; }
.seam__progress i::after { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: calc(var(--p) * 100%); background: var(--brand); }

.duo { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.duo__col { padding-block: clamp(40px, 5vw, 72px); padding-inline: 0 clamp(24px, 4vw, 64px); }
.duo__col + .duo__col { border-inline-start: 1px solid var(--line); padding-inline: clamp(24px, 4vw, 64px) 0; }
.duo__col h3 { margin-block: 18px 34px; }
.duo__list li { display: grid; grid-template-columns: 2.6em 1fr; gap: 8px; padding-block: 18px; border-top: 1px solid var(--line); }
.duo__list li:last-child { border-bottom: 1px solid var(--line); }
.duo__list b { display: block; font-weight: 500; font-size: 1.06rem; }
.duo__list span { display: block; color: var(--ink-2); font-size: var(--fs-small); margin-top: 4px; }
.duo__list .num { color: var(--ink-3); font-size: .85rem; padding-top: .2em; }
@media (max-width: 860px) {
  .duo { grid-template-columns: 1fr; }
  .duo__col, .duo__col + .duo__col { padding-inline: 0; border-inline-start: 0; }
  .seam { height: 190vh; }
  .seam__caption { flex-direction: column; bottom: 4vh; }
}

/* ---------- 10. Approach · index rows ---------- */
.steps { border-top: 1px solid var(--line); }
.step {
  position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 32px);
  padding-block: clamp(30px, 4vw, 54px); border-bottom: 1px solid var(--line);
}
.step::before { content: ""; position: absolute; inset-inline: 0; bottom: -1px; height: 1px; background: var(--brand); transform: scaleX(0); transform-origin: var(--origin-start); transition: transform .9s var(--ease-out); }
.step:hover::before { transform: scaleX(1); }
.step__n { grid-column: 1 / span 2; font-family: var(--font-head); font-weight: 300; font-size: clamp(2.2rem, 4.6vw, 4.6rem); line-height: 1; color: var(--ink-3); transition: color .5s; }
.step:hover .step__n { color: var(--brand-ink); }
.step__t { grid-column: 4 / span 4; font-size: var(--fs-h3); }
.step__d { grid-column: 8 / span 5; color: var(--ink-2); }
@media (max-width: 860px) {
  .step { grid-template-columns: 4.2rem 1fr; row-gap: 12px; }
  .step__n { grid-column: 1; grid-row: 1 / span 2; font-size: 2rem; }
  .step__t, .step__d { grid-column: 2; }
}

/* ---------- 11. Product spotlight ---------- */
.spot { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 32px); align-items: center; }
.spot__text { grid-column: 1 / span 6; }
.spot__visual { grid-column: 8 / span 5; }
.spot__logo { height: clamp(44px, 5vw, 64px); width: auto; margin-bottom: clamp(28px, 3vw, 44px); }
.spot__logo.on-light { display: none; }
[data-theme="light"] .spot__logo.on-dark { display: none; }
[data-theme="light"] .spot__logo.on-light { display: block; }
.spot__tag { font-size: var(--fs-h3); font-family: var(--font-head); font-weight: var(--w-head); line-height: var(--lh-head); margin-bottom: 24px; }
.spot__summary { color: var(--ink-2); font-size: 1.08rem; max-width: 52ch; }
.spot__feats { margin-block: 36px 44px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.spot__feats li { padding-block: 12px; border-top: 1px solid var(--line); font-size: .95rem; display: flex; gap: 12px; align-items: baseline; }
.spot__feats li::before { content: ""; width: 6px; height: 6px; background: var(--accent-c, var(--brand)); transform: rotate(45deg) translateY(-2px); flex: none; }
.spot__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.frame { position: relative; aspect-ratio: 1; display: grid; place-items: center; border: 1px solid var(--line-2); background: var(--bg-2); overflow: hidden; }
.frame::before, .frame::after { content: ""; position: absolute; width: 72%; aspect-ratio: 1; border: 1px solid var(--line-2); transform: rotate(45deg); }
.frame::after { width: 46%; border-color: var(--accent-c, var(--brand)); animation: spin 48s linear infinite; }
@keyframes spin { to { transform: rotate(405deg); } }
.frame img { position: relative; z-index: 1; width: 34%; transform: translate(var(--px, 0), var(--py, 0)); transition: transform .9s var(--ease-out); }
.frame .mono { position: absolute; color: var(--ink-3); }
.frame .mono.tl { top: 16px; inset-inline-start: 18px; }
.frame .mono.br { bottom: 16px; inset-inline-end: 18px; }
@media (max-width: 960px) {
  .spot__text, .spot__visual { grid-column: 1 / -1; }
  .spot__visual { margin-top: 48px; max-width: 520px; }
}
@media (max-width: 560px) { .spot__feats { grid-template-columns: 1fr; } }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.card { background: var(--bg); padding: clamp(28px, 3vw, 44px); display: flex; flex-direction: column; gap: 18px; min-height: 340px; transition: background-color .5s; position: relative; }
.card:hover { background: var(--bg-2); }
.card img.card__logo { height: 38px; width: auto; }
.card .link { margin-top: auto; align-self: flex-start; }

/* ---------- 12. Articles · editorial rows ---------- */
.posts { border-top: 1px solid var(--line); }
.post-row { position: relative; display: grid; grid-template-columns: 9rem 1fr 11rem 2rem; gap: 24px; align-items: baseline; padding-block: clamp(22px, 2.6vw, 34px); border-bottom: 1px solid var(--line); transition: padding .6s var(--ease-out); }
.post-row__date { color: var(--ink-3); font-size: var(--fs-small); }
.post-row__title { font-family: var(--font-head); font-weight: var(--w-head); font-size: clamp(1.3rem, 2.3vw, 2.15rem); line-height: var(--lh-head); transition: color .4s; }
.post-row__cat { color: var(--ink-3); font-size: var(--fs-small); }
.post-row svg { width: 20px; height: 20px; color: var(--ink-3); transition: color .4s, transform .6s var(--ease-out); }
.post-row:hover .post-row__title { color: var(--brand-ink); }
.post-row:hover svg { color: var(--brand-ink); transform: scaleX(var(--flip, 1)) rotate(-45deg); }
.post-row__thumb { display: none; }
@media (hover: hover) and (pointer: fine) and (min-width: 961px) { .post-row:hover { padding-inline-start: 18px; } }
@media (max-width: 860px) {
  .post-row { grid-template-columns: 1fr auto; gap: 10px 16px; }
  .post-row__date { grid-column: 1; grid-row: 1; }
  .post-row__title { grid-column: 1 / -1; grid-row: 2; }
  .post-row__cat { grid-column: 2; grid-row: 1; }
  .post-row svg { display: none; }
}
.peek {
  position: fixed; left: 0; top: 0; z-index: 40; width: 300px; aspect-ratio: 4 / 3; pointer-events: none;
  clip-path: polygon(50% 50%, 50% 50%, 50% 50%, 50% 50%);
  transition: clip-path .55s var(--ease-out);
  background: var(--bg-3);
}
.peek.is-on { clip-path: polygon(50% -50%, 150% 50%, 50% 150%, -50% 50%); }
.peek img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 13. CTA ---------- */
.cta { text-align: start; }
.cta__title { font-size: var(--fs-display); line-height: var(--lh-display); letter-spacing: var(--track-display); max-width: 12ch; }
.cta__row { margin-top: clamp(40px, 5vw, 72px); display: flex; flex-wrap: wrap; gap: 28px 48px; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 32px; }
.cta__row p { color: var(--ink-2); max-width: 48ch; }
.magnet { display: inline-block; transform: translate(var(--mx, 0), var(--my, 0)); transition: transform .7s var(--ease-out); }

/* ---------- 14. Page heads ---------- */
.page-head { padding-top: calc(var(--header-h) + clamp(60px, 10vw, 150px)); padding-bottom: clamp(56px, 8vw, 110px); position: relative; }
.page-head .label { margin-bottom: clamp(24px, 3vw, 40px); }
.page-head__title { font-size: var(--fs-h1); line-height: var(--lh-display); letter-spacing: var(--track-display); max-width: 18ch; }
.page-head__lead { margin-top: clamp(28px, 3vw, 44px); max-width: 60ch; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: var(--fs-small); color: var(--ink-3); margin-bottom: 28px; }
.crumbs a:hover { color: var(--ink); }
.crumbs li + li::before { content: "/"; margin-inline-end: 8px; color: var(--ink-4); }

/* ---------- 15. About / generic blocks ---------- */
.split2 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 32px); row-gap: 28px; }
.split2 > .label { grid-column: 1 / span 3; align-self: start; padding-top: .6em; }
.split2 > .split2__main { grid-column: 4 / span 8; }
@media (max-width: 860px) { .split2 > .label, .split2 > .split2__main { grid-column: 1 / -1; } }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.pillar { padding: clamp(28px, 3vw, 48px) clamp(18px, 2vw, 34px) clamp(28px, 3vw, 48px) 0; }
.pillar + .pillar { border-inline-start: 1px solid var(--line); padding-inline-start: clamp(18px, 2vw, 34px); }
.pillar h3 { margin-block: 18px 14px; }
.pillar p { color: var(--ink-2); }
@media (max-width: 860px) { .pillars { grid-template-columns: 1fr; } .pillar + .pillar { border-inline-start: 0; border-top: 1px solid var(--line); padding-inline-start: 0; } }

.kv { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--line); }
.kv > div { display: grid; grid-template-columns: 12rem 1fr; gap: 20px; padding-block: 26px; border-bottom: 1px solid var(--line); align-items: baseline; }
.kv dt { color: var(--ink-3); font-size: var(--fs-small); }
.kv dd { margin: 0; font-size: clamp(1.15rem, 2vw, 1.7rem); font-family: var(--font-head); font-weight: var(--w-head); line-height: 1.4; overflow-wrap: anywhere; }
.kv dd .link { font: inherit; }
@media (max-width: 640px) { .kv > div { grid-template-columns: 1fr; gap: 6px; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1px solid var(--line-2); font-size: .85rem; color: var(--ink-2); transition: border-color .3s, color .3s, background-color .3s; }
.chip:hover { color: var(--ink); border-color: var(--ink-3); }
.chip[aria-current="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- 16. Product landing ---------- */
.pl-hero { position: relative; padding-top: calc(var(--header-h) + clamp(28px, 4vw, 64px)); padding-bottom: clamp(64px, 8vw, 120px); overflow: hidden; }
.pl-hero__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 32px); align-items: start; }
.pl-hero__text { grid-column: 1 / span 7; position: relative; z-index: 1; }
.pl-hero__visual { grid-column: 8 / span 5; margin-top: clamp(0px, 3vw, 40px); }
.pl-hero__name { font-size: var(--fs-display); line-height: var(--lh-display); letter-spacing: var(--track-display); }
.pl-hero__tag { margin-top: 24px; font-size: var(--fs-h3); font-family: var(--font-head); font-weight: var(--w-head); color: var(--ink-2); line-height: var(--lh-head); max-width: 24ch; }
.pl-hero__summary { margin-top: 26px; max-width: 56ch; color: var(--ink-2); }
.pl-hero__actions { margin-top: 40px; display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 960px) { .pl-hero__text, .pl-hero__visual { grid-column: 1 / -1; } .pl-hero__visual { margin-top: 56px; max-width: 420px; } }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
.feature { background: var(--bg); padding: clamp(28px, 3vw, 44px) clamp(20px, 2.4vw, 36px); min-height: 250px; display: flex; flex-direction: column; gap: 14px; transition: background-color .5s; }
.feature:hover { background: var(--bg-2); }
.feature .num { color: var(--accent-c, var(--brand-ink)); font-size: 1.1rem; }
.feature h3 { font-size: 1.3rem; line-height: 1.4; }
.feature p { color: var(--ink-2); font-size: .98rem; }
@media (max-width: 960px) { .feature-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .feature-grid { grid-template-columns: 1fr; } .feature { min-height: 0; } }
.uses { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px); }
.uses ul li { padding-block: 16px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1.8em 1fr; }
.uses ul li::before { content: ""; width: 6px; height: 6px; background: var(--accent-c, var(--brand)); transform: rotate(45deg); margin-top: .75em; }
.uses ul li b { display: block; font-weight: 500; }
.uses ul li span { display: block; color: var(--ink-2); font-size: .95rem; margin-top: 4px; }
@media (max-width: 760px) { .uses { grid-template-columns: 1fr; } }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 24px; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; border: 1px solid var(--line); }
.gallery figcaption { margin-top: 12px; color: var(--ink-3); font-size: var(--fs-small); }

/* ---------- 17. Blog ---------- */
.feature-post { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 32px); align-items: end; padding-bottom: clamp(48px, 6vw, 88px); }
.feature-post__media { grid-column: 1 / span 7; aspect-ratio: 16 / 10; background: var(--bg-3); overflow: hidden; position: relative; }
.feature-post__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease-out); }
.feature-post:hover .feature-post__media img { transform: scale(1.03); }
.feature-post__text { grid-column: 8 / span 5; }
.feature-post__text .h3 { font-size: clamp(1.6rem, 2.8vw, 2.7rem); margin-block: 18px 18px; }
.feature-post__text p { color: var(--ink-2); }
@media (max-width: 960px) { .feature-post__media, .feature-post__text { grid-column: 1 / -1; } .feature-post__text { margin-top: 28px; } }
/* article cards (home, blog list, related) */
.post-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(44px, 5vw, 72px) clamp(16px, 2vw, 32px); }
.post-cards > .post-card:only-child { grid-column: span 2; }
@media (min-width: 621px) { .post-cards:has(> .post-card:nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.post-card { display: flex; flex-direction: column; color: inherit; text-decoration: none; }
.post-card__media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-3); }
.post-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease-out); }
.post-card__media::after { content: ""; position: absolute; inset: auto 0 0 0; height: 2px; background: var(--brand); transform: scaleX(0); transform-origin: right; transition: transform .8s var(--ease-out); }
[dir="ltr"] .post-card__media::after { transform-origin: left; }
.post-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 22px; font-size: var(--fs-small); color: var(--ink-3); }
.post-card__cat { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); }
.post-card__cat::before { content: ""; width: 6px; height: 6px; background: var(--brand); transform: rotate(45deg); }
.post-card__title { display: block; margin-top: 14px; font-family: var(--font-head); font-weight: var(--w-head); font-size: clamp(1.2rem, 1.7vw, 1.6rem); line-height: var(--lh-head); transition: color .4s; }
.post-card__excerpt { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-top: 12px; color: var(--ink-2); font-size: .98rem; line-height: 1.95; }
.post-card__foot { margin-top: auto; padding-top: 18px; display: flex; justify-content: space-between; align-items: center; gap: 16px; border-top: 1px solid var(--line); font-size: var(--fs-small); color: var(--ink-3); }
.post-card__excerpt { margin-bottom: 24px; }
.post-card__title:has(+ .post-card__foot) { margin-bottom: 24px; }
.post-card__more { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); transition: color .4s; }
.post-card__more svg { width: 16px; height: 16px; transition: transform .6s var(--ease-out); }
.post-card:hover .post-card__media img { transform: scale(1.04); }
.post-card:hover .post-card__media::after { transform: scaleX(1); }
.post-card:hover .post-card__title, .post-card:hover .post-card__more { color: var(--brand-ink); }
.post-card:hover .post-card__more svg { transform: scaleX(var(--flip, 1)) rotate(-45deg); }
@media (max-width: 960px) { .post-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .post-cards > .post-card:only-child { grid-column: 1 / -1; } }
@media (max-width: 620px) { .post-cards { grid-template-columns: 1fr; } .post-cards > .post-card:only-child { grid-column: auto; } }
.placeholder-art { position: absolute; inset: 0; display: grid; place-items: center; background: var(--bg-2); }
.placeholder-art::before { content: ""; width: 34%; aspect-ratio: 1; border: 1px solid var(--line-2); transform: rotate(45deg); }
.placeholder-art::after { content: ""; position: absolute; width: 9%; aspect-ratio: 1; background: var(--brand); transform: rotate(45deg); }

.pager { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 56px; color: var(--ink-3); font-size: var(--fs-small); }

.read-progress { position: fixed; top: 0; inset-inline: 0; height: 2px; z-index: 70; background: transparent; pointer-events: none; }
.read-progress i { display: block; height: 100%; width: 100%; background: var(--brand); transform: scaleX(var(--rp, 0)); transform-origin: var(--origin-start); }

.article-head { padding-top: calc(var(--header-h) + clamp(56px, 8vw, 120px)); }
.article-head__meta { display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--ink-3); font-size: var(--fs-small); margin-bottom: 28px; }
.article-head__title { font-size: clamp(2.2rem, 5vw, 4.8rem); line-height: var(--lh-display); letter-spacing: var(--track-display); max-width: 20ch; }
:lang(fa) .article-head__title, :lang(ar) .article-head__title { line-height: 1.4; }
.article-head__excerpt { margin-top: 28px; max-width: 60ch; }
.article-cover { margin-top: clamp(48px, 6vw, 80px); aspect-ratio: 21 / 9; background: var(--bg-3); overflow: hidden; position: relative; }
.article-cover img { width: 100%; height: 100%; object-fit: cover; }
.article-layout { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 32px); padding-block: clamp(56px, 7vw, 110px); }
.article-aside { grid-column: 1 / span 3; }
.article-body { grid-column: 4 / span 7; }
.toc { position: sticky; top: calc(var(--header-h) + 32px); font-size: var(--fs-small); }
.toc .label { margin-bottom: 18px; }
.toc a { display: block; padding-block: 7px; color: var(--ink-3); border-inline-start: 1px solid var(--line); padding-inline-start: 14px; transition: color .3s, border-color .3s; line-height: 1.5; }
.toc a:hover, .toc a.is-active { color: var(--ink); border-color: var(--brand); }
.toc ul ul a { padding-inline-start: 26px; }
@media (max-width: 1100px) { .article-aside { display: none; } .article-body { grid-column: 1 / -1; max-width: 760px; } }

.prose { font-size: 1.125rem; line-height: 1.8; color: color-mix(in srgb, var(--ink) 88%, transparent); max-width: 68ch; }
:lang(fa) .prose, :lang(ar) .prose { font-size: 1.1rem; line-height: 2.15; max-width: 64ch; }
.prose > * + * { margin-top: 1.25em; }
.prose h2, .prose h3, .prose h4 { color: var(--ink); margin-top: 2.2em; margin-bottom: -.2em; }
.prose h2 { font-size: clamp(1.55rem, 2.4vw, 2.1rem); }
.prose h3 { font-size: 1.35rem; }
.prose h2::before { content: ""; display: inline-block; width: .32em; height: .32em; background: var(--brand); transform: rotate(45deg) translateY(-.2em); margin-inline-end: .55em; }
.prose a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--brand-ink); text-underline-offset: .25em; text-decoration-thickness: 1px; }
.prose a:hover { color: var(--brand-ink); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose ul, .prose ol { padding-inline-start: 1.3em; }
.prose ul li { list-style: none; position: relative; }
.prose ul li::before { content: ""; position: absolute; inset-inline-start: -1.15em; top: .78em; width: 5px; height: 5px; background: var(--brand); transform: rotate(45deg); }
.prose ol { list-style: decimal; }
.prose ol li::marker { color: var(--brand-ink); }
.prose li + li { margin-top: .5em; }
.prose blockquote { margin: 2em 0; padding-inline-start: 1.4em; border-inline-start: 2px solid var(--brand); font-family: var(--font-head); font-weight: var(--w-head); font-size: 1.35em; line-height: 1.55; color: var(--ink); }
.prose img { width: 100%; border: 1px solid var(--line); }
.prose figure { margin: 2em 0; }
.prose figcaption { color: var(--ink-3); font-size: var(--fs-small); margin-top: 10px; }
.prose code { font-family: var(--font-mono); font-size: .86em; background: var(--bg-3); padding: .15em .4em; direction: ltr; unicode-bidi: isolate; }
.prose pre { background: var(--bg-2); border: 1px solid var(--line); padding: 20px; overflow-x: auto; direction: ltr; text-align: left; }
.prose pre code { background: none; padding: 0; }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 3em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95em; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: start; }

.article-foot { border-top: 1px solid var(--line); margin-top: 64px; padding-top: 28px; display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.author { display: flex; gap: 16px; align-items: center; }
.author img { width: 52px; height: 52px; object-fit: cover; border-radius: 50%; }
.author b { display: block; font-weight: 500; }
.author span { color: var(--ink-3); font-size: var(--fs-small); }

/* ---------- 18. Footer ---------- */
.site-footer { position: relative; padding-top: clamp(80px, 10vw, 140px); border-top: 1px solid var(--line); overflow: hidden; }
.foot-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 32px); row-gap: 48px; }
.foot-intro { grid-column: 1 / span 5; }
.foot-intro img { height: 54px; width: auto; margin-bottom: 28px; }
.foot-intro .logo-light { display: none; }
[data-theme="light"] .foot-intro .logo-dark { display: none; }
[data-theme="light"] .foot-intro .logo-light { display: block; }
.foot-intro p { color: var(--ink-2); max-width: 40ch; }
.foot-col { grid-column: span 2; }
.foot-col.wide { grid-column: span 3; }
.foot-col .label { margin-bottom: 20px; }
.foot-col li + li { margin-top: 10px; }
.foot-col a { color: var(--ink-2); transition: color .3s; }
.foot-col a:hover { color: var(--ink); }
.foot-col address { font-style: normal; color: var(--ink-2); }
.foot-word {
  margin-top: clamp(32px, 4vw, 64px); padding-bottom: clamp(16px, 2vw, 32px);
  font-family: var(--font-head); font-weight: 800; line-height: 1; letter-spacing: -.04em;
  font-size: clamp(3.5rem, 16vw, 19rem); color: var(--bg-3); white-space: nowrap; user-select: none;
  text-align: center; overflow: hidden;
}
:lang(fa) .foot-word, :lang(ar) .foot-word { letter-spacing: 0; line-height: 1.25; font-size: clamp(3.5rem, 18vw, 20rem); }
.foot-bar .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }
.foot-bar { padding-block: 22px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: var(--fs-small); position: relative; z-index: 1; background: var(--bg); }
.foot-bar a:hover { color: var(--ink); }
@media (max-width: 960px) { .foot-intro { grid-column: 1 / -1; } .foot-col, .foot-col.wide { grid-column: span 6; } }
@media (max-width: 520px) { .foot-col, .foot-col.wide { grid-column: 1 / -1; } }

/* ---------- 19. Cursor ---------- */
.cursor { position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none; width: 0; height: 0; display: none; }
.cursor i { position: absolute; width: 10px; height: 10px; left: -5px; top: -5px; border: 1px solid var(--ink); transform: rotate(45deg) scale(var(--cs, 1)); transition: transform .45s var(--ease-out), background-color .3s, border-color .3s, opacity .3s; }
.cursor.is-link i { --cs: 3.4; background: var(--brand-soft); border-color: var(--brand); }
.cursor.is-hidden i { opacity: 0; }
@media (hover: hover) and (pointer: fine) { .js .cursor { display: block; } }

/* ---------- 20. Reveal system (only when JS is running) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 1.1s var(--ease-out), transform 1.1s var(--ease-out); transition-delay: calc(var(--d, 0) * 1ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js [data-reveal="fade"] { transform: none; }
.js [data-reveal="seam"] { opacity: 1; transform: none; clip-path: polygon(0 100%, 0 100%, 0 100%); transition: clip-path 1.4s var(--ease-io); transition-delay: calc(var(--d, 0) * 1ms); }
.js [data-reveal="seam"].is-in { clip-path: polygon(0 100%, 0 -110%, 210% 100%); }
.js [data-split] { opacity: 1; transform: none; }
.js [data-split] .w { display: inline-block; overflow: clip; overflow-clip-margin: .25em; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
.js [data-split] .w > span { display: inline-block; transform: translateY(110%); transition: transform 1.15s var(--ease-out); transition-delay: calc(var(--d, 0) * 1ms + var(--i, 0) * 55ms); }
.js [data-split].is-in .w > span { transform: none; }

/* ---------- 21. View transitions (progressive enhancement) ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: .45s var(--ease-io) both vtOut; }
::view-transition-new(root) { animation: .7s var(--ease-io) both vtIn; }
@keyframes vtOut { to { opacity: 0; } }
@keyframes vtIn { from { clip-path: polygon(0 100%, 0 100%, 0 100%); } to { clip-path: polygon(0 100%, 0 -110%, 210% 100%); } }

/* ---------- 22. Errors ---------- */
.err { min-height: 100svh; display: grid; align-content: center; padding-top: var(--header-h); }
.err__code { font-family: var(--font-head); font-weight: 300; font-size: clamp(6rem, 24vw, 20rem); line-height: .9; color: var(--ink-4); }
.err h1 { margin-block: 18px 22px; }

/* ---------- 23. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .js [data-reveal], .js [data-reveal="seam"], .js [data-split] .w > span { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .seam { height: auto; }
  .seam__sticky { position: relative; height: auto; padding-block: 96px; }
  .cursor, .peek { display: none !important; }
  @view-transition { navigation: none; }
}

/* ---------- 24. Print ---------- */
@media print {
  .site-header, .site-footer, .cursor, .peek, .read-progress, .mnav, .hero__layer { display: none !important; }
  body { background: #fff; color: #000; }
}

/* =====================================================================
   v1.1 — interactive sections
   ===================================================================== */

/* ---------- Pattern: noise → logo (canvas) ---------- */
.pattern { position: relative; height: 260vh; }
.pattern__sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.pattern canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pattern__head { position: absolute; top: calc(var(--header-h) + 28px); inset-inline: var(--gutter); display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; pointer-events: none; }
.pattern__head .h2 { max-width: 15ch; font-size: clamp(1.7rem, 3.4vw, 3.4rem); }
.pattern__stages { position: absolute; bottom: clamp(28px, 6vh, 64px); inset-inline: var(--gutter); display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; pointer-events: none; }
.pattern__stage { border-top: 1px solid var(--line-2); padding-top: 16px; opacity: .28; transition: opacity .6s, border-color .6s; }
.pattern__stage.is-on { opacity: 1; border-color: var(--brand); }
.pattern__stage b { display: block; font-family: var(--font-head); font-weight: var(--w-head); font-size: clamp(1rem, 1.5vw, 1.35rem); }
.pattern__stage span { display: block; color: var(--ink-2); font-size: var(--fs-small); margin-top: 4px; }
.pattern__stage .num { color: var(--brand-ink); font-size: .8rem; margin-bottom: 6px; display: block; }
@media (max-width: 760px) {
  .pattern { height: 220vh; }
  .pattern__stages { grid-template-columns: 1fr; gap: 10px; }
  .pattern__stage { display: none; } .pattern__stage.is-on { display: block; }
}

/* ---------- Orbit: product hero visual ---------- */
.orbit { position: relative; aspect-ratio: 1; width: 100%; max-width: 620px; margin-inline-start: auto; }
.orbit__layer { position: absolute; inset: 0; transform: translate(var(--dx, 0px), var(--dy, 0px)); transition: transform 1s var(--ease-out); }
.orbit__layer svg { width: 100%; height: 100%; overflow: visible; }
.orbit .ring { fill: none; stroke: var(--line-2); stroke-width: 1; }
.orbit .ring.dash { stroke-dasharray: 2 6; }
.orbit .ring.acc { stroke: var(--accent-c, var(--brand)); stroke-opacity: .55; }
.orbit .bub { fill: var(--bg); stroke: var(--ink-3); stroke-width: 1.2; }
.orbit .bub.on { fill: var(--accent-c, var(--brand)); stroke: var(--accent-c, var(--brand)); }
.orbit .bub.x { fill: none; stroke: var(--brand-ink); }
.orbit .spin { transform-box: view-box; transform-origin: 50% 50%; animation: spin2 60s linear infinite; }
.orbit .spin.rev { animation-direction: reverse; animation-duration: 44s; }
.orbit .spin.fast { animation-duration: 30s; }
@keyframes spin2 { to { transform: rotate(360deg); } }
.orbit__core { position: absolute; inset: 31%; display: grid; place-items: center; }
.orbit__core::before { content: ""; position: absolute; inset: -14%; border: 1px solid var(--accent-c, var(--brand)); transform: rotate(45deg); animation: spin 48s linear infinite; }
.orbit__core::after { content: ""; position: absolute; inset: 0; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 22%; }
.orbit__core img { position: relative; z-index: 1; width: 62%; border-radius: 18%; }
.orbit .mono { position: absolute; color: var(--ink-3); }
.orbit .mono.t { top: 2%; inset-inline-start: 0; }
.orbit .mono.b { bottom: 2%; inset-inline-end: 0; }

/* ---------- Marquee band ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding-block: clamp(18px, 2.4vw, 32px); white-space: nowrap; user-select: none; }
.marquee__track { display: inline-flex; gap: 0; animation: marq 60s linear infinite; will-change: transform; }
[dir="rtl"] .marquee__track { animation-name: marqR; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item { display: inline-flex; align-items: center; gap: clamp(20px, 3vw, 48px); padding-inline-end: clamp(20px, 3vw, 48px); font-family: var(--font-head); font-weight: var(--w-head); font-size: clamp(1.6rem, 3.6vw, 3.6rem); line-height: 1.5; color: var(--ink-3); transition: color .4s; }
.marquee__item:hover { color: var(--ink); }
.marquee__item i { width: 12px; height: 12px; background: var(--accent-c, var(--brand)); transform: rotate(45deg); flex: none; }
@keyframes marq { to { transform: translateX(-50%); } }
@keyframes marqR { to { transform: translateX(50%); } }

/* ---------- Journey: the answer sheet ---------- */
.journey { position: relative; height: 320vh; }
.journey__sticky { position: sticky; top: 0; height: 100svh; display: grid; align-items: center; overflow: hidden; }
.journey__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 32px); align-items: center; }
.journey__text { grid-column: 1 / span 5; }
.journey__text .h2 { margin-block: 18px clamp(28px, 4vh, 48px); font-size: clamp(1.8rem, 3.4vw, 3.4rem); }
.journey__phases li { position: relative; padding: 18px 0 18px; padding-inline-start: 28px; border-top: 1px solid var(--line); opacity: .35; transition: opacity .5s; }
.journey__phases li:last-child { border-bottom: 1px solid var(--line); }
.journey__phases li::before { content: ""; position: absolute; inset-inline-start: 0; top: 28px; width: 9px; height: 9px; border: 1px solid var(--ink-3); transform: rotate(45deg); transition: background-color .4s, border-color .4s; }
.journey__phases li.is-on { opacity: 1; }
.journey__phases li.is-on::before { background: var(--accent-c, var(--brand)); border-color: var(--accent-c, var(--brand)); }
.journey__phases b { display: block; font-family: var(--font-head); font-weight: var(--w-head); font-size: clamp(1.15rem, 1.7vw, 1.5rem); }
.journey__phases span { display: block; color: var(--ink-2); font-size: var(--fs-small); margin-top: 4px; }
.journey__phases i { position: absolute; inset-inline-start: 0; bottom: -1px; height: 1px; width: calc(var(--pp, 0) * 100%); background: var(--accent-c, var(--brand)); }
.journey__visual { grid-column: 7 / span 6; }
.sheet { position: relative; aspect-ratio: 12 / 8.6; width: 100%; padding: 4%; border: 1px solid var(--line-2); background: var(--bg-2); }
.sheet__cells { position: absolute; inset: 4% 4% 10%; }
.sheet__bar { position: absolute; bottom: 0; width: calc(100% / 12 * .62); margin-inline-start: calc(100% / 12 * .19); border-radius: 999px 999px 0 0; background: color-mix(in srgb, var(--accent-c, var(--brand)) 16%, transparent); transform-origin: bottom; transform: scaleY(var(--bs, 0)); height: var(--bh, 0%); }
.sheet__cells b { position: absolute; width: calc(100% / 12); height: calc(100% / 8); display: grid; place-items: center; transform: translateY(var(--ty, 0)) scale(var(--s, 1)); transition: transform .45s var(--ease-out); }
.sheet__cells b::before { content: ""; width: 62%; aspect-ratio: 1; border-radius: 50%; border: 1.2px solid var(--ink-4); background: transparent; transition: background-color .35s, border-color .35s, opacity .35s; }
.sheet__cells b.seen::before { border-color: var(--ink-3); }
.sheet__cells b.ok::before { background: var(--accent-c, var(--brand)); border-color: var(--accent-c, var(--brand)); }
.sheet__cells b.no::before { background: var(--brand); border-color: var(--brand); }
.sheet__cells b.gap::before { background: transparent; border-color: var(--brand-ink); border-style: dashed; }
.sheet__scan { position: absolute; inset-inline: 4%; height: 1px; top: calc(4% + var(--sy, 0) * 86%); background: var(--accent-c, var(--brand)); opacity: var(--so, 0); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent-c, var(--brand)) 20%, transparent); }
.sheet__legend { position: absolute; bottom: 3%; inset-inline: 4%; display: flex; justify-content: space-between; gap: 16px; color: var(--ink-3); opacity: var(--lo, 0); transition: opacity .5s; }
.sheet__legend span { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; }
.sheet__legend span::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--accent-c, var(--brand)); }
.sheet__legend span.g::before { background: transparent; border: 1.2px dashed var(--brand-ink); }
.sheet .mono { position: absolute; top: -26px; inset-inline-start: 0; color: var(--ink-3); }
.sheet .mono.r { inset-inline-start: auto; inset-inline-end: 0; color: var(--accent-c, var(--brand)); }
@media (max-width: 960px) {
  .journey { height: 300vh; }
  .journey__text, .journey__visual { grid-column: 1 / -1; }
  .journey__text .h2 { margin-block: 10px 16px; }
  .journey__phases li { padding-block: 10px; }
  .journey__phases li::before { top: 18px; }
  .journey__phases span { display: none; }
  .journey__visual { margin-top: 28px; }
}

/* ---------- Feature cards: diagonal accent wipe ---------- */
.feature { position: relative; overflow: hidden; }
.feature::after { content: ""; position: absolute; inset: 0; background: color-mix(in srgb, var(--accent-c, var(--brand)) 9%, transparent); clip-path: polygon(0 100%, 0 100%, 0 100%); transition: clip-path .8s var(--ease-io); pointer-events: none; }
.feature:hover::after { clip-path: polygon(0 100%, 0 -110%, 210% 100%); }
.feature .num { display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center; border: 1px solid var(--accent-c, var(--brand)); transform: rotate(45deg); font-size: .85rem; }
.feature .num > span { transform: rotate(-45deg); }

@media (prefers-reduced-motion: reduce) {
  .pattern, .journey { height: auto; }
  .pattern__sticky, .journey__sticky { position: relative; height: auto; min-height: 100svh; }
  .marquee__track { animation: none; }
}

/* emphasised words: brand colour, never synthetic italics (Persian/Arabic have no italic) */
.h1 em, .h2 em, .hero__title em, .page-head__title em, .cta__title em, .pattern__head em, .pl-hero__name em { font-style: normal; color: var(--brand-ink); }
:lang(fa) em, :lang(ar) em { font-style: normal; }

/* =====================================================================
   v1.2 — layers, radar, gateways, page-head mark
   ===================================================================== */

/* ---------- Layers: exploded isometric stack ---------- */
.layers { position: relative; height: 260vh; }
.layers__sticky { position: sticky; top: 0; height: 100svh; display: grid; align-items: center; overflow: hidden; }
.layers__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 32px); align-items: center; }
.layers__text { grid-column: 1 / span 5; }
.layers__text .h2 { margin-block: 18px clamp(24px, 4vh, 44px); font-size: clamp(1.8rem, 3.4vw, 3.4rem); }
.layers__list li { display: grid; grid-template-columns: 2.4em 1fr; gap: 6px; padding-block: 12px; border-top: 1px solid var(--line); opacity: .32; transition: opacity .5s; }
.layers__list li:last-child { border-bottom: 1px solid var(--line); }
.layers__list li.is-on { opacity: 1; }
.layers__list li.is-on .num { color: var(--brand-ink); }
.layers__list b { display: block; font-weight: 500; }
.layers__list span:not(.num) { display: block; color: var(--ink-2); font-size: var(--fs-small); }
.layers__list .num { color: var(--ink-3); font-size: .85rem; padding-top: .2em; }
.layers__visual { grid-column: 7 / span 6; }
.stack { position: relative; aspect-ratio: 1; width: 100%; max-width: 640px; margin-inline: auto; --gap: 14; }
.plane { position: absolute; left: 50%; top: 50%; width: 58%; aspect-ratio: 1; z-index: calc(20 - var(--i));
  transform: translate(-50%, -50%) translate(var(--px, 0px), calc((var(--i) - (var(--n, 5) - 1) / 2) * var(--gap) * 1px + var(--py, 0px))) scale(1, .56) rotate(45deg);
  transition: transform .8s var(--ease-out), opacity .6s; }
.plane > i { position: absolute; inset: 0; border: 1px solid var(--line-2); background-color: color-mix(in srgb, var(--bg) 86%, transparent); transition: border-color .5s, background-color .5s; }
.plane:nth-child(1) > i { background-image: radial-gradient(var(--ink-3) 1px, transparent 1.4px); background-size: 9% 9%; }
.plane:nth-child(2) > i { background-image: repeating-linear-gradient(0deg, var(--ink-4) 0 1px, transparent 1px 8%); }
.plane:nth-child(3) > i { background-image: linear-gradient(var(--ink-4) 1px, transparent 1px), linear-gradient(90deg, var(--ink-4) 1px, transparent 1px); background-size: 12.5% 12.5%; }
.plane:nth-child(4) > i { background-image: radial-gradient(circle, var(--brand-soft) 28%, transparent 30%); background-size: 16% 16%; }
.plane[data-core] > i { background: var(--brand); border-color: var(--brand); }
.plane[data-core] > i::after { content: ""; position: absolute; inset: 37%; background: var(--bg); transform: rotate(0deg); }
.plane[data-core] > i::before { content: ""; position: absolute; inset: 42%; background: var(--ink); z-index: 1; transform: scale(var(--cs, 0)); transition: transform .6s var(--ease-out); }
.plane.is-past { opacity: .1; }
.plane.is-on > i { border-color: var(--brand-ink); }
@media (max-width: 960px) {
  .layers { height: 240vh; }
  .layers__text, .layers__visual { grid-column: 1 / -1; }
  .layers__list span:not(.num) { display: none; }
  .layers__list li { padding-block: 7px; }
  .layers__visual { max-width: 380px; width: 80%; margin: 8px auto 0; }
}

/* ---------- Radar: skills picture before / after ---------- */
.radar { position: relative; height: 230vh; }
.radar__sticky { position: sticky; top: 0; height: 100svh; display: grid; align-items: center; overflow: hidden; }
.radar__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 32px); align-items: center; }
.radar__visual { grid-column: 1 / span 7; }
.radar__text { grid-column: 9 / span 4; }
.radar__text .h2 { margin-block: 18px 32px; font-size: clamp(1.8rem, 3.2vw, 3.2rem); }
.radar__svg { width: 100%; max-height: 82svh; overflow: visible; }
.radar__svg .grid { fill: none; stroke: var(--line); }
.radar__svg .axis { stroke: var(--line); transition: stroke .3s; }
.radar__svg .axis.on { stroke: var(--accent-c, var(--brand)); }
.radar__svg .full { fill: var(--brand-soft); stroke: var(--brand-ink); stroke-dasharray: 4 6; stroke-width: 1; }
.radar__svg .ghost { fill: none; stroke: var(--ink-3); stroke-dasharray: 3 5; opacity: var(--go, 0); }
.radar__svg .cur { fill: color-mix(in srgb, var(--accent-c, var(--brand)) 26%, transparent); stroke: var(--accent-c, var(--brand)); stroke-width: 2; stroke-linejoin: round; }
.radar__svg .dot { fill: var(--bg); stroke: var(--accent-c, var(--brand)); stroke-width: 2; transition: r .3s; }
.radar__svg .dot.on { fill: var(--accent-c, var(--brand)); }
.radar__svg text { fill: var(--ink-2); font-family: var(--font-body); font-size: 15px; transition: fill .3s; }
.radar__svg text.on { fill: var(--ink); font-weight: 600; }
.radar__legend li { display: flex; align-items: center; gap: 14px; padding-block: 14px; border-top: 1px solid var(--line); opacity: .4; transition: opacity .5s; }
.radar__legend li:last-child { border-bottom: 1px solid var(--line); }
.radar__legend li.is-on { opacity: 1; }
.radar__legend li::before { content: ""; width: 26px; height: 0; border-top: 2px dashed var(--ink-3); flex: none; }
.radar__legend li.a::before { border-top: 3px solid var(--accent-c, var(--brand)); }
.radar__legend li.g::before { height: 14px; border: 1px dashed var(--brand-ink); background: var(--brand-soft); }
@media (max-width: 960px) {
  .radar { height: 200vh; }
  .radar__visual, .radar__text { grid-column: 1 / -1; }
  .radar__text { order: -1; }
  .radar__text .h2 { margin-block: 10px 14px; }
  .radar__legend { display: flex; gap: 18px; flex-wrap: wrap; }
  .radar__legend li { border: 0 !important; padding: 0; font-size: .85rem; }
  .radar__svg { max-height: 56svh; }
  .radar__svg text { font-size: 24px; }
}

/* ---------- Gateways: big outbound links ---------- */
.gates { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.gate { position: relative; overflow: hidden; isolation: isolate; min-height: clamp(260px, 30vw, 380px); padding: clamp(28px, 3.4vw, 52px); background: var(--bg);
  display: flex; flex-direction: column; justify-content: space-between; gap: 24px; --gx: 50%; --gy: 50%; }
.gate::before { content: ""; position: absolute; z-index: -1; inset: 0; background: var(--accent-c, var(--brand)); clip-path: polygon(0 100%, 0 100%, 0 100%); transition: clip-path .8s var(--ease-io); }
.gate::after { content: ""; position: absolute; z-index: -1; width: 180px; height: 180px; left: var(--gx); top: var(--gy); border: 1px solid var(--accent-c, var(--brand)); transform: translate(-50%, -50%) rotate(45deg) scale(var(--gs, .4)); opacity: var(--ga, 0); transition: transform .5s var(--ease-out), opacity .4s; }
.gate:hover { --gs: 1; --ga: 1; }
.gate .mono { color: var(--ink-3); transition: color .4s; }
.gate__label { font-family: var(--font-head); font-weight: var(--w-head); font-size: clamp(2rem, 4.2vw, 4.4rem); line-height: 1.15; transition: color .5s; }
.gate__arrow { align-self: flex-end; width: 64px; height: 64px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 50%; transition: transform .6s var(--ease-out), border-color .4s, background-color .4s; }
.gate__arrow svg { width: 24px; height: 24px; }
[dir="rtl"] .gate__arrow { align-self: flex-start; }
[dir="rtl"] .gate__arrow svg { transform: scaleX(-1); }
.gate:focus-visible::before, .gate:hover::before { clip-path: polygon(0 100%, 0 -110%, 210% 100%); }
.gate:hover .gate__label, .gate:hover .mono { color: #121112; }
.gate:hover .gate__arrow { background: #121112; border-color: #121112; color: var(--accent-c, var(--brand)); transform: rotate(45deg); }
.gate:hover::after { border-color: #121112; }

/* ---------- Page-head brand mark (opens toward the pointer) ---------- */
.page-head--mark { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 32px); align-items: center; }
.page-head--mark .page-head__text { grid-column: 1 / span 8; }
.head-mark { grid-column: 10 / span 3; width: 100%; max-width: 380px; justify-self: end; --ku: 3; --core: 0; }
.head-mark svg { width: 100%; height: auto; overflow: visible; }
.head-mark .hm-half { fill: var(--brand); }
.head-mark .hm-a { transform: translate(calc(var(--ku) * -1px), calc(var(--ku) * -1px)); }
.head-mark .hm-b { transform: translate(calc(var(--ku) * 1px), calc(var(--ku) * 1px)); }
.head-mark .hm-core { transform-box: fill-box; transform-origin: center; transform: scale(var(--core)); fill: var(--ink); }
.head-mark .hm-line { stroke: var(--brand-ink); stroke-width: .3; stroke-dasharray: 1 2; opacity: calc(var(--core) * .6); }
@media (max-width: 960px) {
  .page-head--mark .page-head__text { grid-column: 1 / -1; }
  .head-mark { grid-column: 1 / -1; grid-row: 1; justify-self: start; width: 34%; max-width: 180px; margin-bottom: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .layers, .radar { height: auto; }
  .layers__sticky, .radar__sticky { position: relative; height: auto; min-height: 100svh; }
}

/* =====================================================================
   v1.3 — product visibility, JobKav scenes
   ===================================================================== */
.preview-bar { position: fixed; z-index: 65; inset-inline: 0; bottom: 0; padding: 10px var(--gutter); background: #8a6d1f; color: #fff; font-size: .85rem; text-align: center; }
.spot-wrap--next { margin-top: clamp(80px, 11vw, 160px); padding-top: clamp(80px, 11vw, 160px); border-top: 1px solid var(--line); }
@media (min-width: 961px) {
  .spot--flip .spot__text { grid-column: 7 / span 6; grid-row: 1; }
  .spot--flip .spot__visual { grid-column: 1 / span 5; grid-row: 1; }
}

/* ---------- JobKav hero: the talent field ---------- */
.jk-hero { position: relative; min-height: 100svh; overflow: hidden; display: flex; flex-direction: column; justify-content: center;
  padding-top: calc(var(--header-h) + 24px); padding-bottom: 96px; }
.jk-hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.jk-hero__inner { position: relative; z-index: 1; pointer-events: none; }
.jk-hero__inner a, .jk-hero__inner button { pointer-events: auto; }
.jk-hero__text { max-width: min(640px, 52%); }
.jk-hero__logo { height: clamp(56px, 7vw, 96px); width: auto; margin-block: 26px 30px; }
.jk-hero__logo.on-light { display: none; }
[data-theme="light"] .jk-hero__logo.on-dark { display: none; }
[data-theme="light"] .jk-hero__logo.on-light { display: block; }
.jk-hero__title { font-size: clamp(2.2rem, 4.6vw, 4.6rem); line-height: var(--lh-head); letter-spacing: calc(var(--track-display) * .6); }
.jk-hero__legend { position: absolute; z-index: 1; bottom: 28px; inset-inline: var(--gutter); display: flex; gap: 24px; align-items: center; color: var(--ink-3); font-size: .8rem; }
.jk-hero__legend span { display: inline-flex; align-items: center; gap: 8px; }
.jk-hero__legend i.c { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-2); }
.jk-hero__legend i.j { width: 12px; height: 12px; border: 1.5px solid var(--accent-c); border-radius: 3px; }
.jk-hero__read { margin-inline-start: auto; color: var(--accent-c); }
@media (max-width: 960px) {
  .jk-hero { justify-content: flex-start; }
  .jk-hero__text { max-width: none; }
  .jk-hero canvas { opacity: .3; }
}

/* ---------- JobKav dual: employers | job seekers (divider follows the pointer) ---------- */
.dual { position: relative; min-height: max(100svh, 680px); overflow: hidden; --x: 50%; --t: 8%; }
.dual__panel { position: absolute; inset: 0; display: flex; align-items: center; }
.dual__start { background: var(--bg-2); }
.dual__end { background: var(--accent-c, var(--brand)); color: #fff; clip-path: var(--clip, polygon(50% 0, 100% 0, 100% 100%, 42% 100%)); }
.dual__end .label, .dual__end .dual__list span:not(.num), .dual__end .num { color: rgba(255, 255, 255, .78); }
.dual__end .dual__list li { border-color: rgba(255, 255, 255, .22); }
.dual__content { width: min(44%, 560px); padding-block: 80px; }
.dual__start .dual__content { margin-inline-start: var(--gutter); }
.dual__end .dual__content { margin-inline-start: auto; margin-inline-end: var(--gutter); }
.dual__title { font-size: clamp(2.2rem, 5vw, 5.2rem); line-height: var(--lh-display); margin-block: 20px 34px; }
.dual__list li { display: grid; grid-template-columns: 2.4em 1fr; gap: 6px; padding-block: 14px; border-top: 1px solid var(--line); }
.dual__list b { display: block; font-weight: 600; }
.dual__list span:not(.num) { display: block; font-size: var(--fs-small); color: var(--ink-2); margin-top: 3px; }
.dual__list .num { color: var(--ink-3); font-size: .85rem; padding-top: .2em; }
.dual__divider { position: absolute; inset-block: 0; left: 0; width: 0; pointer-events: none; transform: translateX(var(--dx, 50vw)); }
.dual__divider i { position: absolute; top: -5%; height: 110%; width: 2px; left: -1px; background: #fff; transform: skewX(var(--sk, -4deg)); transform-origin: center; opacity: .9; }
.dual__divider b { position: absolute; top: var(--hy, 50%); left: 0; width: 64px; height: 64px; transform: translate(-50%, -50%); border-radius: 50%; background: #fff; color: #111; display: flex; align-items: center; justify-content: center; gap: 0; box-shadow: 0 0 0 8px color-mix(in srgb, #fff 18%, transparent); }
.dual__divider b svg { width: 18px; height: 18px; }
.dual__divider b svg:first-child { transform: scaleX(-1); }
@media (hover: none), (max-width: 960px) {
  .dual { min-height: 0; }
  .dual__panel { position: relative; inset: auto; }
  .dual__end { clip-path: none !important; }
  .dual__content { width: auto; margin-inline: var(--gutter) !important; padding-block: 72px; }
  .dual__divider { display: none; }
}

/* ---------- JobKav board: competency ranking that re-sorts on scroll ---------- */
.board { position: relative; height: 280vh; }
.board__sticky { position: sticky; top: 0; height: 100svh; display: grid; align-items: center; overflow: hidden; }
.board__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 32px); align-items: center; }
.board__text { grid-column: 1 / span 4; }
.board__text .h2 { margin-block: 18px 30px; font-size: clamp(1.9rem, 3.6vw, 3.6rem); }
.board__notes li { padding-block: 12px; border-top: 1px solid var(--line); color: var(--ink-2); display: flex; gap: 12px; align-items: center; }
.board__notes li:last-child { border-bottom: 1px solid var(--line); }
.board__notes li::before { content: ""; width: 7px; height: 7px; background: var(--accent-c); transform: rotate(45deg); flex: none; }
.board__visual { grid-column: 6 / span 7; }
.board__card { position: relative; border: 1px solid var(--line-2); background: var(--bg-2); padding: 18px clamp(14px, 2vw, 26px) 22px; }
.board__head { display: flex; justify-content: space-between; gap: 12px; color: var(--ink-3); padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.board__phase { color: var(--accent-c); }
.board__rows { position: relative; height: calc(var(--rows, 9) * var(--rh, 52px)); margin-top: 8px; }
.brow { position: absolute; inset-inline: 0; top: 0; height: var(--rh, 52px); display: grid; grid-template-columns: 2.2em 36px 1fr 40%; gap: 14px; align-items: center;
  transform: translateY(calc(var(--pos, 0) * var(--rh, 52px))); transition: transform .9s var(--ease-out), opacity .4s; cursor: default; }
.brow::after { content: ""; position: absolute; inset-inline: -10px; inset-block: 4px; border-radius: 6px; background: transparent; transition: background-color .3s; z-index: -1; }
.brow:hover::after { background: var(--bg-3); }
.brow__n { font-family: var(--font-head); color: var(--ink-3); font-size: 1rem; text-align: center; }
.brow__av { width: 34px; height: 34px; border-radius: 50%; background: var(--bg-3); border: 1px solid var(--line-2); position: relative; overflow: hidden; }
.brow__av::before { content: ""; position: absolute; left: 50%; top: 22%; width: 34%; height: 34%; border-radius: 50%; background: var(--ink-3); transform: translateX(-50%); }
.brow__av::after { content: ""; position: absolute; left: 50%; top: 64%; width: 64%; height: 60%; border-radius: 50% 50% 0 0; background: var(--ink-3); transform: translateX(-50%); }
.brow__name { height: 10px; width: var(--nw, 60%); border-radius: 6px; background: var(--ink-4); }
.brow__bar { height: 8px; border-radius: 6px; background: var(--ink-4); overflow: hidden; }
.brow__bar i { display: block; height: 100%; width: calc(var(--sc, 0) * 100%); background: color-mix(in srgb, var(--accent-c) 70%, var(--ink-3)); border-radius: inherit; transition: width .6s var(--ease-out); }
.brow.top1 .brow__n, .brow.top2 .brow__n, .brow.top3 .brow__n { color: var(--ink); }
.brow.top1 .brow__av { border: 2px solid #E3B341; } .brow.top2 .brow__av { border: 2px solid #B8C0CC; } .brow.top3 .brow__av { border: 2px solid #C98A54; }
.brow.top1 .brow__bar i, .brow.top2 .brow__bar i, .brow.top3 .brow__bar i { background: var(--accent-c); }
.brow.you .brow__name { background: none; height: auto; width: auto; font-weight: 600; color: var(--accent-c); font-size: .95rem; }
.brow.you .brow__av { border: 2px solid var(--accent-c); background: color-mix(in srgb, var(--accent-c) 22%, transparent); }
.brow.you .brow__av::before, .brow.you .brow__av::after { background: var(--accent-c); }
.brow.you::after { background: color-mix(in srgb, var(--accent-c) 12%, transparent); }
.brow.you .brow__bar i { background: var(--accent-c); }
.board__pop { position: absolute; inset-inline-end: calc(100% + 16px); width: 220px; padding: 16px; background: var(--bg); border: 1px solid var(--line-2); opacity: 0; transform: translateY(var(--py, 0)); transition: opacity .25s, transform .4s var(--ease-out); pointer-events: none; }
.board__pop.is-on { opacity: 1; }
.board__pop b { display: block; font-size: .85rem; margin-bottom: 10px; }
.board__pop div { display: grid; grid-template-columns: 5.5em 1fr; gap: 10px; align-items: center; font-size: .78rem; color: var(--ink-2); margin-top: 6px; }
.board__pop i { height: 6px; border-radius: 4px; background: var(--ink-4); position: relative; overflow: hidden; }
.board__pop i::after { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: var(--w, 50%); background: var(--accent-c); }
@media (max-width: 1100px) { .board__pop { inset-inline-end: auto; inset-inline-start: 50%; top: auto !important; } }
@media (max-width: 960px) {
  .board { height: 240vh; }
  .board__text, .board__visual { grid-column: 1 / -1; }
  .board__notes { display: none; }
  .board__text .h2 { margin-block: 10px 18px; }
  .board__rows { --rh: 42px; }
  .brow { grid-template-columns: 2em 28px 1fr 38%; gap: 10px; }
  .brow__av { width: 28px; height: 28px; }
  .board__pop { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .board { height: auto; }
  .board__sticky { position: relative; height: auto; min-height: 100svh; }
}
.p-jobkav .btn--solid { background: var(--accent-c); border-color: var(--accent-c); }
.p-jobkav .btn::before { background: var(--accent-c); }
.p-jobkav .btn--solid::before { background: var(--ink); }


/* =====================================================================
   Phones first: less text, shorter scroll, tap to read more.
   The compact form is the base. Wider screens restore the full text.
   (.m-clamp and .m-fold are added by nk.js only below 761px.)
   ===================================================================== */
.m-clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: var(--lines, 3); overflow: hidden; }
.m-clamp.is-open { display: block; -webkit-line-clamp: unset; overflow: visible; }
.m-more { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; padding: 6px 0; background: none; border: 0; font: inherit; font-size: var(--fs-small); color: var(--brand-ink); cursor: pointer; }
.m-more::after { content: ""; width: 7px; height: 7px; border-inline-end: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .3s; }
.m-more[aria-expanded="true"]::after { transform: translateY(2px) rotate(-135deg); }
.m-fold { position: relative; cursor: pointer; padding-inline-end: 34px !important; -webkit-tap-highlight-color: transparent; }
.m-fold::after { content: ""; position: absolute; inset-inline-end: 6px; top: 50%; width: 12px; height: 12px; margin-top: -6px;
  background: linear-gradient(currentColor, currentColor) center / 12px 1.5px no-repeat, linear-gradient(currentColor, currentColor) center / 1.5px 12px no-repeat;
  color: var(--ink-3); transition: transform .35s var(--ease-out); }
.m-fold.is-open::after { transform: rotate(45deg); color: var(--brand-ink); }
.m-fold .m-fold__d { display: none !important; }
.m-fold.is-open .m-fold__d { display: block !important; animation: mFold .35s var(--ease-out); }
.feature.m-fold::after { inset: auto; inset-inline-end: 6px; top: 34px; clip-path: none; }
@keyframes mFold { from { opacity: 0; transform: translateY(-4px); } }

@media (max-width: 760px) {
  /* secondary text hidden on phones */
  .seam__caption, .post-card__excerpt, .hero__scroll, .pattern__stage span:not(.num), .board__notes, .spot__feats li:nth-child(n+5) { display: none !important; }
  /* tighter rhythm */
  .section-head .lead { margin-top: 16px; }
  .duo__list li, .uses ul li, .dual__list li { padding-block: 14px; }
  .step { padding-block: 18px !important; row-gap: 4px !important; }
  .step__n { font-size: 1.5rem !important; }
  .feature { padding: 22px 0 !important; min-height: 0 !important; gap: 10px !important; background: transparent !important; }
  .feature-grid { background: none !important; gap: 0 !important; }
  .feature + .feature { border-top: 1px solid var(--line); }
  .feature .num { width: 30px !important; height: 30px !important; }
  .feature h3 { font-size: 1.1rem; }
  .uses { gap: 36px; }
  .post-cards { gap: 40px; }
  .post-card__title { font-size: 1.15rem; }
  .post-card__foot { margin-top: 18px; }
  /* shorter scroll-driven scenes */
  .seam { height: 150vh; }
  .layers { height: 170vh; }
  .pattern { height: 160vh; }
  .journey { height: 210vh; }
  .radar { height: 160vh; }
  /* buttons stay thumb-friendly and side by side where they fit */
  .hero__actions, .pl-hero__actions { gap: 10px; }
  .hero__actions .btn, .pl-hero__actions .btn { flex: 1 1 auto; justify-content: center; min-height: 48px; }
}
