/* ============================================================
   Linaxcode — Components & Sections
   ============================================================ */

/* ---------------------------------------------------------------
   Global parallax code background (behind everything)
   --------------------------------------------------------------- */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  /* fade top & bottom so it melts into the page edges */
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
}
.bg-layer__inner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  will-change: transform;
}
.bg-tile {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.95;
  white-space: pre;
  color: rgba(232, 162, 61, 0.055);   /* faint amber code */
  padding-left: clamp(1.25rem, 5vw, 4rem);
  letter-spacing: 0.02em;
  user-select: none;
}

/* ---------------------------------------------------------------
   Reveal animation (driven by reveal.js)
   --------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  will-change: opacity, transform;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ---------------------------------------------------------------
   Buttons
   --------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease),
              border-color 0.18s var(--ease), color 0.18s var(--ease);
}
.btn--sm { min-height: 40px; padding: 0.5rem 1rem; font-size: 0.875rem; }

.btn--accent {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}
.btn--accent:hover { background: var(--accent-hover); transform: translateY(-2px); }

.btn--ghost {
  border: 1px solid var(--border);
  color: var(--text);
  background: transparent;
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* ---------------------------------------------------------------
   Gutter rail (signature) — ≥1024px only
   --------------------------------------------------------------- */
.gutter { display: none; }

@media (min-width: 1024px) {
  .gutter {
    position: fixed;
    top: 0; left: 0;
    width: var(--gutter-w);
    height: 100vh; height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-block: 1.5rem;
    border-right: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg) 80%, transparent);
    backdrop-filter: blur(6px);
    z-index: 40;
  }
  .gutter__logo {
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
  }
  .gutter__list {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    margin: auto 0;
  }
  .gutter__item {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-faint);
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    letter-spacing: 0.1em;
    transition: color 0.25s var(--ease);
    padding: 0.25rem;
  }
  .gutter__ln { color: var(--border); }
  .gutter__item:hover { color: var(--text-muted); }
  .gutter__item.is-active { color: var(--accent); }
  .gutter__item.is-active .gutter__ln { color: var(--accent); }

  /* offset everything to clear the rail */
  .nav__inner, main, .footer { padding-left: var(--gutter-w); }
  .nav__inner { padding-left: calc(var(--gutter-w) + clamp(1.25rem, 5vw, 2.5rem)); }
}

/* ---------------------------------------------------------------
   Nav
   --------------------------------------------------------------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: calc(var(--nav-h) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);     /* clear notch / status bar */
  z-index: 50;
  display: flex;
  align-items: center;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; width: 100%; }

.nav__brand { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em; }
.nav__mark { font-family: var(--font-mono); color: var(--accent); font-weight: 700; }

.nav__links { display: flex; align-items: center; gap: 1.75rem; }
.nav__links a { font-family: var(--font-mono); font-size: 0.9rem; color: var(--text-muted); transition: color 0.2s var(--ease); }
.nav__links a:hover { color: var(--text); }
.nav__links .btn { color: var(--text); }
.nav__links .btn:hover { color: var(--accent); }

.nav__toggle { display: none; flex-direction: column; gap: 5px; width: 44px; height: 44px; align-items: center; justify-content: center; }
.nav__toggle span { width: 22px; height: 2px; background: var(--text); transition: transform 0.25s var(--ease), opacity 0.25s var(--ease); }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: color-mix(in srgb, var(--bg) 97%, transparent);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
}
.mobile-menu.is-open { opacity: 1; visibility: visible; }
.mobile-menu__nav { display: flex; flex-direction: column; gap: 1.75rem; text-align: center; }
.mobile-menu__nav a { font-family: var(--font-display); font-size: 1.75rem; font-weight: 600; }
.mobile-menu__nav a:hover { color: var(--accent); }
.mobile-menu__nav .btn { font-family: var(--font-mono); font-size: 1rem; margin-top: 0.5rem; }

/* ---------------------------------------------------------------
   Hero
   --------------------------------------------------------------- */
.hero { position: relative; }
/* when frames are ready (and motion allowed) the hero gets extra height so the
   pinned stage can scrub the robot frame-by-frame over a longer scroll distance */
.hero.is-pinned { height: 200vh; }
.hero__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-block: var(--nav-h) 4rem;
}
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero__scrim {
  position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(120% 80% at 30% 30%, transparent 0%, var(--bg) 78%),
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 40%, transparent) 0%, var(--bg) 100%);
}
.hero__inner { position: relative; z-index: 3; }

/* 3D Spline robot — subtle full-bleed backdrop on mobile, right-side on desktop.
   Warm filter tints the scene toward the site's amber palette.
   pointer-events:none so it never blocks the hero CTAs; the scene uses
   events-target="global" so the robot still follows the cursor. */
.hero__robot {
  display: block;
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.3;            /* faded behind text on small screens */
  pointer-events: none;
}
.hero__robot img,
.hero__robot video {
  position: absolute; inset: 0;
  width: 100%; height: 100%; display: block;
  will-change: transform, opacity;
}
.hero__robot img {
  object-fit: cover; object-position: 50% 14%;   /* mobile: fill, show face/upper */
  transform-origin: 50% 20%;
  filter: drop-shadow(0 10px 44px rgba(232, 140, 40, 0.2));
  z-index: 2;
}
.hero__robot video {
  object-fit: cover; object-position: 50% 22%;
  opacity: 0;                          /* desktop: revealed on scroll; mobile: shown via JS */
  z-index: 1;
}
@media (min-width: 768px) {
  .hero__robot { left: auto; right: 0; width: 50%; opacity: 1; }
  .hero__robot img { object-fit: contain; object-position: right bottom; transform-origin: 62% 20%; }
  /* video edge fades into the dark hero on its left */
  .hero__robot video {
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 26%, #000 100%);
            mask-image: linear-gradient(90deg, transparent 0%, #000 26%, #000 100%);
  }
}
@media (min-width: 1280px) {
  .hero__robot { right: 2%; width: 48%; }
}

.hero__hi { font-family: var(--font-mono); color: var(--text-muted); font-size: 1rem; margin-top: 1.1rem; }
.hero__title { font-size: var(--fs-hero); font-weight: 700; line-height: 0.98; margin-block: 0.25rem 0; }
.hero__title .accent { color: var(--accent); }
.hero__name { display: inline; }
/* editor-style block caret that types out the name */
.hero__caret-blk {
  display: inline-block;
  width: 0.07em; min-width: 3px;
  height: 0.82em;
  background: var(--accent);
  margin-left: 0.06em;
  vertical-align: baseline;
  transform: translateY(0.04em);
  animation: blink 1.05s steps(1) infinite;
  box-shadow: 0 0 10px var(--accent-glow);
}
@media (prefers-reduced-motion: reduce) { .hero__caret-blk { display: none; } }

.hero__role { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.4rem, 3.4vw, 2.35rem); line-height: 1.15; max-width: 20ch; margin-top: 0.9rem; }
.hero__role .accent { color: var(--accent); }
.hero__type { margin-top: 1.25rem; }

.hero__type { font-size: clamp(0.95rem, 2vw, 1.1rem); color: var(--text-muted); display: flex; align-items: center; gap: 0.5rem; min-height: 1.6em; }
.hero__prompt { color: var(--accent); }
.hero__cursor { display: inline-block; width: 9px; height: 1.1em; background: var(--accent); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero__sub { max-width: 54ch; color: var(--text-muted); font-size: var(--fs-lead); margin-block: 1.75rem; }

.hero__cta { display: flex; flex-wrap: wrap; gap: 1rem; }

.hero__stats { display: flex; flex-wrap: wrap; gap: 2.5rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.hero__stats li { display: flex; flex-direction: column; gap: 0.25rem; }
.hero__stat-num { font-size: 1.75rem; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.hero__stat-label { font-size: 0.8rem; color: var(--text-muted); }

.hero__scroll { position: absolute; bottom: 1.5rem; left: 50%; transform: translateX(-50%); z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-muted); }
.hero__scroll svg { animation: bob 2s var(--ease) infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

/* ---------------------------------------------------------------
   Sections (shared)
   --------------------------------------------------------------- */
.section { padding-block: var(--section-y); position: relative; }
.section__head { max-width: 60ch; margin-bottom: 3.5rem; }
.section__title { font-size: var(--fs-h2); margin-block: 1rem 0.75rem; }
.section__lead { color: var(--text-muted); font-size: var(--fs-lead); max-width: 52ch; }

/* ---------------------------------------------------------------
   Services bento
   --------------------------------------------------------------- */
.bento { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: transform 0.22s var(--ease), border-color 0.22s var(--ease), background 0.22s var(--ease);
}
.card:hover { transform: translateY(-4px); border-color: var(--accent); background: var(--surface-2); }
.card__icon { display: inline-flex; width: 48px; height: 48px; align-items: center; justify-content: center; border-radius: var(--radius-sm); background: var(--accent-glow); color: var(--accent); margin-bottom: 1.25rem; }
.card__icon svg { width: 24px; height: 24px; }
.card__title { font-size: var(--fs-h3); margin-bottom: 0.6rem; }
.card__text { color: var(--text-muted); font-size: 1rem; }
.card--primary { background: var(--surface-2); }

/* ---------------------------------------------------------------
   Services — radial orbital map
   --------------------------------------------------------------- */
.orbital { position: relative; width: 100%; min-height: 600px; display: flex; align-items: center; justify-content: center; overflow: visible; margin-top: 1rem; }
.orbital__stage { position: relative; width: 100%; max-width: 880px; height: 580px; }
/* trim the gap between the orbital and the About section */
.section.services { padding-bottom: clamp(2rem, 5vw, 3.5rem); }

.orbital__center {
  position: absolute; left: 50%; top: 50%;
  width: 76px; height: 76px; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 32% 30%, var(--accent-hover), var(--accent) 58%, #7c5113);
  display: flex; align-items: center; justify-content: center;
  z-index: 20; cursor: pointer; border: none;
  box-shadow: 0 0 55px var(--accent-glow);
}
.orbital__core { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,0.85); }
.orbital__ping {
  position: absolute; left: 50%; top: 50%; width: 76px; height: 76px;
  border-radius: 50%; border: 1px solid rgba(232,162,61,0.5);
  transform: translate(-50%, -50%); animation: orbital-ping 2.4s var(--ease) infinite;
  pointer-events: none;
}
@keyframes orbital-ping { 0% { opacity: 0.7; transform: translate(-50%,-50%) scale(1); } 75%, 100% { opacity: 0; transform: translate(-50%,-50%) scale(2.4); } }

.orbital__ring {
  position: absolute; left: 50%; top: 50%;
  width: 560px; height: 560px; max-width: 86%; aspect-ratio: 1;
  border-radius: 50%; border: 1px solid var(--border);
  transform: translate(-50%, -50%); pointer-events: none;
}
.orbital__ring--inner {
  position: absolute; left: 50%; top: 50%;
  width: 360px; height: 360px; max-width: 56%; aspect-ratio: 1;
  border-radius: 50%; border: 1px dashed var(--border);
  transform: translate(-50%, -50%); pointer-events: none; opacity: 0.5;
}

.orbital-node { position: absolute; left: 50%; top: 50%; transition: transform 0.7s var(--ease), opacity 0.7s var(--ease); }
.orbital-node__btn { display: block; }
.orbital-node__dot {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--border); background: var(--surface); color: var(--text);
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.orbital-node__btn:hover .orbital-node__dot { border-color: var(--accent); color: var(--accent); }
.orbital-node.is-related .orbital-node__dot { background: color-mix(in srgb, var(--accent) 35%, var(--surface)); border-color: var(--accent); color: var(--text); animation: orbital-pulse 1.4s ease-in-out infinite; }
.orbital-node.is-active .orbital-node__dot { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); transform: scale(1.45); box-shadow: 0 0 26px var(--accent-glow); }
@keyframes orbital-pulse { 50% { box-shadow: 0 0 0 6px rgba(232,162,61,0.12); } }

.orbital-node__label {
  position: absolute; top: -36px; left: 50%; transform: translateX(-50%);
  white-space: nowrap; font-family: var(--font-display); font-weight: 600;
  font-size: 0.98rem; letter-spacing: 0.005em; pointer-events: none;
  background: linear-gradient(90deg, #E8A23D 0%, #FBE7C2 50%, #E8A23D 100%);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: orbital-shimmer 3.5s linear infinite;
  transition: transform 0.3s var(--ease);
}
.orbital-node.is-active .orbital-node__label { transform: translateX(-50%) scale(1.14); }
@keyframes orbital-shimmer { from { background-position: 0% center; } to { background-position: 200% center; } }

.orbital-card {
  position: absolute; top: 84px; left: 50%; transform: translateX(-50%);
  width: 256px; background: rgba(20,20,22,0.94); backdrop-filter: blur(10px);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 24px 60px -30px rgba(0,0,0,0.9); padding: 1rem; text-align: left; z-index: 30;
}
.orbital-card::before { content: ""; position: absolute; top: -10px; left: 50%; transform: translateX(-50%); width: 1px; height: 10px; background: var(--accent); }
.orbital-card__top { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.orbital-card__cat { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent); padding: 0.18rem 0.5rem; border-radius: 999px; }
.orbital-card__tag { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-faint); }
.orbital-card__title { font-family: var(--font-display); font-size: 1rem; font-weight: 600; margin: 0.6rem 0 0.4rem; }
.orbital-card__text { font-size: 0.82rem; color: var(--text-muted); line-height: 1.55; }
.orbital-card__meter-row { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 0.66rem; color: var(--text-muted); margin: 0.9rem 0 0.35rem; }
.orbital-card__meter { width: 100%; height: 3px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.orbital-card__meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-hover)); }
.orbital-card__rel { margin-top: 0.9rem; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.orbital-card__rel-h { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 0.5rem; }
.orbital-card__rel-list { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.orbital-card__rel-btn { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-muted); border: 1px solid var(--border); background: transparent; border-radius: 999px; padding: 0.2rem 0.55rem; cursor: pointer; transition: color 0.2s, border-color 0.2s; }
.orbital-card__rel-btn:hover { color: var(--accent); border-color: var(--accent); }

@media (max-width: 600px) {
  .orbital__stage { height: 480px; }
  .orbital { min-height: 520px; }
  .orbital-card { width: 220px; }
}
@media (prefers-reduced-motion: reduce) {
  .orbital__ping, .orbital-node.is-related .orbital-node__dot, .orbital-node__label { animation: none; }
  .orbital-node__label { -webkit-text-fill-color: var(--accent); color: var(--accent); }
}

/* ---------------------------------------------------------------
   Work / Portfolio — dark, faded, luxury
   --------------------------------------------------------------- */
.work-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 640px) { .work-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .work-grid { grid-template-columns: repeat(3, 1fr); } }

.work-card {
  position: relative;
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  transition: transform 0.28s var(--ease), border-color 0.28s var(--ease), box-shadow 0.28s var(--ease);
}
.work-card__media { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--surface-2); }
.work-card__media img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
  filter: grayscale(0.65) brightness(0.4) contrast(1.05);
  transform: scale(1.02);
  transition: filter 0.45s var(--ease), transform 0.6s var(--ease);
}
.work-card::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,11,13,0.55) 0%, rgba(11,11,13,0.92) 100%);
  pointer-events: none;
  transition: opacity 0.4s var(--ease);
}
.work-card:hover::after, .work-card:focus-visible::after { opacity: 0.3; }
.work-card__meta {
  position: absolute; left: 1.1rem; right: 1.1rem; bottom: 1rem;
  z-index: 2; display: flex; flex-direction: column; gap: 0.15rem;
}
.work-card__name { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--text); }
.work-card__type { font-size: 0.72rem; color: var(--text-muted); letter-spacing: 0.04em; }
.work-card__visit {
  position: absolute; top: 0.85rem; right: 0.95rem; z-index: 2;
  font-size: 0.72rem; color: var(--accent-ink); background: var(--accent);
  padding: 0.25rem 0.65rem; border-radius: 999px;
  opacity: 0; transform: translateY(-5px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.work-card:hover, .work-card:focus-visible {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 26px 55px -30px rgba(0,0,0,0.9);
}
.work-card:hover img, .work-card:focus-visible img { filter: none; transform: scale(1.05); }
.work-card:hover .work-card__visit, .work-card:focus-visible .work-card__visit { opacity: 1; transform: none; }
.work-note { margin-top: 2rem; color: var(--text-faint); font-size: 0.85rem; }

/* group labels */
.work-group { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); margin: 2.75rem 0 1.25rem; display: flex; align-items: center; gap: 0.85rem; }
.work-group::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.work-group span { color: var(--accent); }

/* logo cards (figures, no link) — lighter so the mark reads */
figure.work-card { margin: 0; cursor: default; }
.work-card--logo .work-card__media img { filter: grayscale(0.12) brightness(0.82) contrast(1.02); }
.work-card--logo::after { background: linear-gradient(180deg, rgba(11,11,13,0.2) 0%, rgba(11,11,13,0.82) 100%); }
.work-card--logo:hover { transform: translateY(-5px); border-color: var(--accent); }
.work-card--logo:hover .work-card__media img { filter: none; transform: scale(1.04); }

/* ---------------------------------------------------------------
   Showcase bento — premium capability gallery
   --------------------------------------------------------------- */
.show-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 1rem; }

.show-tile {
  position: relative; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--radius);
  min-height: 240px; isolation: isolate;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.show-tile > img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: -2;
  filter: grayscale(0.35) brightness(0.62) contrast(1.05);
  transform: scale(1.04);
  transition: filter 0.5s var(--ease), transform 0.7s var(--ease);
}
.show-tile::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(11,11,13,0.15) 0%, rgba(11,11,13,0.55) 55%, rgba(11,11,13,0.93) 100%);
  transition: opacity 0.4s var(--ease);
}
.show-tile__body { position: absolute; left: 0; bottom: 0; padding: 1.5rem; width: 100%; }
.show-tile__tag { display: inline-block; font-size: 0.7rem; letter-spacing: 0.12em; color: var(--accent); margin-bottom: 0.5rem; }
.show-tile__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.15rem, 1.6vw, 1.5rem); }
.show-tile__line {
  color: var(--text-muted); font-size: 0.92rem; margin-top: 0.4rem; max-width: 42ch;
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.show--web .show-tile__line { opacity: 1; transform: none; }   /* feature tile always shows line */

.show-tile:hover {
  border-color: var(--accent);
  box-shadow: 0 28px 60px -32px rgba(0,0,0,0.9), 0 0 0 1px rgba(232,162,61,0.25);
  transform: translateY(-4px);
}
.show-tile:hover > img { filter: grayscale(0) brightness(0.8) contrast(1.05); transform: scale(1.08); }
.show-tile:hover::after { opacity: 0.85; }
.show-tile:hover .show-tile__line { opacity: 1; transform: none; }

/* Bento layout on larger screens */
@media (min-width: 760px) {
  .show-grid { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 210px; }
  .show--web    { grid-column: 1 / 3; grid-row: 1 / 3; }
  .show--mobile { grid-column: 3 / 5; grid-row: 1 / 2; }
  .show--brand  { grid-column: 3 / 4; grid-row: 2 / 3; }
  .show--auto   { grid-column: 4 / 5; grid-row: 2 / 3; }
  .show--dash   { grid-column: 1 / 5; grid-row: 3 / 4; }
}
@media (prefers-reduced-motion: reduce) {
  .show-tile__line { opacity: 1; transform: none; }
  .show-tile > img { transition: none; }
}

/* ---------------------------------------------------------------
   Story
   --------------------------------------------------------------- */
.story__grid { display: grid; grid-template-columns: 1fr; gap: 3rem; align-items: center; }
.story__body p { color: var(--text-muted); max-width: 62ch; margin-top: 1.1rem; }
.story__body p strong { color: var(--text); font-weight: 600; }
.story__data { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem 2rem; margin-top: 2.25rem; padding-top: 1.75rem; border-top: 1px solid var(--border); }
.story__data dt { font-size: 0.75rem; color: var(--text-faint); }
.story__data dd { font-size: 1.35rem; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.story__resume { margin-top: 2rem; }

/* Code card */
.codecard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: 0 24px 60px -30px rgba(0,0,0,0.8); }
.codecard__bar { display: flex; align-items: center; gap: 0.4rem; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.codecard__bar span { width: 11px; height: 11px; border-radius: 50%; background: var(--border); }
.codecard__bar span:first-child { background: #E06C6C; }
.codecard__bar span:nth-child(2) { background: #E8A23D; }
.codecard__bar span:nth-child(3) { background: #6FBF8B; }
.codecard__bar em { margin-left: auto; font-style: normal; font-size: 0.78rem; color: var(--text-faint); }
.codecard pre { padding: 1.5rem; overflow-x: auto; font-size: 0.85rem; line-height: 1.85; }
.codecard code { color: var(--text-muted); }
.c-key { color: #C792EA; } .c-var { color: var(--text); } .c-prop { color: #82AAFF; }
.c-str { color: var(--accent); } .c-num { color: #6FBF8B; }

/* ---------------------------------------------------------------
   Contact
   --------------------------------------------------------------- */
.contact__grid { display: grid; grid-template-columns: 1fr; gap: 3rem; }
.contact__info { margin-top: 2.25rem; display: flex; flex-direction: column; gap: 0.85rem; }
.contact__info li { display: flex; gap: 1rem; align-items: baseline; font-size: 0.95rem; }
.contact__label { color: var(--text-faint); min-width: 4.5rem; font-size: 0.8rem; }
.contact__info a { color: var(--text); border-bottom: 1px solid transparent; transition: border-color 0.2s, color 0.2s; }
.contact__info a:hover { color: var(--accent); border-color: var(--accent); }

.socials { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.socials a { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; padding: 0.5rem 0.9rem; border: 1px solid var(--border); border-radius: var(--radius-sm); font-family: var(--font-mono); font-size: 0.82rem; color: var(--text-muted); transition: color 0.2s, border-color 0.2s; }
.socials a svg { width: 18px; height: 18px; }
.socials a:hover { color: var(--accent); border-color: var(--accent); }

/* Form */
.form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 2.25rem); }
.field { margin-bottom: 1.25rem; }
.field label { display: block; font-family: var(--font-mono); font-size: 0.82rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.req { color: var(--accent); }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 0.9rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 1rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.field textarea { resize: vertical; min-height: 120px; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-faint); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.field.has-error input, .field.has-error textarea { border-color: var(--danger); }
.field__err { color: var(--danger); font-size: 0.8rem; margin-top: 0.4rem; min-height: 1em; font-family: var(--font-mono); }

.form__submit { width: 100%; margin-top: 0.5rem; }
.form__submit[disabled] { opacity: 0.6; cursor: not-allowed; }
.form__status { margin-top: 1rem; font-family: var(--font-mono); font-size: 0.88rem; min-height: 1em; }
.form__status.is-success { color: var(--success); }
.form__status.is-error { color: var(--danger); }

/* ---------------------------------------------------------------
   Footer
   --------------------------------------------------------------- */
.footer { border-top: 1px solid var(--border); padding-block: 2.5rem; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; }
.footer__tag { color: var(--text-muted); font-size: 0.85rem; }
.footer__copy { color: var(--text-faint); font-size: 0.8rem; margin-left: auto; }
.footer__top { color: var(--text-muted); font-size: 0.8rem; transition: color 0.2s; }
.footer__top:hover { color: var(--accent); }

/* ---------------------------------------------------------------
   Anchor offset (clear fixed nav)
   --------------------------------------------------------------- */
:where(#hero, #services, #work, #story, #process, #contact) { scroll-margin-top: var(--nav-h); }

/* ---------------------------------------------------------------
   Process — 4-step timeline
   --------------------------------------------------------------- */
.steps {
  display: grid; grid-template-columns: 1fr; gap: 1.25rem;
  position: relative; list-style: none; padding: 0; margin: 0;
}
.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem 1.5rem;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.step:hover { transform: translateY(-4px); border-color: var(--accent); background: var(--surface-2); }
.step__num {
  position: absolute; top: 1.1rem; right: 1.25rem;
  font-size: 2.4rem; font-weight: 700; line-height: 1;
  color: transparent; -webkit-text-stroke: 1px var(--border);
  transition: -webkit-text-stroke-color 0.25s var(--ease);
}
.step:hover .step__num { -webkit-text-stroke-color: var(--accent); }
.step__icon {
  display: inline-flex; width: 48px; height: 48px;
  align-items: center; justify-content: center;
  border-radius: var(--radius-sm); background: var(--accent-glow); color: var(--accent);
  margin-bottom: 1.1rem;
}
.step__icon svg { width: 24px; height: 24px; }
.step__title { font-size: var(--fs-h3); margin-bottom: 0.45rem; }
.step__text { color: var(--text-muted); font-size: 0.95rem; max-width: 36ch; }

@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) {
  .steps { grid-template-columns: repeat(4, 1fr); gap: 1rem; }
  /* connecting line behind the row of steps */
  .steps::before {
    content: ""; position: absolute; top: 2.4rem; left: 8%; right: 8%;
    height: 1px; background: linear-gradient(90deg, transparent, var(--border) 12%, var(--border) 88%, transparent);
    z-index: 0;
  }
  .step { z-index: 1; }
}

/* ---------------------------------------------------------------
   Responsive
   --------------------------------------------------------------- */
@media (min-width: 640px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .story__data { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 768px) {
  .story__grid { grid-template-columns: 1.1fr 0.9fr; }
  .contact__grid { grid-template-columns: 0.9fr 1.1fr; align-items: start; }
  .contact__intro { position: sticky; top: calc(var(--nav-h) + 1.5rem); }
}

@media (min-width: 1024px) {
  .bento { grid-template-columns: repeat(3, 1fr); }
  /* primary cards take a wider feel on top row already via order */
}

/* Mobile nav swap */
@media (max-width: 767px) {
  .nav__links { display: none; }
  .nav__toggle { display: flex; }
}

/* Lock scroll when mobile menu open */
body.menu-open { overflow: hidden; }

/* keep the About code card from forcing the grid wider than the screen */
.story__body, .story__aside { min-width: 0; }
.codecard, .codecard pre { max-width: 100%; }

/* ---------------------------------------------------------------
   Mobile services list (replaces the orbital on phones)
   --------------------------------------------------------------- */
.svc-list { display: none; list-style: none; margin: 0; padding: 0; }
.svc-card {
  display: flex; gap: 1rem; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.1rem 1.15rem;
}
.svc-card__icon {
  flex: none; width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); background: var(--accent-glow); color: var(--accent);
}
.svc-card__title { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; margin-bottom: 0.25rem; }
.svc-card__text { color: var(--text-muted); font-size: 0.9rem; line-height: 1.5; }

/* Services: the orbital needs room — show the card list on tablets & phones */
@media (max-width: 1023px) {
  .orbital { display: none; }
  .svc-list { display: grid; gap: 0.85rem; margin-top: 1.5rem; }
}

/* ===============================================================
   MOBILE OPTIMISATION  (≤767px)
   =============================================================== */
@media (max-width: 767px) {
  /* declutter: drop the desktop-only flourishes */
  .bg-layer { display: none; }

  /* hero on phones = video backdrop only (no PNG flash) */
  .hero__robot img { display: none; }
  .hero__robot video { opacity: 1; }

  /* tighter section rhythm */
  .section { padding-block: clamp(3.25rem, 12vw, 4.5rem); }
  .section__head { margin-bottom: 2rem; }

  /* hero: fainter video so text is crisp, compact stats, no scroll cue */
  .hero__robot { opacity: 0.22; }
  .hero__stage { padding-block: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + 2.25rem) 2.25rem; }
  .hero .eyebrow { margin-top: 0.5rem; }
  .hero__hi { margin-top: 0.5rem; }
  .hero__sub { margin-block: 1.1rem 1.35rem; font-size: 1rem; }
  .hero__cta { gap: 0.7rem; }
  .hero__cta .btn { flex: 1 1 auto; }
  .hero__stats {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem; margin-top: 1.75rem; padding-top: 1.4rem;
  }
  .hero__stat-num { font-size: 1.35rem; }
  .hero__stat-label { font-size: 0.66rem; line-height: 1.25; }
  .hero__scroll { display: none; }

  /* showcase: single column, readable height */
  .show-tile { min-height: 200px; }
  .show-tile__line { opacity: 1; transform: none; }   /* always show on touch */

  /* contact: comfortable stacking */
  .contact__info li { gap: 0.6rem; }
  .socials a { flex: 1 1 auto; justify-content: center; }
}

/* phones with reduced-motion → static sharp PNG (no video) */
@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  .hero__robot img { display: block; }
  .hero__robot video { display: none; }
}
