/* Omar Kadri portfolio. Noir and crimson, after saai.pro. */

:root {
  /* palette: one ground, one ink, one accent, one red field */
  --black: #050505;
  --surface: #101010;
  --surface-2: #181818;
  --red: #c4111d;          /* the field: white text passes AA on it */
  --red-bright: #ef2b37;   /* accent on black */
  --red-deep: #8f0b14;
  --ink: #f5f5f5;
  --ink-soft: #a8a8a8;
  --ink-dark: #0a0a0a;
  --paper: #f3f3f3;

  --font-display: 'Bebas Neue', 'Arial Narrow', Impact, sans-serif;
  --font-text: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-ui: var(--font-text);

  /* five steps */
  --step-s: 0.9375rem;                         /* 15px */
  --step-body: 1.0625rem;                      /* 17px */
  --step-m: clamp(1.375rem, 1.1rem + 0.9vw, 1.875rem); /* 22–30 */
  --step-l: clamp(2.75rem, 1.6rem + 4.6vw, 5.5rem);    /* 44–88 */
  --step-xl: clamp(7.5rem, 22vw, 22rem);       /* the name */

  --m: clamp(16px, 3vw, 44px);                 /* outer margin, everywhere */
  --gap: clamp(120px, 12vw, 200px);            /* between sections */
  --top-h: 64px;

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--top-h) + 16px); color-scheme: dark; }
a, button, input { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  background: var(--black);
  color: var(--ink);
  font: 400 var(--step-body)/1.55 var(--font-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
strong { font-weight: 700; }
::selection { background: var(--red-bright); color: #fff; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.chapter--red :focus-visible { outline-color: var(--ink-dark); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip {
  position: fixed; left: var(--m); top: -100px; z-index: 100;
  background: var(--ink); color: var(--ink-dark); padding: 12px 18px; font-weight: 700;
}
.skip:focus { top: 12px; }

/* ---------------------------------------------------------------- header */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--top-h);
  display: flex; align-items: center; gap: 28px;
  padding: 0 var(--m);
  font-size: var(--step-s); font-weight: 500;
  color: #fff;
  background: var(--red);
  transition: color .3s var(--ease-io), background-color .3s var(--ease-io);
}
.top.is-light { color: var(--ink); background: var(--black); }
.top.is-surface { color: var(--ink); background: var(--surface); }
.top a { text-decoration: none; }
.top__mark { font-weight: 700; margin-right: auto; }
.top__nav { display: flex; gap: 24px; }
.top__nav a { position: relative; padding: 10px 0; }
.top__nav a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 4px; height: 2px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .25s var(--ease-out);
}
.top__nav a:hover::after, .top__nav a[aria-current="true"]::after { transform: scaleX(1); }
.top__status { display: flex; align-items: center; gap: 8px; }

.dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: currentColor; animation: pulse 2.4s ease-in-out infinite;
}
.top .dot { background: #22c55e; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ---------------------------------------------------------------- chapters */
main { position: relative; z-index: 1; background: var(--black); }
.chapter { padding: var(--gap) var(--m); position: relative; }
.chapter--red { background: var(--red); color: var(--ink); }
.chapter--black { background: var(--black); }
.chapter--surface { background: var(--surface); }

.section-title {
  font: 400 var(--step-l)/0.92 var(--font-display);
  letter-spacing: 0.005em;
  text-wrap: balance;
  max-width: 16ch;
  margin-bottom: clamp(48px, 6vw, 96px);
}
.section-title--small { max-width: 22ch; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px;
  border: 0; border-radius: 0; cursor: pointer;
  font-weight: 700; text-decoration: none;
  transition: transform .16s var(--ease-out), background-color .2s, color .2s;
}
.btn:active { transform: scale(.97); }
.btn--ink { background: var(--ink-dark); color: var(--ink); }
.btn--ink:hover { background: #fff; color: var(--ink-dark); }
.link {
  background: none; border: 0; padding: 0; cursor: pointer;
  font-weight: 700; text-decoration: underline; text-underline-offset: 5px;
  text-decoration-thickness: 2px; transition: text-underline-offset .2s var(--ease-out);
}
.link:hover { text-underline-offset: 8px; }

/* ---------------------------------------------------------------- hero */
.hero {
  min-height: 100svh;
  padding-top: calc(var(--top-h) + 6svh);
  padding-bottom: 40px;
  display: grid; grid-template-rows: auto auto 1fr auto;
}
.hero__strip {
  display: flex; flex-wrap: wrap; gap: 8px 0; margin-top: 40px; padding: 16px 0 0;
  font-size: var(--step-body); font-weight: 500; color: #fff;
}
.hero__strip li { white-space: nowrap; }
.hero__strip li:not(:last-child)::after { content: '/'; margin: 0 14px; color: var(--ink-dark); font-weight: 700; }
.hero__role { margin-top: 24px; font-size: var(--step-m); line-height: 1.3; color: #fff; font-weight: 500; }
.hero__bottom { align-self: end; padding-top: 40px; }
.hero__name {
  font: 400 var(--step-xl)/0.8 var(--font-display);
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin-left: -0.04em;
}
.hero__name span { display: inline-block; white-space: nowrap; }
@media (min-width: 641px) {
  .hero__name { font-size: 25.6vw; line-height: .84; white-space: nowrap; }
}
.hero__bottom {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
  gap: 5vw; align-items: end;
}
.hero__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3vw; max-width: 760px; }
.hero__stats dt { font: 400 clamp(3rem, 2rem + 3.4vw, 5.5rem)/0.9 var(--font-display); color: var(--ink-dark); }
.hero__stats dd { margin-top: 8px; font-size: var(--step-s); color: #fff; max-width: 18ch; }
.hero__l1 { color: #ffd6d6; }
.hero__l2 { color: var(--ink-dark); }
.hero__foot {
  justify-self: end;
  width: 100%;
  display: grid; gap: 28px;
  padding-top: 40px;
}
.hero__lede { font-size: clamp(1.0625rem, 0.95rem + 0.35vw, 1.25rem); line-height: 1.5; color: #fff; }
.hero__actions { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; color: #fff; }

/* ---------------------------------------------------------------- about */
.about__row {
  display: grid; grid-template-columns: minmax(0, 30fr) minmax(0, 70fr);
  column-gap: 4vw; row-gap: 40px; align-items: start;
}
.about__row--record {
  margin-top: clamp(80px, 9vw, 140px);
  grid-template-columns: minmax(0, 30fr) minmax(0, 70fr);
}
.facts { display: grid; gap: 22px; font-size: var(--step-s); }
.facts dt { color: var(--ink-soft); }
.facts dd { color: var(--ink); font-weight: 500; }
.about__para {
  font-size: clamp(1.375rem, 1rem + 1.25vw, 2.125rem);
  line-height: 1.32; letter-spacing: -0.01em; max-width: 34ch;
}
.about__text { display: grid; gap: 28px; }
.about__body { max-width: 52ch; font-size: clamp(1.0625rem, 0.95rem + 0.35vw, 1.25rem); }
.about__body strong { color: var(--red-bright); font-weight: 700; }
.about__word { font: 500 var(--step-body)/1.4 var(--font-text); color: var(--ink-soft); }
.record { display: grid; gap: 12px; max-width: 760px; }
.record li {
  display: flex; justify-content: space-between; gap: 24px;
  font-size: var(--step-m); line-height: 1.3;
}
.record li span:last-child { color: var(--ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.about__row--record .about__word:nth-of-type(2) { margin-top: 24px; }
.about__row--record .record:nth-of-type(2) { margin-top: 24px; }

/* ---------------------------------------------------------------- flagships */
.flag {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  column-gap: 5vw; row-gap: 40px; align-items: center;
}
.flag + .flag { margin-top: clamp(100px, 11vw, 180px); }
.flag--flip .flag__text { order: 2; }
.flag__name {
  font: 400 clamp(3rem, 2rem + 4vw, 6rem)/0.9 var(--font-display);
  color: var(--red-bright); margin-bottom: 24px;
}
.flag__text p { max-width: 44ch; }
.flag__text p + p { margin-top: 20px; }
.flag__stack { color: var(--ink-soft); font-size: var(--step-s); }
.flag__ui figcaption { margin-top: 14px; font-size: var(--step-s); color: var(--ink-soft); }

/* interface fragments: the product's own look (data-ui), mono allowed here */
.ui {
  background: var(--black); color: var(--ink);
  border: 1px solid #2a2a2a; border-radius: 0; /* data-ui fragment, taste-skill-ignore */
  font: 400 14px/1.45 var(--font-ui);
  overflow: hidden;
  transition: transform .5s var(--ease-out);
}
.flag__ui:hover .ui { transform: translateY(-6px); }
.ui__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid #2a2a2a; background: #0c0c0c; /* data-ui fragment, taste-skill-ignore */
}
.ui__title { font-weight: 600; }
.ui__live { display: flex; align-items: center; gap: 8px; color: #4ade80; }
.ui__live .dot { background: #4ade80; }
.ui__seg { display: flex; border: 1px solid #333; overflow: hidden; } /* data-ui fragment, taste-skill-ignore */
.ui__seg button {
  min-width: 44px; min-height: 36px; border: 0; background: transparent; cursor: pointer;
  font: 600 14px var(--font-ui); color: var(--ink-soft);
}
.ui__seg button[aria-pressed="true"] { background: var(--red); color: #fff; }

.beds__grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; padding: 16px; }
.bed {
  aspect-ratio: 1 / 1; display: grid; place-items: center;
  font-size: 13px; font-weight: 600;
}
.is-occ { background: var(--red); color: #fff; }
.is-free { background: #14361f; color: #86efac; }
.is-clean { background: #3a300f; color: #fde68a; }
.beds__queue { padding: 0 16px 8px; }
.beds__queue li {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center;
  padding: 10px 0; border-top: 1px solid #222; /* data-ui fragment, taste-skill-ignore */
}
.beds__queue b { color: var(--red-bright); }
.beds__queue em { font-style: normal; color: var(--ink-soft); }
.beds__legend { display: flex; flex-wrap: wrap; gap: 16px; padding: 12px 16px 16px; color: var(--ink-soft); font-size: 13px; }
.k::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-inline-end: 6px; vertical-align: -1px; }
.k--occ::before { background: var(--red); } .k--free::before { background: #22c55e; } .k--clean::before { background: #eab308; }
.ui--beds[dir="rtl"] { font-family: var(--font-text); }

.deck__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: #222; }
.deck__stats div { background: var(--black); padding: 16px; display: grid; gap: 4px; }
.deck__stats small { color: var(--ink-soft); font-size: 13px; }
.deck__stats b { font: 600 clamp(22px, 2.4vw, 32px)/1 var(--font-ui); font-variant-numeric: tabular-nums; }
.deck__stats i { font-style: normal; font-size: 14px; color: var(--ink-soft); margin-left: 2px; }
.deck__spark { width: 100%; height: 70px; color: var(--red-bright); padding: 8px 0; }
.deck__log { padding: 6px 16px 16px; display: grid; gap: 6px; min-height: 132px; }
.deck__log li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deck__log time { color: var(--ink-soft); margin-right: 8px; }
.deck__log li.is-new { animation: logIn .45s var(--ease-out); }
@keyframes logIn { from { opacity: 0; transform: translateY(8px); } }

.ui--pitch { color: #9ca3af; }
.pitch { width: 100%; height: auto; background: #0b1a10; }
.pitch__team circle { fill: var(--red); stroke: #fff; stroke-width: 2; }
.pitch__arrow { stroke: #fff; }
.pitch__run { animation: run 3.2s var(--ease-io) infinite; transform-box: fill-box; }
@keyframes run { 0%, 20% { transform: translate(0, 0); } 60%, 80% { transform: translate(74px, -34px); } 100% { transform: translate(0, 0); } }
.pitch__event { padding: 12px 16px; color: var(--ink); border-top: 1px solid #222; } /* data-ui fragment, taste-skill-ignore */

/* Hkeya-Sghira pipeline */
.book__steps { padding: 8px 16px; counter-reset: step; }
.book__steps li {
  counter-increment: step;
  display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: center;
  padding: 9px 0; border-top: 1px solid #222; color: var(--ink-soft); /* data-ui fragment, taste-skill-ignore */
}
.book__steps li:first-child { border-top: 0; }
.book__steps li::before {
  content: counter(step); display: grid; place-items: center; width: 24px; height: 24px;
  border: 1px solid #3a3a3a; font-size: 12px; font-weight: 600; /* data-ui fragment, taste-skill-ignore */
}
.book__steps em { font-style: normal; font-size: 13px; font-variant-numeric: tabular-nums; }
.book__steps li.is-done { color: var(--ink); }
.book__steps li.is-done::before {
  content: ''; border-color: #14361f;
  background: #14361f url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%2386efac' stroke-width='2.6'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.book__steps li.is-run { color: var(--ink); }
.book__steps li.is-run::before { background: var(--red); border-color: var(--red); color: #fff; }
.book__steps li.is-run em { color: var(--red-bright); }
.book__bar { height: 4px; margin: 4px 16px 0; background: #222; }
.book__bar i { display: block; height: 100%; background: var(--red-bright); transition: width .6s var(--ease-out); }
.book__event { padding: 12px 16px 14px; color: var(--ink-soft); font-size: 13px; }

/* Tadil order lifecycle */
.order__steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 16px; counter-reset: st; }
.order__steps li {
  counter-increment: st; position: relative;
  padding: 10px 8px 10px; min-height: 64px; background: #141414; color: var(--ink-soft);
  font-size: 12.5px; line-height: 1.25; transition: background-color .3s, color .3s;
}
.order__steps li::before { content: counter(st); display: block; font-weight: 700; font-size: 15px; margin-bottom: 4px; color: #555; }
.order__steps li.is-done { background: #1d1d1d; color: var(--ink); }
.order__steps li.is-done::before { color: #86efac; }
.order__steps li.is-now { background: var(--red); color: #fff; }
.order__steps li.is-now::before { color: #fff; }
.order__info { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: #222; border-top: 1px solid #222; } /* data-ui fragment, taste-skill-ignore */
.order__info div { background: var(--black); padding: 12px 16px 14px; display: grid; gap: 4px; }
.order__info dt { color: var(--ink-soft); font-size: 12.5px; }
.order__info dd { font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .order__steps { grid-template-columns: repeat(2, 1fr); }
  .order__info { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- architecture */
.arch .section-title { color: var(--ink); max-width: 18ch; }
.arch__body { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 5vw; align-items: start; }
.arch__layers { display: grid; gap: 4px; }
.arch__layers button {
  text-align: left; cursor: pointer;
  font: 400 clamp(2rem, 1.3rem + 2.6vw, 3.75rem)/1 var(--font-display);
  padding: 14px 20px; border: 0; border-radius: 0;
  background: var(--red-deep); color: #ffd6d6;
  transition: background-color .2s, color .2s, transform .25s var(--ease-out);
}
.arch__layers button:hover { transform: translateX(8px); }
.arch__layers button[aria-selected="true"] { background: var(--ink-dark); color: var(--ink); transform: translateX(16px); }
.arch__panel { background: var(--ink-dark); padding: clamp(28px, 3vw, 48px); min-height: 100%; }
.arch__lead { font-size: var(--step-m); line-height: 1.35; margin-bottom: 28px; }
.arch__points { display: grid; gap: 12px; margin-bottom: 28px; }
.arch__points li { padding-left: 28px; position: relative; }
.arch__points li::before { content: ''; position: absolute; left: 0; top: .6em; width: 14px; height: 3px; background: var(--red-bright); }
.arch__deps { color: var(--ink-soft); }
.arch__panel.is-swap > * { animation: swapIn .35s var(--ease-out) both; }
.arch__panel.is-swap > *:nth-child(2) { animation-delay: .05s; }
.arch__panel.is-swap > *:nth-child(3) { animation-delay: .1s; }
@keyframes swapIn { from { opacity: 0; transform: translateY(10px); } }

/* ---------------------------------------------------------------- work ledger */
.work { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: 5vw; }
.work__col { max-width: 760px; }
.ledger__row {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 64px;
  gap: 16px; align-items: baseline;
  padding: 14px 0; cursor: default;
  transition: color .2s;
}
.ledger__name { font-size: var(--step-m); font-weight: 500; line-height: 1.25; }
.ledger__kind { color: var(--ink-soft); font-size: var(--step-body); }
.ledger__year { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.ledger:hover .ledger__row:not(.is-on), .ledger.has-focus .ledger__row:not(.is-on) { color: #5c5c5c; }
.ledger:hover .ledger__row:not(.is-on) .ledger__kind, .ledger:hover .ledger__row:not(.is-on) .ledger__year { color: #444; }
.ledger__row.is-on .ledger__name { color: var(--red-bright); }
.ledger__preview {
  position: sticky; top: calc(var(--top-h) + 40px); align-self: start;
  aspect-ratio: 4 / 3; margin-top: clamp(100px, 10vw, 150px);
  background: var(--red); color: #fff;
  display: grid; align-content: end; padding: 28px;
  transition: opacity .15s;
}
.ledger__metric { font: 400 clamp(5rem, 3rem + 7vw, 11rem)/0.85 var(--font-display); color: var(--ink-dark); }
.ledger__metric.is-swap { animation: swapIn .3s var(--ease-out); }
.ledger__note { font-size: var(--step-m); line-height: 1.25; margin-top: 12px; max-width: 18ch; }

/* ---------------------------------------------------------------- ask my CV */
.ask { min-height: 88svh; }
.ask__form { margin: 0 calc(var(--m) * -0) 40px; }
.ask__input {
  width: 100%; border: 0; border-radius: 0; background: transparent; padding: 0 0 8px;
  font: 400 clamp(3rem, 1.5rem + 7vw, 8.25rem)/1 var(--font-display);
  color: var(--ink); caret-color: var(--red-bright);
  border-bottom: 4px solid var(--red);
  -webkit-appearance: none; appearance: none;
}
.ask__input::-webkit-search-cancel-button { display: none; }
.ask__input:focus { outline: none; border-bottom-color: var(--ink); }
.ask__answer {
  max-width: 720px; background: var(--black); border-radius: 0;
  padding: 20px; font: 400 15px/1.5 var(--font-text);
}
.ask__meta { color: #4ade80; font: 500 14px var(--font-ui); margin-bottom: 12px; }
.ask__results { display: grid; gap: 14px; counter-reset: r; }
.ask__results li { padding: 14px 16px; background: var(--surface-2); }
.ask__results li.is-new { animation: swapIn .3s var(--ease-out) both; }
.ask__results li:nth-child(2).is-new { animation-delay: .06s; }
.ask__results li:nth-child(3).is-new { animation-delay: .12s; }
.ask__src { display: flex; justify-content: space-between; gap: 12px; color: var(--ink-soft); font: 500 13px var(--font-ui); margin-bottom: 6px; }
.ask__score { color: var(--red-bright); }
.ask__results p { font-size: 16px; color: var(--ink); }
.ask__results mark { background: var(--red); color: #fff; padding: 0 2px; }
.ask__how { margin-top: 14px; color: var(--ink-soft); font-size: 14px; }
.ask__body { display: grid; grid-template-columns: minmax(0, 720px) minmax(0, 1fr); gap: 5vw; align-items: start; }
.ask__examples { display: grid; gap: 6px; justify-items: start; }
.ask__examples button { font-size: var(--step-m) !important; }
.ask__examples button {
  background: none; border: 0; padding: 8px 0; cursor: pointer;
  font-size: var(--step-body); font-weight: 500; color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--red-bright);
  text-decoration-thickness: 2px; text-underline-offset: 6px;
  transition: color .2s, text-underline-offset .2s var(--ease-out);
}
.ask__examples button:hover { color: var(--red-bright); text-underline-offset: 9px; }

/* ---------------------------------------------------------------- stack line-up */
.lineup { width: 100%; border-collapse: collapse; font-size: clamp(1.125rem, 0.8rem + 1.1vw, 1.75rem); }
.lineup td, .lineup th { padding: 0; text-align: left; font-weight: 400; line-height: 1.55; vertical-align: baseline; }
.lineup td:nth-child(1) { width: 36%; }
.lineup td:nth-child(2) { width: 18%; color: var(--ink-soft); }
.lineup td:nth-child(3) { width: 26%; }
.lineup td:nth-child(4) { text-align: right; color: var(--ink-soft); }
.lineup__group th {
  color: var(--red-bright); padding-top: 64px; padding-bottom: 12px;
}
.lineup tbody:first-of-type .lineup__group th { padding-top: 0; }
.lineup tr:not(.lineup__group) { transition: color .2s; }
.lineup tr:not(.lineup__group):hover td { color: var(--ink); }

/* ---------------------------------------------------------------- contact */
.contact {
  padding-top: clamp(60px, 7vw, 100px); padding-bottom: clamp(60px, 7vw, 100px);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); column-gap: 4vw; align-items: end;
}
.contact__aside { background: var(--ink-dark); color: var(--ink); padding: 32px; display: grid; gap: 24px; }
.contact__now { font-size: var(--step-m); line-height: 1.3; font-weight: 500; }
.contact__facts { display: grid; gap: 14px; }
.contact__facts dt { color: var(--ink-soft); font-size: var(--step-s); }
.contact__facts dd { font-weight: 500; }
.btn--light { background: var(--ink); color: var(--ink-dark); }
.btn--light:hover { background: var(--red-bright); color: #fff; }
.rows { display: grid; }
.row {
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  font: 400 clamp(2.4rem, 0.8rem + 5.6vw, 6rem)/1 var(--font-display);
  padding: 22px 0 14px;
}
.row a { text-decoration: none; color: var(--ink); overflow-wrap: anywhere; transition: color .2s, transform .25s var(--ease-out); display: inline-block; }
.row a:hover { color: var(--ink-dark); transform: translateX(10px); }
.copy {
  font: 700 var(--step-s) var(--font-text); background: var(--ink-dark); color: var(--ink);
  border: 0; min-height: 44px; padding: 0 18px; cursor: pointer; border-radius: 0;
  transition: transform .16s var(--ease-out), background-color .2s;
}
.copy:hover { background: #fff; color: var(--ink-dark); }
.copy:active { transform: scale(.96); }
.row--hello { color: var(--ink-dark); }
.round {
  width: 0.95em; height: 0.95em; border-radius: 50%; flex: none;
  display: grid !important; place-items: center;
  background: var(--ink-dark); color: var(--ink) !important;
  transition: transform .3s var(--ease-out), background-color .2s !important;
}
.round:hover { transform: rotate(-45deg) !important; background: #fff; color: var(--ink-dark) !important; }
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--ink-dark); font-weight: 700; padding: 14px 22px;
  transition: opacity .2s, transform .3s var(--ease-out);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------------- footer */
.foot {
  position: relative; z-index: 0;
  min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; gap: 64px;
  background: var(--paper); color: var(--ink-dark);
  padding: calc(var(--top-h) + 40px) var(--m) 24px;
}
.foot__cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; font-size: var(--step-body); }
.foot__cols > div { display: grid; align-content: start; gap: 6px; }
.foot__cols a, .foot__cols p:not(.foot__h) { color: #3d3d3d; text-decoration: none; width: fit-content; max-width: 100%; overflow-wrap: anywhere; }
.foot__cols a:hover { color: var(--red); text-decoration: underline; text-underline-offset: 4px; }
.foot__h { font-weight: 700; color: var(--ink-dark); }
.foot__replay { color: #3d3d3d; font-weight: 500; text-align: left; }
.foot__cta { align-self: end; display: grid; justify-items: start; gap: 20px; }
.foot__title { font: 400 clamp(4.5rem, 2rem + 11vw, 15rem)/0.86 var(--font-display); color: var(--red); }
.foot__mail { font-size: var(--step-m); font-weight: 500; color: var(--ink-dark); text-underline-offset: 6px; overflow-wrap: anywhere; }
.foot__mail:hover { color: var(--red); }
.foot__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 8px; }
.foot .btn--ink:hover { background: var(--red); color: #fff; }
.foot__legal { display: grid; gap: 6px; font-size: 0.875rem; color: #3d3d3d; }
.foot__legal a { color: var(--ink-dark); }

/* ---------------------------------------------------------------- entrances */
.js-reveal .reveal { opacity: 0; transform: translateY(24px); }
.js-reveal .reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
  transition-delay: var(--d, 0ms);
}

/* ---------------------------------------------------------------- tablet */
@media (max-width: 1000px) {
  .top__status { display: none; }
  .flag, .flag--flip, .arch__body, .work { grid-template-columns: 1fr; }
  .flag--flip .flag__text { order: 0; }
  .ledger__preview { display: none; }
  .ask__body { grid-template-columns: 1fr; }
  .ask__examples { display: flex; flex-wrap: wrap; gap: 6px 24px; }
  .hero__bottom { grid-template-columns: 1fr; }
  .hero__stats { display: none; }
  .contact { grid-template-columns: 1fr; row-gap: 48px; }
  .arch__layers button[aria-selected="true"], .arch__layers button:hover { transform: none; }
  .foot__cols { grid-template-columns: 1fr 1fr; }
}

/* ---------------------------------------------------------------- phone */
@media (max-width: 640px) {
  :root { --top-h: 56px; --gap: 104px; }
  .top { gap: 16px; font-size: 14px; }
  .top__mark { font-size: 15px; }
  .top__nav { gap: 14px; }
  .top__nav a[href="#stack"] { display: none; }
  .hero__name { font-size: 33vw; line-height: .82; }
  .hero__name span { display: block; }
  .hero__foot { order: -1; }
  .hero__stats { gap: 16px; }
  .hero__stats dt { font-size: 2.6rem; }
  .hero__stats dd { font-size: 0.875rem; }
  .ask__input { font-size: 11vw; }
  .ask__examples button { font-size: 1.0625rem !important; }
  .about__row, .about__row--record { row-gap: 16px; }
  .hero__foot { justify-self: start; width: 100%; }
  .about__row, .about__row--record { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .record li { font-size: 1.125rem; }
  .beds__grid { grid-template-columns: repeat(4, 1fr); }
  .deck__stats div { padding: 12px 10px; }
  .ledger__row { grid-template-columns: 1fr auto; row-gap: 2px; padding: 12px 0; }
  .ledger__kind { grid-row: 2; grid-column: 1 / -1; }
  .ledger__year { grid-row: 1; grid-column: 2; }
  .lineup, .lineup tbody, .lineup tr, .lineup td, .lineup th { display: block; width: auto !important; }
  .lineup tr:not(.lineup__group) { display: grid; grid-template-columns: 1fr auto; padding: 10px 0; }
  .lineup td:nth-child(1) { grid-column: 1 / -1; font-size: 1.25rem; }
  .lineup td:nth-child(2), .lineup td:nth-child(3), .lineup td:nth-child(4) { font-size: 0.9375rem; }
  .lineup td:nth-child(3) { display: none; }
  .lineup__group th { padding-top: 48px; }
  .row { font-size: 11vw; padding: 16px 0 10px; }
  .row:first-child a { font-size: 8.4vw; }
  .row--hello { background: var(--ink-dark); color: var(--ink); margin: 16px calc(var(--m) * -1) 0; padding: 20px var(--m); justify-content: space-between; }
  .row--hello .round { background: var(--red); width: 56px; height: 56px; }
  .foot__cols { grid-template-columns: 1fr 1fr; row-gap: 32px; }
}

/* ---------------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js-reveal .reveal { opacity: 1; transform: none; }
}
