/* ==========================================================================
   DMG Vision — site stylesheet.

   Tokens come from the Nocturne design system, re-grounded for the light
   page theme the site uses. Everything below is written as classes with real
   :hover / :focus-visible rules; nothing relies on inline style.
   ========================================================================== */

:root {
  /* Ground and ink */
  --color-bg: #f4f5fa;
  --color-surface: #fcfcfe;
  --color-text: #232531;
  --color-accent: #5d5294;
  --color-divider: color-mix(in srgb, #232531 14%, transparent);
  /* Form controls need a boundary you can actually see: WCAG 1.4.11 asks for
     3:1 against the surface behind them, and --color-divider manages 1.31:1.
     This sits between neutral-500 and -600 at 3.25:1. */
  --color-border-control: #888ca0;

  /* Neutral ramp */
  --color-neutral-100: #f3f5fe;
  --color-neutral-200: #e4e7f5;
  --color-neutral-300: #cfd3e5;
  --color-neutral-400: #b2b6ca;
  --color-neutral-500: #9397ab;
  --color-neutral-600: #75798c;
  --color-neutral-700: #595d6c;
  --color-neutral-800: #3f424d;
  --color-neutral-900: #292b31;

  /* Accent ramp */
  --color-accent-100: #f5f4ff;
  --color-accent-200: #e7e5fe;
  --color-accent-300: #d2cefd;
  --color-accent-400: #b5abfc;
  --color-accent-500: #968ae0;
  --color-accent-600: #796cbf;
  --color-accent-700: #5d5294;
  --color-accent-800: #423a6a;
  --color-accent-900: #2b2741;

  /* The saturated band — presence, used only at full-section scale */
  --color-section: #262a60;
  --color-section-glow: #353b80;

  --font-heading: "Inter", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-xl: 16px;

  --shadow-sm: 0 0 0 1px #e4e7f5;
  --shadow-md: 0 0 0 1px #e4e7f5, 0 6px 18px rgba(35, 37, 49, 0.07);
  --shadow-lg: 0 0 0 1px #cfd3e5, 0 16px 40px rgba(35, 37, 49, 0.12);
  --shadow-lift: 0 20px 44px rgba(35, 37, 49, 0.12);

  --shell-max: 1264px;
  --shell-pad: clamp(20px, 5vw, 72px);
  --header-h: 70px;
  /* Static spacing under the fixed header. --header-h is measured at runtime
     and changes as the header shrinks, so page padding must not depend on it
     or every page nudges on first scroll. */
  --header-space: 70px;

  --ease: cubic-bezier(0.22, 0.68, 0.24, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------- reset -- */

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

html {
  scroll-behavior: smooth;
  /* the fixed header must not cover an anchored section */
  scroll-padding-top: calc(var(--header-h) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--color-text);
  text-wrap: pretty;
  background:
    radial-gradient(1100px 640px at 88% -220px, color-mix(in srgb, var(--color-accent-200) 90%, transparent), transparent 62%),
    radial-gradient(900px 700px at -12% 108%, color-mix(in srgb, #e4e7f5 70%, transparent), transparent 55%),
    var(--color-bg);
  background-repeat: no-repeat;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0;
}

p { margin: 0; }
img { display: block; max-width: 100%; }
figure { margin: 0; }

a { color: var(--color-accent); text-underline-offset: 3px; }
a:hover { color: var(--color-accent-600); }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 3px;
}
::selection { background: color-mix(in srgb, var(--color-accent) 28%, transparent); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
.skip-link:focus-visible { left: 16px; }

.shell {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding-inline: var(--shell-pad);
}

.measure { max-width: 58ch; }

/* ------------------------------------------------------- scroll progress -- */

.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 60;
  pointer-events: none;
}
.scroll-progress span {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(to right, var(--color-accent), var(--color-accent-400));
}

/* --------------------------------------------------------------- header -- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease,
    backdrop-filter 0.3s ease;
}
.site-header[data-stuck],
.site-header[data-nav-open] {
  background: rgba(247, 248, 252, 0.96);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: var(--color-neutral-200);
  box-shadow: 0 10px 30px rgba(35, 37, 49, 0.05);
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-block: 18px;
  transition: padding-block 0.3s var(--ease);
}
.site-header[data-stuck] .nav { padding-block: 12px; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  text-decoration: none;
  color: var(--color-text);
}
.brand-word {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.logo-tile { flex: none; display: block; }
.brand .logo-tile { transition: transform 0.45s var(--ease); }
.brand:hover .logo-tile { transform: rotate(-6deg) scale(1.06); }
.brand:hover .logo-rule { fill: #d2cefd; }
.logo-rule { transition: fill 0.3s ease; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  position: relative;
  color: inherit;
  text-decoration: none;
  font-size: 14px;
  padding-block: 4px;
  transition: color 0.2s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: 100% 50%;
  transition: transform 0.32s var(--ease);
}
.nav-link:hover { color: var(--color-accent); }
.nav-link:hover::after,
.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: 0 50%;
}
.nav-link[aria-current="page"] { color: var(--color-accent); }

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 10px;
  border: 1px solid var(--color-neutral-300);
  border-radius: var(--radius-md);
  background: transparent;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 1.5px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s ease;
}
.nav-toggle span + span { margin-top: 5px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ------------------------------------------------------------- buttons -- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.2;
  color: var(--color-text);
  background: transparent;
  border: 1px solid transparent;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  transition: transform 0.2s var(--ease), background 0.2s ease, color 0.2s ease,
    border-color 0.2s ease, box-shadow 0.2s ease;
}
.btn-lg { padding: 10px 18px; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary { color: var(--color-accent); border-color: var(--color-accent); }
.btn-primary:hover {
  background: color-mix(in srgb, var(--color-accent) 12%, transparent);
  color: var(--color-accent);
  box-shadow: 0 8px 20px rgba(93, 82, 148, 0.16);
}
.btn-primary:active { background: color-mix(in srgb, var(--color-accent) 22%, transparent); }

.btn-secondary { border-color: var(--color-divider); }
.btn-secondary:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); color: var(--color-text); }
.btn-secondary:active { background: color-mix(in srgb, var(--color-text) 14%, transparent); }

.btn-ghost { color: var(--color-accent); padding-inline: 6px; }
.btn-ghost:hover { background: color-mix(in srgb, var(--color-accent) 10%, transparent); transform: none; }

.btn-invert {
  background: var(--color-neutral-100);
  color: #232531;
  padding: 11px 20px;
}
.btn-invert:hover { background: #fff; color: #232531; }

.btn-outline-light {
  color: var(--color-neutral-100);
  border-color: color-mix(in srgb, #f3f5fe 45%, transparent);
  padding: 11px 20px;
}
.btn-outline-light:hover {
  background: rgba(243, 245, 254, 0.12);
  color: var(--color-neutral-100);
}

.btn-block { width: 100%; }
.btn:disabled, .btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* The arrow on a text link slides on hover. */
.link-arrow span { display: inline-block; transition: transform 0.28s var(--ease); }
.link-arrow:hover span { transform: translateX(4px); }
.ext { display: inline-block; transition: transform 0.28s var(--ease); }
.btn:hover .ext { transform: translate(2px, -2px); }

/* ---------------------------------------------------------------- tags -- */

.tag {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  letter-spacing: 0.02em;
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--color-neutral-200);
  color: var(--color-neutral-800);
  transition: transform 0.2s var(--ease), background 0.2s ease, color 0.2s ease;
}
.tag:hover {
  transform: translateY(-2px);
  background: var(--color-accent-200);
  color: var(--color-accent-800);
}
.tag-outline {
  background: transparent;
  border: 1px solid var(--color-accent);
  color: var(--color-accent);
}
.tag-outline:hover { background: color-mix(in srgb, var(--color-accent) 10%, transparent); color: var(--color-accent); }

.tag-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* -------------------------------------------------------------- kicker -- */

.kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent);
}
.kicker-inline { margin-bottom: 0; margin-right: auto; }
.kicker-rule {
  width: 44px;
  height: 1px;
  flex: none;
  background: var(--color-accent);
  transform-origin: 0 50%;
  animation: rule-in 0.9s var(--ease-out) both;
}
@keyframes rule-in { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.fade-rule {
  height: 1px;
  background: linear-gradient(to right,
    transparent, var(--color-divider) 48px,
    var(--color-divider) calc(100% - 48px), transparent);
}

/* ---------------------------------------------------------- typography -- */

.display {
  font-size: clamp(42px, 6.2vw, 84px);
  line-height: 1.08;
  letter-spacing: -0.022em;
  margin-left: -0.06em;
  max-width: 15ch;
}
.display-sm {
  font-size: clamp(40px, 5.4vw, 72px);
  line-height: 1.1;
  letter-spacing: -0.018em;
  max-width: 16ch;
}

.lede {
  font-size: 17px;
  line-height: 29px;
  max-width: 58ch;
  margin-top: 36px;
}

.statement {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.35;
  letter-spacing: -0.015em;
  max-width: 30ch;
  margin-bottom: 56px;
}
.statement-tight {
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.45;
  max-width: none;
  margin-bottom: 0;
}

.h-lg {
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  max-width: 20ch;
  margin-bottom: 28px;
}
.h-md {
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.25;
  letter-spacing: -0.012em;
  margin-bottom: 16px;
}

.body-muted {
  font-size: 15.5px;
  line-height: 28px;
  color: color-mix(in srgb, var(--color-text) 78%, transparent);
  margin-bottom: 28px;
}

.num {
  font-size: 13px;
  color: var(--color-accent);
  font-feature-settings: "tnum" 1;
}

/* ------------------------------------------------------------- sections -- */

.page-head { padding-block: calc(var(--header-space) + 84px) 56px; }
.hero { position: relative; overflow: hidden; }
.hero-inner { padding-block: calc(var(--header-space) + 96px) 84px; position: relative; }

.hero-blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
}
.hero-blob-a {
  top: -180px; right: -120px; width: 520px; height: 520px;
  background: radial-gradient(circle at 40% 40%, rgba(145, 132, 217, 0.34), rgba(145, 132, 217, 0) 68%);
  filter: blur(6px);
  animation: float-a 16s ease-in-out infinite;
}
.hero-blob-b {
  bottom: -220px; left: -160px; width: 460px; height: 460px;
  background: radial-gradient(circle at 60% 40%, rgba(93, 82, 148, 0.18), rgba(93, 82, 148, 0) 70%);
  filter: blur(8px);
  animation: float-b 20s ease-in-out infinite;
}
@keyframes float-a {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-26px, 18px, 0) scale(1.06); }
}
@keyframes float-b {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(22px, -16px, 0) scale(1.08); }
}

.proof {
  display: flex;
  gap: 14px 30px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 72px;
  padding-top: 24px;
  border-top: 1px solid var(--color-neutral-300);
}
.proof-label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 50%, transparent);
}
.proof-name {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 15px;
  transition: color 0.2s ease, transform 0.2s var(--ease);
}
.proof-name:hover { color: var(--color-accent); transform: translateY(-1px); }

/* Stat band — the one saturated field on the page. */
.stat-band {
  position: relative;
  overflow: hidden;
  background: var(--color-section);
  padding-block: 74px;
  color: #f3f5fe;
}
.stat-band-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(900px 420px at 85% -40%,
    color-mix(in srgb, var(--color-section-glow) 70%, transparent), transparent 64%);
  pointer-events: none;
}
.stat-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 42px 28px;
}
.stat-value {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(34px, 3.4vw, 50px);
  line-height: 1.1;
  margin-left: -0.055em;
  font-feature-settings: "tnum" 1;
}
.stat-label {
  font-size: 13px;
  line-height: 16px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: color-mix(in srgb, #f3f5fe 70%, transparent);
  margin-top: 14px;
}

.section-services { padding-block: 98px 28px; }
.section-work { padding-block: 84px 42px; }
.section-why { padding-block: 70px; }
.section-process { padding-block: 70px 84px; }
.section-built { padding-block: 0 84px; }
.section-cta { padding-block: 0 98px; }
.section-cta-plain { padding-block: 0 98px; }
.section-service-detail { padding-bottom: 56px; }
.section-stack { padding-block: 70px 98px; }
.section-contact { padding-block: 28px 98px; }
.section-lockups { padding-block: 28px 42px; }
.section-brand-spec { padding-block: 42px 98px; }

.section-cta-plain .fade-rule { margin-bottom: 70px; }
.section-process .fade-rule { margin-bottom: 70px; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 42px;
}

.link-row { margin-top: 42px; }

/* Numbered service list on the home page. */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  column-gap: clamp(24px, 4vw, 64px);
}
.service-row {
  border-top: 1px solid var(--color-neutral-300);
  padding-block: 20px;
  display: flex;
  gap: 20px;
  align-items: baseline;
  transition: padding-left 0.25s var(--ease), border-color 0.25s ease;
}
.service-row:hover {
  padding-left: 8px;
  border-top-color: var(--color-accent-400);
}
.service-name { font-size: 16px; line-height: 24px; }

/* Work cards. */
.work-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}
.work-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: var(--color-text);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  transform-style: preserve-3d;
  transition: transform 0.3s var(--ease), box-shadow 0.3s ease;
}
.work-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lift);
  color: var(--color-text);
}
.work-card-body { padding: 22px 22px 26px; }
.card-kicker {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 8px;
}
.work-card-title {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 19px;
  line-height: 1.25;
  margin-bottom: 8px;
}
.work-card-text {
  font-size: 14px;
  line-height: 24px;
  color: color-mix(in srgb, var(--color-text) 70%, transparent);
}
.work-card-more {
  display: inline-block;
  margin-top: 14px;
  font-size: 13px;
  color: var(--color-accent);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease);
}
.work-card:hover .work-card-more { opacity: 1; transform: translateX(0); }

/* Screenshot slot — a real image, or the designed placeholder. */
.project-shot {
  width: 100%;
  /* The width/height attributes on the <img> reserve space before it loads,
     but they also act as presentational hints. Without height:auto the 900px
     hint wins and aspect-ratio is ignored, stretching every screenshot. */
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 0;
}
.project-shot-empty {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(150deg, #2b2e44, #1d1f30 62%);
  color: var(--color-accent-300);
}
.shot-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(181, 171, 252, 0.09) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(181, 171, 252, 0.09) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(120% 100% at 50% 0%, #000 35%, transparent 78%);
}
.shot-glow {
  position: absolute;
  inset: -30% 40% 40% -20%;
  background: radial-gradient(circle, rgba(145, 132, 217, 0.4), transparent 62%);
  filter: blur(18px);
  animation: float-a 14s ease-in-out infinite;
}
.shot-mark {
  position: relative;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(34px, 6vw, 52px);
  letter-spacing: -0.03em;
  color: #f3f5fe;
  opacity: 0.92;
}
.project-figure .project-shot { border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }

/* Why panel. */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 42px clamp(24px, 5vw, 96px);
  align-items: start;
}
.why-panel {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--color-neutral-300);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.why-row {
  background: var(--color-surface);
  padding: 20px 22px;
  transition: background 0.25s ease, padding-left 0.25s var(--ease);
}
.why-row:hover { background: #f7f8fd; padding-left: 28px; }
.why-title {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 15px;
  margin-bottom: 4px;
}
.why-body {
  font-size: 14px;
  line-height: 24px;
  color: color-mix(in srgb, var(--color-text) 72%, transparent);
}

/* Stage / service rows. */
.stage-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px clamp(24px, 4vw, 72px);
  align-items: baseline;
  padding-block: 42px;
  transition: padding-left 0.3s var(--ease);
}
.stage-row:hover { padding-left: 10px; }
.stage-list .stage-row + .stage-row,
.stage-row-bordered { border-top: 1px solid var(--color-neutral-300); }
.section-service-detail .stage-row-bordered:last-child { border-bottom: 1px solid var(--color-neutral-300); }
.stage-row .num { flex: 0 0 auto; min-width: 44px; font-size: 15px; line-height: 28px; }
.stage-title {
  flex: 1 1 220px;
  font-size: 24px;
  line-height: 28px;
  letter-spacing: -0.01em;
}
.stage-body {
  flex: 3 1 300px;
  font-size: 15.5px;
  line-height: 28px;
  max-width: 52ch;
  color: color-mix(in srgb, var(--color-text) 78%, transparent);
}

/* CTA panel. */
.cta-panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: clamp(36px, 5vw, 64px);
  background: var(--color-section);
  color: #f3f5fe;
}
.cta-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(700px 320px at 88% -30%,
    color-mix(in srgb, var(--color-section-glow) 72%, transparent), transparent 66%);
  pointer-events: none;
}
.cta-panel > *:not(.cta-glow) { position: relative; }
.cta-title {
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.2;
  letter-spacing: -0.018em;
  margin-bottom: 16px;
  max-width: 18ch;
}
.cta-body {
  font-size: 16px;
  line-height: 28px;
  max-width: 56ch;
  margin-bottom: 30px;
  color: color-mix(in srgb, #f3f5fe 78%, transparent);
}

/* Services page stack. */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 42px clamp(24px, 4vw, 72px);
}
.stack-title { font-size: 17px; line-height: 28px; margin-bottom: 16px; }

/* Work page. */
.project { padding-block: 42px; }
.project:last-of-type { padding-bottom: 84px; }
.project .fade-rule { margin-bottom: 56px; }
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px clamp(24px, 5vw, 80px);
  align-items: center;
}
.project-kind {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 12px;
  font-feature-settings: "tnum" 1;
}
.project-title {
  font-size: clamp(26px, 2.8vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin-bottom: 16px;
}
.project-summary { font-size: 15.5px; line-height: 28px; margin-bottom: 16px; max-width: 52ch; }
.project-role {
  font-size: 15.5px;
  line-height: 28px;
  margin-bottom: 20px;
  max-width: 52ch;
  color: color-mix(in srgb, var(--color-text) 72%, transparent);
}
.project-tags { margin-bottom: 24px; }

/* ---------------------------------------------------------- contact page -- */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 56px clamp(24px, 5vw, 96px);
  align-items: start;
}
.contact-label {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 60%, transparent);
  margin-bottom: 12px;
}
/* The email address carries the weight the phone number used to. It is set
   smaller because it is much longer, and allowed to break rather than push the
   column wider on a narrow screen. */
.contact-email {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(21px, 2.6vw, 32px);
  line-height: 1.2;
  letter-spacing: -0.012em;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 42px;
  overflow-wrap: anywhere;
  transition: transform 0.25s var(--ease);
}
.contact-email:hover { transform: translateX(4px); }
.contact-address {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-style: normal;
  font-size: 15.5px;
  line-height: 26px;
  margin-bottom: 42px;
  color: color-mix(in srgb, var(--color-text) 78%, transparent);
}

.contact-heading { font-size: 17px; line-height: 28px; margin: 42px 0 24px; }
.next-step {
  display: flex;
  gap: 20px;
  align-items: baseline;
  padding-bottom: 20px;
}
.next-step p {
  font-size: 15.5px;
  line-height: 28px;
  max-width: 44ch;
  color: color-mix(in srgb, var(--color-text) 78%, transparent);
}
.next-step .num { flex: none; }

/* --------------------------------------------------------------- forms -- */

.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.form-card { padding: 28px; }
.form-card form { display: flex; flex-direction: column; gap: 20px; }
.form-title { font-size: 20px; line-height: 28px; }

.field { display: block; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > label, .field > legend {
  display: block;
  font-size: 12px;
  margin-bottom: 5px;
  padding: 0;
  color: color-mix(in srgb, var(--color-text) 70%, transparent);
}
.input {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  font: inherit;
  font-size: 14px;
  color: var(--color-text);
  caret-color: var(--color-accent);
  background: var(--color-surface);
  border: 1px solid var(--color-border-control);
  border-radius: var(--radius-md);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.input:hover { border-color: color-mix(in srgb, var(--color-text) 45%, transparent); }
.input:focus-visible {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 16%, transparent);
  outline: none;
}
.input-invalid { border-color: #b4443f; }
.input-invalid:focus-visible { box-shadow: 0 0 0 3px rgba(180, 68, 63, 0.16); }
textarea.input { min-height: 104px; resize: vertical; }

.field-error, .form-alert {
  font-size: 12.5px;
  line-height: 20px;
  color: #9c3a35;
  margin-top: 6px;
}
.form-alert {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(180, 68, 63, 0.08);
  border: 1px solid rgba(180, 68, 63, 0.22);
}

.radio-row { display: flex; gap: 8px 16px; flex-wrap: wrap; margin-top: 4px; }
.radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
}
.radio input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.radio .dot {
  width: 16px;
  height: 16px;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--color-border-control);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.radio:hover .dot { border-color: var(--color-accent); }
.radio input:checked + .dot {
  border-color: var(--color-accent);
  background: var(--color-accent);
  box-shadow: inset 0 0 0 4px var(--color-surface);
}
.radio input:focus-visible + .dot { outline: 2px solid var(--color-accent); outline-offset: 2px; }

.form-note, .form-sent-body {
  font-size: 12px;
  line-height: 20px;
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
}
.form-sent-body { font-size: 15px; line-height: 28px; color: color-mix(in srgb, var(--color-text) 78%, transparent); }

.form-status {
  font-size: 13px;
  line-height: 20px;
  margin: 0;
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* The submit button shows a spinner while htmx is in flight. */
.btn-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.htmx-request .btn-spinner { display: inline-block; }
.htmx-request .btn-label { opacity: 0.7; }
.form-card.htmx-request { opacity: 0.72; transition: opacity 0.2s ease; }

.form-card-sent { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.sent-mark { color: var(--color-accent); }
.sent-ring {
  stroke-dasharray: 126;
  stroke-dashoffset: 126;
  animation: draw 0.7s var(--ease-out) forwards;
}
.sent-tick {
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
  animation: draw 0.4s var(--ease-out) 0.45s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

/* htmx swaps get a short fade so the card does not snap. */
[data-swap-in] { animation: swap-in 0.4s var(--ease-out) both; }
@keyframes swap-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* ----------------------------------------------------------- brand page -- */

.lockup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.lockup { overflow: hidden; transition: transform 0.3s var(--ease), box-shadow 0.3s ease; }
.lockup:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.lockup-stage { display: grid; place-items: center; padding: 56px 24px; }
.lockup-stage-light { background: var(--color-surface); }
.lockup-stage-dark {
  padding: 40px 24px;
  background: radial-gradient(600px 300px at 80% -40%,
    color-mix(in srgb, var(--color-section-glow) 70%, transparent), transparent 64%), var(--color-section);
}
.lockup-sizes { display: flex; align-items: center; justify-content: center; gap: 28px; }
.brand-lg { gap: 14px; }
.brand-stack { flex-direction: column; gap: 14px; }
.brand-word-lg { font-size: 29px; color: #232531; }
.brand-word-reversed { font-size: 22px; color: #f3f5fe; }
.lockup-caption {
  padding: 16px 20px;
  border-top: 1px solid var(--color-neutral-300);
}
.lockup-caption p {
  font-size: 13px;
  color: color-mix(in srgb, var(--color-text) 65%, transparent);
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 42px clamp(24px, 4vw, 72px);
  margin-top: 56px;
}
.spec-title { font-size: 17px; line-height: 28px; margin-bottom: 16px; }
.spec-body { font-size: 15px; line-height: 28px; margin-bottom: 10px; }
.spec-note {
  font-size: 13px;
  line-height: 24px;
  color: color-mix(in srgb, var(--color-text) 60%, transparent);
}
.swatch-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--color-neutral-300);
}
.swatch {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  flex: none;
  box-shadow: inset 0 0 0 1px rgba(35, 37, 49, 0.12);
  transition: transform 0.25s var(--ease);
}
.swatch-row:hover .swatch { transform: scale(1.12); }
.swatch-label { font-size: 14px; font-feature-settings: "tnum" 1; }

/* --------------------------------------------------------------- footer -- */

.site-footer { border-top: 1px solid var(--color-neutral-300); }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 40px clamp(24px, 4vw, 56px);
  padding-block: 56px 36px;
}
.footer-brand { min-width: 200px; }
.footer-brand .brand { margin-bottom: 14px; }
.footer-blurb {
  font-size: 14px;
  line-height: 24px;
  max-width: 30ch;
  color: color-mix(in srgb, var(--color-text) 65%, transparent);
}
.footer-heading {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 50%, transparent);
  margin-bottom: 14px;
}
.footer-links { display: flex; flex-direction: column; gap: 9px; font-size: 14px; }
.footer-links a {
  color: var(--color-text);
  text-decoration: none;
  width: fit-content;
  transition: color 0.2s ease, transform 0.2s var(--ease);
}
.footer-links a:hover { color: var(--color-accent); transform: translateX(3px); }
.footer-email {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}
.footer-address {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 16px;
  font-style: normal;
  font-size: 13px;
  line-height: 20px;
  color: color-mix(in srgb, var(--color-text) 62%, transparent);
}

.footer-base { border-top: 1px solid var(--color-neutral-300); }
.footer-base-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding-block: 18px 40px;
  font-size: 13px;
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
}
.footer-base-right { margin-left: auto; }

/* --------------------------------------------------------------- motion -- */

/* Scroll reveal. JS adds data-reveal-armed before observing, so a page with
   JS off never hides anything. */
[data-reveal-armed] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.72s var(--ease), transform 0.72s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal-armed][data-revealed] { opacity: 1; transform: none; }

/* Word-by-word entrance for the big headings. */
.word { display: inline-block; }
.word-inner {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.5em);
  animation: word-up 0.8s var(--ease-out) forwards;
  animation-delay: var(--word-delay, 0ms);
}
@keyframes word-up { to { opacity: 1; transform: none; } }

/* Applied only once the element has revealed, so this does not override the
   reveal's own opacity/transform transition and cancel the stagger. */
[data-tilt][data-revealed],
[data-tilt]:not([data-reveal]) {
  transition: transform 0.3s var(--ease), box-shadow 0.3s ease;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal-armed] { opacity: 1; transform: none; }
  .word-inner { opacity: 1; transform: none; }
  .hero-blob, .shot-glow { animation: none; }
}

/* ------------------------------------------------------------ responsive -- */

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav { flex-wrap: wrap; }
  .nav-links {
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s var(--ease), opacity 0.25s ease;
    opacity: 0;
  }
  .nav-links[data-open] {
    /* Leave room for the header row itself, and let the panel scroll rather
       than shear the last item off in landscape. */
    max-height: calc(100dvh - 84px);
    overflow-y: auto;
    overscroll-behavior: contain;
    opacity: 1;
    padding-block: 12px;
  }
  .nav-link {
    padding: 12px 2px;
    border-bottom: 1px solid var(--color-neutral-200);
  }
  .nav-link::after { display: none; }
  .nav-cta { margin-top: 14px; align-self: flex-start; }
}

@media (max-width: 640px) {
  .hero-inner { padding-top: calc(var(--header-space) + 56px); padding-bottom: 56px; }
  .page-head { padding-top: calc(var(--header-space) + 56px); }
  .proof { margin-top: 48px; }
  .stage-row { padding-block: 28px; }
  .stage-title { font-size: 21px; }
  .section-services { padding-top: 64px; }
  .form-card { padding: 22px; }
  .footer-base-right { margin-left: 0; }
}
