/* Abdelrahman Elsofany: portfolio
   Palette: ink #0D1B2A, navy #1B263B, steel #415A77, mist #778DA9, bone #E0E1DD */

:root {
  --ink: #0D1B2A;
  --navy: #1B263B;
  --navy-2: #22304A;
  --steel: #415A77;
  --mist: #778DA9;
  --bone: #E0E1DD;
  --muted: #A3B1C2;   /* 7:1 on ink */
  --dim: #8C9EB7;     /* AA on ink and navy */
  --line: rgba(119, 141, 169, .2);
  --line-2: rgba(119, 141, 169, .42);

  --sans: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --serif: "Newsreader", ui-serif, Georgia, serif;
  --arabic: "Noto Kufi Arabic", "Geeza Pro", sans-serif;

  /* type scale, 4:3 from 17px */
  --t-0: .8125rem;
  --t-1: 1.0625rem;
  --t-2: 1.375rem;
  --t-3: 1.875rem;
  --t-4: clamp(2.25rem, 4.6vw, 3.5rem);
  --t-5: clamp(3rem, 8vw, 6.75rem);

  --gutter: clamp(16px, 4.2vw, 56px);
  --max: 1320px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --nav-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--nav-h); color-scheme: dark; overflow-x: clip; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--ink); color: var(--bone);
  font: 400 var(--t-1)/1.6 var(--sans);
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, dl, dd, figure, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
::selection { background: var(--mist); color: var(--ink); }
:focus-visible { outline: 2px solid var(--bone); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 16px; top: -64px; z-index: 300; background: var(--bone); color: var(--ink); padding: 10px 16px; border-radius: 8px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
[lang="ar"] { font-family: var(--arabic); }

/* ---------- buttons, links, tags ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px;
  border-radius: 999px; font-weight: 600; font-size: .95rem; text-decoration: none; letter-spacing: .005em;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .2s var(--ease);
}
.btn:active { transform: scale(.97); }
.btn--solid { background: var(--bone); color: var(--ink); }
.btn--solid:hover { background: #fff; }
.btn--ghost { border: 1px solid var(--line-2); color: var(--bone); background: rgba(13, 27, 42, .5); }
.btn--ghost:hover { border-color: var(--bone); }
.link { display: inline-block; color: var(--bone); font-weight: 500; text-decoration: underline; text-decoration-color: var(--steel); text-underline-offset: 5px; text-decoration-thickness: 1px; transition: text-decoration-color .2s; }
.link:hover { text-decoration-color: var(--bone); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font-size: var(--t-0); color: var(--muted); padding: 3px 10px; border: 1px solid var(--line); border-radius: 6px; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 100; height: var(--nav-h);
  display: flex; align-items: center; gap: 28px; padding: 0 var(--gutter);
  transition: background-color .3s, border-color .3s; border-bottom: 1px solid transparent;
}
.nav.is-scrolled { background: rgba(13, 27, 42, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom-color: var(--line); }
.nav__mark { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: -.01em; margin-right: auto; min-height: 44px; }
.nav__mark svg { width: 20px; height: 20px; color: var(--bone); }
.nav__links { display: flex; gap: 24px; }
.nav__links a, .nav__cv { text-decoration: none; color: var(--muted); font-size: .94rem; transition: color .2s; padding: 10px 0; }
.nav__links a:hover, .nav__links a[aria-current="true"], .nav__cv:hover { color: var(--bone); }
.nav__cv { color: var(--bone); border: 1px solid var(--line-2); border-radius: 999px; padding: 8px 16px; }
.nav__toggle { display: none; width: 44px; height: 44px; position: relative; }
.nav__toggle i { position: absolute; left: 11px; right: 11px; height: 1.5px; background: var(--bone); transition: transform .3s var(--ease); }
.nav__toggle i:first-of-type { top: 18px; } .nav__toggle i:last-of-type { top: 25px; }
.nav__toggle[aria-expanded="true"] i:first-of-type { transform: translateY(3.5px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] i:last-of-type { transform: translateY(-3.5px) rotate(-45deg); }
.menu { position: fixed; inset: 0; z-index: 90; background: var(--ink); padding: calc(var(--nav-h) + 24px) var(--gutter) 32px; }
.menu nav { display: grid; gap: 4px; }
.menu a { font-size: 2rem; font-weight: 600; text-decoration: none; padding: 8px 0; font-variation-settings: "wdth" 80; letter-spacing: -.02em; }
@media (max-width: 860px) {
  .nav__links, .nav__cv { display: none; }
  .nav__toggle { display: block; }
}

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: grid; align-items: end;
  grid-template-columns: minmax(0, 1fr) min(40vw, 66vh); gap: clamp(32px, 4vw, 56px);
  padding: calc(var(--nav-h) + 24px) max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))) clamp(28px, 6vh, 64px);
}
.hero__inner { position: relative; }
.hero__name {
  font-weight: 640; font-size: clamp(3.5rem, 11.2vw, 12rem); line-height: .84; letter-spacing: -.028em;
  font-variation-settings: "wdth" 75, "opsz" 96; display: grid; margin-left: -.04em;
}
.hero__line { display: block; }
.hero__ar { font-size: clamp(1rem, 1.6vw, 1.375rem); font-weight: 500; letter-spacing: 0; line-height: 1.4; color: var(--muted); justify-self: start; margin: 18px 0 0 .1em; }
.hero__lede { max-width: 34ch; font-size: clamp(1.125rem, 1.7vw, 1.375rem); line-height: 1.45; color: var(--muted); margin-top: 22px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.hero__photo { position: relative; border-radius: 22px; overflow: hidden; background: var(--navy); aspect-ratio: 966 / 1019; }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.35) contrast(1.04); }
.hero__photo canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; align-content: end; gap: 28px; }
  .hero__photo { order: -1; width: min(78vw, 320px); }
}

/* ---------- section scaffolding ---------- */
section { position: relative; }
.sec-head { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px 48px; align-items: end; }
.sec-title { font-size: var(--t-5); line-height: .9; font-weight: 640; letter-spacing: -.04em; font-variation-settings: "wdth" 78, "opsz" 96; }
.sec-sub { font-family: var(--serif); font-size: var(--t-2); line-height: 1.45; color: var(--muted); max-width: 46ch; padding-bottom: .35em; }
.sec-sub em { color: var(--bone); }
@media (max-width: 860px) { .sec-head { grid-template-columns: 1fr; } }

/* ---------- statement / attention ---------- */
.statement { padding: clamp(96px, 16vw, 200px) var(--gutter); max-width: var(--max); margin: 0 auto; }
.statement__wrap { position: relative; }
.statement__arcs { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.statement__arcs path { fill: none; stroke: var(--mist); stroke-linecap: round; }
.statement__text { font-family: var(--serif); font-weight: 350; font-size: clamp(1.75rem, 3.9vw, 3.4rem); line-height: 1.42; letter-spacing: -.012em; max-width: 30ch; color: var(--muted); position: relative; }
.statement__text b { font-weight: 450; color: var(--bone); cursor: default; border-radius: 4px; padding: 0 .06em; margin: 0 -.06em; transition: background-color .3s, color .3s; }
.statement__text b.is-query { background: var(--bone); color: var(--ink); }
.statement__text b.is-key { background: rgba(119, 141, 169, calc(var(--w, 0) * .55)); }

/* ---------- ventures ---------- */
.ventures { padding: clamp(72px, 10vw, 140px) 0; }
.vgrid { max-width: var(--max); margin: clamp(48px, 7vw, 96px) auto 0; padding: 0 var(--gutter); display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(32px, 5vw, 72px); }
.venture { display: grid; gap: 16px; align-content: start; padding-top: 28px; border-top: 1px solid var(--line-2); }
.venture > p:not([class]) { color: var(--muted); max-width: 52ch; }
.venture__role { font-size: .9375rem; color: var(--dim); }
.venture__name { font-size: var(--t-4); line-height: 1; font-weight: 640; letter-spacing: -.035em; font-variation-settings: "wdth" 80; }
.venture__lede { font-family: var(--serif); font-size: var(--t-2); line-height: 1.45; max-width: 40ch; }
.stages { display: flex; flex-wrap: wrap; gap: 5px; counter-reset: st; }
.stages li { counter-increment: st; display: flex; align-items: center; gap: 6px; font-size: .8125rem; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--navy); border: 1px solid var(--line); }
.stages li::before { content: counter(st); width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 600; background: var(--ink); color: var(--muted); font-variant-numeric: tabular-nums; }
.vfacts { display: grid; margin-top: 4px; }
.vfacts div { display: grid; grid-template-columns: 8em 1fr; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.vfacts dt { color: var(--dim); }
@media (max-width: 860px) { .vgrid { grid-template-columns: 1fr; gap: 56px; } }

.market { max-width: var(--max); margin: clamp(72px, 9vw, 120px) auto 0; padding: 0 var(--gutter); }
.market__cap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; margin-bottom: 20px; }
.market__cap h3 { font-size: var(--t-3); line-height: 1.1; font-weight: 620; letter-spacing: -.02em; font-variation-settings: "wdth" 85; }
.market__cap p { color: var(--muted); }
.market__plot { position: relative; height: 440px; background: var(--navy); border: 1px solid var(--line); border-radius: 22px 22px 0 0; overflow: hidden; }
.market__row { position: absolute; left: 0; right: 0; top: calc(var(--r) * 25%); height: 25%; }
.market__row + .market__row::before { content: ""; position: absolute; left: 0; right: 0; top: 0; border-top: 1px solid var(--line); transform-origin: left; transition: transform 1s var(--ease); }
.market__row span { position: absolute; left: 22px; top: 50%; transform: translateY(-50%); font-size: .9375rem; color: var(--dim); }
.market__field { position: absolute; inset: 0 28px 0 170px; }
.mk-pos { position: absolute; left: calc(var(--x) * 100%); top: calc((var(--r) + .5) * 25%); transform: translate(calc(var(--x) * -100%), -50%); }
.mk { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 12px; border-radius: 999px; background: var(--ink); border: 1px solid var(--steel); font-weight: 600; font-size: .9375rem; white-space: nowrap; transition: border-color .25s, background-color .25s, box-shadow .25s, opacity .25s; }
.mk:hover { border-color: var(--mist); }
.mk[aria-pressed="true"] { border-color: var(--bone); background: var(--navy-2); box-shadow: 0 0 0 5px rgba(224, 225, 221, .1); }
.market.has-pick .mk[aria-pressed="false"] { opacity: .62; }
.market.has-pick .mk[aria-pressed="false"]:hover { opacity: 1; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; display: inline-block; }
.dot--aom { border: 1.5px solid var(--mist); }
.dot--itl { background: var(--bone); }
.market__probe { position: absolute; top: 0; bottom: 0; left: 0; width: 0; border-left: 1px dashed var(--mist); opacity: 0; pointer-events: none; transition: left .45s var(--ease), top .45s var(--ease), opacity .3s; }
.market.has-pick .market__probe { opacity: .7; }
.market.is-pending .market__row::before { transform: scaleX(0); }
.market__axis { position: relative; display: flex; justify-content: space-between; padding: 14px 28px 14px 170px; font-size: .9375rem; color: var(--muted); background: var(--navy); border: 1px solid var(--line); border-top-color: var(--line-2); border-radius: 0 0 22px 22px; }
.market__axis span:nth-child(2) { position: absolute; left: calc(170px + (100% - 198px) / 2); transform: translateX(-50%); }
.market__foot { display: grid; grid-template-columns: 1fr auto; gap: 16px 32px; align-items: start; margin-top: 24px; }
.market__detail { min-height: 9.5em; }
.md__venture { font-size: .9375rem; color: var(--dim); }
.md__name { font-size: var(--t-3); line-height: 1.1; font-weight: 620; letter-spacing: -.02em; font-variation-settings: "wdth" 85; margin: 2px 0 12px; }
.md__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 32px; }
.md__list dt { color: var(--dim); font-size: .9375rem; }
.md__list dd { margin-top: 2px; max-width: 40ch; }
.market__legend { display: flex; gap: 20px; font-size: .9375rem; color: var(--muted); }
.market__legend li { display: flex; align-items: center; gap: 8px; }
@media (max-width: 860px) {
  .market__plot { height: 470px; }
  .market__row span { top: 14px; left: 16px; transform: none; font-size: .8125rem; }
  .market__field { inset: 22px 12px 0 12px; }
  .mk { font-size: .875rem; padding: 0 12px 0 10px; gap: 6px; }
  .mk-pos { left: calc(var(--xm, var(--x)) * 100%); transform: translate(calc(var(--xm, var(--x)) * -100%), -50%); }
  .market__axis { padding: 12px 14px; font-size: .8125rem; }
  .market__axis span:nth-child(2) { left: 50%; }
  .market__foot { grid-template-columns: 1fr; }
  .md__list { grid-template-columns: 1fr; }
}

/* ---------- DiaDose ---------- */
.dd { padding: clamp(72px, 10vw, 140px) 0; }
.dd__grid { max-width: var(--max); margin: clamp(48px, 7vw, 96px) auto 0; padding: 0 var(--gutter); display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; }
.dd__stage {
  position: sticky; top: calc(var(--nav-h) + 4vh); height: min(78vh, 640px); align-self: start;
  background: var(--navy); border-radius: 22px; border: 1px solid var(--line); overflow: hidden;
}
.stage { position: absolute; inset: 0; padding: clamp(20px, 3vw, 36px); display: flex; flex-direction: column; opacity: 0; visibility: hidden; transition: opacity .5s var(--ease), visibility 0s .5s; }
.dd__stage[data-state="1"] [data-panel="1"],
.dd__stage[data-state="2"] [data-panel="2"],
.dd__stage[data-state="3"] [data-panel="3"],
.dd__stage[data-state="4"] [data-panel="4"] { opacity: 1; visibility: visible; transition: opacity .5s var(--ease) .1s, visibility 0s; }
.stage__foot { margin-top: auto; padding-top: 16px; font-size: var(--t-0); color: var(--dim); line-height: 1.45; max-width: 60ch; }
.dd__steps { display: grid; }
.dd__step { min-height: 78vh; padding: 12vh 0; display: flex; flex-direction: column; justify-content: center; gap: 14px; border-top: 1px solid var(--line); counter-increment: step; }
.dd__step:first-child { border-top: 0; padding-top: 4vh; }
.dd__step h3 { font-size: var(--t-3); line-height: 1.1; font-weight: 600; letter-spacing: -.02em; font-variation-settings: "wdth" 85; }
.dd__step h3::before { content: counter(step); display: block; font-size: var(--t-0); color: var(--dim); font-weight: 500; margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.dd__step--stack h3::before { content: none; }
.dd__step p { color: var(--muted); max-width: 44ch; }
.dd__step .metric { color: var(--bone); font-size: var(--t-2); line-height: 1.35; }
.dd__step .metric b { font-weight: 600; }
.dd__step--stack { min-height: 0; padding-bottom: 0; }

/* recognise */
.classes { flex: 1; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 2px 10px; font-size: clamp(.625rem, .9vw, .78rem); line-height: 1.55; color: var(--steel); overflow: hidden; }
.classes span { transition: color .5s, opacity .6s; }
.classes span.is-off { opacity: .28; }
.classes span.is-top { color: var(--bone); opacity: 1; }
.top5 { position: absolute; left: clamp(20px, 3vw, 36px); right: clamp(20px, 3vw, 36px); bottom: 74px; display: grid; gap: 8px; padding: 18px; background: rgba(13, 27, 42, .94); border: 1px solid var(--line-2); border-radius: 14px; }
.top5 li { display: grid; grid-template-columns: 7.5em 1fr 3em; align-items: center; gap: 12px; font-size: .9375rem; }
.top5 li:first-child { color: var(--bone); font-weight: 600; }
.top5 li:not(:first-child) { color: var(--muted); }
.top5 i { height: 6px; border-radius: 3px; background: var(--line); position: relative; overflow: hidden; }
.top5 i::after { content: ""; position: absolute; inset: 0; background: var(--mist); transform-origin: left; transform: scaleX(0); transition: transform 1s var(--ease); }
.top5 li:first-child i::after { background: var(--bone); }
.top5 b { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }
.dd__stage[data-state="1"] .top5 i::after { transform: scaleX(var(--p)); transition-delay: .9s; }

/* estimate */
.nutr { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border-radius: 14px; overflow: hidden; }
.nutr li { background: var(--navy); padding: clamp(14px, 2.2vw, 26px); display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto 1fr auto; column-gap: 6px; align-content: start; }
.nutr span { grid-column: 1 / -1; color: var(--muted); font-size: .9375rem; }
.nutr b { font-size: clamp(2.5rem, 5.4vw, 4.75rem); font-weight: 600; letter-spacing: -.04em; line-height: 1; font-variation-settings: "wdth" 80; font-variant-numeric: tabular-nums; align-self: end; margin-top: 18px; }
.nutr small { align-self: end; color: var(--muted); padding-bottom: .5em; }
.nutr em { grid-column: 1 / -1; font-style: normal; font-size: var(--t-0); color: var(--dim); margin-top: 6px; }

/* dose */
.dose { flex: 1; display: grid; gap: 22px; align-content: start; }
.dose label { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: baseline; }
.dose label span { color: var(--muted); }
.dose output { font-weight: 600; font-variant-numeric: tabular-nums; }
.dose input[type="range"] { grid-column: 1 / -1; width: 100%; height: 44px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.dose input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--bone) var(--fill, 30%), var(--steel) var(--fill, 30%)); }
.dose input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--steel); }
.dose input[type="range"]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--bone); }
.dose input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--bone); margin-top: -9px; box-shadow: 0 0 0 6px rgba(224, 225, 221, .12); transition: box-shadow .2s; }
.dose input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border: 0; border-radius: 50%; background: var(--bone); }
.dose input[type="range"]:active::-webkit-slider-thumb { box-shadow: 0 0 0 10px rgba(224, 225, 221, .18); }
.dose__math { display: grid; gap: 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.dose__math p { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; color: var(--muted); }
.dose__math code { font-family: var(--sans); font-variant-numeric: tabular-nums; color: var(--bone); }
.dose__total { margin-top: 6px; }
.dose__total span { color: var(--bone); align-self: center; }
.dose__total strong { color: var(--bone); margin-left: auto; font-size: clamp(3rem, 6vw, 5rem); line-height: 1; font-weight: 600; letter-spacing: -.04em; font-variation-settings: "wdth" 80; font-variant-numeric: tabular-nums; }
.dose__total small { color: var(--muted); }
.dose__total.is-capped strong { color: var(--mist); }

/* forecast */
.fc { flex: 1; width: 100%; min-height: 0; overflow: visible; }
.fc__grid line { stroke: var(--line); }
.fc__axis text { fill: var(--dim); font: 400 10px var(--sans); }
.fc__target { fill: rgba(119, 141, 169, .1); }
.fc__band { fill: rgba(224, 225, 221, .08); }
.fc__m { fill: none; stroke-width: 1.2; opacity: .8; }
.fc__m--a { stroke: var(--steel); }
.fc__m--b { stroke: var(--mist); stroke-dasharray: 4 3; }
.fc__m--c { stroke: var(--muted); stroke-dasharray: 1 3; }
.fc__ens { fill: none; stroke: var(--bone); stroke-width: 2.4; stroke-linecap: round; }
.fc__legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: var(--t-0); color: var(--muted); margin-top: 12px; }
.fc__legend li { display: flex; align-items: center; gap: 8px; }
.k { width: 18px; height: 0; border-top: 1.5px solid; }
.k--a { border-color: var(--steel); } .k--b { border-color: var(--mist); border-top-style: dashed; } .k--c { border-color: var(--muted); border-top-style: dotted; } .k--e { border-color: var(--bone); border-top-width: 3px; }

@media (max-width: 960px) {
  .dd__grid { grid-template-columns: 1fr; gap: 0; }
  .dd__stage { top: calc(var(--nav-h) + 8px); height: 54svh; z-index: 2; box-shadow: 0 -24px 0 6px var(--ink), 0 24px 40px -12px var(--ink); }
  .dd__step { min-height: 64svh; padding: 8svh 0; }
  .dd__step:first-child { padding-top: 10svh; }
  .top5 { bottom: 60px; padding: 12px; }
  .top5 li { font-size: .8125rem; grid-template-columns: 6.5em 1fr 2.6em; }
  .dose { gap: 10px; } .dose__math { gap: 4px; padding-top: 10px; }
  .dose input[type="range"] { height: 36px; }
}

/* ---------- products ---------- */
.products { padding: clamp(72px, 10vw, 140px) 0; }
.majlis { max-width: var(--max); margin: clamp(48px, 7vw, 96px) auto 0; padding: 0 var(--gutter); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; }
.majlis__copy { display: grid; gap: 16px; }
.majlis__copy > p:not(.status):not(.role):not(.majlis__lede):not(.model) { color: var(--muted); max-width: 52ch; }
.majlis__title { font-size: var(--t-4); line-height: 1; font-weight: 640; letter-spacing: -.035em; font-variation-settings: "wdth" 80; display: flex; align-items: baseline; gap: 16px; }
.majlis__title span { font-size: .5em; font-weight: 500; color: var(--mist); letter-spacing: 0; }
.majlis__lede { font-family: var(--serif); font-size: var(--t-2); line-height: 1.45; }
.majlis__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.status { font-size: var(--t-0); color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--mist); }
.status--live { color: var(--bone); }
.status--live::before { background: var(--bone); border-color: var(--bone); box-shadow: 0 0 0 4px rgba(224, 225, 221, .14); }
.role { font-size: .9375rem; color: var(--dim); }
.model { max-width: 60ch; color: var(--bone); }
.model span { display: block; font-size: .9375rem; color: var(--dim); margin-bottom: 2px; }

.council { position: relative; aspect-ratio: 520 / 400; background: radial-gradient(70% 80% at 50% 100%, var(--navy-2), var(--navy) 60%); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.council svg { width: 100%; height: 100%; }
.council__links path { fill: none; stroke: var(--mist); stroke-width: 1; opacity: 0; }
.seat circle.seat__ring { fill: var(--ink); stroke: var(--steel); stroke-width: 1.2; }
.seat circle.seat__pulse { fill: none; stroke: var(--bone); stroke-width: 1; opacity: 0; }
.seat text { fill: var(--muted); font: 500 12px var(--sans); text-anchor: middle; }
@media (max-width: 600px) { .seat text { font-size: 17px; } .seat .seat__glyph { font-size: 19px; } }
.seat .seat__glyph { fill: var(--bone); font: 600 15px var(--sans); }
.seat.is-on circle.seat__ring { stroke: var(--bone); fill: var(--navy-2); }
.seat.is-on text { fill: var(--bone); }
.seat.is-dissent circle.seat__ring { stroke: var(--mist); stroke-dasharray: 3 3; }
.council__claim { position: absolute; left: 8%; right: 8%; bottom: 14%; text-align: center; opacity: 0; pointer-events: none; }
.council__claim span { display: inline-block; font-family: var(--serif); font-size: clamp(.95rem, 1.6vw, 1.2rem); position: relative; }
.council__claim span::after { content: ""; position: absolute; left: -4px; right: -4px; top: 52%; height: 1.5px; background: var(--bone); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease); }
.council__claim.is-struck span { color: var(--dim); }
.council__claim.is-struck span::after { transform: scaleX(1); }
.council__claim em { display: block; font-style: normal; font-size: var(--t-0); color: var(--dim); margin-top: 6px; opacity: 0; transition: opacity .4s .4s; }
.council__claim.is-struck em { opacity: 1; }
.verdict { position: absolute; left: 0; right: 0; margin: 0 auto; bottom: 7%; width: min(86%, 380px); background: var(--bone); color: var(--ink); border-radius: 14px; padding: 16px 18px; opacity: 0; }
.verdict__who { font-size: var(--t-0); font-weight: 600; color: var(--steel); }
.verdict__text { font-family: var(--serif); font-size: clamp(1.05rem, 1.8vw, 1.3rem); line-height: 1.3; font-weight: 500; margin: 4px 0 6px; }
.verdict__vote { font-size: var(--t-0); color: var(--steel); }

.plist { max-width: var(--max); margin: clamp(64px, 9vw, 120px) auto 0; padding: 0 var(--gutter); }
.prod { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 6fr) minmax(0, 3fr); gap: 20px 48px; padding: clamp(32px, 4vw, 48px) 0; border-top: 1px solid var(--line); }
.prod:last-child { border-bottom: 1px solid var(--line); }
.prod__head { display: grid; gap: 10px; align-content: start; }
.prod__head h3 { font-size: var(--t-3); line-height: 1.05; font-weight: 620; letter-spacing: -.025em; font-variation-settings: "wdth" 82; }
.prod__head h3 span { font-size: .6em; color: var(--mist); font-weight: 500; letter-spacing: 0; margin-left: 6px; }
.prod__body { display: grid; gap: 14px; align-content: start; }
.prod__body > p:first-child { color: var(--muted); max-width: 60ch; }
.spec { min-height: 150px; border-radius: 16px; background: var(--navy); border: 1px solid var(--line); position: relative; overflow: hidden; display: grid; place-items: center; padding: 16px; }
.spec__cap { position: absolute; left: 16px; bottom: 12px; font-size: var(--t-0); color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 960px) {
  .majlis { grid-template-columns: 1fr; }
  .council { aspect-ratio: auto; }
  .council svg { aspect-ratio: 520 / 400; height: auto; }
  .verdict { position: relative; bottom: auto; width: auto; margin: 0 14px 14px; }
  .council__claim { bottom: auto; top: 62%; }
  .prod { grid-template-columns: 1fr; }
  .spec { min-height: 170px; }
}

/* specimen: goose eggs */
.eggs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px 12px; width: 100%; max-width: 240px; margin-bottom: 18px; }
.egg { width: 100%; aspect-ratio: 4 / 5; }
.egg path.shell { fill: var(--bone); transition: fill .4s, opacity .4s; }
.egg path.crack { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; transition: stroke-dashoffset .35s var(--ease); }
.egg.is-cracked path.shell { fill: var(--steel); }
.egg.is-cracked path.crack { stroke-dashoffset: 0; }

/* specimen: InTheLine ticket */
.ticket { display: flex; align-items: center; gap: 18px; }
.ticket__no { width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center; font-size: 2.2rem; font-weight: 640; font-variation-settings: "wdth" 80; background: var(--ink); border: 1.5px solid var(--steel); position: relative; transition: background-color .4s, color .4s, border-color .4s; }
.ticket__no::after { content: ""; position: absolute; inset: -1.5px; border-radius: 50%; border: 1.5px solid var(--bone); opacity: 0; }
.ticket__states { display: grid; gap: 4px; font-size: .9375rem; color: var(--dim); }
.ticket__states li { transition: color .3s; display: flex; align-items: center; gap: 8px; }
.ticket__states li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--steel); transition: background-color .3s; }
.ticket[data-s="0"] li:nth-child(1), .ticket[data-s="1"] li:nth-child(2), .ticket[data-s="2"] li:nth-child(3) { color: var(--bone); }
.ticket[data-s="0"] li:nth-child(1)::before, .ticket[data-s="1"] li:nth-child(2)::before, .ticket[data-s="2"] li:nth-child(3)::before { background: var(--bone); }
.ticket[data-s="1"] .ticket__no { background: var(--bone); color: var(--ink); border-color: var(--bone); }
.ticket[data-s="1"] .ticket__no::after { animation: ring 1.1s var(--ease) 2; }
@keyframes ring { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(1.6); } }

/* specimen: Osta quotes */
.quotes { display: grid; gap: 8px; width: 100%; max-width: 250px; }
.quote { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: 10px; background: var(--ink); border: 1px solid var(--line); font-size: .875rem; opacity: 0; transform: translateX(24px); transition: opacity .45s var(--ease), transform .45s var(--ease), border-color .3s, background-color .3s, color .3s; }
.quote span { color: var(--muted); }
.quote b { font-weight: 600; font-variant-numeric: tabular-nums; }
.spec--osta.is-in .quote { opacity: 1; transform: none; }
.spec--osta.is-in .quote:nth-child(2) { transition-delay: .35s; }
.spec--osta.is-in .quote:nth-child(3) { transition-delay: .7s; }
.quote.is-picked { background: var(--bone); color: var(--ink); border-color: var(--bone); }
.quote.is-picked span { color: var(--steel); }

/* specimen: U.ai memory */
.mem { width: 100%; max-width: 230px; }
.mem line { stroke: var(--steel); stroke-width: 1; }
.mem circle { fill: var(--ink); stroke: var(--mist); stroke-width: 1.2; }
.mem circle.is-hot { fill: var(--bone); stroke: var(--bone); }
.bubble { position: absolute; right: 14px; bottom: 14px; left: 30%; font-family: var(--serif); font-size: .9375rem; line-height: 1.3; background: var(--bone); color: var(--ink); padding: 10px 12px; border-radius: 12px 12px 2px 12px; opacity: 0; transform: translateY(8px) scale(.96); transform-origin: bottom right; transition: opacity .4s var(--ease), transform .4s var(--ease); }
.spec--uai.is-done .bubble { opacity: 1; transform: none; }

.earlier { max-width: var(--max); margin: clamp(56px, 7vw, 96px) auto 0; padding: 0 var(--gutter); display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 20px 48px; }
.earlier__title { font-size: var(--t-2); font-weight: 600; letter-spacing: -.01em; }
.earlier__list { display: grid; gap: 28px; }
.earlier__list div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 7fr); gap: 8px 32px; }
.earlier__list dt { font-weight: 600; }
.earlier__list dd { color: var(--muted); max-width: 64ch; }
.earlier__meta { display: block; margin-top: 6px; color: var(--dim); font-size: .9375rem; }
@media (max-width: 860px) { .earlier, .earlier__list div { grid-template-columns: 1fr; } }

/* ---------- research ---------- */
.research { padding: clamp(72px, 10vw, 140px) 0; }
.papers { position: relative; max-width: var(--max); margin: clamp(48px, 7vw, 96px) auto 0; padding: 0 var(--gutter); display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 48px; }
.trace { position: absolute; left: var(--gutter); top: 0; height: 100%; width: calc((100% - 2 * var(--gutter) - 48px) * .25); overflow: visible; }
.trace path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.trace__ghost { stroke: var(--line); stroke-width: 1; }
.trace__live { stroke: var(--bone); stroke-width: 1.6; }
.trace__probe { fill: var(--bone); }
.papers__list { grid-column: 2; display: grid; }
.paper { padding: clamp(36px, 5vw, 64px) 0; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.paper:last-child { border-bottom: 1px solid var(--line); }
.papers.is-live .paper { opacity: .5; transition: opacity .6s var(--ease); }
.papers.is-live .paper.is-reached { opacity: 1; }
.paper__when { font-size: .9375rem; color: var(--dim); }
.paper__when em { color: var(--muted); }
.paper__title { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(1.375rem, 2.5vw, 2.125rem); line-height: 1.25; letter-spacing: -.01em; max-width: 36ch; }
.paper__by { color: var(--muted); font-size: .9375rem; max-width: 70ch; }
.paper__by strong { color: var(--bone); font-weight: 600; }
@media (max-width: 860px) {
  .papers { grid-template-columns: 44px minmax(0, 1fr); gap: 16px; }
  .trace { width: 44px; }
}

/* ---------- about ---------- */
.about { padding: clamp(72px, 10vw, 140px) 0 clamp(40px, 5vw, 64px); }

.journey { max-width: var(--max); margin: clamp(56px, 7vw, 96px) auto 0; padding: 0 var(--gutter); }
.journey__head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 12px 48px; align-items: baseline; }
.journey__head h3 { font-size: var(--t-3); line-height: 1.1; font-weight: 620; letter-spacing: -.02em; font-variation-settings: "wdth" 85; }
.journey__head p { color: var(--muted); max-width: 56ch; }
.journey__track { position: relative; height: 2px; margin-top: clamp(32px, 4vw, 48px); background: var(--line); border-radius: 2px; }
.journey__fill { position: absolute; inset: 0; background: var(--bone); border-radius: 2px; transform-origin: left; transform: scaleX(var(--p, 1)); }
.journey__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; }
.year { position: relative; padding-top: 36px; transition: opacity .6s var(--ease), transform .6s var(--ease); }
.year__dot { position: absolute; left: 0; top: -8px; width: 14px; height: 14px; border-radius: 50%; background: var(--ink); border: 2px solid var(--steel); transition: background-color .4s, border-color .4s, box-shadow .4s; }
.year__num { font-size: var(--t-4); line-height: 1; font-weight: 640; letter-spacing: -.035em; font-variation-settings: "wdth" 78; font-variant-numeric: tabular-nums; color: var(--steel); transition: color .5s var(--ease); }
.year h4 { font-size: var(--t-2); line-height: 1.25; font-weight: 600; letter-spacing: -.01em; margin: 14px 0 12px; }
.year ul { display: grid; gap: 8px; }
.year ul li { position: relative; padding-left: 18px; color: var(--muted); max-width: 40ch; }
.year ul li::before { content: ""; position: absolute; left: 0; top: .72em; width: 8px; height: 1.5px; background: var(--steel); }
.year em { color: var(--bone); }
.year.is-on .year__num { color: var(--bone); }
.year.is-on .year__dot { background: var(--bone); border-color: var(--bone); box-shadow: 0 0 0 6px rgba(224, 225, 221, .12); }
.journey.is-live .year:not(.is-on) { opacity: .4; transform: translateY(14px); }

.panels { max-width: var(--max); margin: clamp(56px, 7vw, 96px) auto 0; padding: 0 var(--gutter); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.panel { display: grid; gap: 14px; align-content: start; padding: clamp(22px, 2.4vw, 32px); background: var(--navy); border: 1px solid var(--line); border-radius: 22px; transition: border-color .3s var(--ease); }
.panel:hover { border-color: var(--line-2); }
.panel__title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: var(--t-2); font-weight: 600; letter-spacing: -.01em; }
.panel__title span { font-size: .9375rem; font-weight: 500; color: var(--dim); font-variant-numeric: tabular-nums; }
.panel__note { color: var(--muted); font-size: .9375rem; }
.panel__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.panel__chips li {
  font-size: .9375rem; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--ink);
  transition: opacity .45s var(--ease), transform .55s var(--ease), background-color .2s, color .2s, border-color .2s;
  transition-delay: calc(var(--i) * 45ms + var(--pd, 0ms)), calc(var(--i) * 45ms + var(--pd, 0ms)), 0s, 0s, 0s;
}
.panel__chips li:hover { background: var(--bone); color: var(--ink); border-color: var(--bone); }
.panel:nth-child(2) { --pd: 180ms; }
.panels.is-pending .panel__chips li { opacity: 0; transform: translateY(10px) scale(.9); }
.panel--facts { grid-column: 1 / -1; }
.panel--facts dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 32px; }
.panel--facts div { display: grid; gap: 6px; align-content: start; padding-left: 18px; border-left: 1px solid var(--line); }
.panel--facts dt { font-size: .875rem; color: var(--dim); }
.panel--facts dd { font-size: .9375rem; }

@media (max-width: 1100px) {
  .panel--facts dl { grid-template-columns: 1fr 1fr; row-gap: 24px; }
}
@media (max-width: 860px) {
  .journey__head { grid-template-columns: 1fr; }
  .journey__track { display: none; }
  .journey__list { grid-template-columns: 1fr; gap: 0; margin-top: 32px; }
  .year { padding: 0 0 36px 32px; }
  .year::after { content: ""; position: absolute; left: 6px; top: 18px; bottom: 0; width: 2px; background: var(--line); }
  .year:last-child { padding-bottom: 0; }
  .year:last-child::after { content: none; }
  .year__dot { top: 6px; }
  .journey.is-live .year:not(.is-on) { transform: translateX(10px); }
  .panels { grid-template-columns: 1fr; }
  .panel--facts dl { grid-template-columns: 1fr; row-gap: 16px; }
}

/* ---------- contact ---------- */
.contact { max-width: var(--max); margin: 0 auto; padding: clamp(72px, 10vw, 128px) var(--gutter) clamp(64px, 8vw, 110px); }
.contact__title { font-family: var(--serif); font-weight: 350; font-size: clamp(1.75rem, 3.6vw, 3rem); line-height: 1.2; max-width: 24ch; color: var(--muted); }
.contact__mail {
  display: inline-block; margin-top: clamp(24px, 4vw, 48px); text-decoration: none; overflow-wrap: anywhere;
  font-size: clamp(1.6rem, 5.6vw, 5.4rem); font-weight: 600; letter-spacing: -.04em; line-height: 1.02; font-variation-settings: "wdth" 76;
  background: linear-gradient(var(--bone), var(--bone)) left bottom / 0 2px no-repeat; padding-bottom: .08em; transition: background-size .5s var(--ease);
}
.contact__mail:hover, .contact__mail:focus-visible { background-size: 100% 2px; }
.contact__mail .ch { display: inline-block; }
.contact__list { display: flex; flex-wrap: wrap; gap: 10px 32px; margin-top: 36px; }
.contact__list a { display: inline-flex; min-height: 44px; align-items: center; color: var(--muted); text-decoration: underline; text-decoration-color: var(--steel); text-underline-offset: 5px; font-size: var(--t-2); transition: color .2s, text-decoration-color .2s; }
.contact__list a:hover { color: var(--bone); text-decoration-color: var(--bone); }
.footer { max-width: var(--max); margin: 0 auto; padding: 24px var(--gutter) 40px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--dim); font-size: var(--t-0); }
.footer a { color: var(--muted); }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
