/* ========================================================
   Fat Elephant — Design System
   ======================================================== */

/* ---------- Spatial page transitions (progressive enhancement) ---------- */

@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: 220ms ease-out both fe-page-out;
}

::view-transition-new(root) {
  animation: 260ms ease-in both fe-page-in;
}

@keyframes fe-page-out {
  to {
    opacity: 0;
    transform: translateY(-14px) scale(0.99);
  }
}

@keyframes fe-page-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.99);
  }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}

/* Coco Gothic by Zetafonts — CC BY-NC trial files, not licensed for commercial/production use.
   A commercial license must be purchased at zetafonts.com/collection/358 before this ships live. */
@font-face {
  font-family: "Coco Gothic";
  src: url("../assets/fonts/CocoGothic-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Coco Gothic";
  src: url("../assets/fonts/CocoGothic-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --cream: #fffdee;
  --mint: #e2fbce;
  --lime: #e3ef26;
  --teal: #076653;
  --teal-dark: #0c342c;
  --teal-darkest: #06231d;

  --ink: #0c342c;
  --ink-soft: #3f5952;
  --border-soft: rgba(12, 52, 44, 0.12);

  --bg: var(--cream);
  --surface: #ffffff;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 28px;

  --shadow-soft: 0 20px 40px -20px rgba(6, 35, 29, 0.25);
  --shadow-card: 0 10px 30px -12px rgba(6, 35, 29, 0.18);

  --container: 1180px;

  --font-display: "Sora", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-hand: "Caveat", "Segoe Script", cursive;
  --font-coco: "Coco Gothic", var(--font-display);
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 96px 0;
}

@media (max-width: 720px) {
  section {
    padding: 64px 0;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  background: var(--mint);
  padding: 8px 16px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.eyebrow--on-dark {
  color: var(--lime);
  background: rgba(227, 239, 38, 0.12);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 30px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--lime);
  color: var(--teal-darkest);
  box-shadow: 0 10px 24px -10px rgba(227, 239, 38, 0.7);
}

.btn-primary:hover {
  box-shadow: 0 16px 30px -10px rgba(227, 239, 38, 0.85);
}

.btn-outline {
  background: transparent;
  color: var(--teal-dark);
  border-color: var(--border-soft);
}

.btn-outline:hover {
  border-color: var(--teal);
  background: var(--mint);
}

.btn-outline.on-dark {
  color: var(--cream);
  border-color: rgba(255, 253, 238, 0.35);
}

.btn-outline.on-dark:hover {
  background: rgba(255, 253, 238, 0.1);
  border-color: var(--lime);
}

.btn-block {
  width: 100%;
}

/* ---------- Navbar ---------- */

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 253, 238, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}

.navbar .container {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.nav-logo {
  display: flex;
  align-items: center;
  justify-self: center;
}

.nav-logo img {
  height: 50px;
  width: auto;
}

@media (max-width: 480px) {
  .nav-logo img {
    height: 40px;
  }
}

.nav-menu {
  position: relative;
  justify-self: start;
}

.nav-menu-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 1.5px solid var(--border-soft);
  border-radius: 999px;
  padding: 10px 18px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--teal-dark);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.nav-menu-trigger:hover,
.nav-menu-trigger[aria-expanded="true"] {
  border-color: var(--teal);
  background: var(--mint);
  color: var(--teal);
}

.nav-menu-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  min-width: 200px;
  margin: 0;
  padding: 10px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  display: grid;
  gap: 2px;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-dropdown.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-dropdown a {
  display: block;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink-soft);
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-dropdown a:hover {
  background: var(--mint);
  color: var(--teal);
}

/* Fat Build stands out in the menu: bold, in the same lime as "Big" and "Fat" in the hero */
.nav-dropdown a[href="build.html"] {
  font-weight: 800;
  color: var(--lime);
}

.nav-dropdown a.active {
  background: var(--mint);
  color: var(--teal);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-self: end;
}

.social-link.nav-social {
  width: 36px;
  height: 36px;
  margin-top: 0;
  background: var(--mint);
  color: var(--teal);
}

.social-link.nav-social:hover {
  background: var(--teal);
  color: var(--cream);
}

@media (max-width: 480px) {
  .nav-menu-trigger span {
    display: none;
  }

  .nav-menu-trigger {
    padding: 10px;
  }
}

@media (max-width: 860px) {
  .nav-right .btn,
  .nav-right .nav-social {
    display: none;
  }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-top: 84px;
  padding-bottom: 96px;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  z-index: 0;
}

.hero::before {
  width: 420px;
  height: 420px;
  background: var(--lime);
  opacity: 0.35;
  top: -140px;
  right: -100px;
  transform: translateY(var(--blob-shift-1, 0px));
  will-change: transform;
}

.hero::after {
  width: 380px;
  height: 380px;
  background: var(--teal);
  opacity: 0.18;
  bottom: -160px;
  left: -120px;
  transform: translateY(var(--blob-shift-2, 0px));
  will-change: transform;
}

.hero .container {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}

.hero .doodle-title {
  margin: 0 0 0.3em;
  font-family: var(--font-display);
  font-size: clamp(3.3rem, 9.2vw, 7.6rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--teal-darkest);
  user-select: none;
}

.fe-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Interactive doodle type: lime letters with pen-style overlays that swap on hover / tap */

.dt-line {
  display: block;
  white-space: nowrap;
}

.dt-letter {
  position: relative;
  display: inline-block;
  color: var(--lime);
  -webkit-text-stroke: 0.05em var(--teal-darkest);
  paint-order: stroke fill;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.dt-letter:hover {
  transform: translateY(-0.04em) rotate(-3deg) scale(1.04);
}

.dt-letter::before,
.dt-letter::after {
  content: attr(data-char);
  position: absolute;
  inset: 0;
  pointer-events: none;
  color: transparent;
  -webkit-text-stroke: 0.022em var(--teal-darkest);
  opacity: 0;
  filter: url(#fe-rough);
}

.dt-letter[data-v="1"]::before {
  opacity: 1;
  transform: translate(0.05em, -0.04em);
}

.dt-letter[data-v="2"]::before {
  opacity: 1;
  transform: translate(0.05em, -0.04em) rotate(1deg);
}

.dt-letter[data-v="2"]::after {
  opacity: 1;
  transform: translate(0.1em, -0.08em) rotate(2deg);
}

.dt-letter[data-v="3"]::before {
  opacity: 1;
  -webkit-text-stroke: 0;
  background: repeating-linear-gradient(135deg, var(--teal-darkest) 0 2px, transparent 2px 9px);
  -webkit-background-clip: text;
  background-clip: text;
}

.dt-dot {
  display: inline-block;
  width: 0.3em;
  height: 0.3em;
  margin-left: 0.07em;
  vertical-align: baseline;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.dt-dot:hover {
  transform: rotate(20deg) scale(1.2);
}

.dt-dot svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: var(--lime);
  stroke: var(--teal-darkest);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: url(#fe-rough);
}

.dt-dot svg > * {
  display: none;
}

.dt-dot[data-v="0"] .d0,
.dt-dot[data-v="1"] .d1,
.dt-dot[data-v="2"] .d2,
.dt-dot[data-v="3"] .d3 {
  display: inline;
}

.dt-dot .d1 path,
.dt-dot .d2,
.dt-dot .d3 {
  fill: none;
}

.dt-letter.is-drawing::before,
.dt-letter.is-drawing::after,
.dt-dot.is-drawing svg {
  animation: dt-redraw 0.55s ease-out both;
}

@keyframes dt-redraw {
  from { clip-path: inset(-30% 100% -30% -30%); }
  to { clip-path: inset(-30% -30% -30% -30%); }
}

@media (prefers-reduced-motion: reduce) {
  .dt-letter,
  .dt-dot {
    transition: none;
  }

  .dt-letter.is-drawing::before,
  .dt-letter.is-drawing::after,
  .dt-dot.is-drawing svg {
    animation: none;
  }
}

.hero .doodle-title .coco-regular {
  font-family: var(--font-coco);
  font-weight: 400;
}

.hero .doodle-title .coco-bold {
  font-family: var(--font-coco);
  font-weight: 700;
}

/* The descriptive line search engines and screen readers read as the page heading */
.hero .hero-h1 {
  max-width: 30ch;
  margin: 0 auto 14px;
  font-size: clamp(1.2rem, 2.1vw, 1.65rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--teal-darkest);
}

.hero-lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 52ch;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 28px;
}

/* ---------- Trusted-by (floating logos) ---------- */

.trusted-by {
  position: relative;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  padding: 44px 0;
  overflow: hidden;
}

.trusted-by .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

/* "Our Clients" sits in a pill, like the other section labels */
.trusted-by-label {
  padding: 8px 18px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  background: var(--mint);
  white-space: nowrap;
}

.trusted-by-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 56px;
  min-width: 0;
}

.trusted-by-logos a,
.trusted-by-logos .client {
  display: inline-flex;
  align-items: center;
}

.trusted-by-logos img {
  height: 34px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  filter: brightness(1);
  transition: transform 0.3s ease, filter 0.3s ease;
  animation: float-logo 5s ease-in-out infinite;
}

.trusted-by-logos img.is-wisdomx {
  height: 44px;
}

/* Tall, portrait logo: needs more height to stay readable */
.trusted-by-logos img.is-gandhi {
  height: 86px;
}

@media (max-width: 640px) {
  .trusted-by .trusted-by-logos {
    gap: 20px 22px;
  }

  .trusted-by-logos img.is-gandhi {
    height: 76px;
  }
}

.trusted-by-logos img:hover {
  animation: none;
  transform: translateY(-5px) scale(1.08);
  filter: brightness(1.08);
}

.trusted-by-logos img:nth-child(2) {
  animation-delay: -2.5s;
}

@keyframes float-logo {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .trusted-by-logos img {
    animation: none;
  }
}

/* ---------- Section headers ---------- */

.section-head {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.section-head p {
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.section-head.left {
  margin: 0 0 56px;
  text-align: left;
}

/* ---------- Services: pixel stage (home) ---------- */

.services {
  --nav-h: 76px;
  --footer-h: 56px;
  --step: 55vh;
  --stage-h: calc(100vh - var(--nav-h));
  --art: clamp(260px, 56vh, 440px);
  --grid-line: rgba(12, 52, 44, 0.08);
}

.px {
  display: block;
  width: 100%;
  height: 100%;
}

.px-k { fill: var(--teal-darkest); }
.px-t { fill: var(--teal); }
.px-l { fill: var(--lime); }
.px-m { fill: var(--mint); }
.px-w { fill: var(--surface); }

/* Default / small screens / reduced motion: a calm stacked list */

.service-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.service-item {
  display: grid;
  grid-template-columns: var(--box, 96px) 1fr;
  column-gap: 24px;
  align-items: start;
  padding: 28px 0;
  border-top: 1px solid var(--border-soft);
}

.service-item:last-child {
  border-bottom: 1px solid var(--border-soft);
}

@media (min-width: 600px) {
  .service-item {
    --box: 120px;
  }
}

.service-art {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: var(--box, 96px);
  height: var(--box, 96px);
  padding: calc(var(--box, 96px) / 6);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: calc(var(--box, 96px) / 24) calc(var(--box, 96px) / 24);
  box-shadow: 0 0 0 1px var(--border-soft);
}

.service-head {
  grid-column: 2;
  grid-row: 1;
}

.service-index {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--teal);
}

.service-title {
  margin: 0 0 8px;
  font-size: 1.3rem;
}

.service-copy {
  grid-column: 2;
  grid-row: 2;
}

.service-copy p {
  margin: 0 0 10px;
  color: var(--ink-soft);
}

.service-link {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--teal);
}

.service-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.stage-line,
.stage-frame,
.stage-footer {
  display: none;
}

/* Desktop with motion: scroll-driven stage (class added by main.js) */

.services.has-stage .stage-track {
  height: calc(var(--stage-h) + var(--steps, 6) * var(--step));
}

.services.has-stage .stage {
  position: sticky;
  top: var(--nav-h);
  height: var(--stage-h);
  min-height: 520px;
  overflow: hidden;
}

.services.has-stage .stage-inner {
  position: relative;
  height: calc(100% - var(--footer-h));
}

.services.has-stage .service-list {
  position: absolute;
  inset: 0 24px;
}

.services.has-stage .stage-frame {
  display: block;
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--art);
  height: var(--art);
  transform: translate(-50%, -50%);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: calc(var(--art) / 24) calc(var(--art) / 24);
  box-shadow: inset 0 0 0 1px var(--grid-line);
}

.services.has-stage .service-item {
  position: absolute;
  inset: 0;
  display: block;
  padding: 0;
  border: 0;
  pointer-events: none;
}

.services.has-stage .service-head {
  position: absolute;
  left: 0;
  top: 50%;
  width: min(34%, 440px);
  opacity: 0;
  transform: translateY(calc(-50% + var(--d, 0) * 11rem));
  transition: transform 0.85s cubic-bezier(0.22, 0.8, 0.2, 1), opacity 0.6s ease;
}

.services.has-stage .service-item.is-active .service-head {
  opacity: 1;
}

.services.has-stage .service-item.is-prev .service-head {
  opacity: 0.18;
}

.services.has-stage .service-index {
  margin-bottom: 14px;
}

.services.has-stage .service-title {
  margin: 0;
  font-size: clamp(1.9rem, 3vw, 2.8rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--teal-darkest);
}

.services.has-stage .service-art {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--art) * 2 / 3);
  height: calc(var(--art) * 2 / 3);
  padding: 0;
  background: none;
  box-shadow: none;
  transform: translate(-50%, -50%);
  visibility: hidden;
}

.services.has-stage .service-item.is-active .service-art,
.services.has-stage .service-art.is-entering,
.services.has-stage .service-art.is-leaving {
  visibility: visible;
}

.services.has-stage .service-copy {
  position: absolute;
  right: 0;
  bottom: 12%;
  width: min(280px, 26%);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s;
}

.services.has-stage .service-item.is-active .service-copy {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
  transition: opacity 0.55s ease 0.45s, transform 0.55s ease 0.45s, visibility 0s;
}

.services.has-stage .service-copy p {
  margin: 0 0 14px;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--ink);
}

.services.has-stage .stage-footer {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  border-top: 1px solid var(--border-soft);
}

.stage-footer-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--footer-h);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.stage-count {
  justify-self: end;
}

.stage-steps {
  display: flex;
  gap: 6px;
}

.stage-step {
  position: relative;
  padding: 6px 8px;
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.stage-step:hover {
  opacity: 0.9;
}

.stage-step.is-active {
  opacity: 1;
  color: var(--teal-darkest);
}

.stage-step.is-active::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 2px;
  height: 1px;
  background: currentColor;
}

.stage-step:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

/* The sweep line + glitch band that crosses the stage on each change */

.services.has-stage .stage-line {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 1px;
  background: var(--teal-darkest);
  opacity: 0;
  pointer-events: none;
  z-index: 2;
}

.services.has-stage .stage-line::after {
  content: "";
  position: absolute;
  left: calc(50% - var(--art) / 3);
  width: calc(var(--art) * 2 / 3);
  top: -14px;
  height: 28px;
  background: repeating-linear-gradient(0deg, rgba(6, 35, 29, 0.55) 0 2px, transparent 2px 6px);
}

.services.has-stage .stage.is-sweeping[data-dir="fwd"] .stage-line {
  animation: fe-sweep-up 0.9s cubic-bezier(0.65, 0, 0.35, 1) both;
}

.services.has-stage .stage.is-sweeping[data-dir="back"] .stage-line {
  animation: fe-sweep-down 0.9s cubic-bezier(0.65, 0, 0.35, 1) both;
}

@keyframes fe-sweep-up {
  0% { top: calc((100% - var(--footer-h)) / 2 + var(--art) / 3); opacity: 0; }
  12%, 88% { opacity: 0.6; }
  100% { top: calc((100% - var(--footer-h)) / 2 - var(--art) / 3); opacity: 0; }
}

@keyframes fe-sweep-down {
  0% { top: calc((100% - var(--footer-h)) / 2 - var(--art) / 3); opacity: 0; }
  12%, 88% { opacity: 0.6; }
  100% { top: calc((100% - var(--footer-h)) / 2 + var(--art) / 3); opacity: 0; }
}

.services.has-stage .stage[data-dir="fwd"] .service-art.is-entering {
  animation: fe-in-up 0.9s cubic-bezier(0.65, 0, 0.35, 1) both, fe-glitch 0.9s steps(1, end) both;
}

.services.has-stage .stage[data-dir="fwd"] .service-art.is-leaving {
  animation: fe-out-up 0.9s cubic-bezier(0.65, 0, 0.35, 1) both;
}

.services.has-stage .stage[data-dir="back"] .service-art.is-entering {
  animation: fe-in-down 0.9s cubic-bezier(0.65, 0, 0.35, 1) both, fe-glitch 0.9s steps(1, end) both;
}

.services.has-stage .stage[data-dir="back"] .service-art.is-leaving {
  animation: fe-out-down 0.9s cubic-bezier(0.65, 0, 0.35, 1) both;
}

@keyframes fe-in-up {
  from { clip-path: inset(100% 0 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

@keyframes fe-out-up {
  from { clip-path: inset(0 0 0 0); }
  to { clip-path: inset(0 0 100% 0); }
}

@keyframes fe-in-down {
  from { clip-path: inset(0 0 100% 0); }
  to { clip-path: inset(0 0 0 0); }
}

@keyframes fe-out-down {
  from { clip-path: inset(0 0 0 0); }
  to { clip-path: inset(100% 0 0 0); }
}

@keyframes fe-glitch {
  0% { transform: translate(calc(-50% - 10px), -50%); }
  14% { transform: translate(calc(-50% + 8px), -50%); }
  28% { transform: translate(calc(-50% - 5px), -50%); }
  42% { transform: translate(calc(-50% + 4px), -50%); }
  56% { transform: translate(calc(-50% - 2px), -50%); }
  70%, 100% { transform: translate(-50%, -50%); }
}

/* ---------- Services page: stacking cards ---------- */

.card-stack {
  --stack-top: 96px;
  --stack-step: 18px;
  position: relative;
}

/* Zero-height anchors keep deep links (services.html#engineering) landing on the right card */
.stack-anchor {
  display: block;
  height: 0;
  scroll-margin-top: calc(var(--stack-top) + var(--i) * var(--stack-step));
}

.stack-card {
  --card-bg: #06231d;
  --card-fg: var(--cream);
  --card-soft: rgba(255, 253, 238, 0.74);
  --card-line: rgba(255, 253, 238, 0.28);
  position: sticky;
  top: calc(var(--stack-top) + var(--i) * var(--stack-step));
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: stretch;
  min-height: clamp(380px, 62vh, 470px);
  margin-bottom: 36px;
  padding: 44px 48px;
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  color: var(--card-fg);
  box-shadow: 0 -12px 32px -14px rgba(6, 35, 29, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform-origin: 50% 0;
  transform: scale(calc(1 - var(--p, 0) * 0.06));
  filter: brightness(calc(1 - var(--p, 0) * 0.3));
  will-change: transform;
}

article.stack-card:last-of-type {
  margin-bottom: 0;
}

.tone-1 { --card-bg: #06231d; }
.tone-2 { --card-bg: #0c342c; }
.tone-3 { --card-bg: #076653; }
.tone-4 { --card-bg: #2f7d4a; }

.tone-5 {
  --card-bg: #e2fbce;
  --card-fg: var(--teal-darkest);
  --card-soft: rgba(6, 35, 29, 0.72);
  --card-line: rgba(6, 35, 29, 0.3);
}

.tone-6 {
  --card-bg: #e3ef26;
  --card-fg: var(--teal-darkest);
  --card-soft: rgba(6, 35, 29, 0.76);
  --card-line: rgba(6, 35, 29, 0.34);
}

.stack-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.stack-index {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--card-soft);
}

.stack-title {
  margin: 14px 0 18px;
  font-size: clamp(2.3rem, 4.6vw, 3.8rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--card-fg);
}

.stack-title strong {
  display: block;
  font-weight: 800;
}

.stack-title span {
  display: block;
  font-weight: 600;
  opacity: 0.55;
}

.stack-intro {
  max-width: 46ch;
  margin: 0 0 auto;
  padding-bottom: 24px;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--card-soft);
}

.stack-label {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--card-soft);
}

.stack-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stack-chips li {
  padding: 7px 14px;
  border: 1px solid var(--card-line);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--card-fg);
}

.stack-art {
  --box: clamp(168px, 20vw, 240px);
  align-self: center;
  width: var(--box);
  height: var(--box);
  padding: calc(var(--box) / 6);
  border-radius: 20px;
  background-color: var(--cream);
  background-image:
    linear-gradient(var(--grid-line, rgba(12, 52, 44, 0.08)) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line, rgba(12, 52, 44, 0.08)) 1px, transparent 1px);
  background-size: calc(var(--box) / 24) calc(var(--box) / 24);
  box-shadow: 0 0 0 1px rgba(6, 35, 29, 0.12), 0 16px 32px -16px rgba(0, 0, 0, 0.5);
}

@media (max-width: 760px) {
  .card-stack {
    --stack-top: 88px;
    --stack-step: 10px;
  }

  .stack-card {
    grid-template-columns: 1fr;
    gap: 20px;
    min-height: 0;
    margin-bottom: 28px;
    padding: 24px 22px 28px;
  }

  .stack-art {
    --box: 72px;
    order: -1;
    align-self: start;
    border-radius: 14px;
  }

  .stack-title {
    margin-top: 10px;
    font-size: clamp(2rem, 9.5vw, 2.7rem);
  }
}

/* ---------- Fat Build teaser ---------- */

.fb-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 48px;
  align-items: center;
  overflow: hidden;
  padding: 64px 56px;
  border-radius: var(--radius-lg);
  color: var(--cream);
  background:
    radial-gradient(ellipse at 85% 0%, #0f4a3d 0%, rgba(15, 74, 61, 0) 60%),
    var(--teal-darkest);
}

.fb-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle at center, rgba(226, 251, 206, 0.14) 0 1px, transparent 1.6px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 70%);
  mask-image: linear-gradient(to right, transparent, #000 70%);
}

.fb-copy,
.fb-stage {
  position: relative;
}

.fb-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mint);
  background: rgba(226, 251, 206, 0.1);
}

.fb-eyebrow b {
  padding: 3px 10px;
  border-radius: 999px;
  color: var(--teal-darkest);
  background: var(--lime);
}

.fb-copy h2 {
  margin-bottom: 14px;
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  line-height: 1.12;
  color: var(--cream);
}

.fb-hl {
  display: inline-block;
  padding: 0.02em 0.28em;
  border-radius: 0.4em;
  color: var(--teal-darkest);
  background: var(--lime);
  transform: rotate(-1.5deg);
}

.fb-copy > p {
  max-width: 46ch;
  margin-bottom: 20px;
  color: rgba(255, 253, 238, 0.82);
}

.fb-steps {
  display: grid;
  gap: 10px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

.fb-steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  color: var(--cream);
}

.fb-steps b {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 0.8rem;
  color: var(--teal-darkest);
  background: var(--mint);
}

.fb-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 18px;
}

.fb-note {
  font-size: 0.85rem;
  color: rgba(255, 253, 238, 0.7);
}

/* a tiny product that rebuilds itself */
.fb-stage {
  display: grid;
  place-items: center;
  min-height: 340px;
  padding: 24px 0;
}

.fb-device {
  --fb-accent: #e3ef26;
  --fb-ink: #06231d;
  width: min(100%, 440px);
  overflow: hidden;
  border-radius: 16px;
  color: #06231d;
  background: #e9ecdb;
  box-shadow: 0 40px 60px -26px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.08);
  transform: rotate(-2deg);
}

.fb-chrome {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(6, 35, 29, 0.12);
}

.fb-chrome i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(6, 35, 29, 0.25);
}

.fb-url {
  flex: 1;
  max-width: 190px;
  margin-left: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 10.5px;
  color: rgba(6, 35, 29, 0.6);
  background: #ffffff;
}

.fb-screen {
  padding-bottom: 14px;
  font-size: 11px;
  background: #fffdee;
}

.fb-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 2px solid #06231d;
  background: #ffffff;
}

.fb-logo {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 12px;
  color: var(--fb-ink);
  background: var(--fb-accent);
  transition: background-color 0.5s ease, color 0.5s ease;
}

.fb-bar .fb-name {
  font-family: var(--font-display);
  font-size: 12px;
}

.fb-navs {
  display: flex;
  flex: 1;
  justify-content: flex-end;
  gap: 6px;
}

.fb-navs i {
  width: 26px;
  height: 6px;
  border-radius: 99px;
  background: rgba(6, 35, 29, 0.14);
}

.fb-signin {
  padding: 4px 10px;
  border: 2px solid #06231d;
  border-radius: 999px;
  font-weight: 700;
  font-size: 10px;
  color: var(--fb-ink);
  background: var(--fb-accent);
  transition: background-color 0.5s ease, color 0.5s ease;
}

.fb-hero {
  padding: 18px 14px 12px;
}

.fb-hero h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.1;
  color: #06231d;
}

.fb-l {
  display: block;
  height: 6px;
  margin-bottom: 6px;
  border-radius: 99px;
  background: rgba(6, 35, 29, 0.14);
}

.fb-l--s {
  width: 60%;
}

.fb-cta {
  display: inline-block;
  margin-top: 6px;
  padding: 6px 14px;
  border: 2px solid #06231d;
  border-radius: 999px;
  font-weight: 800;
  color: var(--fb-ink);
  background: var(--fb-accent);
  box-shadow: 3px 3px 0 #06231d;
  transform: rotate(-2deg);
  transition: background-color 0.5s ease, color 0.5s ease;
}

.fb-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 0 14px;
}

.fb-card {
  display: grid;
  align-content: start;
  gap: 7px;
  min-height: 74px;
  padding: 9px;
  border: 2px solid #06231d;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 3px 3px 0 #06231d;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.2, 1.5, 0.4, 1);
}

.fb-card.is-on {
  opacity: 1;
  transform: scale(1);
}

.fb-k {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 10px;
}

.fb-bars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: end;
  gap: 3px;
  height: 30px;
}

.fb-bars em {
  display: block;
  height: var(--h);
  border-radius: 3px 3px 1px 1px;
  background: var(--fb-accent);
  transition: background-color 0.5s ease;
}

.fb-pay {
  justify-self: start;
  padding: 3px 9px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 9px;
  color: var(--fb-ink);
  background: var(--fb-accent);
  transition: background-color 0.5s ease, color 0.5s ease;
}

.fb-pill {
  justify-self: start;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 9px;
  color: rgba(6, 35, 29, 0.55);
  background: rgba(6, 35, 29, 0.1);
}

/* feature tags floating around the product */
.fb-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px 7px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--teal-darkest);
  background: var(--cream);
  box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.6);
}

.fb-chip i {
  display: block;
  position: relative;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--lime);
}

.fb-chip i::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2.5px;
  width: 4px;
  height: 8px;
  border: solid var(--teal-darkest);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.fb-chip--a {
  top: 6%;
  right: -2%;
}

.fb-chip--b {
  bottom: 8%;
  left: -3%;
}

.fb-chip--c {
  bottom: 22%;
  right: -3%;
}

@media (prefers-reduced-motion: no-preference) {
  .fb-device {
    animation: fb-float 6s ease-in-out infinite;
  }

  .fb-chip {
    animation: fb-bob 4.6s ease-in-out infinite;
  }

  .fb-chip--b {
    animation-duration: 5.4s;
    animation-delay: -1.6s;
  }

  .fb-chip--c {
    animation-duration: 5s;
    animation-delay: -3s;
  }
}

@keyframes fb-float {
  0%, 100% { transform: rotate(-2deg) translateY(0); }
  50% { transform: rotate(-2deg) translateY(-8px); }
}

@keyframes fb-bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -7px; }
}

@media (max-width: 900px) {
  .fb-panel {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 44px 24px 36px;
  }

  .fb-stage {
    min-height: 0;
    padding: 20px 6px 28px;
  }

  .fb-chip {
    font-size: 0.72rem;
  }

  .fb-chip--a {
    right: 0;
  }

  .fb-chip--b {
    left: 0;
  }

  .fb-chip--c {
    right: 0;
  }
}

/* ---------- Process: the desk ---------- */

/* Paper notes on a desk. On wide screens the notes can be picked up and moved around
   (main.js); on small screens they simply stack. */
.process {
  position: relative;
  overflow: hidden;
  padding: 72px 48px 64px;
  border-radius: var(--radius-lg);
  background-color: #f3f1e4;
  background-image: radial-gradient(circle at center, rgba(12, 52, 44, 0.12) 0 1px, transparent 1.6px);
  background-size: 22px 22px;
}

.process .section-head h2 {
  color: var(--teal-darkest);
}

.desk-board {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 36px;
  align-items: start;
  padding: 28px 0 8px;
}

.note {
  --dx: 0px;
  --dy: 0px;
  position: relative;
  padding: 34px 28px 30px;
  border-radius: 6px 6px 10px 10px;
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 1px 1px rgba(6, 35, 29, 0.1), 0 14px 26px -14px rgba(6, 35, 29, 0.38);
  translate: var(--dx) var(--dy);
  transform: rotate(var(--r, 0deg));
}

/* The strip of tape holding each note down */
.note::before {
  content: "";
  position: absolute;
  top: -13px;
  left: 50%;
  width: 92px;
  height: 28px;
  margin-left: -46px;
  background: rgba(227, 239, 38, 0.82);
  transform: rotate(-3deg);
  clip-path: polygon(0 0, 3% 18%, 0 36%, 3% 54%, 0 72%, 3% 100%, 100% 100%, 97% 82%, 100% 64%, 97% 46%, 100% 28%, 97% 0);
}

.note--lime {
  background: var(--lime);
  margin-top: 44px;
}

.note--lime::before {
  background: rgba(6, 35, 29, 0.28);
}

.note--paper:nth-of-type(3) {
  margin-top: 12px;
}

.note-num {
  display: inline-block;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 3rem;
  line-height: 1;
  color: var(--teal);
  transform: rotate(-5deg);
}

.note--lime .note-num {
  color: var(--teal-darkest);
}

.note h3 {
  margin: 6px 0 8px;
  font-size: 1.2rem;
  color: var(--teal-darkest);
}

.note p {
  margin: 0;
  font-size: 0.97rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.note--lime p {
  color: var(--teal-darkest);
}

/* Question note: a one-tap question and a free-text note, sent to us by email */
.note--ask {
  grid-column: 2;
  margin-top: 14px;
  background: #fffef6;
  background-image: linear-gradient(90deg, transparent 38px, rgba(255, 122, 89, 0.55) 38px 40px, transparent 40px);
  padding-left: 54px;
}

.ask fieldset {
  margin: 0 0 12px;
  padding: 0;
  border: 0;
}

.ask legend {
  padding: 0;
  margin-bottom: 4px;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1.05;
  color: var(--teal-darkest);
}

.note-sub {
  margin-bottom: 8px;
  font-size: 0.86rem;
}

.ask-opt {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(12, 52, 44, 0.22);
  font-size: 0.93rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--teal-darkest);
  cursor: pointer;
}

.ask-opt input {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin: 0;
  border: 2px solid var(--teal-dark);
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  transition: background 0.2s ease;
}

.ask-opt input::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal-darkest);
  transform: scale(0);
  transition: transform 0.2s cubic-bezier(0.2, 1.6, 0.4, 1);
}

.ask-opt input:checked {
  background: var(--lime);
}

.ask-opt input:checked::after {
  transform: scale(1);
}

.ask-opt input:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}

.ask-label {
  display: block;
  margin: 12px 0 6px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--teal-darkest);
}

.ask textarea {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid rgba(12, 52, 44, 0.2);
  border-radius: 8px;
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--ink);
  background: #ffffff;
  resize: vertical;
  user-select: text;
}

.ask textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(7, 102, 83, 0.15);
}

.ask-send {
  margin-top: 12px;
  padding: 10px 24px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--cream);
  background: var(--teal-darkest);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ask-send:hover {
  transform: translateY(-2px) rotate(-1deg);
  box-shadow: 0 10px 18px -10px rgba(6, 35, 29, 0.6);
}

.ask-send:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}

.ask-status {
  margin: 10px 0 0;
  min-height: 1.2em;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

.ask-status.is-error {
  color: #b3401f;
  font-weight: 700;
}

.ask-status a {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.stamp {
  position: absolute;
  right: -16px;
  top: -20px;
  padding: 4px 10px;
  border: 3px solid var(--teal);
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  background: rgba(227, 239, 38, 0.55);
  opacity: 0;
  transform: rotate(-12deg) scale(1.6);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.35s cubic-bezier(0.2, 1.5, 0.4, 1);
}

.note--ask.is-shipped .stamp {
  opacity: 1;
  transform: rotate(-12deg) scale(1);
}

/* Doodles with handwritten captions */
.doodle {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--teal-dark);
  pointer-events: none;
}

.doodle svg {
  flex-shrink: 0;
  width: 84px;
  height: auto;
}

.doodle-caption {
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 1.45rem;
  line-height: 1.1;
}

.doodle--spark {
  grid-column: 3;
  grid-row: 2;
  justify-self: start;
  margin-top: 20px;
  transform: rotate(3deg);
}

.doodle--spark svg {
  width: 56px;
  color: var(--teal);
}

/* Desktop: notes can be picked up */
@media (min-width: 861px) and (hover: hover) and (pointer: fine) {
  .note {
    cursor: grab;
    user-select: none;
    touch-action: none;
  }

  .note--ask .ask-opt,
  .note--ask .ask-opt input,
  .note--ask .ask-send {
    cursor: pointer;
  }

  .note--ask textarea {
    cursor: text;
  }

  .note.is-held {
    cursor: grabbing;
    box-shadow: 0 2px 2px rgba(6, 35, 29, 0.12), 0 30px 40px -18px rgba(6, 35, 29, 0.5);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .note {
    transition: transform 0.35s cubic-bezier(0.2, 1.4, 0.4, 1), box-shadow 0.25s ease;
  }

  .note.is-held {
    transform: rotate(calc(var(--r, 0deg) * 0.35)) scale(1.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

  @media (hover: hover) {
    .note:not(.is-held):hover {
      transform: rotate(calc(var(--r, 0deg) * 0.6)) translateY(-4px);
    }
  }

  .process.in-view .note {
    animation: note-drop 0.8s cubic-bezier(0.2, 1.2, 0.3, 1) backwards;
    animation-delay: calc(var(--i, 0) * 0.14s + 0.15s);
  }

  .process.in-view .doodle {
    animation: doodle-in 0.7s ease backwards 0.7s;
  }
}

@keyframes note-drop {
  from {
    opacity: 0;
    transform: translateY(-34px) rotate(calc(var(--r, 0deg) - 7deg));
  }
}

@keyframes doodle-in {
  from {
    opacity: 0;
  }
}

@media (max-width: 860px) {
  .process {
    padding: 56px 22px 48px;
  }

  .desk-board {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding-top: 24px;
  }

  .note {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
  }

  .note--lime,
  .note--paper:nth-of-type(3),
  .note--ask {
    margin-top: 0;
  }

  .doodle {
    display: none;
  }
}

/* Contact form success: reuses the pop-up's tick and glow */
.form-card.is-sent > :not(.contact-done) {
  display: none;
}

/* Short titles in pop-ups and success states: styled like headings, but plain text for the page outline */
.ship-heading {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--teal-darkest);
}

.contact-done {
  padding: 32px 12px;
}

.form-note.is-error {
  color: #b3401f;
  font-weight: 700;
}

/* ---------- Ship dialog (email pop-up) ---------- */

.ship-dialog {
  width: min(420px, calc(100vw - 32px));
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 14px;
  color: var(--ink);
  background: #fffef6;
  box-shadow: 0 2px 2px rgba(6, 35, 29, 0.12), 0 40px 70px -20px rgba(6, 35, 29, 0.6);
  overflow: visible;
}

.ship-dialog::backdrop {
  background: rgba(6, 35, 29, 0.55);
  backdrop-filter: blur(3px);
}

/* the strip of tape across the top, like the notes */
.ship-dialog::before {
  content: "";
  position: absolute;
  top: -13px;
  left: 50%;
  width: 96px;
  height: 28px;
  margin-left: -48px;
  background: rgba(227, 239, 38, 0.9);
  transform: rotate(-3deg);
  clip-path: polygon(0 0, 3% 18%, 0 36%, 3% 54%, 0 72%, 3% 100%, 100% 100%, 97% 82%, 100% 64%, 97% 46%, 100% 28%, 97% 0);
}

.ship-dialog[open] {
  animation: ship-in 0.35s cubic-bezier(0.2, 1.3, 0.4, 1);
}

.ship-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--ink-soft);
  background: transparent;
  cursor: pointer;
  transition: background 0.2s ease;
}

.ship-close:hover {
  background: var(--mint);
}

.ship-close:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}

.ship-form,
.ship-done {
  padding: 40px 32px 28px;
}

.ship-lead {
  margin: 0 0 18px;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.ship-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--teal-darkest);
}

.ship-form input[type="email"] {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid rgba(12, 52, 44, 0.22);
  border-radius: 10px;
  font: inherit;
  color: var(--ink);
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ship-form input[type="email"]:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(7, 102, 83, 0.15);
}

.ship-form input[aria-invalid="true"] {
  border-color: #c4472a;
}

.ship-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.ship-error {
  min-height: 1.3em;
  margin: 8px 0 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: #b3401f;
}

.ship-go {
  width: 100%;
  margin-top: 8px;
  padding: 14px 24px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
  color: var(--teal-darkest);
  background: var(--lime);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ship-go:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 24px -12px rgba(6, 35, 29, 0.55);
}

.ship-go:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}

.ship-go:disabled {
  opacity: 0.7;
  cursor: progress;
  transform: none;
}

.ship-fine {
  margin: 12px 0 0;
  font-size: 0.78rem;
  text-align: center;
  color: var(--ink-soft);
}

.ship-fine a {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* the quiet "it worked" moment */
.ship-done {
  text-align: center;
}

.ship-done[hidden] {
  display: none;
}

.ship-check {
  position: relative;
  width: 84px;
  height: 84px;
  margin: 0 auto 14px;
}

.ship-check::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(227, 239, 38, 0.75), rgba(227, 239, 38, 0) 68%);
}

.ship-check svg {
  position: relative;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--teal);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ship-ring {
  stroke-dasharray: 189;
  stroke-dashoffset: 0;
}

.ship-tick {
  stroke: var(--teal-darkest);
  stroke-dasharray: 60;
  stroke-dashoffset: 0;
}

.ship-done p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

@media (prefers-reduced-motion: no-preference) {
  .ship-done:not([hidden]) .ship-check::before {
    animation: ship-glow 1.1s ease-out both;
  }

  .ship-done:not([hidden]) .ship-ring {
    animation: ship-draw 0.55s ease-out both;
  }

  .ship-done:not([hidden]) .ship-tick {
    animation: ship-draw-tick 0.4s 0.45s ease-out both;
  }

  .ship-done:not([hidden]) p {
    animation: ship-rise 0.5s 0.65s ease-out both;
  }
}

@keyframes ship-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.95) rotate(-1deg);
  }
}

@keyframes ship-draw {
  from { stroke-dashoffset: 189; }
}

@keyframes ship-draw-tick {
  from { stroke-dashoffset: 60; }
}

@keyframes ship-glow {
  from { opacity: 0; transform: scale(0.4); }
  60% { opacity: 1; }
  to { opacity: 0.6; transform: scale(1.15); }
}

@keyframes ship-rise {
  from { opacity: 0; transform: translateY(6px); }
}

/* ---------- CTA banner ---------- */

.cta-banner {
  background: linear-gradient(120deg, var(--mint), var(--lime) 120%);
  border-radius: var(--radius-lg);
  padding: 64px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.cta-banner h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--teal-darkest);
  margin-bottom: 6px;
}

.cta-banner p {
  color: var(--teal-dark);
  margin-bottom: 0;
}

.cta-banner .btn-primary {
  background: var(--teal-darkest);
  color: var(--cream);
  box-shadow: 0 10px 24px -10px rgba(6, 35, 29, 0.5);
}

.cta-banner .btn-primary:hover {
  box-shadow: 0 16px 30px -10px rgba(6, 35, 29, 0.6);
}

@media (max-width: 640px) {
  .cta-banner {
    padding: 40px 28px;
    flex-direction: column;
    text-align: center;
  }
}

/* ---------- Values / About ---------- */

.values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

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

@media (max-width: 560px) {
  .values-grid {
    grid-template-columns: 1fr;
  }
}

.value-card {
  padding: 8px 0;
}

.value-card .value-num {
  font-family: var(--font-hand);
  font-weight: 700;
  color: var(--teal-dark);
  font-size: 2.8rem;
  margin-bottom: 4px;
  display: inline-block;
  transform: rotate(-4deg);
}

.value-card:nth-child(2) .value-num,
.value-card:nth-child(4) .value-num {
  transform: rotate(3deg);
}

.value-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.value-card p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin-bottom: 0;
}

.why-section {
  background: rgba(226, 251, 206, 0.72);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  padding: 112px 0;
}

@media (max-width: 720px) {
  .why-section {
    padding: 64px 0;
  }
}

.split {
  max-width: 720px;
  margin: 0 auto;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 56px 64px;
  box-shadow: var(--shadow-card);
}

@media (max-width: 640px) {
  .split {
    padding: 40px 28px;
  }
}

.callout {
  font-family: "Doto", var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.02em;
  color: var(--teal);
  margin: 0 0 20px;
}

/* ---------- About page: pixel field ---------- */

/* A very faint dot grid sits behind the page; main.js adds a canvas where pixels form near the cursor */
.pixel-field {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(circle at center, rgba(12, 52, 44, 0.16) 0 1px, transparent 1.6px);
  background-size: 16px 16px;
}

.pixel-field canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---------- Manifesto ---------- */

.manifesto-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media (max-width: 720px) {
  .manifesto-grid {
    grid-template-columns: 1fr;
  }
}

.manifesto-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 24px 26px;
}

.manifesto-item .mark {
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 2.2rem;
  color: var(--teal-dark);
  line-height: 1;
  flex-shrink: 0;
  display: inline-block;
  transform: rotate(-6deg);
}

.manifesto-item:nth-child(even) .mark {
  transform: rotate(4deg);
}

.manifesto-item p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1rem;
}

.manifesto-item strong {
  color: var(--teal-dark);
}

/* ---------- About page: colour blocks ---------- */

/* The About page runs on bold colour blocks and starburst number badges. Coral is the one
   extra accent, used sparingly against the brand lime, teal and cream. */
body.page-about {
  --coral: #ff7a59;
  --burst: polygon(50.0% 0.0%, 60.4% 11.4%, 75.0% 6.7%, 78.3% 21.7%, 93.3% 25.0%, 88.6% 39.6%, 100.0% 50.0%, 88.6% 60.4%, 93.3% 75.0%, 78.3% 78.3%, 75.0% 93.3%, 60.4% 88.6%, 50.0% 100.0%, 39.6% 88.6%, 25.0% 93.3%, 21.7% 78.3%, 6.7% 75.0%, 11.4% 60.4%, 0.0% 50.0%, 11.4% 39.6%, 6.7% 25.0%, 21.7% 21.7%, 25.0% 6.7%, 39.6% 11.4%);
}

/* Highlighted words in headlines */
body.page-about .pill {
  display: inline;
  padding: 0.04em 0.34em;
  border-radius: 0.5em;
  background: var(--pill-bg, var(--lime));
  color: var(--teal-darkest);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

body.page-about .pill--tilt {
  display: inline-block;
  transform: rotate(-2deg);
}

body.page-about .pill--dark {
  --pill-bg: var(--teal-darkest);
  color: var(--lime);
}

body.page-about .pill--white {
  --pill-bg: #ffffff;
}

body.page-about .pill--coral {
  --pill-bg: var(--coral);
}

body.page-about .pill--lime {
  --pill-bg: var(--lime);
}

/* Highlighted words drift up and down, each at its own pace */
body.page-about .pill,
body.page-about .callout {
  display: inline-block;
  max-width: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  body.page-about .pill,
  body.page-about .callout {
    animation: word-float var(--float-dur, 4.6s) ease-in-out var(--float-delay, 0s) infinite;
  }

  body.page-about .pill--dark {
    --float-dur: 4.2s;
  }

  body.page-about .pill--white {
    --float-dur: 4.9s;
    --float-delay: -1.4s;
  }

  body.page-about .split .pill--lime {
    --float-dur: 5.2s;
    --float-delay: -0.6s;
  }

  body.page-about .callout {
    --float-dur: 5.6s;
    --float-delay: -2.2s;
  }

  body.page-about .section-head .pill--lime {
    --float-dur: 4.7s;
    --float-delay: -1s;
  }

  body.page-about .pill--coral {
    --float-dur: 4.4s;
    --float-delay: -2.6s;
  }
}

@media (max-width: 480px) {
  body.page-about .callout {
    font-size: 1.8rem;
  }
}

@keyframes word-float {
  0%, 100% { translate: 0 0; rotate: 0deg; }
  50% { translate: 0 -6px; rotate: 1.2deg; }
}

/* Header: a lime block with two starbursts peeking in from the corners */
body.page-about .page-header {
  position: relative;
  overflow: hidden;
  background: var(--lime);
  padding: 96px 0 104px;
}

body.page-about .page-header .container {
  position: relative;
  z-index: 1;
}

body.page-about .page-header .eyebrow {
  background: var(--teal-darkest);
  color: var(--lime);
}

body.page-about .page-header h1 {
  font-size: clamp(2.2rem, 5.4vw, 4.1rem);
  line-height: 1.14;
  max-width: 920px;
  margin: 0 auto 26px;
}

body.page-about .page-header p {
  color: var(--teal-darkest);
}

/* Why Fat Elephant: dark block, sticker card */
body.page-about .why-section {
  position: relative;
  overflow: hidden;
  background: var(--teal-darkest);
  border: 0;
}

body.page-about .why-section .container {
  position: relative;
  z-index: 1;
}

body.page-about .split {
  box-shadow: 10px 10px 0 var(--lime);
}

body.page-about .callout {
  display: inline-block;
  background: var(--lime);
  color: var(--teal-darkest);
  padding: 6px 22px 12px;
  border-radius: 20px;
  transform: rotate(-2deg);
  margin-bottom: 26px;
}

/* Manifesto: a patchwork of colour cards with starburst numbers */
body.page-about .manifesto-item {
  --card-bg: var(--lime);
  --card-fg: var(--teal-darkest);
  --card-strong: var(--teal-darkest);
  --badge-bg: var(--teal-darkest);
  --badge-fg: var(--lime);
  align-items: center;
  gap: 20px;
  background: var(--card-bg);
  border: 0;
  border-radius: var(--radius-lg);
  padding: 30px 32px;
}

body.page-about .manifesto-item:nth-child(2) {
  --card-bg: var(--teal-darkest);
  --card-fg: var(--mint);
  --card-strong: var(--lime);
  --badge-bg: var(--lime);
  --badge-fg: var(--teal-darkest);
}

body.page-about .manifesto-item:nth-child(3) {
  --card-bg: var(--mint);
  --badge-bg: var(--teal);
  --badge-fg: var(--cream);
}

body.page-about .manifesto-item:nth-child(4) {
  --card-bg: var(--teal);
  --card-fg: var(--cream);
  --card-strong: var(--lime);
  --badge-bg: var(--lime);
  --badge-fg: var(--teal-darkest);
}

body.page-about .manifesto-item:nth-child(5) {
  --card-bg: var(--coral);
  --badge-bg: var(--teal-darkest);
  --badge-fg: var(--cream);
}

body.page-about .manifesto-item:nth-child(6) {
  --card-bg: #ffffff;
  --badge-bg: var(--lime);
  --badge-fg: var(--teal-darkest);
  box-shadow: inset 0 0 0 2px var(--teal-darkest);
}

body.page-about .manifesto-item .mark {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  background: var(--badge-bg);
  color: var(--badge-fg);
  clip-path: var(--burst);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  transform: rotate(-8deg);
}

body.page-about .manifesto-item:nth-child(even) .mark {
  transform: rotate(8deg);
}

body.page-about .manifesto-item p {
  color: var(--card-fg);
}

body.page-about .manifesto-item strong {
  color: var(--card-strong);
}

/* Values: a teal block with colour cards */
body.page-about .values-section {
  position: relative;
  overflow: hidden;
  background: var(--teal);
}

body.page-about .values-section .container {
  position: relative;
  z-index: 1;
}

body.page-about .values-section .eyebrow {
  background: var(--lime);
  color: var(--teal-darkest);
}

body.page-about .values-section .section-head h2 {
  color: var(--cream);
}

body.page-about .values-section .section-head p {
  color: var(--mint);
}

body.page-about .value-card {
  --card-bg: var(--lime);
  --badge-bg: var(--teal-darkest);
  --badge-fg: var(--lime);
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 32px 28px 34px;
}

body.page-about .value-card:nth-child(2) {
  --card-bg: var(--cream);
  --badge-bg: var(--coral);
  --badge-fg: var(--teal-darkest);
}

body.page-about .value-card:nth-child(3) {
  --card-bg: var(--coral);
  --badge-bg: var(--teal-darkest);
  --badge-fg: var(--cream);
}

body.page-about .value-card:nth-child(4) {
  --card-bg: var(--mint);
  --badge-bg: var(--teal);
  --badge-fg: var(--lime);
}

body.page-about .value-card .value-num {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  background: var(--badge-bg);
  color: var(--badge-fg);
  clip-path: var(--burst);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  transform: rotate(-8deg);
}

body.page-about .value-card:nth-child(even) .value-num {
  transform: rotate(8deg);
}

body.page-about .value-card h3 {
  font-size: 1.3rem;
  color: var(--teal-darkest);
}

body.page-about .value-card p {
  color: var(--teal-darkest);
}

/* Closing banner */
body.page-about .cta-banner {
  position: relative;
  background: var(--lime);
}

@media (max-width: 720px) {
  body.page-about .page-header {
    padding: 64px 0 72px;
  }

  body.page-about .manifesto-item {
    padding: 24px 22px;
  }

  body.page-about .manifesto-item .mark {
    width: 52px;
    height: 52px;
  }
}

/* ---------- Page header (inner pages) ---------- */

.page-header {
  padding: 72px 0 56px;
  text-align: center;
}

.page-header .eyebrow {
  margin-bottom: 18px;
}

.page-header h1 {
  font-size: clamp(2rem, 3.6vw, 2.8rem);
  color: var(--teal-darkest);
}

.page-header p {
  max-width: 620px;
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}

@media (max-width: 860px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.contact-info {
  background: var(--teal-darkest);
  color: var(--cream);
  border-radius: var(--radius-lg);
  padding: 44px 36px;
}

.contact-info h3 {
  color: var(--cream);
}

.contact-info p {
  color: rgba(255, 253, 238, 0.72);
}

.contact-detail {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 24px;
}

.contact-detail .icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(227, 239, 38, 0.14);
  color: var(--lime);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-detail .icon svg {
  width: 20px;
  height: 20px;
}

.contact-detail strong {
  display: block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--lime);
  margin-bottom: 2px;
}

.contact-detail span,
.contact-detail a {
  color: var(--cream);
  font-weight: 600;
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 40px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

@media (max-width: 520px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 8px;
  color: var(--teal-dark);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-soft);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--cream);
  color: var(--ink);
  transition: border-color 0.2s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--teal);
}

.field textarea {
  resize: vertical;
  min-height: 120px;
}

.form-note {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 14px;
  text-align: center;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--teal-darkest);
  color: rgba(255, 253, 238, 0.7);
  padding: 64px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 253, 238, 0.12);
}

@media (max-width: 720px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.footer-brand img {
  height: 34px;
  filter: brightness(0) invert(1);
  margin-bottom: 16px;
}

.footer-brand p {
  max-width: 32ch;
  font-size: 0.95rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-top: 20px;
  background: rgba(227, 239, 38, 0.14);
  color: var(--lime);
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.social-link svg {
  width: 20px;
  height: 20px;
}

/* Instagram and LinkedIn sit side by side in the footer */
.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.footer-social .social-link {
  margin-top: 0;
}

.social-link:hover {
  transform: translateY(-3px) scale(1.06);
  background: var(--lime);
  color: var(--teal-darkest);
}

.footer-heading {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--cream);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.footer-col a {
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--lime);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  font-size: 0.85rem;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.footer-legal a {
  transition: color 0.2s ease;
}

.footer-legal a:hover {
  color: var(--lime);
}

/* ---------- Legal pages (privacy, terms) ---------- */

.legal-section {
  padding-top: 8px;
}

.legal {
  max-width: 760px;
  margin: 0 auto;
}

.legal-updated {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin: 0 0 8px;
}

.legal h2 {
  font-size: 1.3rem;
  color: var(--teal-darkest);
  margin: 40px 0 12px;
}

.legal p,
.legal li {
  color: var(--ink-soft);
  line-height: 1.75;
}

.legal p {
  margin: 0 0 14px;
}

.legal ul {
  margin: 0 0 14px;
  padding-left: 1.3em;
}

.legal li {
  margin-bottom: 6px;
}

.legal strong {
  color: var(--teal-darkest);
}

.legal a {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal a:hover {
  color: var(--teal-darkest);
}

/* ---------- Ambient cursor glow ---------- */

.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(227, 239, 38, 0.28) 0%,
    rgba(227, 239, 38, 0.08) 50%,
    rgba(227, 239, 38, 0) 70%
  );
  pointer-events: none;
  z-index: 40;
  opacity: 0;
  transition: opacity 0.35s ease;
  will-change: transform;
}

.cursor-glow.is-visible {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .cursor-glow {
    display: none;
  }
}

/* ---------- Reveal-on-scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Visually hidden, still read out by screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Mobile polish: fewer moving parts, tighter spacing ---------- */

.fb-signin {
  white-space: nowrap;
}

@media (max-width: 640px) {
  /* Home: Fat Build panel */
  .fb-panel {
    gap: 22px;
    padding: 34px 20px 26px;
  }

  .fb-steps,
  .fb-chip {
    display: none;
  }

  .fb-copy > p {
    margin-bottom: 20px;
  }

  .fb-stage {
    padding: 4px 0 8px;
  }

  /* Home: the desk */
  .process {
    padding: 44px 16px 36px;
  }

  .desk-board {
    gap: 22px;
    padding-top: 18px;
  }

  /* Services page: lighter cards */
  .stack-card {
    gap: 16px;
    padding: 22px 20px 24px;
  }

  .stack-intro {
    padding-bottom: 16px;
    font-size: 1rem;
  }

  .stack-chips {
    gap: 6px;
  }

  .stack-chips li {
    padding: 5px 11px;
    font-size: 0.8rem;
  }

  /* Footer: compact */
  .site-footer {
    padding: 44px 0 22px;
  }

  .footer-grid {
    gap: 26px;
    padding-bottom: 28px;
  }

  .footer-brand img {
    margin-bottom: 12px;
  }

  .footer-social {
    margin-top: 14px;
  }

  .footer-heading {
    margin-bottom: 12px;
  }

  .footer-col ul {
    gap: 10px;
  }

  .footer-brand + .footer-col ul {
    grid-template-columns: 1fr 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-top: 20px;
  }
}

/* 404 page */
.not-found-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

/* Cookie banner (only appears once analytics is switched on) */
.consent {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 90;
  max-width: 400px;
  padding: 18px 20px;
  border-radius: 16px;
  color: var(--cream);
  background: var(--teal-darkest);
  box-shadow: 0 20px 40px -16px rgba(6, 35, 29, 0.6);
}

.consent p {
  margin: 0 0 14px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: rgba(255, 253, 238, 0.88);
}

.consent a {
  color: var(--lime);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.consent-actions {
  display: flex;
  gap: 10px;
}

.consent-btn {
  padding: 9px 20px;
  border: 1.5px solid rgba(255, 253, 238, 0.4);
  border-radius: 999px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--cream);
  background: transparent;
  cursor: pointer;
}

.consent-btn--accept {
  border-color: var(--lime);
  color: var(--teal-darkest);
  background: var(--lime);
}

.consent-btn:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 2px;
}

@media (max-width: 560px) {
  .consent {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: none;
  }
}
