/* ==========================================================================
   LuxeLocale — design system
   Dark-first. One accent. All colors, spacing, and type sizes are tokens —
   retheme the site from this block alone.
   ========================================================================== */

:root {
  /* ---- Color ---- */
  --bg:             #09090b;   /* page background */
  --bg-raised:      #101014;   /* cards, form panel */
  --bg-inset:       #0d0d10;   /* inputs, screenshot wells */
  --border:         rgba(255, 255, 255, 0.08);
  --border-strong:  rgba(255, 255, 255, 0.16);

  --text-primary:   #f4f4f5;   /* headings, emphasized text */
  --text-secondary: #a1a1aa;   /* body copy — 7.5:1 on --bg */
  --text-tertiary:  #82828c;   /* meta text — 5.2:1 on --bg */

  --accent:         #4f46e5;   /* filled CTAs — white text passes 4.5:1 */
  --accent-hover:   #6366f1;
  --accent-text:    #818cf8;   /* links, eyebrows, focus — 6.5:1 on --bg */
  --success:        #4ade80;
  --error:          #f87171;

  --frame:          #1c1c21;   /* device bezel */

  /* ---- Type scale (minor third, fluid at the top end) ---- */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display",
               "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --text-xs:      0.8125rem;                            /* 13px — eyebrows, meta */
  --text-sm:      0.9375rem;                            /* 15px — card copy, nav */
  --text-base:    1.0625rem;                            /* 17px — body */
  --text-lg:      1.1875rem;                            /* 19px — lede paragraphs */
  --text-xl:      1.375rem;                             /* 22px — card titles */
  --text-h2:      clamp(1.875rem, 1.25rem + 2.5vw, 2.75rem);
  --text-h1:      clamp(2.25rem,  1.5rem + 3vw,   3.5rem);
  --text-display: clamp(2.625rem, 1.5rem + 5vw,   4.5rem);

  --leading-body: 1.6;
  --tracking-tight: -0.022em;
  --tracking-display: -0.035em;
  --measure: 65ch;

  /* ---- Spacing (8px scale) ---- */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 2.5rem;
  --space-6: 3rem;
  --space-8: 4rem;
  --space-12: 6rem;
  --section-pad: clamp(3.5rem, 2.5rem + 2vw, 5rem);  /* 56px → 80px */

  /* ---- Chrome ---- */
  --container: 72rem;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --nav-height: 4.75rem;

  /* ---- Motion system ----
     Three speeds, two curves. Micro = hover feedback, base = most transitions,
     slow = reveals and media. Nothing bounces; --ease-out-soft decelerates
     hard then settles (engineered, not springy). */
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);        /* standard ease-out */
  --ease-out-soft: cubic-bezier(0.22, 1, 0.36, 1);     /* strong deceleration */
  --speed-micro: 150ms;
  --speed: 200ms;
  --speed-slow: 400ms;
  --stagger: 60ms;
}

/* ==========================================================================
   Reset & base
   ========================================================================== */

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

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  color: var(--text-primary);
  line-height: 1.12;
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}

p { max-width: var(--measure); }

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

a {
  color: var(--accent-text);
  text-decoration: none;
}

/* Visible keyboard focus everywhere; invisible for mouse clicks */
:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: rgba(79, 70, 229, 0.35); color: var(--text-primary); }

/* Filmic grain: inline SVG turbulence tiled across the page at ~3% opacity.
   Costs zero requests and kills the "flat digital black" look. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Anchored sections land below the fixed nav */
section[id] { scroll-margin-top: calc(var(--nav-height) + 1rem); }

/* Skip link: hidden until keyboard-focused */
.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 50%;
  transform: translate(-50%, -300%);
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: 500;
}
.skip-link:focus-visible { transform: translate(-50%, 0); }

/* ==========================================================================
   Layout primitives
   ========================================================================== */

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-3);
}

.section { padding-block: var(--section-pad); }

/* Section intro: eyebrow / heading / subcopy */
.eyebrow {
  color: var(--accent-text);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-head { max-width: 36rem; margin-inline: auto; text-align: center; }
.section-head .eyebrow { margin-bottom: var(--space-2); }
.section-head h2 { font-size: var(--text-h2); }
.section-head p { margin: var(--space-2) auto 0; }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  padding: 0.8125rem 1.75rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: 500;
  transition: background-color var(--speed) var(--ease),
              border-color var(--speed) var(--ease),
              transform var(--speed-micro) var(--ease);
}
.btn:active { transform: scale(0.97); }   /* distinct press compression */
.btn svg { width: 1em; height: 1em; flex-shrink: 0; }

/* Fill sweep: a soft light band crosses the button on hover (transform-only) */
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.18) 50%, transparent 65%);
  transform: translateX(-101%);
}
.btn:hover::before { transition: transform 500ms var(--ease-out-soft); transform: translateX(101%); }
.btn > * { position: relative; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 0 rgba(79, 70, 229, 0);
  /* box-shadow here is the one deliberate exception to transform/opacity-only:
     a 200ms glow on a ~40px-tall element — imperceptible cost */
  transition: background-color var(--speed) var(--ease),
              box-shadow var(--speed) var(--ease),
              transform var(--speed-micro) var(--ease);
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 28px 2px rgba(79, 70, 229, 0.4);
}

.btn-secondary {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text-primary);
}
.btn-secondary:hover { border-color: rgba(255, 255, 255, 0.32); }

/* App Store pill — compact variant */
.btn-store {
  background: var(--text-primary);
  color: var(--bg);
  padding: 0.625rem 1.25rem;
  font-size: var(--text-sm);
}
.btn-store:hover { background: #fff; }
.btn-store svg { width: 1.05em; height: 1.05em; }

/* ==========================================================================
   Navigation
   ========================================================================== */

/* Transparent at the top; once scrolled past ~80px the bar becomes solid and a
   soft gradient scrim below it lets content dissolve into the header — no hard
   edge, no blur. */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  background: rgba(9, 9, 11, 0);
  transition: background-color var(--speed) var(--ease);
}
.nav::after {
  content: "";
  position: absolute;
  inset: 100% 0 auto;
  height: 36px;
  background: linear-gradient(to bottom, var(--bg), transparent);
  opacity: 0;
  transition: opacity var(--speed) var(--ease);
  pointer-events: none;
}
.nav.is-scrolled { background: var(--bg); }
.nav.is-scrolled::after { opacity: 1; }

.nav-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-3);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo { display: inline-flex; color: var(--text-primary); }
.logo-mark { height: 3.25rem; width: auto; display: block; }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--text-sm);
  font-weight: 500;
}
.nav-links a { color: var(--text-secondary); transition: color 150ms var(--ease); }
.nav-links a:hover { color: var(--text-primary); }
.nav-links .btn { color: #fff; padding: 0.5rem 1.25rem; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: var(--space-1);
  margin-right: calc(var(--space-1) * -1);
  color: var(--text-secondary);
  cursor: pointer;
}
.nav-toggle:hover { color: var(--text-primary); }
.nav-toggle svg { width: 1.5rem; height: 1.5rem; display: block; }

.nav-mobile {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.nav-mobile-links {
  display: flex;
  flex-direction: column;
  padding: var(--space-2) var(--space-3) var(--space-3);
  font-size: var(--text-base);
  font-weight: 500;
}
.nav-mobile-links a {
  color: var(--text-secondary);
  padding: 0.75rem 0.25rem;
  border-bottom: 1px solid var(--border);
  transition: color 150ms var(--ease);
}
.nav-mobile-links a:last-child { border-bottom: 0; }
.nav-mobile-links a:hover { color: var(--text-primary); }

@media (max-width: 767px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-mobile.is-open { display: block; }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: var(--nav-height);
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}

/* Ambient layer stack (bottom → top):
   .hero-mesh   — animated CSS gradient mesh, always present, instant paint
   video        — generated ambient loop, faded in by JS once it can play
   .hero-scrim  — contrast guarantee: text always reads ≥ 4.5:1 over media */
.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.hero-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;         /* one 16:9 master covers every viewport, incl. 9:16 */
  opacity: 0;
  transition: opacity 800ms var(--ease);
}
.hero-media video.is-playing { opacity: 0.5; }

.hero-mesh {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(38% 45% at 30% 28%, rgba(79, 70, 229, 0.16), transparent 70%),
    radial-gradient(30% 38% at 72% 40%, rgba(129, 140, 248, 0.08), transparent 70%),
    radial-gradient(45% 50% at 50% 85%, rgba(79, 70, 229, 0.07), transparent 70%);
  animation: mesh-drift 36s var(--ease) infinite alternate;
}
@keyframes mesh-drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to   { transform: translate3d(2%, 2%, 0) scale(1.08); }
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(9, 9, 11, 0.5) 0%, rgba(9, 9, 11, 0.35) 40%, var(--bg) 100%);
}

.hero-inner { max-width: 52rem; padding-inline: var(--space-3); }
.hero .eyebrow { margin-bottom: var(--space-3); }
.hero h1 {
  font-size: var(--text-display);
  font-weight: 700;
  letter-spacing: var(--tracking-display);
}
.hero-sub {
  margin: var(--space-3) auto 0;
  max-width: 34rem;
  font-size: var(--text-lg);
}
.hero-actions {
  margin-top: var(--space-5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
}

/* Sub-page hero (portfolio.html) */
.hero-compact {
  padding: calc(var(--nav-height) + var(--space-8)) 0 var(--space-8);
  text-align: center;
  background:
    radial-gradient(640px 320px at 50% -5%, rgba(79, 70, 229, 0.12), transparent 70%);
}
.hero-compact h1 { font-size: var(--text-h1); font-weight: 700; }
.hero-compact .eyebrow { margin-bottom: var(--space-2); }
.hero-compact p { margin: var(--space-2) auto 0; max-width: 36rem; font-size: var(--text-lg); }

/* ==========================================================================
   Device frame — screenshots are the hero of each card
   ========================================================================== */

.device {
  position: relative;
  width: var(--device-w, 232px);
  aspect-ratio: 9 / 19;
  flex-shrink: 0;
  border-radius: 34px;
  padding: 7px;                          /* bezel */
  background: #000;
  border: 1px solid var(--frame);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04),
              0 24px 48px -24px rgba(0, 0, 0, 0.8);
}
.device::before {                        /* Dynamic Island */
  content: "";
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 26%;
  height: 20px;
  background: #000;
  border-radius: 999px;
  z-index: 2;
}
.device img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 27px;
}

/* ==========================================================================
   Portfolio cards (index)
   ========================================================================== */

.work-grid {
  margin-top: var(--space-8);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  align-items: stretch;                  /* equal card heights */
}

.work-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--speed) var(--ease),
              border-color var(--speed) var(--ease);
}
.work-card:hover {
  transform: translateY(-4px);           /* slight lift, border brighten */
  border-color: var(--border-strong);
}

/* App-icon well: the store icon is the hero, centered and elevated */
.work-card-media {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6) var(--space-4);
  background:
    radial-gradient(130% 100% at 50% 0%, rgba(79, 70, 229, 0.10), transparent 60%);
  border-bottom: 1px solid var(--border);
}
.app-icon {
  width: 7rem;
  height: 7rem;
  border-radius: 1.5rem;                 /* iOS-style squircle-ish corner */
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 32px -16px rgba(0, 0, 0, 0.85);
  transition: transform var(--speed-slow) var(--ease-out-soft);
}
.work-card:hover .app-icon { transform: translateY(-2px) scale(1.05); }

.work-card-body {
  flex: 1;                               /* pins the App Store row to a shared baseline */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: var(--space-3) var(--space-3) var(--space-4);
  text-align: left;
}
.work-card-body h3 {
  font-size: var(--text-xl);
  font-weight: 600;
}
.work-card-body p {
  margin-block: var(--space-1) var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}
.work-card-body .btn { margin-top: auto; align-self: center; }  /* pinned to a shared baseline, centered */

.work-more { margin-top: var(--space-6); text-align: center; }

@media (max-width: 1023px) {
  .work-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 639px) {
  .work-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Services — numbered, hairline-ruled, no decoration
   ========================================================================== */

.services-grid {
  margin-top: var(--space-8);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}

.service {
  border-top: 1px solid var(--border-strong);
  padding-top: var(--space-3);
}

/* Generated abstract mark, hanging from the hairline rule. */
.service-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: var(--space-3);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  /* faint accent-lit surface so the tile has depth, not a black hole */
  background:
    radial-gradient(120% 120% at 30% 20%, rgba(79, 70, 229, 0.18), transparent 70%),
    var(--bg-raised);
}
.service-icon svg {
  width: 1.75rem;
  height: 1.75rem;
  stroke: var(--accent-text);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  /* crisp neon glow — sharp at any DPI, unlike the downscaled raster */
  filter: drop-shadow(0 0 4px rgba(129, 140, 248, 0.5));
  transition: transform var(--speed-slow) var(--ease-out-soft);
}
.service:hover .service-icon svg { transform: scale(1.08); }

.service h3 {
  font-size: var(--text-lg);
  font-weight: 600;
}
.service p {
  margin-top: var(--space-1);
  font-size: var(--text-sm);
}

@media (max-width: 1023px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 639px) {
  .services-grid { grid-template-columns: 1fr; gap: var(--space-5); }
}

/* ==========================================================================
   About
   ========================================================================== */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: center;
}
.about-copy .eyebrow { margin-bottom: var(--space-2); }
.about-copy h2 { font-size: var(--text-h2); }
.about-copy p { margin-top: var(--space-3); font-size: var(--text-lg); }

.about-visual { display: flex; justify-content: center; }
.about-mark {
  width: min(20rem, 100%);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(80% 80% at 50% 20%, rgba(79, 70, 229, 0.12), transparent 70%),
    var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.about-mark svg { width: 7rem; height: 7rem; color: var(--text-primary); opacity: 0.9; }

@media (max-width: 1023px) {
  .about-grid { grid-template-columns: 1fr; gap: var(--space-6); }
  .about-visual { order: -1; }
  .about-mark { width: min(14rem, 100%); }
}

/* ==========================================================================
   Contact
   ========================================================================== */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: var(--space-8);
  align-items: start;
}
.contact-copy .eyebrow { margin-bottom: var(--space-2); }
.contact-copy h2 { font-size: var(--text-h2); }
.contact-copy > p { margin-top: var(--space-3); font-size: var(--text-lg); }

.contact-details {
  margin-top: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  list-style: none;
  padding: 0;
}
.contact-details li { display: flex; align-items: center; gap: var(--space-2); }
.contact-details svg { width: 1.25rem; height: 1.25rem; color: var(--accent-text); flex-shrink: 0; }
.contact-details a { color: var(--text-secondary); transition: color 150ms var(--ease); }
.contact-details a:hover { color: var(--text-primary); }

/* ---- Form ---- */
.contact-form {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.field label {
  display: block;
  margin-bottom: var(--space-1);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
}
.field input,
.field textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-inset);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font: inherit;
  font-size: var(--text-sm);
  transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease);
}
.field textarea { resize: vertical; min-height: 7.5rem; }
.field ::placeholder { color: var(--text-tertiary); }

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent-text);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3);
}

/* Inline validation — only after the user has interacted */
.field input:user-invalid,
.field textarea:user-invalid {
  border-color: var(--error);
}
.field input:user-invalid:focus,
.field textarea:user-invalid:focus {
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.25);
}

.contact-form button[type="submit"] { width: 100%; }
.contact-form button[type="submit"]:disabled { opacity: 0.6; cursor: wait; }

/* Status line: space is reserved, so showing a message never shifts layout */
.form-status {
  min-height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: 500;
  text-align: center;
}
.form-status .success { color: var(--success); }
.form-status .error { color: var(--error); }
.form-status [hidden] { display: none; }

@media (max-width: 1023px) {
  .contact-grid { grid-template-columns: 1fr; gap: var(--space-6); }
}

/* ==========================================================================
   Portfolio page — case studies
   ========================================================================== */

.case { padding-block: var(--space-12); }
.case + .case { border-top: 1px solid var(--border); }

.case-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: center;
}

/* Screenshot strip: horizontal scroll on small screens */
.case-media {
  --device-w: 200px;
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  padding-block: var(--space-2);
  scrollbar-width: none;
}
.case-media::-webkit-scrollbar { display: none; }

/* App icon above each case title */
.case-icon {
  width: 120px;
  height: 120px;
  border-radius: 1.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 34px -14px rgba(0, 0, 0, 0.85);
  margin-bottom: var(--space-3);
}
.case-copy .eyebrow { margin-bottom: var(--space-1); }
.case-copy h2 { font-size: var(--text-h2); }
.case-copy .case-lede { margin-top: var(--space-2); font-size: var(--text-lg); }

.case-block { margin-top: var(--space-4); }
.case-block h3 {
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--space-1);
}

.case-features {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.case-features li { display: flex; align-items: flex-start; gap: var(--space-1); }
.case-features svg {
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.2rem;
  color: var(--accent-text);
  flex-shrink: 0;
}

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

@media (max-width: 1023px) {
  .case-grid { grid-template-columns: 1fr; gap: var(--space-5); }
  .case-media { order: -1; }         /* screenshots first on mobile, always */
  .case-media {
    margin-inline: calc(var(--space-3) * -1);
    padding-inline: var(--space-3);
  }
}

/* Closing CTA band */
.cta-band {
  border-top: 1px solid var(--border);
  text-align: center;
}
.cta-band h2 { font-size: var(--text-h2); }
.cta-band p { margin: var(--space-2) auto 0; font-size: var(--text-lg); }
.cta-band .hero-actions { margin-top: var(--space-4); }

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  border-top: 1px solid var(--border);
  padding-block: var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.footer-logo { display: inline-flex; color: var(--text-primary); opacity: 0.85; }
.footer-logo .logo-mark { height: 2.5rem; }
.footer-links { display: flex; gap: var(--space-3); }
.footer-links a { color: var(--text-tertiary); transition: color 150ms var(--ease); }
.footer-links a:hover { color: var(--text-primary); }

@media (max-width: 639px) {
  .footer-inner { flex-direction: column; text-align: center; }
}

/* ==========================================================================
   Motion — scroll reveal + entrance. Gated on .js so content is never
   hidden without JavaScript, and fully disabled for reduced motion.
   ========================================================================== */

/* Scroll reveals: fade + 20px rise, 350ms, fired once by IntersectionObserver.
   --reveal-delay is set per-element by JS to stagger grid children 60ms apart. */
.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 350ms var(--ease-out-soft) var(--reveal-delay, 0ms),
              transform 350ms var(--ease-out-soft) var(--reveal-delay, 0ms);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Hero entrance: eyebrow → headline → subcopy → CTAs, 60ms apart */
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
.js .rise   { animation: rise 400ms var(--ease-out-soft) both; }
.js .rise-1 { animation-delay: var(--stagger); }
.js .rise-2 { animation-delay: calc(var(--stagger) * 2); }
.js .rise-3 { animation-delay: calc(var(--stagger) * 3); }

/* Reduced motion: opacity fades only — no transforms, no mesh drift, no
   sweep band. JS separately skips video autoplay and stagger delays. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-mesh { animation: none; }
  .btn::before { display: none; }
  .js .rise { animation: rise-fade 200ms var(--ease) both; }
  .js .reveal {
    transform: none;
    transition: opacity 200ms var(--ease);
  }
  .work-card:hover,
  .work-card:hover .device img,
  .service:hover .service-icon img,
  .btn:active { transform: none; }
}
@keyframes rise-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
