/* ============================================================
   KZAR & CO — shared design system
   Tokens from brand-spec.md (extracted from live eonkzar.com)
   ============================================================ */

:root {
  --bg:      oklch(17% 0.004 120);
  --surface: oklch(21% 0.005 120);
  --fg:      oklch(92% 0.005 120);
  --muted:   oklch(60% 0.008 120);
  --border:  oklch(30% 0.006 120);
  --accent:  oklch(91.5% 0.224 124);
  --ink:     oklch(12% 0.004 120);

  --font-display: 'Instrument Sans', sans-serif;
  /* headlines: Noto Serif Display 500 at 75% width; accents: same face, italic 100 */
  --font-headline: 'Noto Serif Display', Georgia, serif;
  --font-serif:    'Noto Serif Display', Georgia, serif;
  --font-body:    'Instrument Sans', sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, Menlo, monospace;

  --step-display: clamp(2.75rem, 1.2rem + 7vw, 7rem);
  --step-h2:      clamp(2rem, 1rem + 4.2vw, 4.25rem);
  --step-h3:      clamp(1.35rem, 1.1rem + 1.2vw, 2rem);
  --step-lead:    clamp(1.05rem, 1rem + 0.4vw, 1.3rem);

  --gutter: clamp(20px, 4vw, 72px);
  --section: clamp(96px, 12vw, 200px);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-wipe: cubic-bezier(0.77, 0, 0.18, 1);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font: 400 17px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--accent); color: var(--ink); }

.container { width: min(1440px, 100%); margin-inline: auto; padding-inline: var(--gutter); }

.mono {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.kicker { color: var(--accent); }
.kicker::before { content: '/ '; }

h1, h2, h3 { letter-spacing: -0.03em; line-height: 1.02; text-wrap: balance; }
h1, h2 { font-family: var(--font-headline); font-weight: 500; font-stretch: 75%; }
h3 { font-family: var(--font-display); font-weight: 600; }
.display { font-size: var(--step-display); }
.h2 { font-size: var(--step-h2); }
.h3 { font-size: var(--step-h3); letter-spacing: -0.02em; }

em.serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 100;
  font-stretch: 75%;
  letter-spacing: -0.01em;
}

.lead { font-size: var(--step-lead); line-height: 1.6; color: var(--muted); max-width: 56ch; text-wrap: pretty; }
.lead strong { color: var(--fg); font-weight: 500; }

.section { padding-block: calc(var(--section) / 2); }
.section-head { display: flex; flex-direction: column; gap: 20px; margin-bottom: clamp(44px, 6vw, 88px); }

.hr { border: 0; border-top: 1px solid var(--border); }

/* ---------- buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 18px 32px;
  border: 1px solid var(--border);
  border-radius: 2px;
  font-family: var(--font-mono); font-size: 0.8rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  position: relative; overflow: hidden;
  transition: color 0.35s var(--ease-out), border-color 0.35s var(--ease-out);
}
.btn::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: var(--accent);
  transform: scaleY(0); transform-origin: bottom;
  transition: transform 0.4s var(--ease-wipe);
}
.btn:hover { color: var(--ink); border-color: var(--accent); }
.btn:hover::after { transform: scaleY(1); }
.btn .arrow { transition: transform 0.35s var(--ease-out); }
.btn:hover .arrow { transform: translateX(5px); }

.btn-solid { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.btn-solid::after { background: var(--fg); }
.btn-solid:hover { border-color: var(--fg); }

.link-line { position: relative; padding-bottom: 2px; }
.link-line::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.4s var(--ease-wipe);
}
.link-line:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 90;
  transition: background 0.4s, transform 0.45s var(--ease-out);
  /* scrim so links stay readable over bright hero imagery before scroll */
  background: linear-gradient(180deg, oklch(12% 0.004 120 / 0.65), oklch(12% 0.004 120 / 0));
}
.nav.is-scrolled {
  background: color-mix(in oklab, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.nav.is-hidden { transform: translateY(-100%); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.logo { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; letter-spacing: -0.02em; }
.logo span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 36px; list-style: none; }
.nav-links .mono { font-size: 0.72rem; color: oklch(80% 0.008 120); transition: color 0.3s; }
.nav-links .mono:hover, .nav-links .mono[aria-current="page"] { color: var(--fg); }
.nav-cta { padding: 12px 22px; }

/* ---------- services dropdown ---------- */
.nav-drop { position: relative; }
.nav-drop-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.72rem; color: oklch(80% 0.008 120); transition: color 0.3s;
  /* no vertical padding: keeps the label on the same text baseline as the sibling links */
  padding-block: 0;
}
.nav-drop-btn:hover, .nav-drop.is-open .nav-drop-btn, .nav-drop:focus-within .nav-drop-btn { color: var(--fg); }
.drop-caret { color: var(--accent); transition: transform 0.35s var(--ease-out); }
.nav-drop.is-open .drop-caret { transform: rotate(45deg); }
.drop-menu {
  position: absolute; top: calc(100% + 14px); left: 50%;
  min-width: 260px; list-style: none; padding: 12px 0;
  background: color-mix(in oklab, var(--ink) 90%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border); border-radius: 3px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out), visibility 0s linear 0.3s;
}
/* accent hairline + invisible hover bridge up to the trigger */
.drop-menu::after { content: ''; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--accent); }
.drop-menu::before { content: ''; position: absolute; inset: auto 0 100% 0; height: 16px; }
.nav-drop:hover .drop-menu,
.nav-drop:focus-within .drop-menu,
.nav-drop.is-open .drop-menu {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translate(-50%, 0);
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.drop-menu a {
  display: block; padding: 11px 24px;
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); white-space: nowrap;
  transition: color 0.25s, padding-left 0.3s var(--ease-out);
}
.drop-menu a:hover, .drop-menu a[aria-current="page"] { color: var(--fg); padding-left: 32px; }

.menu-btn { display: none; flex-direction: column; gap: 6px; padding: 12px; min-width: 44px; min-height: 44px; justify-content: center; align-items: center; }
.menu-btn span { width: 24px; height: 1.5px; background: var(--fg); transition: transform 0.35s var(--ease-out), opacity 0.3s; }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

.menu-overlay {
  position: fixed; inset: 0; z-index: 80;
  background: var(--ink);
  display: flex; flex-direction: column; justify-content: center;
  /* "safe" keeps the top reachable (scrollable) when items overflow the screen */
  justify-content: safe center;
  overflow-y: auto;
  padding: calc(76px + 16px) var(--gutter) var(--gutter);
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.6s var(--ease-wipe);
  visibility: hidden;
}
.menu-overlay.is-open { clip-path: inset(0 0 0 0); visibility: visible; }
.menu-overlay nav { display: flex; flex-direction: column; gap: 8px; }
.menu-overlay a.big {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2rem, 8vw, 3.25rem); letter-spacing: -0.03em;
  padding-block: 8px;
}
.menu-overlay a.big, .menu-overlay .menu-services {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
.menu-overlay.is-open a.big, .menu-overlay.is-open .menu-services { opacity: 1; transform: none; }
.menu-overlay.is-open > nav > :nth-child(2) { transition-delay: 0.06s; }
.menu-overlay.is-open > nav > :nth-child(3) { transition-delay: 0.12s; }
.menu-overlay.is-open > nav > :nth-child(4) { transition-delay: 0.18s; }
.menu-overlay.is-open > nav > :nth-child(5) { transition-delay: 0.24s; }
.menu-overlay .menu-meta { margin-top: 48px; display: flex; flex-direction: column; gap: 8px; color: var(--muted); }

/* services: a fifth big menu item that expands in place */
.menu-services-btn {
  display: flex; align-items: baseline; gap: 16px; text-align: left;
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2rem, 8vw, 3.25rem); letter-spacing: -0.03em;
  padding-block: 8px; line-height: 1.02;
}
.menu-services-btn .drop-caret { font-size: 0.45em; color: var(--accent); transition: transform 0.35s var(--ease-out); }
.menu-services.is-open .menu-services-btn .drop-caret { transform: rotate(45deg); }
.menu-services-list { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.45s var(--ease-wipe); }
.menu-services-list > nav { overflow: hidden; display: flex; flex-direction: column; }
.menu-services.is-open .menu-services-list { grid-template-rows: 1fr; }
.menu-services-list a {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.15rem, 4.5vw, 1.5rem); letter-spacing: -0.02em;
  color: var(--muted); padding-block: 7px; transition: color 0.3s;
}
.menu-services-list a:first-child { padding-top: 14px; }
.menu-services-list a:hover { color: var(--fg); }

/* ---------- page-transition curtain (signature flourish) ---------- */
.curtain {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg);
  display: grid; place-items: center;
  transform: translateY(100%);
  pointer-events: none;
}
.curtain::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 2px;
  background: var(--accent);
}
.curtain-label { color: var(--muted); display: flex; align-items: baseline; gap: 16px; }
.curtain-label strong { font-family: var(--font-serif); font-style: italic; font-weight: 300; font-stretch: 75%; font-size: clamp(1.6rem, 4.5vw, 3rem); color: var(--fg); letter-spacing: -0.01em; text-transform: none; }
/* with JS on, the curtain covers from the very first paint — no flash of
   content between page loads; site.js lifts it once the page is ready */
.js .curtain { transform: translateY(0); }
.js .curtain.is-down { transform: translateY(100%); transition: none; }
.js .curtain.is-entering { transform: translateY(0); transition: transform 0.65s var(--ease-wipe); }
.js .curtain.is-lifting { transform: translateY(-100%); transition: transform 0.7s var(--ease-wipe); }

/* ---------- scroll reveals ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(28px); }
.js [data-reveal].is-in { opacity: 1; transform: none; transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); transition-delay: var(--d, 0s); }

/* extra bottom padding keeps descenders (g, y, italics) inside the clip;
   the negative margin cancels it out so line spacing is unchanged */
.js .line-mask { overflow: hidden; display: block; padding-bottom: 0.15em; margin-bottom: -0.15em; }
.js .line-mask > span { display: block; transform: translateY(125%); transition: transform 0.9s var(--ease-wipe); }
.js .is-in .line-mask > span, .js .line-mask.is-in > span { transform: none; }
.js .line-mask:nth-child(2) > span { transition-delay: 0.09s; }
.js .line-mask:nth-child(3) > span { transition-delay: 0.18s; }

/* ---------- hero ---------- */
.hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding-top: 140px; position: relative; overflow: clip; }
.hero-ambient { position: absolute; inset: 0; pointer-events: none; }
.hero-ambient::before,
.hero-ambient::after {
  content: ''; position: absolute; width: 64vmax; height: 64vmax; border-radius: 50%;
  filter: blur(70px); will-change: transform;
}
.hero-ambient::before {
  left: 50%; top: -34%;
  background: radial-gradient(circle, oklch(91.5% 0.224 124 / 0.11), transparent 62%);
  animation: drift-a 24s ease-in-out infinite alternate;
}
.hero-ambient::after {
  left: -28%; bottom: -42%;
  background: radial-gradient(circle, oklch(75% 0.13 124 / 0.07), transparent 60%);
  animation: drift-b 34s ease-in-out infinite alternate;
}
@keyframes drift-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-14%, 12%, 0) scale(1.18); }
}
@keyframes drift-b {
  from { transform: translate3d(0, 0, 0) scale(1.1); }
  to   { transform: translate3d(16%, -10%, 0) scale(0.95); }
}
.hero-grain {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 1.1s steps(3) infinite;
}
@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  33% { transform: translate(-12px, 8px); }
  66% { transform: translate(9px, -10px); }
  100% { transform: translate(0, 0); }
}
/* adaptive hero media: the image is the default; JS promotes video only on fast connections once it can play */
.hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; visibility: hidden; filter: saturate(0.88) brightness(0.92);
  transition: opacity 0.8s var(--ease-out), visibility 0s linear 0.8s;
}
.hero.hero-video-ready .hero-video { opacity: 1; visibility: visible; transition-delay: 0s; }
.hero.hero-video-ready .hero-img { opacity: 0; }
.hero-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 32%;
  filter: saturate(0.88) brightness(0.92);
  transition: opacity 0.8s var(--ease-out);
}
.hero-veil {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, oklch(17% 0.004 120 / 0.62), oklch(17% 0.004 120 / 0.18) 62%, transparent),
    linear-gradient(180deg, oklch(17% 0.004 120 / 0.45), oklch(17% 0.004 120 / 0.2) 42%, var(--bg) 97%);
}
@media (prefers-reduced-motion: reduce) {
  .hero-ambient::before, .hero-ambient::after, .hero-grain { animation: none; }
  .hero-video { display: none; }
}
.hero-grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 90% 70% at 75% 15%, oklch(0% 0 0 / 0.5), transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 75% 15%, rgba(0,0,0,0.5), transparent 70%);
}
.hero-body { display: flex; flex-direction: column; gap: clamp(28px, 4vw, 48px); padding-bottom: clamp(40px, 6vw, 72px); position: relative; }
.hero-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.hero-strip { border-top: 1px solid var(--border); padding-block: 22px; position: relative; }

/* ---------- marquee ---------- */
.marquee { overflow: hidden; display: flex; user-select: none; }
.marquee-track { display: flex; flex-shrink: 0; gap: 56px; padding-right: 56px; align-items: center; animation: marquee 28s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee .mono { color: var(--muted); white-space: nowrap; }
.marquee .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
@keyframes marquee { to { transform: translateX(-100%); } }

/* ---------- work cards ---------- */
.work-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 3vw, 48px); }
.work-card { display: flex; flex-direction: column; gap: 20px; }
.work-cover {
  aspect-ratio: 4 / 3; overflow: hidden; border-radius: 2px;
  border: 1px solid var(--border); position: relative;
  transition: border-color 0.4s;
}
.work-card:hover .work-cover { border-color: var(--muted); }
.work-cover-art { position: absolute; inset: 0; transition: transform 0.9s var(--ease-out); }
.work-card:hover .work-cover-art { transform: scale(1.045); }
.work-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.work-meta .mono { color: var(--muted); }
.work-title { font-size: var(--step-h3); display: flex; align-items: center; gap: 12px; }
.work-title .arrow { color: var(--accent); opacity: 0; transform: translateX(-8px); transition: opacity 0.35s, transform 0.35s var(--ease-out); }
.work-card:hover .work-title .arrow { opacity: 1; transform: none; }

/* screenshot covers — real project imagery */
.cover-shot { background: var(--surface); }
.cover-shot .shot-main { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.cover-shot .shot-inset {
  position: absolute; right: 6%; bottom: 7%; width: 27%;
  border: 1px solid var(--border); border-radius: 3px;
  box-shadow: 0 22px 60px oklch(0% 0 0 / 0.55);
}
/* ---------- service rows ---------- */
.service-list { border-top: 1px solid var(--border); }
.service-row { border-bottom: 1px solid var(--border); }
.service-row > button {
  width: 100%; display: grid; grid-template-columns: 80px 1fr auto;
  align-items: center; gap: 24px; text-align: left;
  padding-block: clamp(22px, 3vw, 34px);
  transition: padding-left 0.4s var(--ease-out);
}
.service-row > button:hover { padding-left: 12px; }
.service-row .num { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); }
.service-row .name { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.25rem, 2.4vw, 1.9rem); letter-spacing: -0.02em; transition: color 0.3s; }
.service-row .toggle { font-family: var(--font-mono); font-size: 1.2rem; color: var(--muted); transition: transform 0.4s var(--ease-out), color 0.3s; min-width: 44px; min-height: 44px; display: grid; place-items: center; }
.service-row.is-open .toggle { transform: rotate(45deg); color: var(--accent); }
.service-row .panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.5s var(--ease-wipe); }
.service-row.is-open .panel { grid-template-rows: 1fr; }
.service-row .panel > div { overflow: hidden; }
.service-row .panel p { color: var(--muted); max-width: 58ch; padding: 0 0 28px 104px; }

/* ---------- services bento (home) ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(180px, auto);
  gap: 12px;
}
.bento-cell {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: clamp(20px, 2vw, 32px);
  display: flex; flex-direction: column; gap: 10px;
  transition: transform 0.4s var(--ease-out), border-color 0.4s, background 0.4s;
}
.bento-cell:hover { transform: translateY(-4px); border-color: oklch(40% 0.01 120); }
.bento-cell h3 .arrow {
  color: var(--accent); display: inline-block;
  opacity: 0; transform: translateX(-8px);
  transition: opacity 0.35s, transform 0.35s var(--ease-out);
}
.bento-cell:hover h3 .arrow { opacity: 1; transform: none; }
.bento-cell .num { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.bento-cell h3 { font-size: clamp(1.15rem, 1.6vw, 1.45rem); letter-spacing: -0.02em; margin-top: auto; }
.bento-cell p { color: var(--muted); font-size: 0.92rem; line-height: 1.55; }

/* dark grey ramp — each box a slightly different shade */
.b-shade-1 { background: oklch(20% 0.006 120); }
.b-shade-2 { background: oklch(23% 0.008 120); }
.b-shade-3 { background: oklch(26% 0.01 120); }
.b-shade-4 { background: oklch(18% 0.005 120); }

/* featured: web design — frosted-glass mockup art under a dark scrim */
.b-web {
  grid-column: 1 / 3; grid-row: 1 / 3;
  background:
    radial-gradient(130% 130% at 100% 0%, oklch(25% 0.032 125 / 0) 0%, oklch(25% 0.032 125 / 0.55) 42%, oklch(25% 0.032 125) 72%),
    url("../assets/service-web-design.jpg") center / cover no-repeat;
  border-color: oklch(33% 0.04 126);
}
.b-web h3 { font-size: clamp(1.5rem, 2.2vw, 2rem); }
.b-web p { color: oklch(78% 0.02 122); font-size: 1rem; max-width: 44ch; }
.b-web:hover { border-color: oklch(45% 0.07 125); }

/* featured: presentation design — slide deck in the meadow, dark scrim */
.b-pres {
  grid-column: 2 / -1; grid-row: 3;
  background:
    radial-gradient(95% 220% at 100% 50%, oklch(21% 0.026 132 / 0) 0%, oklch(21% 0.026 132 / 0.5) 45%, oklch(21% 0.026 132) 78%),
    url("../assets/service-presentation.jpg") right center / cover no-repeat;
  border-color: oklch(30% 0.035 130);
}
.b-pres h3 { font-size: clamp(1.5rem, 2.2vw, 2rem); }
.b-pres p { color: oklch(76% 0.02 125); max-width: 52ch; }
.b-pres:hover { border-color: oklch(42% 0.06 128); }

.b-brand   { grid-column: 3; grid-row: 1; }
.b-stack   { grid-column: 4; grid-row: 1; }
.b-custom  { grid-column: 3; grid-row: 2; }
.b-social  { grid-column: 4; grid-row: 2; }
/* keep these two headings level regardless of copy length */
.b-custom h3, .b-social h3 { margin-top: 0; }
.b-content { grid-column: 1; grid-row: 3; }

@media (max-width: 1024px) {
  .bento { grid-template-columns: 1fr 1fr; grid-auto-rows: minmax(150px, auto); }
  .bento-cell { grid-column: auto; grid-row: auto; }
  .b-web { grid-column: 1 / -1; }
  .b-pres { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .bento { grid-template-columns: 1fr; grid-auto-rows: auto; }
}

/* ---------- approach steps ---------- */
/* cards share row tracks via subgrid (number / spacer / heading / copy),
   so headings bottom-align on one line and copy starts on one line
   regardless of how long each paragraph or heading is */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: auto minmax(88px, 1fr) auto auto;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}
.step {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: clamp(24px, 2.5vw, 40px);
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 4;
  transition: background 0.4s;
}
.step:hover { background: var(--surface); }
.step .num { color: var(--accent); }
.step h3 { align-self: end; }
.step p { color: var(--muted); font-size: 0.95rem; margin-top: 14px; }

/* ---------- quotes ---------- */
.quote-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); }
.quote { background: var(--bg); padding: clamp(24px, 2.5vw, 40px); display: flex; flex-direction: column; gap: 24px; transition: background 0.4s; }
.quote:hover { background: var(--surface); }
.quote blockquote { font-size: 1.05rem; line-height: 1.55; text-wrap: pretty; }
.quote blockquote::before { content: '“'; font-family: var(--font-serif); font-size: 2.2rem; line-height: 0; color: var(--accent); display: block; margin-bottom: 18px; }
.quote figcaption { margin-top: auto; display: flex; flex-direction: column; gap: 2px; }
.quote figcaption .mono { color: var(--muted); }

/* ---------- big CTA ---------- */
.cta { padding-block: var(--section); text-align: left; position: relative; overflow: clip; }
.cta .display { max-width: 14ch; }
.cta-row { display: flex; align-items: center; gap: 32px; margin-top: 48px; flex-wrap: wrap; }
.cta .mono.muted { color: var(--muted); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border); padding-block: 56px 40px; }
.footer-grid { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col .mono { color: var(--muted); }
.footer a.mono:hover { color: var(--fg); }
.footer-base { display: flex; justify-content: space-between; gap: 16px; margin-top: 56px; color: var(--muted); flex-wrap: wrap; }

/* ---------- case study (work page) ---------- */
.case { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 96px); align-items: start; padding-block: clamp(48px, 6vw, 96px); border-top: 1px solid var(--border); }
.case-info { display: flex; flex-direction: column; gap: 28px; position: sticky; top: 110px; }
.case-info .scope { border-top: 1px solid var(--border); }
.case-info .scope li { list-style: none; display: flex; justify-content: space-between; gap: 16px; padding-block: 14px; border-bottom: 1px solid var(--border); }
.case-info .scope .mono { color: var(--muted); }
.case .work-cover { aspect-ratio: 4 / 5; }

/* ---------- contact form ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(40px, 6vw, 110px); align-items: start; }
.field { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.field label { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea {
  background: transparent; border: 0; border-bottom: 1px solid var(--border);
  border-radius: 0; color: var(--fg); font: 400 1.05rem/1.5 var(--font-body);
  padding: 12px 0; min-height: 44px;
  transition: border-color 0.3s;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.field select option { background: var(--surface); color: var(--fg); }
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom-color: var(--accent); }
.field.has-error input, .field.has-error textarea { border-bottom-color: oklch(62% 0.19 25); }
.field .error { font-size: 0.82rem; color: oklch(70% 0.17 25); display: none; }
.field.has-error .error { display: block; }
.form-done { display: none; flex-direction: column; gap: 16px; border: 1px solid var(--border); border-radius: 2px; padding: 36px; }
.form-done.is-visible { display: flex; }
.form-done .mono { color: var(--accent); }

/* ---------- digital presence review ---------- */
.review-hero { min-height: auto; position: relative; overflow: clip; padding-bottom: clamp(80px, 10vw, 140px); }
.review-hero::before {
  content: ''; position: absolute; inset: 8% var(--gutter) auto auto;
  width: min(620px, 58vw); aspect-ratio: 1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, oklch(91.5% 0.224 124 / 0.12), transparent 66%);
  filter: blur(28px); z-index: -1;
}
.review-hero-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.55fr); gap: clamp(32px, 6vw, 96px); align-items: end; }
.review-hero-actions { display: flex; flex-direction: column; gap: 22px; align-items: flex-start; }
.review-hero-actions .muted, .review-note { color: var(--muted); max-width: 52ch; }
.review-split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 112px); align-items: start; }
.review-copy { display: flex; flex-direction: column; gap: 24px; color: var(--muted); font-size: clamp(1rem, 0.95rem + 0.25vw, 1.18rem); line-height: 1.75; }
.review-copy p:first-child { color: var(--fg); }
.review-copy .link-line { color: var(--accent); align-self: flex-start; margin-top: 12px; }
.review-steps .step { min-height: 260px; }
.review-steps-three { grid-template-columns: repeat(3, 1fr); }
.review-fit .quote blockquote { color: var(--fg); }
.review-note { margin-top: 28px; }
#request { scroll-margin-top: 96px; }
#request .contact-grid { align-items: start; }
#request form { position: relative; }
#request .btn { margin-top: 10px; }

/* ---------- page header (inner pages) ---------- */
.page-head { padding-top: clamp(150px, 18vw, 220px); padding-bottom: clamp(40px, 5vw, 72px); display: flex; flex-direction: column; gap: 24px; }

/* ---------- service hero: full-bleed artwork under a radial veil ---------- */
.service-hero { position: relative; overflow: clip; }
.service-hero::before { content: none; } /* artwork replaces the review-hero glow */
.service-hero .container { position: relative; display: flex; flex-direction: column; gap: 24px; }
.service-hero-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 30%;
}
/* clear at the top right, blending into the page background everywhere else */
.service-hero-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, oklch(17% 0.004 120 / 0) 55%, var(--bg) 96%),
    radial-gradient(115% 145% at 84% 0%,
      oklch(17% 0.004 120 / 0) 0%,
      oklch(17% 0.004 120 / 0.35) 34%,
      oklch(17% 0.004 120 / 0.82) 58%,
      var(--bg) 80%);
}

/* ---------- accessibility & motion ---------- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .js [data-reveal], .js .line-mask > span { opacity: 1; transform: none; }
  .curtain { display: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .quote-grid { grid-template-columns: repeat(2, 1fr); }
  .case { grid-template-columns: 1fr; }
  .case-info { position: static; }
  .case .work-cover { aspect-ratio: 4 / 3; }
  .contact-grid { grid-template-columns: 1fr; }
  .review-hero-grid, .review-split, .review-steps-three { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .menu-btn { display: flex; }
  .work-grid { grid-template-columns: 1fr; }
  .quote-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; grid-auto-rows: auto 24px auto auto; }
  .service-row > button { grid-template-columns: 48px 1fr auto; gap: 14px; }
  .service-row .panel p { padding-left: 62px; }
  .hero { padding-top: 110px; }
}

@media (max-width: 480px) {
  :root { --gutter: 18px; }
  .service-row > button { grid-template-columns: 1fr auto; }
  .service-row .num { display: none; }
  .service-row .panel p { padding-left: 0; }
  .cta-row { gap: 20px; }
}
