/* ==========================================================================
   Spunk Studio — design system
   --------------------------------------------------------------------------
   1.  Tokens
   2.  Reset & base
   3.  Utilities (container, section, visually-hidden, skip link)
   4.  Typography
   5.  Icons
   6.  Buttons & links
   7.  Header & navigation
   8.  Hero
   9.  Section headings & shared blocks
   10. Numbered list (about / why / process)
   11. Service cards
   12. Work / projects
   13. Store presence
   14. Technology stack
   15. Portfolio band (light)
   16. Testimonials
   17. Contact & form
   18. Footer
   19. Motion & reveal
   20. Responsive
   ========================================================================== */

/* ==========================================================================
   1. Tokens
   ========================================================================== */

:root {
  /* -- Surfaces ------------------------------------------------------- */
  --bg-base: #08090d;
  --bg-alt: #0c0e14; /* alternating section band */
  --bg-sunken: #05060a;
  --surface-1: #101219;
  --surface-2: #171a23;
  --surface-3: #1f232e;

  /* -- Text (lowest tier still clears WCAG AA on --bg-base) ----------- */
  --text-1: #f5f3ef; /* 17.8:1 */
  --text-2: #b7b9be; /* 10.0:1 */
  --text-3: #8a8d96; /*  5.9:1 */

  /* -- Accent --------------------------------------------------------- */
  --accent: #5b8def; /* 6.2:1 as text on --bg-base */
  --accent-hover: #7ba5f5;
  --accent-press: #4477db;
  --accent-fg: #08090d; /* dark foreground on accent fills — 6.2:1 */
  --accent-ink: #2f5fc7; /* accent on light surfaces — 5.1:1 */
  --accent-muted: rgba(91, 141, 239, 0.14);
  --accent-glow: rgba(91, 141, 239, 0.22);

  /* -- Highlight & status --------------------------------------------- */
  --highlight: #ff6b3d; /* the retained brand orange, accents only */
  --success: #58d398;
  --danger: #ff9a8b; /* 9.2:1 on --surface-1 */

  /* -- Borders -------------------------------------------------------- */
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.22);
  --border-accent: rgba(91, 141, 239, 0.38);

  /* -- Focus ---------------------------------------------------------- */
  --focus: var(--accent-hover);

  /* -- Spacing (4px base) --------------------------------------------- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-14: 3.5rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-section: clamp(4.5rem, 9vw, 8rem);

  /* -- Radius --------------------------------------------------------- */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-full: 999px;

  /* -- Elevation ------------------------------------------------------ */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.32);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.45);
  --shadow-accent: 0 12px 40px var(--accent-glow);

  /* -- Typography ----------------------------------------------------- */
  --font-sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text",
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia,
    "Times New Roman", serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --fs-2xs: 0.6875rem;
  --fs-xs: 0.75rem;
  --fs-sm: 0.8125rem;
  --fs-base: 0.9375rem;
  --fs-md: 1rem;
  --fs-lg: clamp(1.0625rem, 0.98rem + 0.35vw, 1.25rem);
  --fs-xl: clamp(1.1875rem, 1.05rem + 0.6vw, 1.5rem);
  --fs-h3: clamp(1.1875rem, 1.06rem + 0.55vw, 1.4375rem);
  --fs-h2: clamp(2rem, 1.4rem + 2.6vw, 3.5rem);
  --fs-h1: clamp(2.75rem, 1.6rem + 5vw, 5.5rem);

  --tracking-tight: -0.03em;
  --tracking-tighter: -0.045em;
  --tracking-label: 0.14em;

  /* -- Layout --------------------------------------------------------- */
  --container: 1200px;
  --container-pad: clamp(1.25rem, 4vw, 3rem);
  --header-h: 68px;

  /* -- Motion --------------------------------------------------------- */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 140ms;
  --dur: 220ms;
  --dur-slow: 420ms;

  /* -- Icons ---------------------------------------------------------- */
  --icon-stroke: 1.75;

  /* Lucide `circle-alert` / `circle-check`, used as CSS masks for form state. */
  --icon-alert: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 8v4'/%3E%3Cpath d='M12 16h.01'/%3E%3C/svg%3E");
  --icon-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E");
}

/*
 * The one inverse surface in the system. The portfolio artwork has a hard
 * white background, so this band re-points the same tokens at light values
 * instead of duplicating component CSS.
 */
.band-light {
  --bg-base: #f2f1ec;
  --surface-1: #ffffff;
  --surface-2: #eae8e1;
  --surface-3: #e0ded6;
  --text-1: #14161b; /* 15.9:1 */
  --text-2: #40434b; /*  8.8:1 */
  --text-3: #63666f; /*  5.1:1 */
  --accent: var(--accent-ink);
  --accent-muted: rgba(47, 95, 199, 0.1);
  --border-subtle: rgba(10, 12, 18, 0.07);
  --border: rgba(10, 12, 18, 0.12);
  --border-strong: rgba(10, 12, 18, 0.2);
  --focus: var(--accent-ink);
  --shadow-sm: 0 1px 2px rgba(28, 26, 22, 0.06), 0 4px 12px rgba(28, 26, 22, 0.05);
  --shadow-md: 0 8px 24px rgba(28, 26, 22, 0.08);
  --shadow-lg: 0 24px 64px rgba(28, 26, 22, 0.1);
}

/* ==========================================================================
   2. Reset & base
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--space-4));
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  /* `clip` (not `hidden`) so overflow is contained without creating a
     scroll container, which would break `position: sticky`. */
  overflow-x: clip;
  background: var(--bg-base);
  color: var(--text-1);
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body.menu-open {
  overflow: hidden;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

p,
h1,
h2,
h3,
h4,
ul,
ol,
figure,
blockquote {
  margin-top: 0;
}

::selection {
  background: var(--accent);
  color: var(--accent-fg);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

/* ==========================================================================
   3. Utilities
   ========================================================================== */

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--container-pad) * 2);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section {
  position: relative;
  padding-block: var(--space-section);
}

.section-alt {
  background: var(--bg-alt);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: var(--space-3);
  left: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--r-xs);
  background: var(--accent);
  color: var(--accent-fg);
  font-size: var(--fs-sm);
  font-weight: 600;
  transform: translateY(-200%);
  transition: transform var(--dur) var(--ease-out);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

/* The inline icon sprite must never occupy layout. */
.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ==========================================================================
   4. Typography
   ========================================================================== */

h1,
h2,
h3,
h4 {
  font-weight: 700;
  text-wrap: balance;
}

h1 {
  margin-bottom: var(--space-6);
  font-size: var(--fs-h1);
  line-height: 1.02;
  letter-spacing: var(--tracking-tighter);
}

h2 {
  margin-bottom: var(--space-5);
  font-size: var(--fs-h2);
  line-height: 1.06;
  letter-spacing: var(--tracking-tighter);
}

h3 {
  margin-bottom: var(--space-3);
  font-size: var(--fs-h3);
  line-height: 1.25;
  letter-spacing: var(--tracking-tight);
}

/*
 * The single deliberate typographic contrast in the system: a serif italic
 * used for the second clause of each display heading.
 */
h1 em,
h2 em {
  color: var(--accent);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.lede {
  max-width: 46ch;
  color: var(--text-2);
  font-size: var(--fs-lg);
  line-height: 1.6;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
  color: var(--text-3);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  line-height: 1.2;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  flex: none;
  background: var(--accent);
}

/* Small uppercase meta label — one treatment, used everywhere. */
.meta-label {
  color: var(--text-3);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

/* Pending/placeholder marker — replaces three previous treatments. */
.badge-pending {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.3rem 0.65rem 0.3rem 0.5rem;
  border: 1px solid var(--border-accent);
  border-radius: var(--r-full);
  background: var(--accent-muted);
  color: var(--accent);
  font-size: var(--fs-2xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

.badge-pending .icon {
  font-size: 0.85rem;
}

/* ==========================================================================
   5. Icons
   ========================================================================== */

.icon {
  width: 1em;
  height: 1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: var(--icon-stroke);
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.125em;
}

/* Square tile that holds a card icon. */
.icon-tile {
  display: grid;
  width: 3rem;
  height: 3rem;
  flex: none;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--accent-muted);
  color: var(--accent);
  font-size: 1.375rem;
  transition: border-color var(--dur) var(--ease-out),
    background-color var(--dur) var(--ease-out);
}

/* Trademarked platform marks keep their own light plate. */
.icon-tile-brand {
  overflow: hidden;
  background: #f5f5f2;
  border-color: transparent;
}

.icon-tile-brand img {
  width: 62%;
  height: 62%;
  object-fit: contain;
}

.icon-tile-brand.icon-tile-ios img {
  width: 100%;
  height: 100%;
}

/* ==========================================================================
   6. Buttons & links
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 3rem;
  padding: 0.75rem 1.375rem;
  border: 1px solid transparent;
  border-radius: var(--r-full);
  font-size: var(--fs-base);
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease-out),
    border-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out),
    box-shadow var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}

.btn .icon {
  transition: transform var(--dur) var(--ease-out);
}

.btn:hover .icon {
  transform: translate(2px, -2px);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-fg);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: var(--shadow-accent);
  transform: translateY(-2px);
}

.btn-primary:active {
  background: var(--accent-press);
  border-color: var(--accent-press);
  box-shadow: none;
  transform: translateY(0);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text-1);
}

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

.btn-outline:active {
  transform: translateY(0);
  background: transparent;
}

.btn-sm {
  min-height: 2.5rem;
  padding: 0.5rem 1rem;
  font-size: var(--fs-sm);
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 2.75rem;
  color: var(--text-1);
  font-size: var(--fs-base);
  font-weight: 600;
  transition: color var(--dur) var(--ease-out);
}

.text-link > span:first-child {
  position: relative;
  padding-bottom: 2px;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 1px;
  transition: background-size var(--dur) var(--ease-out);
}

.text-link:hover {
  color: var(--accent);
}

.text-link:hover > span:first-child {
  background-size: 100% 1px;
}

.text-link .icon {
  transition: transform var(--dur) var(--ease-out);
}

.text-link:hover .icon {
  transform: translate(3px, 0);
}

.text-link-down:hover .icon {
  transform: translate(0, 3px);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-6);
}

/* ==========================================================================
   7. Header & navigation
   ========================================================================== */

.site-header {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  width: 100%;
  border-bottom: 1px solid transparent;
  transition: background-color var(--dur) var(--ease-out),
    border-color var(--dur) var(--ease-out);
}

.site-header.is-scrolled {
  border-bottom-color: var(--border-subtle);
  background: rgba(8, 9, 13, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

@supports not (backdrop-filter: blur(1px)) {
  .site-header.is-scrolled {
    background: rgba(8, 9, 13, 0.96);
  }
}

.nav-shell {
  display: flex;
  min-height: var(--header-h);
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 2.75rem;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
}

.wordmark-mark {
  display: grid;
  width: 2rem;
  height: 2rem;
  flex: none;
  place-items: center;
  border-radius: 0.5rem;
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 1rem;
  transition: transform var(--dur) var(--ease-out),
    box-shadow var(--dur) var(--ease-out);
}

.wordmark:hover .wordmark-mark {
  transform: rotate(-6deg);
  box-shadow: var(--shadow-accent);
}

.wordmark-glyph {
  width: 62%;
  height: 62%;
  fill: currentColor;
  stroke: none;
}

.wordmark-text > span {
  color: var(--accent);
}

.menu-toggle {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  flex: none;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  background: var(--surface-2);
  color: var(--text-1);
  font-size: 1.25rem;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease-out),
    background-color var(--dur) var(--ease-out);
}

.menu-toggle:hover {
  border-color: var(--border-strong);
  background: var(--surface-3);
}

/* Crossfade between the two sprite icons. */
.menu-toggle .icon {
  grid-area: 1 / 1;
  transition: opacity var(--dur-fast) var(--ease-out),
    transform var(--dur) var(--ease-out);
}

.menu-toggle .icon-close,
.menu-toggle[aria-expanded="true"] .icon-open {
  opacity: 0;
  transform: rotate(-45deg) scale(0.7);
}

.menu-toggle[aria-expanded="true"] .icon-close {
  opacity: 1;
  transform: none;
}

.primary-nav {
  display: grid;
  gap: var(--space-1);
}

/* Mobile drawer — only applied once JS confirms it can be toggled. */
.js .primary-nav {
  position: fixed;
  inset: var(--header-h) 0 auto;
  max-height: 0;
  /* `auto` prevents the last links being unreachable on short/landscape
     viewports, which the previous `hidden` caused. */
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-inline: var(--container-pad);
  border-bottom: 1px solid transparent;
  background: rgba(8, 9, 13, 0.98);
  opacity: 0;
  visibility: hidden;
  transition: max-height var(--dur-slow) var(--ease-out),
    padding var(--dur-slow) var(--ease-out), opacity var(--dur) var(--ease-out),
    visibility var(--dur) var(--ease-out);
}

.js .primary-nav.is-open {
  max-height: calc(100dvh - var(--header-h));
  padding-block: var(--space-4) var(--space-6);
  border-bottom-color: var(--border-subtle);
  opacity: 1;
  visibility: visible;
}

.primary-nav .nav-link {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 3rem;
  padding-inline: var(--space-2);
  color: var(--text-2);
  font-size: var(--fs-lg);
  font-weight: 500;
  transition: color var(--dur) var(--ease-out);
}

.primary-nav .nav-link::after {
  content: "";
  position: absolute;
  left: var(--space-2);
  right: var(--space-2);
  bottom: 0.5rem;
  height: 1.5px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease-out);
}

.primary-nav .nav-link:hover {
  color: var(--text-1);
}

.primary-nav .nav-link:hover::after,
.primary-nav .nav-link[aria-current]::after {
  transform: scaleX(1);
}

.primary-nav .nav-link[aria-current] {
  color: var(--text-1);
}

.nav-cta {
  margin-top: var(--space-3);
}

/* ==========================================================================
   8. Hero
   ========================================================================== */

.hero {
  position: relative;
  padding-top: calc(var(--header-h) + var(--space-16));
  padding-bottom: var(--space-16);
  overflow: hidden;
}

/* Single blurred light source (previously three stacked blur layers). */
.hero-glow {
  position: absolute;
  z-index: 0;
  top: -12rem;
  right: -14rem;
  width: 46rem;
  height: 46rem;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(91, 141, 239, 0.16),
    rgba(91, 141, 239, 0) 62%
  );
  pointer-events: none;
}

.hero-grid-lines {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.5;
  pointer-events: none;
  background-image: linear-gradient(var(--border-subtle) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, #000, transparent 70%);
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 70%);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--space-16);
  align-items: center;
}

.hero-lede {
  margin-bottom: var(--space-8);
}

.hero-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-8) 0 0;
  padding: 0;
  list-style: none;
}

.hero-platforms li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 2.125rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  background: var(--surface-1);
  color: var(--text-2);
  font-size: var(--fs-2xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-platforms img {
  width: auto;
  max-width: 1.125rem;
  max-height: 1rem;
  object-fit: contain;
}

.hero-platforms .icon {
  color: var(--accent);
  font-size: 0.875rem;
}

.hero-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-16);
  color: var(--text-3);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-foot p {
  margin: 0;
}

.hero-foot .rule {
  display: none;
  height: 1px;
  flex: 1;
  background: var(--border);
}

/* -- Product mockup -------------------------------------------------- */

/*
 * The mockup is sized entirely in `em` and its root font-size is driven by
 * the width of its own container, so it scales smoothly at every breakpoint
 * without transform hacks.
 */
.hero-visual {
  container-type: inline-size;
  display: flex;
  justify-content: center;
  margin: 0;
}

.product-visual {
  position: relative;
  width: 30em;
  height: 34em;
  max-width: 100%;
  font-size: clamp(8px, 3.3cqw, 15px);
}

@supports not (font-size: 1cqw) {
  .product-visual {
    font-size: clamp(8px, 2.4vw, 15px);
  }
}

.orbit {
  position: absolute;
  border: 1px solid var(--border-accent);
  border-radius: 50%;
}

.orbit-one {
  inset: 3em 0;
}

.orbit-two {
  inset: 7em 4em;
  border-color: var(--border-subtle);
}

.phone {
  position: absolute;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 2.4em;
  background: #05060a;
  box-shadow: var(--shadow-lg);
}

.phone-screen {
  position: absolute;
  inset: 0.5em;
  overflow: hidden;
  border-radius: 1.95em;
  background: var(--surface-1);
}

.phone-back {
  width: 13em;
  height: 26em;
  top: 5.5em;
  left: 0;
  transform: rotate(-11deg);
  opacity: 0.72;
}

.phone-back .phone-screen {
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 2.2em 1em;
  background: linear-gradient(160deg, var(--surface-3), var(--surface-1));
}

.mini-label {
  align-self: flex-start;
  color: var(--text-3);
  font-size: 0.55em;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.focus-ring {
  display: grid;
  width: 7em;
  height: 7em;
  margin-top: 3.5em;
  place-items: center;
  border: 0.7em solid var(--border);
  border-top-color: var(--accent);
  border-right-color: var(--accent);
  border-radius: 50%;
  transform: rotate(18deg);
}

.focus-ring span {
  font-size: 1.6em;
  font-weight: 700;
  transform: rotate(-18deg);
}

.mini-bars {
  display: flex;
  height: 4em;
  align-items: end;
  gap: 0.35em;
  margin-top: 2.25em;
}

.mini-bars i {
  width: 0.55em;
  border-radius: 1em;
  background: var(--border-strong);
}

.mini-bars i:nth-child(1) { height: 35%; }
.mini-bars i:nth-child(2) { height: 65%; }
.mini-bars i:nth-child(3) { height: 45%; }
.mini-bars i:nth-child(4) { height: 90%; background: var(--accent); }
.mini-bars i:nth-child(5) { height: 60%; }

.phone-front {
  width: 15.5em;
  height: 31em;
  top: 1em;
  right: 0.5em;
  transform: rotate(6deg);
}

.phone-front .phone-screen {
  padding: 2.1em 1.05em 1em;
  background: linear-gradient(175deg, var(--surface-2), var(--surface-1) 62%);
}

.phone-speaker {
  position: absolute;
  z-index: 2;
  top: 0.9em;
  left: 50%;
  width: 4em;
  height: 1.1em;
  border-radius: 999px;
  background: #05060a;
  transform: translateX(-50%);
}

.app-topline {
  display: flex;
  align-items: center;
  gap: 0.4em;
  color: var(--text-2);
  font-size: 0.58em;
}

.app-mark {
  display: grid;
  width: 1.2em;
  height: 1.2em;
  place-items: center;
  border-radius: 0.35em;
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 0.6em;
  font-weight: 700;
}

.app-topline i {
  width: 0.35em;
  height: 0.35em;
  margin-left: auto;
  border-radius: 50%;
  background: var(--success);
}

.screen-kicker {
  margin: 2.75em 0 0.5em;
  color: var(--accent-hover);
  font-size: 0.5em;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.screen-title {
  margin-bottom: 1.2em;
  font-size: 1.55em;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: var(--tracking-tighter);
}

.insight-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.5em;
  padding: 0.65em;
  border: 1px solid var(--border);
  border-radius: 0.8em;
  background: rgba(255, 255, 255, 0.04);
}

.insight-icon {
  display: grid;
  width: 1.7em;
  height: 1.7em;
  place-items: center;
  border-radius: 0.45em;
  background: var(--accent-muted);
  color: var(--accent);
  font-size: 0.7em;
}

.insight-card small,
.insight-card strong {
  display: block;
  line-height: 1.35;
}

.insight-card small {
  color: var(--text-3);
  font-size: 0.46em;
}

.insight-card strong {
  font-size: 0.58em;
  font-weight: 600;
}

.insight-card b {
  color: var(--success);
  font-size: 0.55em;
  font-weight: 600;
}

.screen-list {
  display: grid;
  gap: 0.55em;
  margin-block: 1em 1.2em;
}

.screen-list span {
  height: 1.9em;
  border-radius: 0.55em;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.08) 22%,
    rgba(255, 255, 255, 0.035) 22%
  );
}

.screen-cta {
  display: block;
  padding: 0.65em;
  border-radius: 0.65em;
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 0.6em;
  font-weight: 700;
  text-align: center;
}

.app-tabs {
  display: flex;
  justify-content: center;
  gap: 1.8em;
  margin-top: 1em;
}

.app-tabs i {
  width: 0.65em;
  height: 0.65em;
  border: 1px solid var(--text-3);
  border-radius: 50%;
}

.app-tabs i:first-child {
  border-color: var(--accent);
  background: var(--accent);
}

.float-card {
  position: absolute;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.65em;
  min-width: 10em;
  padding: 0.7em 0.8em;
  border: 1px solid var(--border-strong);
  border-radius: 0.8em;
  background: rgba(23, 26, 35, 0.9);
  box-shadow: var(--shadow-md);
}

.float-card small,
.float-card strong {
  display: block;
  line-height: 1.35;
}

.float-card small {
  color: var(--text-3);
  font-size: 0.53em;
}

.float-card strong {
  font-size: 0.7em;
  font-weight: 600;
}

.float-card-top {
  top: 0.5em;
  left: 0;
}

.float-card-bottom {
  right: 0;
  bottom: 1em;
}

.signal-dot {
  width: 0.65em;
  height: 0.65em;
  flex: none;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0.3em rgba(88, 211, 152, 0.14);
}

.spark {
  display: grid;
  width: 1.7em;
  height: 1.7em;
  flex: none;
  place-items: center;
  border-radius: 0.45em;
  background: var(--accent-muted);
  color: var(--accent);
  font-size: 0.7em;
}

/* ==========================================================================
   9. Section headings & shared blocks
   ========================================================================== */

.section-heading {
  display: grid;
  gap: var(--space-6);
  margin-bottom: var(--space-14);
}

.section-heading h2 {
  margin-bottom: 0;
}

.section-heading > div > p {
  max-width: 46ch;
  margin: var(--space-5) 0 0;
  color: var(--text-2);
  font-size: var(--fs-lg);
}

.split-intro {
  display: grid;
  gap: var(--space-8);
}

.intro-copy {
  max-width: 52ch;
  color: var(--text-2);
}

.intro-copy p:first-child {
  color: var(--text-1);
  font-size: var(--fs-lg);
}

.intro-copy .text-link {
  margin-top: var(--space-2);
}

/* Panel — the shared elevated container used by store/stack/contact. */
.panel {
  padding: var(--space-6);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: linear-gradient(160deg, var(--surface-2), var(--surface-1));
}

/* ==========================================================================
   10. Numbered list — one component, three modifiers
   ========================================================================== */

.numbered-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.numbered-list > li {
  counter-increment: step;
}

.numbered-list .step-number {
  display: block;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
}

.numbered-list .step-number::before {
  content: counter(step, decimal-leading-zero);
}

.numbered-list h3 {
  margin-bottom: var(--space-2);
}

.numbered-list p {
  margin: 0;
  color: var(--text-2);
}

/* -- Card grid (About principles) ------------------------------------ */
.numbered-cards {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-14);
}

.numbered-cards > li {
  display: flex;
  flex-direction: column;
  padding: var(--space-6);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface-1);
  transition: border-color var(--dur) var(--ease-out),
    background-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}

.numbered-cards > li:hover {
  border-color: var(--border-accent);
  background: var(--surface-2);
  transform: translateY(-4px);
}

.numbered-cards .step-number {
  margin-bottom: var(--space-10);
}

/* -- Rows (Why Spunk Studio) ----------------------------------------- */
.numbered-rows > li {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: var(--space-3);
  padding-block: var(--space-6);
  border-top: 1px solid var(--border-subtle);
}

.numbered-rows > li:last-child {
  border-bottom: 1px solid var(--border-subtle);
}

.numbered-rows .step-number {
  padding-top: 0.4rem;
}

.numbered-rows h3 {
  font-size: var(--fs-xl);
}

.numbered-rows p {
  font-size: var(--fs-base);
}

/* -- Steps (Process) -------------------------------------------------- */
.numbered-steps > li {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: var(--space-4);
  padding-block: var(--space-6);
  border-top: 1px solid var(--border-subtle);
  transition: background-color var(--dur) var(--ease-out);
}

.numbered-steps > li:last-child {
  border-bottom: 1px solid var(--border-subtle);
}

.numbered-steps .step-number {
  padding-top: 0.45rem;
}

.numbered-steps p {
  max-width: 60ch;
}

.step-tag {
  grid-column: 2;
  color: var(--text-3);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* -- Why section layout ---------------------------------------------- */
.why-grid {
  display: grid;
  gap: var(--space-12);
}

.why-copy > p:not(.eyebrow) {
  max-width: 42ch;
  color: var(--text-2);
  font-size: var(--fs-lg);
}

.why-copy .btn {
  margin-top: var(--space-4);
}

/* ==========================================================================
   11. Service cards
   ========================================================================== */

.services-grid {
  display: grid;
  gap: var(--space-4);
}

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: var(--space-6);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface-1);
  transition: border-color var(--dur) var(--ease-out),
    background-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out),
    box-shadow var(--dur) var(--ease-out);
}

.service-card:hover {
  border-color: var(--border-accent);
  background: var(--surface-2);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.service-card:hover .icon-tile:not(.icon-tile-brand) {
  border-color: var(--border-accent);
  background: rgba(91, 141, 239, 0.2);
}

.service-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-10);
}

.service-index {
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-variant-numeric: tabular-nums;
}

.service-card p {
  margin-bottom: 0;
  color: var(--text-2);
  font-size: var(--fs-base);
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-6) 0 0;
  padding: 0;
  list-style: none;
}

.service-tags li {
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-2);
  font-size: var(--fs-2xs);
  font-weight: 500;
}

/* The one featured card — an accent frame, not an accent fill. */
.service-card-featured {
  border-color: var(--border-accent);
  background: linear-gradient(
    165deg,
    rgba(91, 141, 239, 0.12),
    var(--surface-1) 58%
  );
}

.service-card-featured .service-index {
  color: var(--accent);
}

/* ==========================================================================
   12. Work / projects
   ========================================================================== */

.work-grid {
  display: grid;
  gap: var(--space-10);
}

.project-card {
  display: flex;
  flex-direction: column;
}

.project-figure {
  margin: 0;
}

.project-visual {
  position: relative;
  display: grid;
  min-height: 24rem;
  place-items: end center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  transition: border-color var(--dur) var(--ease-out);
}

.project-card:hover .project-visual {
  border-color: var(--border-accent);
}

.project-visual::before,
.project-visual::after {
  content: "";
  position: absolute;
  width: 22rem;
  height: 22rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
}

.project-visual::after {
  width: 14rem;
  height: 14rem;
}

.project-indigo .project-visual {
  background: linear-gradient(155deg, #3f63b8, #23305c);
}

.project-slate .project-visual {
  background: linear-gradient(155deg, #3d4757, #1b202b);
}

.project-phone {
  position: relative;
  z-index: 1;
  width: 13rem;
  padding: 2.75rem 1.1rem 1.25rem;
  border: 0.4rem solid #05060a;
  border-bottom: 0;
  border-radius: 2rem 2rem 0 0;
  background: var(--surface-1);
  color: var(--text-1);
  box-shadow: var(--shadow-lg);
  transition: transform var(--dur-slow) var(--ease-out);
}

.project-card:hover .project-phone {
  transform: translateY(-8px);
}

/*
 * Scoped to its own class rather than `.project-phone > span`, which also
 * matched the call to action and overrode its foreground colour.
 */
.project-time {
  color: var(--text-3);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.project-phone strong {
  display: block;
  margin-top: 2rem;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: var(--tracking-tighter);
}

.project-phone i {
  display: block;
  width: 6rem;
  height: 6rem;
  margin: 1.5rem auto;
  border: 0.85rem solid var(--border);
  border-top-color: var(--accent);
  border-left-color: var(--accent);
  border-radius: 50%;
}

.project-phone .screen-cta {
  border-radius: var(--r-full);
  color: var(--accent-fg);
  font-size: 0.65rem;
}

.project-tag {
  position: absolute;
  z-index: 2;
  top: var(--space-5);
  right: var(--space-5);
  padding: 0.35rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--r-full);
  background: rgba(8, 9, 13, 0.35);
  color: #fff;
  font-size: var(--fs-2xs);
  font-weight: 600;
  letter-spacing: 0.06em;
}

.project-meta {
  padding-top: var(--space-6);
}

.project-meta .badge-pending {
  margin-bottom: var(--space-4);
}

.project-meta h3 {
  margin-bottom: var(--space-2);
  font-size: var(--fs-xl);
}

.project-platform {
  margin-bottom: var(--space-3);
  color: var(--text-3);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-description {
  margin-bottom: 0;
  max-width: 52ch;
  color: var(--text-2);
  font-size: var(--fs-base);
}

/* ==========================================================================
   13. Store presence
   ========================================================================== */

.store-presence {
  padding-block: 0 var(--space-section);
}

.store-shell {
  display: grid;
  gap: var(--space-8);
  align-items: center;
}

.store-copy h2 {
  margin-bottom: var(--space-4);
}

.store-copy > p:last-child {
  max-width: 48ch;
  margin-bottom: 0;
  color: var(--text-2);
}

.store-badge-panel {
  padding: var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface-1);
}

.store-badge-panel > p:first-child {
  margin-bottom: var(--space-4);
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
}

.store-badges img {
  width: auto;
  height: 3rem;
  object-fit: contain;
}

.store-note {
  display: block;
  max-width: 46ch;
  margin-top: var(--space-4);
  color: var(--text-3);
  font-size: var(--fs-xs);
  line-height: 1.6;
}

/* ==========================================================================
   14. Technology stack
   ========================================================================== */

.stack-shell {
  display: grid;
  gap: var(--space-10);
}

.stack-copy > p:last-child {
  max-width: 44ch;
  margin-bottom: 0;
  color: var(--text-2);
}

.stack-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.stack-list li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 3.5rem;
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface-1);
  font-size: var(--fs-base);
  font-weight: 500;
  transition: border-color var(--dur) var(--ease-out),
    background-color var(--dur) var(--ease-out);
}

.stack-list li:hover {
  border-color: var(--border-accent);
  background: var(--surface-2);
}

.stack-list .icon {
  color: var(--accent);
  font-size: 1.125rem;
}

/* ==========================================================================
   15. Portfolio band (light)
   ========================================================================== */

.success {
  background: var(--bg-base);
  color: var(--text-1);
}

.success-heading {
  max-width: 56rem;
  margin-inline: auto;
  margin-bottom: var(--space-12);
  text-align: center;
}

.success-heading .eyebrow {
  justify-content: center;
}

.success-heading h2 {
  margin-bottom: var(--space-4);
}

.success-heading > p:last-child {
  max-width: 52ch;
  margin: 0 auto;
  color: var(--text-2);
  font-size: var(--fs-lg);
}

.success-stage {
  overflow: hidden;
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  background: var(--surface-1);
}

.portfolio-mosaic {
  position: relative;
  margin: 0;
  aspect-ratio: 1.4 / 1;
  /*
   * Feather the artwork's hard edges into the surface. Narrow viewports crop
   * the 2.4:1 source hardest, so the horizontal fade starts earlier there.
   */
  --mosaic-fade: 18%;
  mask-image: linear-gradient(
      90deg,
      transparent,
      #000 var(--mosaic-fade),
      #000 calc(100% - var(--mosaic-fade)),
      transparent
    ),
    linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(
      90deg,
      transparent,
      #000 var(--mosaic-fade),
      #000 calc(100% - var(--mosaic-fade)),
      transparent
    ),
    linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent);
  mask-composite: intersect;
  -webkit-mask-composite: source-in;
}

.portfolio-mosaic img {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.success-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: 0 0 var(--r-xl) var(--r-xl);
  overflow: hidden;
}

.success-metrics > li {
  padding: var(--space-6) var(--space-4);
  text-align: center;
}

.success-metrics > li:nth-child(odd) {
  border-right: 1px solid var(--border);
}

.success-metrics > li:nth-child(n + 3) {
  border-top: 1px solid var(--border);
}

.metric-value {
  display: block;
  color: var(--accent);
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.05em;
}

.metric-suffix {
  font-size: 0.6em;
}

.success-metrics li p {
  max-width: 14ch;
  margin: var(--space-3) auto 0;
  color: var(--text-2);
  font-size: var(--fs-sm);
  font-weight: 500;
  line-height: 1.45;
}

/* ==========================================================================
   16. Testimonials
   ========================================================================== */

.testimonial-placeholder {
  display: grid;
  gap: var(--space-6);
  padding: var(--space-10) var(--space-6);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-xl);
  background: var(--surface-1);
}

.testimonial-placeholder h2 {
  margin: var(--space-4) 0 0;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
}

.testimonial-placeholder > p {
  max-width: 52ch;
  margin: 0;
  color: var(--text-2);
}

/* ==========================================================================
   17. Contact & form
   ========================================================================== */

.contact-grid {
  display: grid;
  gap: var(--space-10);
}

.contact-copy > p:not(.eyebrow) {
  max-width: 44ch;
  color: var(--text-2);
  font-size: var(--fs-lg);
}

.contact-note {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  margin-top: var(--space-10);
  padding: var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface-1);
}

.contact-note strong {
  display: block;
  font-weight: 600;
}

.contact-note p {
  margin: 0;
  color: var(--text-2);
  font-size: var(--fs-base);
}

.contact-email {
  color: var(--accent);
  font-weight: 500;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-decoration-color: var(--border-accent);
  text-underline-offset: 3px;
  transition: color var(--dur) var(--ease-out),
    text-decoration-color var(--dur) var(--ease-out);
}

.contact-email:hover {
  color: var(--accent-hover);
  text-decoration-color: currentColor;
}

/* The accent frame that replaces the old full-bleed colour section. */
.contact-form {
  position: relative;
  padding: var(--space-6);
  border: 1px solid var(--border-accent);
  border-radius: var(--r-xl);
  background: linear-gradient(165deg, var(--surface-2), var(--surface-1) 55%);
  box-shadow: var(--shadow-lg);
}

.form-row {
  display: grid;
  gap: var(--space-4);
}

.field {
  margin-bottom: var(--space-4);
}

.field label {
  display: flex;
  align-items: baseline;
  gap: var(--space-1);
  margin-bottom: var(--space-2);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Sits beside the label text; only the optional flag is pushed right. */
.field .required {
  color: var(--accent);
}

.field .optional {
  margin-left: auto;
  color: var(--text-3);
  font-size: var(--fs-2xs);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: none;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xs);
  outline: 0;
  background: var(--bg-base);
  color: var(--text-1);
  font-size: var(--fs-base);
  transition: border-color var(--dur) var(--ease-out),
    box-shadow var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out);
}

.field textarea {
  min-height: 8.5rem;
  line-height: 1.6;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-3);
}

.field select {
  appearance: none;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8d96' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  background-size: 1.125rem;
  cursor: pointer;
}

/* Windows/Linux render option lists with the UA palette otherwise. */
.field option {
  background: var(--surface-2);
  color: var(--text-1);
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--border-accent);
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

.field [aria-invalid="true"] {
  border-color: var(--danger);
}

.field [aria-invalid="true"]:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 154, 139, 0.18);
}

/* Keep autofilled fields on-theme instead of the UA's white plate. */
.field input:-webkit-autofill,
.field input:-webkit-autofill:hover,
.field input:-webkit-autofill:focus,
.field textarea:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--bg-base) inset;
  -webkit-text-fill-color: var(--text-1);
  caret-color: var(--text-1);
}

.field-error {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  min-height: 1.25rem;
  margin-top: var(--space-1);
  color: var(--danger);
  font-size: var(--fs-xs);
}

/*
 * Status icons are painted as masks of `currentColor` so they inherit the
 * message colour and need no markup injected by JavaScript.
 */
.field-error::before,
.form-status::before {
  content: "";
  width: 1.1em;
  height: 1.1em;
  flex: none;
  background: currentColor;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
}

.field-error::before,
.form-status.is-error::before {
  mask-image: var(--icon-alert);
  -webkit-mask-image: var(--icon-alert);
}

.form-status::before {
  mask-image: var(--icon-check);
  -webkit-mask-image: var(--icon-check);
}

.field-error:empty::before,
.form-status:empty::before {
  content: none;
}

.field-hint {
  display: block;
  margin-top: var(--space-1);
  color: var(--text-3);
  font-size: var(--fs-xs);
}

.submit-button {
  width: 100%;
  margin-top: var(--space-2);
}

.form-status {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 1.5rem;
  margin: var(--space-4) 0 0;
  color: var(--success);
  font-size: var(--fs-base);
}

.form-status.is-error {
  color: var(--danger);
}

/* In-flight state: neutral colour and no status icon. */
.form-status.is-pending {
  color: var(--text-2);
}

.form-status.is-pending::before {
  content: none;
}

/*
 * Honeypot. Moved off-screen rather than `display: none`, which many bots
 * detect and skip. `aria-hidden` on the wrapper keeps it out of the
 * accessibility tree, and `tabindex="-1"` keeps it out of the tab order.
 */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status:empty {
  margin-top: 0;
  min-height: 0;
}

.form-privacy {
  margin: var(--space-3) 0 0;
  color: var(--text-3);
  font-size: var(--fs-xs);
  line-height: 1.6;
}

/* ==========================================================================
   18. Footer
   ========================================================================== */

.site-footer {
  padding-block: var(--space-16) var(--space-6);
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-sunken);
}

.footer-main {
  display: grid;
  gap: var(--space-10);
}

.footer-brand p {
  max-width: 32ch;
  margin: var(--space-5) 0 0;
  color: var(--text-2);
  font-size: var(--fs-base);
}

.footer-column {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
}

.footer-heading {
  margin-bottom: var(--space-3);
  color: var(--text-3);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.footer-column a,
.footer-column p {
  margin: 0;
  color: var(--text-2);
  font-size: var(--fs-base);
}

.footer-column a {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 2.5rem;
  transition: color var(--dur) var(--ease-out);
}

.footer-email {
  overflow-wrap: anywhere;
}

.footer-email .icon {
  color: var(--accent);
}

.footer-column a:hover {
  color: var(--accent);
}

.footer-column p {
  padding-block: 0.4rem;
}

.footer-bottom {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-12);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-subtle);
  color: var(--text-3);
  font-size: var(--fs-xs);
}

.footer-bottom p {
  margin: 0;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.trademark-notice {
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border-subtle);
  color: var(--text-3);
  font-size: var(--fs-xs);
  line-height: 1.6;
}

.trademark-notice p {
  margin: 0 0 var(--space-2);
  max-width: 100ch;
}

.trademark-notice a {
  color: var(--text-2);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--dur) var(--ease-out);
}

.trademark-notice a:hover {
  color: var(--accent);
}

/* ==========================================================================
   19. Motion & reveal
   ========================================================================== */

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/*
 * `.stagger` moves the animation from the container onto its children so a
 * grid resolves item by item. The container itself stays put.
 */
.js .reveal.stagger {
  opacity: 1;
  transform: none;
}

.js .reveal.stagger > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

.js .reveal.stagger.is-visible > * {
  opacity: 1;
  transform: none;
}

.js .stagger > *:nth-child(2) { --reveal-delay: 70ms; }
.js .stagger > *:nth-child(3) { --reveal-delay: 140ms; }
.js .stagger > *:nth-child(4) { --reveal-delay: 70ms; }
.js .stagger > *:nth-child(5) { --reveal-delay: 140ms; }
.js .stagger > *:nth-child(6) { --reveal-delay: 210ms; }

/* ==========================================================================
   20. Responsive
   ========================================================================== */

@media (min-width: 480px) {
  .hero-foot {
    align-items: center;
    flex-direction: row;
    gap: var(--space-4);
  }

  .hero-foot .rule {
    display: block;
  }

  .form-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .success-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .success-metrics > li:nth-child(odd) {
    border-right: 0;
  }

  .success-metrics > li:not(:last-child) {
    border-right: 1px solid var(--border);
  }

  .success-metrics > li:nth-child(n + 3) {
    border-top: 0;
  }
}

@media (min-width: 768px) {
  :root {
    --header-h: 76px;
  }

  .numbered-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-6);
  }

  .stack-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .stack-list li {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    min-height: 5rem;
  }

  .panel {
    padding: var(--space-10);
  }

  .testimonial-placeholder {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: center;
    padding: var(--space-12);
  }

  .testimonial-placeholder h2 {
    margin-top: var(--space-4);
  }

  .contact-form {
    padding: var(--space-10);
  }

  .portfolio-mosaic {
    aspect-ratio: 2 / 1;
    --mosaic-fade: 9%;
  }

  .footer-main {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
  }
}

/*
 * Two-column layouts only engage at 1024px. Below that every panel stays
 * single-column, which is what previously caused clipped headings between
 * 820px and 1000px.
 */
@media (min-width: 1024px) {
  .menu-toggle {
    display: none;
  }

  .primary-nav,
  .js .primary-nav {
    position: static;
    display: flex;
    max-height: none;
    align-items: center;
    gap: var(--space-1);
    overflow: visible;
    padding: 0;
    border: 0;
    background: transparent;
    opacity: 1;
    visibility: visible;
  }

  .primary-nav .nav-link {
    min-height: 2.5rem;
    padding-inline: var(--space-3);
    font-size: var(--fs-base);
  }

  .primary-nav .nav-link::after {
    bottom: 0.15rem;
  }

  .nav-cta {
    margin-top: 0;
    margin-left: var(--space-3);
  }

  .hero {
    padding-top: calc(var(--header-h) + var(--space-20));
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: var(--space-8);
  }

  .split-intro,
  .section-heading {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: var(--space-16);
  }

  .split-intro .intro-copy {
    padding-top: var(--space-10);
  }

  .section-heading > .eyebrow {
    align-self: start;
    margin-top: var(--space-3);
  }

  .services-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .why-grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: var(--space-20);
  }

  .why-copy {
    position: sticky;
    top: calc(var(--header-h) + var(--space-8));
    align-self: start;
  }

  .numbered-rows > li {
    grid-template-columns: 3rem minmax(0, 1fr);
  }

  .numbered-steps > li {
    grid-template-columns: 3.5rem minmax(0, 1fr) 9rem;
    gap: var(--space-8);
    align-items: start;
    padding-block: var(--space-8);
  }

  .numbered-steps .step-tag {
    grid-column: 3;
    justify-self: end;
    padding-top: 0.45rem;
    text-align: right;
  }

  .project-visual {
    min-height: 32rem;
  }

  .project-phone {
    width: 16rem;
    padding: 3.5rem 1.4rem 1.5rem;
  }

  .project-phone strong {
    font-size: 1.875rem;
  }

  .project-phone i {
    width: 8rem;
    height: 8rem;
  }

  .store-shell {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--space-14);
  }

  .stack-shell {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: var(--space-16);
  }

  .contact-grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: var(--space-16);
    align-items: start;
  }

  .footer-main {
    grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr));
    gap: var(--space-12);
  }

  .footer-brand {
    grid-column: auto;
  }
}

@media (min-width: 1280px) {
  .services-grid,
  .numbered-cards {
    gap: var(--space-5);
  }

  .service-card {
    padding: var(--space-8);
  }

  .numbered-cards > li {
    padding: var(--space-8);
  }
}

@media (min-width: 1536px) {
  :root {
    --container: 1320px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */

@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;
    scroll-behavior: auto !important;
  }

  .js .reveal,
  .js .reveal.stagger > * {
    opacity: 1;
    transform: none;
  }
}
