/* =========================================================
   Babak Ghadri — personal site
   Palette and type follow the portrait (mustard / navy / ink / cream, Vazirmatn)
   ========================================================= */

:root {
  --mustard: #E0AE31;       /* sampled from the portrait background */
  --mustard-deep: #CF9C25;  /* halftone dots on mustard */
  --navy: #172D65;
  --navy-dot: #22397A;
  --blue: #26579B;
  --blueprint: #0B1638;
  --blueprint-ink: #AFC3EE;
  --ink: #040516;
  --cream: #FBEFD9;
  --crimson: #961335;

  --gutter: clamp(16px, 4vw, 56px);
  --nav-h: 72px;
  --radius: clamp(22px, 2.4vw, 36px);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
/* no overflow:hidden while stopped: hiding the scrollbar during the loader shifts the layout */

body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: "Vazirmatn", Tahoma, sans-serif;
  font-size: clamp(16px, .45vw + 13.5px, 19px);
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--mustard); color: var(--ink); }
:focus-visible { outline: 2px solid var(--crimson); outline-offset: 4px; border-radius: 6px; }

.container { width: 100%; max-width: 1360px; margin-inline: auto; padding-inline: var(--gutter); }
.ltr { direction: ltr; unicode-bidi: isolate; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .75em;
  margin: 0 0 2rem;
  font-size: .95rem;
  font-weight: 700;
}
.eyebrow::before { content: ""; width: 2.6rem; height: 1.5px; background: currentColor; opacity: .6; }
.eyebrow b { font-weight: 800; color: var(--mustard); }

/* masked lines: the inner span rises out of an overflow:hidden box */
.mask { display: inline-block; overflow: hidden; padding: .24em .04em .16em; margin: -.22em 0 -.16em; vertical-align: top; }
.mask > span { display: inline-block; }

/* ---------- loader ---------- */
.loader { position: fixed; inset: 0; z-index: 100; display: none; background: var(--navy); color: var(--cream); overflow: hidden; }
.js .loader { display: grid; place-items: center; }
.loader__dots {
  position: absolute; inset: 0;
  background-image: radial-gradient(var(--navy-dot) 32%, transparent 34%);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 0, transparent 65%);
          mask-image: radial-gradient(circle at 50% 50%, #000 0, transparent 65%);
}
.loader__name {
  position: relative; overflow: hidden; padding: .1em .15em .15em;
  font-family: "JetBrains Mono", ui-monospace, Consolas, monospace;
  font-size: clamp(1.9rem, 10vw, 6.4rem); font-weight: 800; line-height: 1.2; letter-spacing: .02em;
}
/* "decrypt": scrambled glyphs in mustard, settled letters in cream, a blinking block caret */
.loader__code { display: block; direction: ltr; white-space: nowrap; }
.loader__code .ch { display: inline-block; color: var(--mustard); opacity: .55; }
.loader__code .ch.is-on { color: var(--cream); opacity: 1; }
.loader__code::after {
  content: ""; display: inline-block; width: .5em; height: .82em; margin-left: .1em; vertical-align: -.06em;
  background: var(--mustard); animation: caret 1s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }
.loader__count {
  position: absolute; left: var(--gutter); bottom: var(--gutter);
  overflow: hidden; padding-top: .1em;
  font-size: clamp(3rem, 7vw, 6.5rem); font-weight: 900; line-height: 1.1; color: var(--mustard);
}
.loader__num { display: block; }

/* ---------- chrome: progress, cursor, nav ---------- */
.progress {
  position: fixed; inset: 0 0 auto; z-index: 70; height: 3px;
  background: var(--crimson);
  transform: scaleX(0); transform-origin: right;
}

.cursor {
  position: fixed; top: 0; left: 0; z-index: 90;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--cream); mix-blend-mode: difference;
  pointer-events: none; opacity: 0;
  transition: width .45s var(--ease), height .45s var(--ease), opacity .3s;
}
.cursor.is-on { opacity: 1; }
.cursor.is-hover { width: 64px; height: 64px; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

.nav {
  position: fixed; inset: 0 0 auto; z-index: 60; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding-inline: var(--gutter);
  color: var(--cream); mix-blend-mode: difference;
  pointer-events: none;
}
.nav a { pointer-events: auto; }
.nav__logo { display: flex; align-items: center; gap: .55em; font-size: 1.12rem; font-weight: 900; }
.nav__logo i { width: .5em; height: .5em; border-radius: 50%; background: currentColor; }
.nav__links { display: flex; gap: clamp(1.1rem, 2.6vw, 2.6rem); font-size: .98rem; font-weight: 700; }
.nav__links a { position: relative; padding-block: .2em; }
.nav__links a::after {
  content: ""; position: absolute; inset: auto 0 0; height: 1.5px; background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform .55s var(--ease);
}
.nav__links a:hover::after { transform: scaleX(1); transform-origin: right; }

/* ---------- hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  height: 100vh; min-height: 540px;  /* 100vh, not svh: svh leaves a black band under the hero on mobile browsers */
  background: var(--mustard); color: var(--navy);
}
.hero__dots {
  position: absolute; inset: 0; z-index: 0;
  background-image: radial-gradient(var(--mustard-deep) 30%, transparent 33%);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(circle at 26% 56%, #000 0, rgba(0,0,0,.55) 20%, transparent 44%);
          mask-image: radial-gradient(circle at 26% 56%, #000 0, rgba(0,0,0,.55) 20%, transparent 44%);
}
/* contact dock: sits where the big name used to, between the role line and the badge */
.hero__dock {
  position: absolute; z-index: 3; right: var(--gutter);
  top: calc(var(--nav-h) + 3vh + 2.4rem);
  bottom: calc(clamp(24px, 6vh, 64px) + clamp(96px, 8.6vw, 128px) + 2vh);
  width: clamp(320px, 39vw, 580px);
  display: flex; align-items: center;
  pointer-events: none;
}
.dock { width: 100%; pointer-events: auto; }
.dock__head { margin: 0 0 .9rem; font-size: .95rem; font-weight: 800; }
.dock__head span { display: inline-flex; align-items: center; gap: .65em; }
.dock__head i { position: relative; width: .5em; height: .5em; border-radius: 50%; background: var(--crimson); }
.dock__head i::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: inherit; animation: ping 2.2s var(--ease) infinite; }

.dock__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(8px, .8vw, 12px); }
/* the item masks its face, so the face can rise into it on the intro */
.dock__item { display: block; border-radius: clamp(18px, 1.7vw, 26px); overflow: hidden; -webkit-tap-highlight-color: transparent; }
.dock__item--call { grid-column: 1 / -1; }

.dock__face {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto 1fr; grid-template-areas: "icon go" "text text";
  height: 100%; min-height: clamp(96px, 15vh, 136px);
  padding: clamp(12px, 1.2vw, 18px);
  border-radius: inherit;
  color: var(--navy);
  background: rgba(251, 239, 217, .22);
  box-shadow: inset 0 0 0 2px var(--navy);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: color .5s var(--ease);
}
/* hover fill: a circle that grows from where the pointer came in (--x/--y set in main.js) */
.dock__face::before {
  content: ""; position: absolute; z-index: -1; left: var(--x, 50%); top: var(--y, 50%);
  width: 260%; aspect-ratio: 1; border-radius: 50%;
  background: var(--navy);
  transform: translate(-50%, -50%) scale(0);
  transition: transform .75s var(--ease);
}

.dock__icon {
  grid-area: icon; position: relative;
  display: grid; place-items: center;
  width: clamp(40px, 3.4vw, 50px); aspect-ratio: 1; border-radius: 50%;
  background: var(--navy); color: var(--mustard);
  transition: background-color .5s var(--ease), color .5s var(--ease), transform .7s var(--ease);
}
.dock__icon svg { width: 48%; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.dock__icon svg > * { stroke-dasharray: 1; }
.dock__icon .fill { fill: currentColor; }

.dock__text { grid-area: text; align-self: end; display: flex; flex-direction: column; align-items: flex-start; min-width: 0; line-height: 1.4; }
.dock__label { font-size: clamp(1.02rem, 1.25vw, 1.3rem); font-weight: 800; }
.dock__meta { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8rem; font-weight: 600; opacity: .72; }

/* outward arrow (points up-left: forward in RTL); a second one waits bottom-right and slides in on hover */
.dock__go {
  grid-area: go; position: relative; overflow: hidden;
  width: clamp(30px, 2.5vw, 38px); aspect-ratio: 1; border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px currentColor;
}
.dock__go svg {
  position: absolute; inset: 22%; width: 56%; height: 56%;
  fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
  transition: transform .65s var(--ease);
}
.dock__go svg + svg { transform: translate(150%, 150%); }

/* primary: the phone call, full width, navy with a ringing handset */
.dock__item--call .dock__face {
  grid-template-columns: auto 1fr auto; grid-template-rows: 1fr; grid-template-areas: "icon text go";
  align-items: center; column-gap: clamp(12px, 1.3vw, 20px);
  min-height: clamp(76px, 11.5vh, 108px);
  background: var(--navy); color: var(--cream); box-shadow: none;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.dock__item--call .dock__face::before { background: var(--crimson); }
.dock__item--call .dock__icon { background: var(--mustard); color: var(--navy); }
.dock__item--call .dock__icon::before,
.dock__item--call .dock__icon::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  box-shadow: 0 0 0 1.5px var(--mustard);
  animation: ring 2.6s var(--ease) infinite;
}
.dock__item--call .dock__icon::after { animation-delay: 1.3s; }
.dock__item--call .dock__icon svg { animation: buzz 3.4s ease-in-out infinite; }
.dock__item--call .dock__text { align-self: center; }
.dock__item--call .dock__label { font-size: .86rem; font-weight: 700; opacity: .75; }
.dock__item--call .dock__meta { font-size: clamp(1.3rem, 2vw, 1.95rem); font-weight: 800; opacity: 1; letter-spacing: .02em; line-height: 1.3; }

/* hover / keyboard focus / touch press */
@media (hover: hover) {
  .dock__item:hover .dock__face::before { transform: translate(-50%, -50%) scale(1); }
  .dock__item:hover .dock__face { color: var(--cream); }
  .dock__item:hover .dock__icon { background: var(--mustard); color: var(--navy); transform: rotate(-10deg) scale(1.06); }
  .dock__item--call:hover .dock__icon { background: var(--cream); color: var(--crimson); }
  .dock__item:hover .dock__go svg:first-child { transform: translate(-150%, -150%); }
  .dock__item:hover .dock__go svg + svg { transform: none; }
}
.dock__item:focus-visible .dock__face::before,
.dock__item:active .dock__face::before { transform: translate(-50%, -50%) scale(1); }
.dock__item:focus-visible .dock__face,
.dock__item:active .dock__face { color: var(--cream); }
.dock__item:focus-visible .dock__icon,
.dock__item:active .dock__icon { background: var(--mustard); color: var(--navy); }
.dock__item--call:focus-visible .dock__icon,
.dock__item--call:active .dock__icon { background: var(--cream); color: var(--crimson); }

@keyframes ping { 0% { transform: scale(1); opacity: .7; } 80%, 100% { transform: scale(3.4); opacity: 0; } }
/* a short ring every few seconds, then still */
@keyframes buzz {
  0%, 64%, 92%, 100% { transform: rotate(0); }
  68% { transform: rotate(-16deg); } 72% { transform: rotate(14deg); } 76% { transform: rotate(-12deg); }
  80% { transform: rotate(10deg); } 84% { transform: rotate(-6deg); } 88% { transform: rotate(4deg); }
}
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.hero__role {
  position: absolute; z-index: 3; top: calc(var(--nav-h) + 3vh); right: var(--gutter);
  margin: 0; font-size: .95rem; font-weight: 800;
}

.hero__portrait {
  position: absolute; z-index: 2; left: 0; bottom: 0;
  width: min(100svh, 62vw); aspect-ratio: 1;
  transform-origin: 70.16% 50.94%;   /* centre of the near (dark) lens */
  will-change: transform; pointer-events: none;
}
.hero__portrait img { width: 100%; height: 100%; }

.hero__foot {
  position: absolute; z-index: 3; right: var(--gutter); bottom: clamp(24px, 6vh, 64px);
  display: flex; align-items: center; gap: clamp(1.2rem, 2.4vw, 2.4rem);
}
.hero__intro { order: 2; max-width: 23ch; margin: 0; font-size: clamp(1rem, 1.15vw, 1.22rem); font-weight: 600; line-height: 1.85; }

.badge { position: relative; flex: none; display: grid; place-items: center; width: clamp(96px, 8.6vw, 128px); aspect-ratio: 1; color: var(--navy); }
.badge > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; animation: spin 18s linear infinite; }
.badge text { direction: ltr; font-family: "Vazirmatn", sans-serif; font-size: 13px; font-weight: 800; fill: currentColor; }
.badge__arrow {
  display: grid; place-items: center; width: 40%; aspect-ratio: 1; border-radius: 50%;
  background: var(--navy); color: var(--mustard);
  transition: transform .6s var(--ease);
}
.badge__arrow svg { width: 46%; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; animation: nudge 1.8s var(--ease) infinite; }
.badge:hover .badge__arrow { transform: scale(1.15); }

.hero__ink { position: absolute; inset: 0; z-index: 5; background: var(--ink); opacity: 0; pointer-events: none; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes nudge { 0%, 100% { transform: translateY(-12%); } 50% { transform: translateY(14%); } }

/* ---------- manifesto ---------- */
.manifesto { position: relative; padding: clamp(80px, 14vh, 160px) 0 clamp(90px, 16vh, 180px); }
.manifesto__text { margin: 0; max-width: 21em; font-size: clamp(1.8rem, 4.3vw, 4.4rem); font-weight: 800; line-height: 1.55; }
.manifesto__text em { font-style: normal; color: var(--mustard); }

/* ---------- services ---------- */
.services { position: relative; padding: 4vh 0 12vh; }
.services__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.5rem 3rem; margin-bottom: clamp(56px, 10vh, 120px); }
.services__title { margin: 0; font-size: clamp(3.4rem, 10vw, 10.5rem); font-weight: 900; line-height: 1.02; }
.services__title .accent { color: var(--mustard); }
.services__lead { max-width: 27ch; margin: 0 0 1.2em; font-size: clamp(1rem, 1.2vw, 1.2rem); opacity: .72; }

.cards { position: relative; }
.card {
  --bg: var(--cream); --fg: var(--ink); --line: var(--navy); --accent: var(--blue);
  position: sticky; top: calc(var(--nav-h) + 8px + var(--i) * 14px);
  height: min(calc(100svh - var(--nav-h) - 84px), 740px); min-height: 460px;
  margin-bottom: 7vh;
  border-radius: var(--radius); overflow: hidden;
  background: var(--bg); color: var(--fg);
  transform-origin: 50% 0;
}
.card:last-child { margin-bottom: 0; }
.card--cream   { --bg: var(--cream);   --fg: var(--ink);   --line: var(--navy);  --accent: var(--blue); }
.card--navy    { --bg: var(--navy);    --fg: var(--cream); --line: var(--cream); --accent: var(--mustard); }
.card--mustard { --bg: var(--mustard); --fg: var(--ink);   --line: var(--ink);   --accent: var(--navy); }
.card--blue    { --bg: var(--blue);    --fg: var(--cream); --line: var(--cream); --accent: var(--mustard); }
.card--print   {
  --bg: var(--blueprint); --fg: var(--cream); --line: var(--blueprint-ink); --accent: var(--mustard);
  background-image:
    linear-gradient(rgba(175,195,238,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(175,195,238,.08) 1px, transparent 1px);
  background-size: 32px 32px;
  box-shadow: inset 0 0 0 1px rgba(175,195,238,.2);
}
.card__shade { position: absolute; inset: 0; z-index: 2; background: var(--ink); opacity: 0; pointer-events: none; }

.card__inner {
  height: 100%;
  display: grid; grid-template-columns: 1.1fr .9fr; grid-template-rows: auto 1fr;
  gap: 0 clamp(24px, 4vw, 72px);
  padding: clamp(22px, 3.2vw, 52px);
}
.card__top { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; font-weight: 800; }
.card__num { font-size: clamp(1.1rem, 1.4vw, 1.4rem); }
.card__num::after { content: ""; display: inline-block; width: .5em; height: .5em; margin-right: .5em; border-radius: 50%; background: var(--accent); vertical-align: middle; }
.card__en { direction: ltr; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; opacity: .7; }
.card__text { align-self: end; padding-bottom: .4rem; }
.card__title { margin: 0 0 .25em; font-size: clamp(2.6rem, 6.2vw, 6.6rem); font-weight: 900; line-height: 1.12; }
.card__desc { max-width: 30ch; margin: 0 0 1.5em; font-size: clamp(1rem, 1.25vw, 1.28rem); line-height: 1.85; opacity: .85; }
.card__tags { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.card__tags li {
  direction: ltr; padding: .42em 1.05em; border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--fg) 40%, transparent);
  font-size: .9rem; font-weight: 700; line-height: 1.5;
}
.card__art { align-self: center; justify-self: center; width: min(100%, 50svh); aspect-ratio: 1; }

/* line art */
.art { width: 100%; height: 100%; overflow: visible; fill: none; stroke: var(--line); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.art .draw { stroke-dasharray: 1; }
.art__halo { stroke-dasharray: 2 12; opacity: .35; transform-origin: 200px 200px; animation: spin 50s linear infinite; }
.art__pkts circle, .art__pkt { fill: var(--accent); stroke: none; }
.art__nodes path { fill: var(--bg); }
.art__core { fill: var(--line); stroke: none; }
.art__ports { stroke: var(--bg); stroke-width: 4; }
.art__leds circle { fill: var(--accent); stroke: none; animation: blink 1.6s steps(2, jump-none) infinite; animation-delay: calc(var(--d) * -.5s); }
.art__vms rect { fill: var(--accent); fill-opacity: 0; stroke-width: 2.5; animation: vm 4.2s ease-in-out infinite; animation-delay: calc(var(--d) * .32s); }
.art__ring { stroke: var(--accent); stroke-width: 2; transform-origin: 200px 200px; animation: ring 2.8s var(--ease) infinite; }
.art__ring--late { animation-delay: 1.4s; }
.art__bars rect { fill: var(--line); stroke: none; transform-box: fill-box; transform-origin: center; animation: eq 1.1s ease-in-out infinite alternate; animation-delay: calc(var(--d) * -.17s); }
.art__glyph { stroke: var(--accent); stroke-width: 3.5; }
.art__spark { fill: var(--accent); stroke: none; }
.art__spin { transform-origin: 200px 200px; animation: spark 7s ease-in-out infinite; }
.art__twinkle { transform-origin: 326px 92px; animation: twinkle 2.4s ease-in-out infinite; }
.art__code { direction: ltr; fill: var(--line); stroke: none; font: 900 30px "Vazirmatn", sans-serif; opacity: .7; }

@keyframes blink { 50% { opacity: .2; } }
@keyframes vm { 0%, 12% { fill-opacity: 0; } 30%, 70% { fill-opacity: 1; } 88%, 100% { fill-opacity: 0; } }
@keyframes ring { 0% { transform: scale(.85); opacity: 0; } 25% { opacity: .9; } 100% { transform: scale(1.38); opacity: 0; } }
@keyframes eq { from { transform: scaleY(.28); } to { transform: scaleY(1); } }
@keyframes spark { 0%, 100% { transform: rotate(0) scale(.92); } 50% { transform: rotate(90deg) scale(1.06); } }
@keyframes twinkle { 0%, 100% { transform: scale(.4); opacity: .4; } 50% { transform: scale(1); opacity: 1; } }

/* ---------- toolbox marquee ---------- */
.stack { position: relative; overflow: clip; padding: clamp(120px, 22vh, 240px) 0 clamp(110px, 18vh, 200px); color: var(--ink); }
.stack__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.5rem 3rem; margin-bottom: clamp(48px, 9vh, 110px); }
.stack__head .eyebrow b { color: var(--crimson); }
.stack__title { margin: 0; font-size: clamp(2.3rem, 5.6vw, 5.6rem); font-weight: 900; line-height: 1.18; }
.stack__note { max-width: 24ch; margin: 0 0 .8em; opacity: .6; }

.marquee { display: flex; overflow: hidden; direction: ltr; font-size: clamp(3.4rem, 9.6vw, 10.5rem); font-weight: 900; line-height: 1.22; letter-spacing: -.02em; }
.marquee--b { color: var(--navy); }
.marquee__track { display: flex; flex: none; will-change: transform; }
.marquee__group { display: flex; flex: none; align-items: center; }
.marquee__group > span { flex: none; padding-inline: .3em; }
.marquee .o { color: var(--blue); }
.marquee--b .o { color: var(--crimson); }
.star {
  flex: none; width: .36em; height: .36em; background: var(--mustard-deep);
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
}

/* ---------- contact ---------- */
.contact { position: relative; display: flex; flex-direction: column; min-height: 100svh; color: var(--ink); }
.contact__bg { position: absolute; inset: 0; z-index: 0; background: var(--mustard); }
.contact__bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(var(--mustard-deep) 30%, transparent 33%);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 0, transparent 46%);
          mask-image: radial-gradient(circle at 50% 30%, #000 0, transparent 46%);
}
.contact__inner {
  position: relative; z-index: 1; flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: clamp(120px, 18vh, 200px) var(--gutter) clamp(64px, 10vh, 120px);
  text-align: center;
}
.contact__avatar {
  width: clamp(112px, 11vw, 164px); aspect-ratio: 1; margin-bottom: 2.2rem;
  border-radius: 50%;
  /* portrait as a background: some mobile browsers (Samsung) don't clip a transformed <img> to the radius */
  background: var(--navy) url("../assets/portrait-cut.webp?v=12") 40% 100% / 90% no-repeat;
  box-shadow: 0 0 0 6px var(--mustard), 0 0 0 7.5px var(--ink);
}
.contact .eyebrow b { color: var(--crimson); }
.contact__title { margin: 0 0 .3em; font-size: clamp(3rem, 9vw, 9.5rem); font-weight: 900; line-height: 1.1; }
.contact__lead { max-width: 34ch; margin: 0 0 2.4rem; font-size: clamp(1.02rem, 1.3vw, 1.3rem); font-weight: 500; }
.contact__links { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; }

.btn {
  display: inline-flex; align-items: center; gap: .7em;
  padding: .95em 1.7em; border-radius: 999px;
  background: var(--ink); color: var(--cream);
  font-size: 1.02rem; font-weight: 800; line-height: 1.4;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
.btn .ltr { font-weight: 600; opacity: .7; }
.btn:hover { background: var(--navy); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--cream); }

/* ---------- consultation form (contact section and /start) ---------- */
.lead {
  width: min(100%, 560px); margin-top: 2.6rem; padding: clamp(20px, 3vw, 30px);
  background: var(--cream); color: var(--ink); text-align: right;
  border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: 7px 7px 0 var(--ink);
  display: flex; flex-direction: column; gap: 1rem; position: relative;
}
.lead__title { margin: 0; font-size: 1.12rem; font-weight: 800; line-height: 1.5; }
.lead__row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.lead__field { display: flex; flex-direction: column; gap: .3rem; font-size: .9rem; font-weight: 700; }
.lead__field small { font-weight: 500; opacity: .65; }
.lead input:not([type=radio]), .lead textarea {
  width: 100%; padding: .7em .9em; border: 2px solid var(--ink); border-radius: 14px;
  background: #fff; color: var(--ink); font: inherit; font-size: 1rem; font-weight: 500; line-height: 1.5;
}
.lead textarea { resize: vertical; min-height: 5.2em; }
.lead input:focus, .lead textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(38, 87, 155, .25); }
.lead input[dir=ltr] { text-align: left; }
.lead input[dir=ltr]::placeholder { text-align: left; }
.lead [aria-invalid=true] { border-color: var(--crimson) !important; }
.lead__err { color: var(--crimson); font-size: .82rem; font-weight: 700; }
.lead__chips { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0; padding: 0; border: 0; }
.lead__chips legend { width: 100%; margin-bottom: .35rem; padding: 0; font-size: .9rem; font-weight: 700; }
.lead__chips label { cursor: pointer; }
.lead__chips input { position: absolute; opacity: 0; pointer-events: none; }
.lead__chips span {
  display: inline-block; padding: .3em .95em; border: 2px solid var(--ink); border-radius: 999px;
  font-size: .9rem; font-weight: 700; transition: background-color .25s var(--ease), color .25s var(--ease);
}
.lead__chips input:checked + span { background: var(--ink); color: var(--cream); }
.lead__chips input:focus-visible + span { outline: 2px solid var(--crimson); outline-offset: 2px; }
.lead .lead__hp { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); opacity: 0; pointer-events: none; }
.lead__send { align-self: flex-start; border: 0; cursor: pointer; font-family: inherit; }
.lead__send[disabled] { opacity: .6; cursor: wait; }
.lead__note { margin: 0; min-height: 1.4em; font-size: .92rem; font-weight: 700; color: var(--crimson); }
.lead__note:empty { display: none; }
.lead--done { align-items: center; text-align: center; }
.lead__thanks { margin: 0; font-size: 1.15rem; font-weight: 800; }
.lead__thanks + p { margin: 0; font-weight: 500; }

.foot {
  position: relative; z-index: 1;
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 22px var(--gutter);
  border-top: 1.5px solid rgba(4, 5, 22, .16);
  font-size: .92rem; font-weight: 600;
}
.foot__top:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  .nav__links { gap: 1.1rem; font-size: .92rem; }
  .manifesto { padding-top: 48px; }

  .hero__role { top: calc(var(--nav-h) + 1svh); font-size: .88rem; }
  /* dock on phones: the call bar full width, the four channels as a row of icon tiles under it */
  .hero__dock { top: calc(var(--nav-h) + 1svh + 2.5rem); bottom: auto; right: 16px; left: 16px; width: auto; display: block; }
  .dock__head { display: none; }
  .dock__grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .dock__item { border-radius: 18px; }
  .dock__item:not(.dock__item--call) .dock__face {
    grid-template-columns: 1fr; grid-template-rows: auto auto; grid-template-areas: "icon" "text";
    justify-items: center; align-content: center; row-gap: 7px;
    min-height: clamp(84px, 13svh, 112px); padding: 10px 4px 8px;
  }
  .dock__item:not(.dock__item--call) :is(.dock__go, .dock__meta) { display: none; }
  .dock__item:not(.dock__item--call) .dock__text { align-self: auto; align-items: center; }
  .dock__item:not(.dock__item--call) .dock__label { font-size: .82rem; }
  .dock__icon { width: 44px; }
  .dock__item--call .dock__face { min-height: clamp(64px, 9.5svh, 84px); padding: 10px 14px; column-gap: 12px; }
  .dock__item--call .dock__icon { width: 46px; }
  .dock__item--call .dock__label { font-size: .8rem; }
  .dock__item--call .dock__meta { font-size: clamp(1.3rem, 6.4vw, 1.6rem); }
  .dock__go { width: 34px; }
  .hero__portrait { width: min(112vw, 62svh); }
  .hero__intro { display: none; }
  /* the hero is 100vh (large viewport); lift the badge by (100vh - 100svh) so the browser's
     bottom toolbar (e.g. Samsung Internet) never covers it */
  .hero__foot { bottom: 28px; bottom: calc(100vh - 100svh + 28px); right: 12px; }

  /* contact buttons stack full-width: label on the right, number / id / address on the left */
  .contact__links { flex-direction: column; align-items: stretch; width: min(100%, 360px); }
  .contact__links .btn { justify-content: space-between; }
  .lead { width: min(100%, 360px); box-shadow: 5px 5px 0 var(--ink); }
  .lead__row { grid-template-columns: 1fr; }
  .lead__send { align-self: stretch; justify-content: center; }
  .badge { width: 84px; }

  .card { height: calc(100svh - var(--nav-h) - 72px); min-height: 0; max-height: 720px; margin-bottom: 5vh; }
  .card__inner { display: flex; flex-direction: column; }
  .card__art { flex: 1 1 auto; min-height: 0; width: 100%; aspect-ratio: auto; padding-block: 3svh; }
  .card__art .art { height: 100%; width: auto; margin-inline: auto; }
  .card__text { padding-bottom: 0; }
  .card__desc { margin-bottom: 1.1em; }
  .card__tags li { font-size: .8rem; }
}

@media (max-width: 860px) and (max-height: 700px) {
  .card__desc { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .badge > svg, .badge__arrow svg, .art *, .art__spin, .art__twinkle,
  .dock__head i::after, .dock__icon::before, .dock__icon::after, .dock__icon svg { animation: none !important; }
  .dock__item--call .dock__icon::before, .dock__item--call .dock__icon::after { display: none; }
  .dock__face::before, .dock__go svg { transition: none; }
}
