/* John Pajegal portfolio. Ink on grid paper; colours match the logo kit. */

/* Archivo and Gochi Hand, both SIL Open Font License (free for commercial and logo use) */
@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

@font-face {
  font-family: "Gochi Hand";
  src: url("fonts/gochi-hand.woff2") format("woff2");
  font-display: swap;
}

:root {
  /* Light mode. The admin's colour pickers set --ink-l, --paper-l and --grid-l */
  --ink-l: #141414;
  --paper-l: #ebebea;
  --grid-l: #d5d5d3;
  --ink: var(--ink-l);
  --paper: var(--paper-l);
  --grid: var(--grid-l);
  --surface: #ffffff;       /* cards, chips, hovered buttons */
  --on-ink: #ffffff;        /* text and icons sitting on ink */
  --print: #ffffff;         /* the about photo stays a light print in both modes */
  --muted: #55554f;         /* 6.4:1 on paper */
  --muted-dark: #c9c9c6;    /* muted text on ink */
  --line-dark: #3a3a37;     /* lines on ink */
  --danger: #b3261e;        /* form errors */
  --live: #e5372b;          /* the "Live" dot on website cards */
  --gutter: clamp(16px, 4vw, 48px);
  --nav-h: 60px;
  --font: "Archivo", "Arial Black", Arial, sans-serif;
  --hand: "Gochi Hand", "Comic Sans MS", cursive;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);      /* arrivals */
  --ease-in-out: cubic-bezier(0.77, 0, 0.18, 1);  /* wipes and curtains */
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);    /* pops with a little overshoot */
}

/* Dark mode: ink and paper swap places, so ink-filled bands (skills strip, contact, footer) turn light */
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: var(--paper-l);
  --paper: var(--ink-l);
  --grid: #2b2b29;
  --surface: #1e1e1c;
  --on-ink: var(--ink-l);
  --muted: #b3b3ad;         /* 9:1 on dark paper */
  --muted-dark: #4d4d48;    /* 7.5:1 on light ink */
  --line-dark: #c4c4bf;
  --danger: #ff8a80;
}

/* Switching modes: the new colours spread out from the button (app.js drives it) */
::view-transition-old(root),
::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: clamp(16px, 1.1vw, 18px);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body.menu-open { overflow: hidden; }

[hidden] { display: none !important; }

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

a { color: inherit; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--on-ink);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

section[id] { scroll-margin-top: calc(var(--nav-h) + 2px); }

.paper-grid {
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 44px 44px;
  background-position: -1px -1px;
}

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hand {
  font-family: var(--hand);
  font-weight: 400;
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.1;
}

.hand-arrow {
  display: inline-block;
  width: 0.7em;
  height: 1em;
  vertical-align: -0.2em;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hand-arrow.is-up { transform: rotate(180deg); }

/* ---------- Buttons ---------- */
.btn {
  --shadow: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 48px;
  padding: 0 22px;
  border: 2px solid var(--ink);
  font: 800 15px/1 var(--font);
  font-stretch: 110%;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background-color 0.18s, color 0.18s;
}

.btn:hover { transform: translate(-3px, -3px); box-shadow: 3px 3px 0 var(--shadow); }
.btn:active { transform: none; box-shadow: none; }

.btn-ink { background: var(--ink); color: var(--on-ink); }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: var(--surface); }
.btn-paper { --shadow: var(--on-ink); background: var(--paper); color: var(--ink); border-color: var(--paper); }

/* ---------- Nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: var(--nav-h);
}

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

.nav-links { display: flex; flex-shrink: 0; gap: clamp(18px, 1.6vw, 28px); margin-left: auto; }
.nav-logo, .nav-cta, .theme-switch { flex-shrink: 0; }
.nav-cta { white-space: nowrap; }

.nav-links a {
  position: relative;
  padding: 8px 0;
  white-space: nowrap;
  font-weight: 700;
  font-stretch: 105%;
  text-decoration: none;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 2px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s var(--ease);
}

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

.nav-cta { min-height: 40px; padding: 0 16px; font-size: 13px; }

.menu-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  height: 44px;
  margin-left: auto;
  padding: 0 14px;
  border: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font: 800 14px/1 var(--font);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

/* Light / dark switch, beside the menu */
.theme-switch { display: flex; flex: none; margin-left: -12px; border: 2px solid var(--ink); }

.theme-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.18s, color 0.18s;
}

.theme-btn + .theme-btn { border-left: 2px solid var(--ink); }
.theme-btn:hover { background: var(--surface); }
.theme-btn[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }
.theme-btn .icon { width: 18px; height: 18px; }

.menu-toggle .icon-close,
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

.mobile-menu {
  position: fixed;
  inset: calc(var(--nav-h) + 2px) 0 0 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  padding: 24px var(--gutter) 40px;
  overflow-y: auto;
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 44px 44px;
}

.mobile-menu[hidden] { display: none; }

.mobile-menu nav { display: flex; flex-direction: column; }

.mobile-menu nav a {
  padding: 14px 0;
  border-bottom: 2px solid var(--ink);
  font-size: clamp(40px, 12vw, 72px);
  font-weight: 900;
  font-stretch: 125%;
  line-height: 1;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  text-decoration: none;
}

.mobile-menu .hand { margin: 0; transform: rotate(-3deg); }

/* Too many links for this width (app.js fitNav): the ones that don't fit are hidden and the
   Menu button joins the bar */
.site-nav.is-compact .menu-toggle { display: inline-flex; margin-left: 0; }
.nav-links a[hidden] { display: none; }

@media (max-width: 1200px) {
  .nav-inner { gap: 10px; }
  .nav-links,
  .nav-cta { display: none; }
  .menu-toggle { display: inline-flex; margin-left: 0; }
  .theme-switch { margin-left: auto; }
  .theme-btn { width: 44px; height: 40px; }
}

@media (max-width: 360px) {
  .theme-btn { width: 40px; }
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(24px, 4vw, 44px) 0 clamp(40px, 6vw, 72px);
  border-bottom: 2px solid var(--ink);
}

.hero-labels {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.hero-labels p {
  margin: 0;
  font-size: clamp(14px, 2.2vw, 30px);
  font-weight: 800;
  font-stretch: 115%;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

/* Face position inside the logo image (from logo/layout.json), used to aim the note */
.hero-logo {
  --face-x: 13.8%;
  --face-bottom: 94.3%;
  position: relative;
  margin: clamp(28px, 4.5vw, 52px) 0 0;
}

.hero-logo picture { display: block; }
.hero-logo img { width: 100%; }

.hero-note {
  position: absolute;
  left: var(--face-x);
  top: var(--face-bottom);
  display: flex;
  align-items: flex-end;
  gap: 0.1em;
  margin-top: 0.2em;
  transform: translateX(-0.42em);
  font-family: var(--hand);
  font-size: clamp(20px, 2.9vw, 40px);
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
}

.hero-note svg {
  flex: none;
  fill: none;
  stroke: var(--ink);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-note .arrow-up { width: 1.25em; height: auto; }
.hero-note .arrow-left,
.hero-note .note-short { display: none; }

.hero-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 28px 40px;
  margin-top: clamp(110px, 11vw, 170px);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  padding: 6px 12px;
  border: 2px solid var(--ink);
  background: var(--surface);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status-dot {
  position: relative;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ink);
}

.status-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
  from { transform: scale(0.6); opacity: 1; }
  to { transform: scale(1.7); opacity: 0; }
}

.lead {
  max-width: 34ch;
  margin: 0;
  font-size: clamp(19px, 1.7vw, 24px);
  font-weight: 500;
  line-height: 1.4;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

@media (max-width: 720px) {
  .hero-logo { --face-x: 68%; --face-bottom: 14%; }

  .hero-note {
    align-items: flex-start;
    gap: 0.2em;
    margin-top: 0;
    transform: none;
    font-size: clamp(16px, 4.8vw, 30px);
  }

  .hero-note .arrow-up,
  .hero-note .note-long { display: none; }
  .hero-note .note-short { display: inline; }

  .hero-note .arrow-left { display: block; width: 1.3em; height: auto; margin-top: 0.35em; }

  .hero-bottom { margin-top: 36px; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { flex: 1 1 auto; }
}

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  padding: 18px 0;
  background: var(--ink);
  color: var(--on-ink);
  border-bottom: 2px solid var(--ink);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 34s linear infinite;
}

.marquee:hover .marquee-track { animation-play-state: paused; }

.marquee ul {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
  margin: 0;
  padding: 0 clamp(20px, 3vw, 40px) 0 0;
  list-style: none;
}

.marquee li {
  font-size: clamp(26px, 4vw, 52px);
  font-weight: 900;
  font-stretch: 125%;
  line-height: 1;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.marquee img {
  width: auto;
  height: 1em;
  padding: 0.12em;
  box-sizing: content-box;
  border-radius: 50%;
  background: var(--paper-l);
}

@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section {
  padding: clamp(64px, 9vw, 128px) 0;
  border-bottom: 2px solid var(--ink);
}

.section-head {
  position: relative;
  display: grid;
  gap: 12px;
  margin-bottom: clamp(32px, 5vw, 64px);
}

.section-label {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-title {
  margin: 0;
  font-size: clamp(34px, 10vw, 112px);
  font-weight: 900;
  font-stretch: 125%;
  line-height: 0.9;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}

.count {
  font-size: 0.32em;
  font-weight: 700;
  font-stretch: 100%;
  letter-spacing: 0;
  vertical-align: top;
}

/* Handwritten note in a section head: sits on the label row, clear of the big title */
.head-note {
  position: absolute;
  top: -0.3em;
  right: 0;
  margin: 0;
  transform: rotate(-4deg);
}

/* Work: aim the note's arrow at the first (favourite) card */
#work .head-note { top: auto; right: auto; bottom: -0.4em; left: 36%; }

@media (max-width: 1024px) {
  .head-note { position: static; justify-self: end; }
  #work .head-note { position: static; justify-self: start; margin-left: clamp(40px, 18vw, 240px); }
}

/* ---------- Work ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
}

.project { grid-column: span 5; }
.project-wide { grid-column: span 7; }
.project-full { grid-column: 1 / -1; }

@media (max-width: 860px) {
  .project,
  .project-wide { grid-column: 1 / -1; }
}

.project-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 2px solid var(--ink);
  background: var(--surface);
  text-decoration: none;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.project-link:hover,
.project-link:focus-visible { transform: translate(-6px, -6px); box-shadow: 6px 6px 0 var(--ink); }

/* Same media height for every card so the text blocks line up across a row */
.project-media {
  height: clamp(210px, 30vw, 440px);
  overflow: hidden;
  border-bottom: 2px solid var(--ink);
  background: var(--surface);
}

.project-media svg {
  display: block;
  width: 100%;
  height: 100%;
  transition: transform 0.4s var(--ease);
}

.project-link:hover .project-media svg { transform: scale(1.03); }

.project-meta {
  display: grid;
  flex: 1;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto 1fr;
  gap: 4px 16px;
  padding: 18px 20px 20px;
}

.project-num {
  align-self: start;
  padding: 2px 6px;
  border: 2px solid var(--ink);
  font-size: 14px;
  font-weight: 900;
  font-stretch: 125%;
}

.project-text { grid-row: span 2; }

.project-text h3 {
  margin: 0;
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 900;
  font-stretch: 125%;
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.project-text p { margin: 8px 0 12px; color: var(--muted); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }

.tags li {
  padding: 3px 8px;
  border: 1.5px solid var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.project-year { justify-self: end; font-size: 14px; font-weight: 700; }

.project-go {
  grid-column: 3;
  grid-row: 2;
  justify-self: end;
  align-self: end;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: var(--ink);
  color: var(--on-ink);
  transition: transform 0.2s var(--ease);
}

.project-link:hover .project-go { transform: rotate(45deg); }

/* Phones: number, year and arrow on one row, text full width below */
@media (max-width: 560px) {
  .project-meta { grid-template-rows: auto auto; align-items: center; gap: 12px; }
  .project-year { grid-column: 2; grid-row: 1; justify-self: start; }
  .project-go { grid-column: 3; grid-row: 1; width: 40px; height: 40px; }
  .project-text { grid-column: 1 / -1; grid-row: 2; }
}

/* ---------- All projects: filters + gallery ---------- */
.more-work { margin-top: clamp(56px, 8vw, 104px); }

.more-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 20px;
}

.more-head h3 {
  margin: 0;
  font-size: clamp(26px, 3.4vw, 44px);
  font-weight: 900;
  font-stretch: 125%;
  line-height: 1;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.work-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; padding: 0; list-style: none; }

.filter-btn {
  min-height: 44px;
  padding: 0 16px;
  border: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font: 700 13px/1 var(--font);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.18s, color 0.18s;
}

.filter-btn:hover { background: var(--surface); }
.filter-btn[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }

.filter-count { margin-left: 6px; font-weight: 600; opacity: 0.7; }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: clamp(14px, 1.6vw, 20px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.gallery-item[hidden] { display: none; }

.tile {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 2px solid var(--ink);
  background: var(--surface);
  text-decoration: none;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.tile:hover,
.tile:focus-visible { transform: translate(-4px, -4px); box-shadow: 4px 4px 0 var(--ink); }

.tile-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-bottom: 2px solid var(--ink);
  background: var(--paper);
}

.tile-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease); }
.tile:hover .tile-media img { transform: scale(1.04); }

.media-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  background: var(--ink);
  color: var(--on-ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.media-badge .icon { width: 14px; height: 14px; }
.icon.icon-fill { fill: currentColor; stroke: none; }

.tile-body { display: grid; gap: 4px; padding: 12px 14px 14px; }

.tile-title {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  font-stretch: 115%;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.tile-cat { margin: 0; color: var(--muted); font-size: 14px; font-weight: 600; }

/* Featured cards use real images now */
.project-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease); }
.project-link:hover .project-media img { transform: scale(1.03); }
.project-media { position: relative; }

/* ---------- Viewer (dialog) ---------- */
.viewer {
  width: min(1100px, 94vw);
  max-width: none;
  max-height: 94vh;
  padding: 0;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 10px 10px 0 var(--ink);
}

.viewer::backdrop { background: rgba(20, 20, 20, 0.78); }

.viewer-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 10px 18px;
  border-bottom: 2px solid var(--ink);
}

.viewer-head h3 {
  flex: 1;
  margin: 0;
  overflow: hidden;
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 900;
  font-stretch: 115%;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.viewer-open { min-height: 44px; padding: 0 14px; font-size: 13px; }

.viewer-close {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border: 2px solid var(--ink);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.viewer-frame { height: min(76vh, calc(94vw * 0.6)); background: var(--ink); }
.viewer-frame iframe { display: block; width: 100%; height: 100%; border: 0; }

@media (max-width: 560px) {
  .viewer-open .label { display: none; }
}

/* ---------- Testimonials (Admin → Testimonials) ---------- */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 22px; margin: 0; padding: 0; list-style: none; }
.quote {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: clamp(22px, 3vw, 32px);
  border: 2px solid var(--ink);
  background: var(--surface);
  box-shadow: 6px 6px 0 var(--ink);
}
.quote:nth-child(odd) { rotate: -0.6deg; }
.quote:nth-child(even) { rotate: 0.6deg; }
.quote-mark { height: 34px; font-size: 92px; font-weight: 900; line-height: 0.75; }
.quote blockquote { margin: 0; }
.quote blockquote p { margin: 0; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.5; }
.quote-by { display: flex; align-items: center; gap: 12px; margin: auto 0 0; }
.quote-by img,
.quote-initial { flex: none; width: 48px; height: 48px; border: 2px solid var(--ink); border-radius: 50%; object-fit: cover; }
.quote-initial { display: grid; place-items: center; background: var(--ink); color: var(--on-ink); font-size: 20px; font-weight: 900; }
.quote-by strong { display: block; font-weight: 900; letter-spacing: 0.02em; text-transform: uppercase; }
.quote-by small { display: block; color: var(--muted); font-size: 14px; }

/* Client reviews: stars, the average on top, and the "Leave a review" form */
.quote-stars { color: #f5a623; font-size: 22px; letter-spacing: 2px; line-height: 1; }
.quote-stars span { color: var(--grid); }
.reviews-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 22px; font-weight: 700; }
.reviews-summary strong { font-size: 22px; font-weight: 900; }
.reviews-empty { margin: 0 0 8px; color: var(--muted); font-weight: 700; }
.reviews-empty[hidden], .reviews-summary[hidden] { display: none; }

.review-box { max-width: 640px; margin-top: 36px; }
.review-open .icon { width: 20px; height: 20px; }
.review-form { margin-top: 18px; padding: clamp(20px, 3vw, 28px); border: 2px solid var(--ink); background: var(--surface); box-shadow: 6px 6px 0 var(--ink); }
.review-form[hidden] { display: none; }
.review-intro { margin: 0 0 14px; font-weight: 700; }
.review-error { min-height: 1.2em; margin: 4px 0 10px; color: var(--danger); font-weight: 700; }
.review-error:empty { min-height: 0; margin: 0; }
.review-thanks { margin-top: 18px; padding: 16px 18px; border: 2px solid var(--ink); background: var(--surface); font-weight: 800; }
.review-thanks[hidden] { display: none; }

/* Star picker: radio buttons drawn as stars, right to left so hovering lights up the stars before it */
.star-pick { margin: 0 0 14px; padding: 0; border: 0; }
.star-pick legend { margin-bottom: 4px; padding: 0; font-size: 13px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.star-row { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.star-row input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.star-row label { color: var(--grid); font-size: 38px; line-height: 1; cursor: pointer; transition: color 0.15s, transform 0.15s var(--ease-out); }
.star-row input:checked ~ label,
.star-row label:hover,
.star-row label:hover ~ label { color: #f5a623; }
.star-row label:hover { transform: scale(1.12); }
.star-row input:focus-visible + label { outline: 3px solid var(--ink); outline-offset: 2px; }

/* ---------- Client counters (Admin → Brands) ---------- */
/* The number so far plus every call booked in that category; a red dot marks the live ones */
.counters { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 12px; margin: 0 0 14px; }
.counter { display: grid; align-content: start; gap: 10px; padding: clamp(16px, 2.4vw, 28px); border: 2px solid var(--ink); background: var(--surface); box-shadow: 6px 6px 0 var(--ink); }
.counter-num { font-size: clamp(44px, 7vw, 104px); font-weight: 900; font-stretch: 125%; line-height: 0.85; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.counter-label { display: flex; align-items: center; gap: 8px; font-size: clamp(12px, 1.2vw, 15px); font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.counter.is-live .counter-label::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--live); }
.motion-lively .counter.is-live .counter-label::before { animation: live-pulse 1.6s ease-in-out infinite; }
.counter.is-bumped { animation: counter-bump 0.9s var(--spring); }
.counters-note { margin: 0 0 clamp(28px, 4vw, 44px); text-align: right; transform: rotate(-2deg); }
@keyframes live-pulse { 50% { opacity: 0.3; } }
@keyframes counter-bump {
  35% { transform: translateY(-8px); box-shadow: 6px 14px 0 var(--live); }
}

@media (max-width: 760px) {
  .counters { gap: 8px; }
  .counter { gap: 8px; padding: 14px 10px; box-shadow: 4px 4px 0 var(--ink); }
  .counter-num { font-size: clamp(28px, 8.4vw, 44px); }
  .counter-label { gap: 6px; font-size: 10px; letter-spacing: 0.05em; }
}

/* ---------- Brands that trusted me ---------- */
/* Dark cards: the brand's video (optional) under a 70% black layer, the logo big in the middle and
   the name small in the top-left corner, like an identity tag */
.brands {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.brand {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  isolation: isolate;
  border: 2px solid var(--ink);
  background: #0b0b0b;
  color: #ffffff;
}

.brand-link {
  position: absolute;
  inset: 0;
  display: block;
  color: inherit;
  text-decoration: none;
}
a.brand-link:focus-visible { outline: 3px solid #ffffff; outline-offset: -7px; }

.brand-video {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out);
}

/* The 70% black layer, and a soft light that follows the mouse (lively mode) */
.brand-link::before,
.brand-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}
.brand-link::before { background: rgb(0 0 0 / 0.7); transition: background-color 0.35s var(--ease); }
.brand-link::after {
  z-index: -1;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgb(255 255 255 / 0.13), transparent 55%);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}

.brand-tag {
  position: absolute;
  top: 14px;
  left: 16px;
  right: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.86);
}
.brand-num {
  flex: none;
  padding: 2px 5px 1px;
  border: 1.5px solid currentColor;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}
.brand-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.brand-mark {
  position: absolute;
  inset: 20% 14% 16%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.45s var(--ease-out);
}
/* Each brand's Logo colour (Admin → Brands): colored as uploaded, all white, or all black */
.brand-logo { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.brand-logo.is-white { filter: brightness(0) invert(1); }
.brand-logo.is-black { filter: brightness(0); }

/* The brand's website along the bottom of the card, with Online/Offline from /api/sitecheck */
.brand-site {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: rgb(255 255 255 / 0.86);
}
.site-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: rgb(255 255 255 / 0.4); }
.site-domain { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-state { flex: none; margin-left: auto; padding: 2px 6px 1px; border: 1.5px solid currentColor; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; }
.site-state:empty { display: none; }
.brand-site.is-checking .site-state { opacity: 0.6; }
.brand-site.is-up .site-dot { background: #22c55e; box-shadow: 0 0 0 3px rgb(34 197 94 / 0.25); }
.brand-site.is-up .site-state { color: #4ade80; }
.brand-site.is-down .site-dot { background: #ef4444; }
.brand-site.is-down .site-state { color: #f87171; }
.motion-lively .brand-site.is-up .site-dot { animation: live-pulse 1.6s ease-in-out infinite; }
.brand-link:has(.brand-site) .brand-mark { bottom: 22%; }
@media (max-width: 760px) {
  .brand-site { left: 10px; right: 10px; bottom: 8px; gap: 6px; font-size: 9px; }
  .site-dot { width: 6px; height: 6px; }
  .site-state { padding: 1px 4px 0; font-size: 8px; letter-spacing: 0.08em; }
  .brand-link:has(.brand-site) .brand-mark { bottom: 20%; }
}

/* An all-black logo gets a light card: 70% white over the video instead of 70% black */
.brand.is-light { background: #f4f4f2; color: #141414; }
.brand.is-light .brand-link::before { background: rgb(255 255 255 / 0.7); }
.brand.is-light .brand-link::after { background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgb(0 0 0 / 0.07), transparent 55%); }
.brand.is-light .brand-tag { color: rgb(20 20 20 / 0.86); }
.brand.is-light:hover .brand-link::before { background-color: rgb(255 255 255 / 0.55); }
.brand.is-light a.brand-link:focus-visible { outline-color: #141414; }
.brand.is-light .brand-site { color: rgb(20 20 20 / 0.86); }
.brand.is-light .site-dot { background: rgb(20 20 20 / 0.35); }
.brand.is-light .brand-site.is-up .site-state { color: #15803d; }
.brand.is-light .brand-site.is-down .site-state { color: #b91c1c; }
.brand-word {
  font-size: clamp(20px, 2.3vw, 32px);
  font-weight: 900;
  font-stretch: 125%;
  line-height: 1;
  letter-spacing: -0.03em;
  text-align: center;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.brand-go {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 20px;
  height: 20px;
  opacity: 0.7;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease-out);
}

.brand:hover .brand-link::before { background-color: rgb(0 0 0 / 0.55); }
.brand:hover .brand-mark { transform: scale(1.06); }
.brand:hover .brand-video { transform: scale(1.05); }
.brand:hover .brand-go { opacity: 1; transform: translate(2px, -2px); }

@media (max-width: 760px) {
  .brands { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .brand { aspect-ratio: 1; }
  .brand-tag { top: 10px; left: 10px; right: 32px; gap: 6px; font-size: 9px; letter-spacing: 0.1em; }
  .brand-mark { inset: 24% 8% 12%; }
  .brand-word { font-size: clamp(12px, 3.4vw, 18px); overflow-wrap: break-word; }
  .brand-go { top: 9px; right: 9px; width: 16px; height: 16px; }
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: clamp(40px, 6vw, 96px);
}

.about-photo {
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 480px;
  margin: 0;
  padding: clamp(24px, 4vw, 44px);
  border: 2px solid var(--ink);
  background: var(--print);
  box-shadow: 10px 10px 0 var(--ink);
  transform: rotate(-2deg);
}

.about-photo img { width: 100%; }

.about-photo figcaption {
  position: absolute;
  right: 8%;
  bottom: -52px;
  transform: rotate(-5deg);
}

.about-text .section-title { margin: 12px 0 24px; }
.about-text > p { max-width: 60ch; margin: 0 0 16px; }
.about-text > p.lead { margin-bottom: 20px; }

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 28px 0;
  border-block: 2px solid var(--ink);
}

.facts div { padding: 14px 16px 14px 0; }
.facts div + div { padding-left: 16px; border-left: 2px solid var(--ink); }

.facts dt { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.facts dd { margin: 4px 0 0; font-weight: 600; line-height: 1.35; }

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

.toolbox li {
  padding: 6px 12px;
  border: 2px solid var(--ink);
  background: var(--surface);
  font-size: 14px;
  font-weight: 700;
}

.toolbox li:nth-child(odd) { transform: rotate(-1.5deg); }
.toolbox li:nth-child(even) { transform: rotate(1.5deg); }

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { width: calc(100% - 24px); max-width: 340px; margin-bottom: 40px; box-shadow: 6px 6px 0 var(--ink); }
}

@media (max-width: 560px) {
  .facts { grid-template-columns: 1fr; }
  .facts div + div { padding-left: 0; border-left: 0; border-top: 2px solid var(--ink); }
}

/* ---------- Services ---------- */
.services { margin: 0; padding: 0; list-style: none; border-top: 2px solid var(--ink); }

.service {
  display: grid;
  grid-template-columns: 64px minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: baseline;
  gap: 24px;
  padding: clamp(22px, 3vw, 36px) 0;
  border-bottom: 2px solid var(--ink);
}

.service-num {
  justify-self: start;
  padding: 2px 8px;
  background: var(--ink);
  color: var(--on-ink);
  font-size: 15px;
  font-weight: 800;
}

.service h3 {
  margin: 0;
  font-size: clamp(28px, 4.2vw, 60px);
  font-weight: 900;
  font-stretch: 125%;
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.service p { max-width: 46ch; margin: 0; color: var(--muted); }

@media (max-width: 760px) {
  .service { grid-template-columns: 1fr; gap: 12px; }
}

/* ---------- Process ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.step { padding: 24px; border: 2px solid var(--ink); background: var(--surface); }

.step-num {
  display: block;
  margin-bottom: 28px;
  color: transparent;
  -webkit-text-stroke: 2px var(--ink);
  font-size: clamp(44px, 5vw, 68px);
  font-weight: 900;
  font-stretch: 125%;
  line-height: 1;
  letter-spacing: -0.04em;
}

.step h3 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 900;
  font-stretch: 125%;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.step p { margin: 0; color: var(--muted); }

@media (max-width: 1024px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact { padding-bottom: clamp(48px, 6vw, 80px); background: var(--ink); color: var(--paper); border-bottom: 0; }
.contact .section-label { color: var(--muted-dark); }
.contact :focus-visible,
.site-footer :focus-visible { outline-color: var(--paper); }

.contact-title {
  max-width: 12ch;
  margin: 16px 0 clamp(32px, 5vw, 56px);
  font-size: clamp(34px, 10vw, 132px);
  font-weight: 900;
  font-stretch: 125%;
  line-height: 0.9;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}

.contact-email { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }

.email-link {
  overflow-wrap: anywhere;
  font-size: clamp(24px, 4.2vw, 60px);
  font-weight: 800;
  font-stretch: 115%;
  letter-spacing: -0.02em;
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 0.18em;
}

.email-link:hover { text-decoration-thickness: 6px; }

.copy-status { font-weight: 700; }

.contact-note { flex-basis: 100%; margin: 4px 0 0; color: var(--paper); transform: rotate(-2deg); }

.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: clamp(40px, 6vw, 72px) 0 0;
  padding: 24px 0 0;
  border-top: 2px solid var(--line-dark);
  list-style: none;
}

.socials a {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  min-height: 44px;
  padding: 0 16px;
  border: 2px solid var(--paper);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 0.18s, color 0.18s;
}

.socials a:hover { background: var(--paper); color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer { padding: 0 0 24px; background: var(--ink); color: var(--paper); }

.footer-logo { width: 100%; padding: clamp(32px, 5vw, 64px) 0; border-top: 2px solid var(--line-dark); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 16px;
  padding-top: 16px;
  border-top: 2px solid var(--line-dark);
  font-size: 14px;
}

.footer-bottom p { margin: 0; }

/* Business and legal links (their text is in Admin → Legal pages) */
.footer-legal { display: flex; flex-wrap: wrap; gap: 8px 0; margin-top: 18px; font-size: 14px; font-weight: 700; }
.footer-legal a { color: inherit; text-decoration: none; }
.footer-legal a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer-legal a + a::before { content: "|"; display: inline-block; margin: 0 12px; opacity: 0.5; }

/* ---------- Business and legal pages (business.html, terms.html, privacy.html, disputes.html) ---------- */
.policy { max-width: 760px; padding-top: clamp(40px, 8vw, 96px); padding-bottom: clamp(48px, 8vw, 96px); }
.policy-back { display: inline-block; margin-bottom: 32px; color: var(--ink); font-weight: 800; }
.policy-title { margin: 0 0 10px; font-size: clamp(30px, 8.4vw, 72px); font-weight: 900; font-stretch: 125%; line-height: 0.95; letter-spacing: -0.03em; text-transform: uppercase; }
.policy-updated { margin: 0 0 8px; color: var(--muted); font-size: 14px; }
.policy-body h2 { margin: 40px 0 10px; font-size: 20px; font-weight: 900; font-stretch: 125%; text-transform: uppercase; }
.policy-body p, .policy-body li { font-size: 17px; line-height: 1.6; }
.policy-body p { margin: 0 0 14px; }
.policy-body ul { margin: 0 0 14px; padding-left: 22px; }
.policy-body a, .policy-links a { color: inherit; text-underline-offset: 3px; }
.policy-links { display: flex; flex-wrap: wrap; gap: 10px 0; margin-top: 56px; padding-top: 20px; border-top: 2px solid var(--ink); font-size: 14px; font-weight: 700; }
.policy-links a { text-decoration: none; }
.policy-links a[aria-current="page"], .policy-links a:hover { text-decoration: underline; }
.policy-links a + a::before { content: "|"; display: inline-block; margin: 0 12px; opacity: 0.5; text-decoration: none; }

/* Phones: the links wrap, so space them out instead of starting a line with "|" */
@media (max-width: 600px) {
  .footer-legal, .policy-links { gap: 10px 20px; }
  .footer-legal a + a::before, .policy-links a + a::before { display: none; }
}

.to-top {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  min-height: 44px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
}

.to-top:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Hero: highlight tag ---------- */
.hero-highlight {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 8px 14px;
  background: var(--ink);
  color: var(--on-ink);
  font-size: clamp(13px, 1.1vw, 15px);
  font-weight: 800;
  font-stretch: 110%;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
  transform: rotate(-2deg);
}

.hero-highlight .icon { width: 18px; height: 18px; }

/* ---------- Work: websites ---------- */
.sites { margin-bottom: clamp(48px, 7vw, 96px); }

.site-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
  gap: clamp(16px, 2vw, 28px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 2px solid var(--ink);
  background: var(--surface);
  text-decoration: none;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.site-card:hover,
.site-card:focus-visible { transform: translate(-6px, -6px); box-shadow: 6px 6px 0 var(--ink); }

.site-frame { border-bottom: 2px solid var(--ink); }

.site-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 2px solid var(--ink);
  background: var(--paper);
  font-size: 13px;
  font-weight: 700;
}

.site-dots { display: flex; gap: 5px; }
.site-dots i { width: 10px; height: 10px; border: 2px solid var(--ink); border-radius: 50%; }

.site-url {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  padding: 3px 10px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--surface);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-live { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
.live-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--live); }
.live-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 2px solid var(--live);
  border-radius: 50%;
  animation: pulse 2s ease-out infinite;
}

.site-shot { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper); }
.site-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.5s var(--ease-out); }
.site-card:hover .site-shot img { transform: scale(1.04); }

.site-meta { display: grid; gap: 6px; padding: 16px 18px 18px; }

.site-title {
  margin: 0;
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 900;
  font-stretch: 125%;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.site-meta p { margin: 0; color: var(--muted); }

.site-visit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Viewer: desktop / phone switch for websites */
.viewer-sizes { display: none; border: 2px solid var(--ink); }
.viewer.is-site .viewer-sizes { display: flex; }

.viewer-sizes button {
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: 800 12px/1 var(--font);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}

.viewer-sizes button + button { border-left: 2px solid var(--ink); }
.viewer-sizes button[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }
.viewer-frame.is-phone { display: grid; justify-items: center; padding: 12px 0; background: var(--paper); }
.viewer-frame.is-phone iframe { width: 390px; max-width: 100%; border: 2px solid var(--ink); border-radius: 18px; }

@media (max-width: 560px) {
  .viewer.is-site .viewer-sizes { display: none; }
}

/* ---------- Websites offer ---------- */
.offer-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
}

.offer-lead { max-width: 40ch; margin-bottom: 28px; }

/* The "Coming soon" sticker and its line (Admin → Websites offer) */
.soon { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-bottom: 26px; }
.soon-sticker {
  display: inline-block;
  padding: 8px 14px 6px;
  border: 2px solid var(--ink);
  background: var(--live);
  color: #ffffff;
  box-shadow: 4px 4px 0 var(--ink);
  font-size: clamp(15px, 1.5vw, 19px);
  font-weight: 900;
  font-stretch: 125%;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transform: rotate(-2deg);
}
.soon-text { color: var(--ink); font-weight: 800; text-decoration: underline; text-underline-offset: 4px; }
.soon-text .icon { margin-left: 4px; vertical-align: -0.2em; transition: transform 0.2s var(--ease); }
.soon-text:hover .icon { transform: translateX(4px); }

/* Payment terms (Admin → Websites offer); the booking form repeats them under its button */
.terms { max-width: 46ch; margin-top: 32px; padding: 18px 22px 20px; border: 2px dashed var(--ink); background: var(--surface); }
.terms-title { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 13px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.terms-title .icon { width: 20px; height: 20px; }
.terms ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.terms li { display: flex; align-items: flex-start; gap: 10px; font-weight: 700; line-height: 1.4; }
.terms li .icon { flex: none; width: 20px; height: 20px; margin-top: 2px; }
.booker-terms { display: flex; align-items: flex-start; gap: 8px; margin: 14px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.booker-terms .icon { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.booker-terms strong { color: var(--ink); }
.offer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; }

.price-sticker {
  display: grid;
  margin: 0;
  padding: 12px 18px;
  border: 2px solid var(--ink);
  background: var(--surface);
  box-shadow: 5px 5px 0 var(--ink);
  transform: rotate(3deg);
}

.price-sticker span { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.price-sticker strong { font-size: clamp(28px, 3.2vw, 44px); font-weight: 900; font-stretch: 125%; line-height: 1; letter-spacing: -0.03em; }

.offer-points { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }

.offer-point {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  padding: 20px;
  border: 2px solid var(--ink);
  background: var(--surface);
}

.offer-point:nth-child(even) { margin-left: clamp(0px, 3vw, 40px); }
.offer-point:nth-child(odd) { margin-right: clamp(0px, 3vw, 40px); }

.point-icon { display: grid; place-items: center; width: 52px; height: 52px; background: var(--ink); color: var(--on-ink); }
.point-icon .icon { width: 28px; height: 28px; }

.offer-point h3 {
  margin: 2px 0 4px;
  font-size: 20px;
  font-weight: 900;
  font-stretch: 125%;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.offer-point p { margin: 0; color: var(--muted); }

@media (max-width: 960px) {
  .offer-grid { grid-template-columns: 1fr; }
  .offer-point:nth-child(n) { margin: 0; }
}

/* Website plans and Hire me (Admin → Websites offer) */
.plans { margin-top: clamp(48px, 7vw, 96px); }
.plans-title, .hire-title {
  margin: 0 0 clamp(24px, 3vw, 36px);
  font-size: clamp(30px, 4.4vw, 60px);
  font-weight: 900;
  font-stretch: 112%;
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}
.plans-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 24px); margin: 0; padding: 0; list-style: none; }
.plan { position: relative; display: flex; flex-direction: column; gap: 14px; padding: clamp(20px, 2.4vw, 30px); border: 3px solid var(--ink); background: var(--surface); }
.plan.is-featured { background: var(--ink); color: var(--on-ink); box-shadow: 6px 6px 0 var(--live); }
.plan-badge { position: absolute; top: -16px; right: 16px; padding: 5px 10px 4px; background: var(--live); color: #ffffff; font-size: 13px; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; transform: rotate(3deg); }
.plan-name { margin: 0; font-size: 16px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.plan-price { display: grid; gap: 4px; margin: 0; }
.plan-price strong { font-size: clamp(36px, 4vw, 52px); font-weight: 900; line-height: 1; letter-spacing: -0.03em; }
.plan-price span { font-size: 18px; font-weight: 800; }
.plan-price em { font-size: 14px; font-style: normal; font-weight: 700; opacity: 0.75; }
.plan-features { align-self: flex-start; margin: 0; padding: 5px 10px 4px; background: var(--ink); color: var(--on-ink); font-size: 14px; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; }
.plan.is-featured .plan-features { background: var(--on-ink); color: var(--ink); }
.plan-items { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; font-weight: 700; line-height: 1.35; }
.plan-items li { display: flex; align-items: flex-start; gap: 8px; }
.plan-items .icon { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--live); }
.plans-note { margin: 18px 0 0; color: var(--muted); font-weight: 700; }

.hire { display: grid; gap: clamp(18px, 2.4vw, 28px); margin-top: clamp(48px, 7vw, 96px); padding: clamp(22px, 3vw, 40px); border: 3px solid var(--ink); background: var(--surface); }
.hire-title { margin: 0; }
.hire-lead { margin: 10px 0 0; font-size: clamp(17px, 1.6vw, 20px); font-weight: 700; }
.hire-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.hire-item { padding: 18px 20px; background: var(--ink); color: var(--on-ink); }
.hire-item.is-accent { background: var(--live); color: #ffffff; }
.hire-item p { margin: 6px 0 0; line-height: 1.4; }
.hire-item .hire-name { margin: 0; font-size: clamp(20px, 2vw, 26px); font-weight: 900; font-stretch: 112%; text-transform: uppercase; }
.hire .btn { justify-self: start; }

@media (max-width: 860px) {
  .plans-grid, .hire-grid { grid-template-columns: 1fr; }
  .plan + .plan { margin-top: 8px; }
}

/* ---------- Booking calendar ---------- */
.booking-lead { max-width: 48ch; margin: -12px 0 clamp(28px, 4vw, 48px); }
.booker-flow { display: grid; gap: clamp(16px, 2vw, 24px); }

/* "Show times in": main time zones as buttons, every other zone in a list */
.zone-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  padding: 14px clamp(16px, 2vw, 24px);
  border: 2px solid var(--ink);
  background: var(--surface);
}

.zone-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 15px;
  font-weight: 900;
  font-stretch: 115%;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.zone-title .icon { width: 20px; height: 20px; }
.zone-options { display: flex; flex-wrap: wrap; gap: 8px; }

.zone-btn {
  display: grid;
  justify-items: start;
  gap: 2px;
  min-height: 48px;
  padding: 6px 14px;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font: 900 14px/1.1 var(--font);
  font-stretch: 110%;
  text-align: left;
  text-transform: uppercase;
  cursor: pointer;
}

.zone-btn small { font-size: 11px; font-weight: 600; letter-spacing: 0.02em; opacity: 0.75; text-transform: none; }
.zone-btn:hover { background: var(--surface); }
.zone-btn[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }

.zone-select {
  min-height: 48px;
  max-width: 100%;
  padding: 0 12px;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font: 700 14px/1 var(--font);
  cursor: pointer;
}

.zone-select.is-picked { background: var(--ink); color: var(--on-ink); }

@media (max-width: 560px) {
  .zone-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .zone-btn { padding: 6px 8px; font-size: 13px; }
  .zone-select { grid-column: 1 / -1; }
}

.booker-box {
  min-width: 0;
  margin: 0;
  padding: clamp(16px, 2vw, 24px);
  border: 2px solid var(--ink);
  background: var(--surface);
}

/* Floated so the legend sits inside the box instead of on its border */
.step-title {
  float: left;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0 0 16px;
  padding: 0;
  font-size: clamp(18px, 1.6vw, 22px);
  font-weight: 900;
  font-stretch: 125%;
  letter-spacing: -0.01em;
  line-height: 1.1;
  text-transform: uppercase;
}

.booker-box > :not(.step-title) { clear: both; }

.step-badge {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  background: var(--ink);
  color: var(--on-ink);
  font-size: 15px;
}

.cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }

.cat-card {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 18px 16px;
  border: 2px solid var(--ink);
  background: var(--paper);
  cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background-color 0.18s, color 0.18s;
}

.cat-card:hover { transform: translate(-3px, -3px); box-shadow: 3px 3px 0 var(--ink); }
.cat-card:focus-within { outline: 3px solid var(--ink); outline-offset: 3px; }
.cat-card.is-picked { background: var(--ink); color: var(--on-ink); }

.cat-icon { display: grid; place-items: center; width: 56px; height: 56px; border: 2px solid currentColor; }
.cat-icon .icon { width: 30px; height: 30px; }
.cat-icon img { width: 34px; height: 34px; object-fit: contain; }

.cat-name {
  font-size: clamp(16px, 1.4vw, 20px);
  font-weight: 900;
  font-stretch: 125%;
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.cat-text { font-size: 14px; line-height: 1.4; opacity: 0.8; }

.booker-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(16px, 2vw, 24px);
}

.booker-side { display: grid; gap: clamp(16px, 2vw, 24px); }

.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.cal-month { margin: 0; font-size: 18px; font-weight: 900; font-stretch: 115%; text-transform: uppercase; }

.cal-nav {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.cal-nav:disabled { opacity: 0.3; cursor: not-allowed; }

.cal-week,
.cal-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }

.cal-week {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}

.cal-day {
  height: clamp(42px, 4vw, 56px);
  padding: 0;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font: 800 15px/1 var(--font);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}

.cal-day:hover:not(:disabled) { background: var(--surface); }
.cal-day.is-today { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.cal-day[aria-pressed="true"],
.cal-day[aria-pressed="true"]:hover { background: var(--ink); color: var(--on-ink); }
.cal-day:disabled { border-color: transparent; background: transparent; color: var(--muted); opacity: 0.5; cursor: default; }

.booker-hint { margin: 0 0 8px; color: var(--muted); }
.booker-hint:empty { display: none; }
.time-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }

.time-btn {
  min-height: 44px;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font: 800 14px/1 var(--font);
  cursor: pointer;
}

.time-btn:hover { background: var(--surface); }
.time-btn[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }

.booker-tz { display: flex; align-items: center; gap: 6px; margin: 12px 0 0; color: var(--muted); font-size: 13px; font-weight: 700; }
.booker-tz .icon { width: 16px; height: 16px; }
.booker-local { margin: 4px 0 0; font-size: 13px; font-weight: 700; }

.bfield { display: grid; gap: 6px; margin-bottom: 12px; }
.bfield > span { font-size: 13px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.bfield em { color: var(--muted); font-style: normal; font-weight: 600; letter-spacing: 0; text-transform: none; }

.bfield input,
.bfield textarea,
.bfield select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font: 500 16px/1.4 var(--font);
}

.bfield textarea { min-height: 88px; resize: vertical; }

/* Hidden from people; bots that fill every field get caught */
.booker-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.booker-error { min-height: 1.4em; margin: 0 0 10px; color: var(--danger); font-weight: 700; }
.booker-submit { width: 100%; }

.booker-done {
  display: grid;
  justify-items: start;
  gap: 12px;
  padding: clamp(24px, 4vw, 48px);
  border: 2px solid var(--ink);
  background: var(--surface);
  box-shadow: 8px 8px 0 var(--ink);
}

.done-icon { display: grid; place-items: center; width: 64px; height: 64px; background: var(--ink); color: var(--on-ink); }
.done-icon .icon { width: 36px; height: 36px; }

.done-title {
  margin: 0;
  font-size: clamp(32px, 5vw, 64px);
  font-weight: 900;
  font-stretch: 125%;
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.done-summary { margin: 0; font-size: clamp(18px, 1.6vw, 22px); font-weight: 700; }
.done-text { max-width: 52ch; margin: 0; color: var(--muted); }
.done-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.done-actions .icon { width: 18px; height: 18px; }
.done-again { border-color: transparent; background: transparent; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.done-again:hover { box-shadow: none; transform: none; }

@media (max-width: 960px) {
  .booker-row { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 400px) {
  .cat-card { padding: 14px 12px; }
  .cat-text { display: none; }
}

/* ---------- Scroll reveal (only when JS runs) ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.js .reveal.is-visible { opacity: 1; transform: none; }
.js .about-photo.reveal.is-visible { transform: rotate(-2deg); } /* keep the pinned-photo tilt */

/* ---------- Motion: "Lively" (Admin → Logos & colours → Animation) ---------- */
/* Everything with .motion-lively only runs when app.js sets that class on <html>:
   not for visitors who ask for reduced motion, and not when the admin picks "Calm". */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.line { display: block; }

/* Hero logo drawn inline so the face can move */
/* Where the face sits inside each logo file, as a share of the logo's box (measured from the SVGs) */
.logo-art {
  --face-l: 8.55%;
  --face-t: 6.39%;
  --face-w: 10.36%;
  --face-h: 86.87%;
  position: relative;
  display: block;
}

@media (max-width: 720px) {
  .logo-art { --face-l: 14.52%; --face-t: 4%; --face-w: 17.59%; --face-h: 54.31%; }
}

/* Poke the face: an invisible round button over it, and the speech bubble that pops out of the head */
.face-poke {
  position: absolute;
  left: var(--face-l);
  top: var(--face-t);
  width: var(--face-w);
  height: var(--face-h);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.face-poke:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }

.face-bubble {
  position: absolute;
  left: calc(var(--face-l) + var(--face-w) * 0.55);
  bottom: calc(100% - var(--face-t) + 0.55em);
  z-index: 5;
  padding: 0.4em 0.7em 0.35em;
  border: 3px solid #141414;
  border-radius: 0.9em;
  background: #ffffff;
  color: #141414;
  box-shadow: 5px 5px 0 var(--ink);
  font: 900 clamp(16px, 2.4vw, 34px)/1 var(--font);
  font-stretch: 125%;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  white-space: pre; /* one line each, as written in app.js (POKES) */
  line-height: 1.05;
  pointer-events: none;
  transform-origin: 1em 130%;
  rotate: var(--tilt, -4deg);
  scale: 0;
  opacity: 0;
  transition: scale 0.25s var(--ease), opacity 0.2s var(--ease);
}

/* Tail pointing down at the head */
.face-bubble::after {
  content: "";
  position: absolute;
  left: calc(0.9em + var(--tail, 0px)); /* --tail: how far app.js slid a long bubble left */
  bottom: -0.36em;
  width: 0.6em;
  height: 0.6em;
  border-right: 3px solid #141414;
  border-bottom: 3px solid #141414;
  background: #ffffff;
  transform: rotate(45deg);
}

.face-bubble.is-on { scale: 1; opacity: 1; transition: scale 0.45s var(--spring), opacity 0.1s; }

/* Calm or reduced motion: the bubble just appears */
html:not(.motion-lively) .face-bubble { scale: 1; transition: opacity 0.15s; }
.logo-svg { display: block; width: 100%; height: auto; overflow: visible; }
.logo-stacked { display: none; }

@media (max-width: 720px) {
  .logo-wide { display: none; }
  .logo-stacked { display: block; }
}

.logo-face { transform-box: fill-box; transform-origin: 50% 85%; }
.logo-letters { fill: var(--ink); }
.face-outline { display: none; } /* white sticker edge around the face, dark mode only */
[data-theme="dark"] .face-outline { display: inline; }
.eye { transform-box: fill-box; transform-origin: 50% 0; }
.mouth-open { transform-box: fill-box; transform-origin: 50% 0; transform: scaleY(0); } /* app.js opens it in time with the sound */

/* Opening animation: labels rise, logo is drawn on, face pops, note writes itself */
.motion-lively .hero.is-intro-wait .hero-labels,
.motion-lively .hero.is-intro-wait .hero-logo,
.motion-lively .hero.is-intro-wait .hero-bottom,
.motion-lively .hero.is-intro-wait + .marquee { opacity: 0; }

.motion-lively .hero.is-intro .hero-labels p { overflow: clip; }
.motion-lively .hero.is-intro .hero-labels span { display: inline-block; animation: rise-in 0.8s var(--ease-out) backwards; }
.motion-lively .hero.is-intro .hero-labels p + p span { animation-delay: 0.1s; }

.motion-lively .hero.is-intro .hero-logo picture,
.motion-lively .hero.is-intro .logo-art { animation: wipe-in 1s var(--ease-in-out) 0.15s backwards; }
.motion-lively .hero.is-intro .logo-face { animation: face-pop 0.9s var(--spring) 0.4s backwards; }
.motion-lively .hero.is-intro .logo-art.no-intro,
.motion-lively .hero.is-intro .no-intro .logo-face { animation: none; }

.motion-lively .hero.is-intro .hero-note { animation: write-in 0.8s var(--ease-out) 1.15s backwards; }
.motion-lively .hero.is-intro .hero-note path { stroke-dasharray: 1 2; animation: draw 0.6s var(--ease-out) 1.05s backwards; }

.motion-lively .hero.is-intro .hero-intro > *,
.motion-lively .hero.is-intro .hero-actions > * { animation: fade-up 0.7s var(--ease-out) backwards; }
.motion-lively .hero.is-intro .hero-intro > :nth-child(1) { animation-delay: 0.7s; }
.motion-lively .hero.is-intro .hero-intro > :nth-child(2) { animation-delay: 0.8s; }
.motion-lively .hero.is-intro .hero-intro > :nth-child(3) { animation-delay: 0.9s; }
.motion-lively .hero.is-intro .hero-actions > :nth-child(1) { animation-delay: 1s; }
.motion-lively .hero.is-intro .hero-actions > :nth-child(2) { animation-delay: 1.1s; }
.motion-lively .hero.is-intro + .marquee { animation: fade-in 0.6s var(--ease) 0.9s backwards; }

/* Skills strip: app.js moves it with your scrolling; the little faces rock as they pass */
.marquee-track.is-driven { animation: none; will-change: transform; }
.motion-lively .marquee img { rotate: var(--spin, 0deg); }

/* Big titles: each line slides up out of its own mask */
.motion-lively .line { overflow: visible clip; padding-block: 0.06em; margin-block: -0.06em; }
.motion-lively .line > span {
  display: block;
  transform: translateY(110%);
  transition: transform 0.9s var(--ease-out);
  transition-delay: calc(0.05s + var(--li, 0) * 0.09s);
}
.motion-lively .is-visible .line > span { transform: none; }

.motion-lively .section-head.reveal,
.motion-lively .contact-title.reveal { opacity: 1; transform: none; }
.motion-lively .section-head > .section-label { opacity: 0; translate: 0 12px; transition: opacity 0.5s var(--ease), translate 0.6s var(--ease-out); }
.motion-lively .section-head.is-visible > .section-label { opacity: 1; translate: none; }

/* Handwritten notes write themselves in, then their arrows get drawn */
.motion-lively .reveal .hand {
  clip-path: polygon(-6% -40%, -6% -40%, -6% 140%, -6% 140%);
  transition: clip-path 0.9s var(--ease-out) 0.5s;
}
.motion-lively .reveal.is-visible .hand { clip-path: polygon(-6% -40%, 106% -40%, 106% 140%, -6% 140%); }
.motion-lively .reveal .hand-arrow { stroke-dasharray: 1 2; stroke-dashoffset: 1.05; transition: stroke-dashoffset 0.5s var(--ease-out) 0.95s; }
.motion-lively .reveal.is-visible .hand-arrow { stroke-dashoffset: 0; }

/* Featured work: an ink curtain pulls off each image */
.motion-lively .project .project-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--ink);
  transform-origin: right;
  transition: transform 0.9s var(--ease-in-out) 0.15s;
}
.motion-lively .project.is-visible .project-media::after { transform: scaleX(0); }
.motion-lively .project-media img {
  scale: 1.15;
  translate: calc(var(--px, 0) * -4%) calc(var(--py, 0) * -4%);
  transition: scale 1.3s var(--ease-out) 0.15s, translate 0.6s var(--ease-out), transform 0.5s var(--ease-out);
}
.motion-lively .project.is-visible .project-media img { scale: 1; }
.motion-lively .project-link:hover .project-media img { transform: scale(1.08); }

/* Gallery tiles ripple in row by row */
.motion-lively .gallery-item.reveal { transition: opacity 0.5s var(--ease), transform 0.8s var(--ease-out); }
.motion-lively .gallery-item.reveal:not(.is-visible) { transform: translateY(40px) rotate(-2deg) scale(0.95); }

/* Brands pop in one by one */
.motion-lively .brands.reveal { opacity: 1; transform: none; }
.motion-lively .brands.reveal:not(.is-visible) .brand { opacity: 0; }
.motion-lively .brands.is-visible .brand { animation: pop-in 0.55s var(--spring) backwards; animation-delay: calc(var(--i, 0) * 0.06s); }

/* About: the photo swings into place like a pinned print; tool tags get tossed on */
.motion-lively .about-photo.reveal {
  transform: translate(-30px, 80px) rotate(-16deg);
  transition: opacity 0.5s var(--ease), transform 1.1s var(--spring), box-shadow 0.3s var(--ease);
}
.motion-lively .about-photo.reveal.is-visible { transform: rotate(-2deg); }
.motion-lively .about-text.reveal:not(.is-visible) .toolbox li { opacity: 0; }
.motion-lively .about-text.is-visible .toolbox li { animation: toss-in 0.6s var(--spring) backwards; animation-delay: calc(0.45s + var(--i, 0) * 0.06s); }

/* Process: the outlined numbers fill with ink */
.motion-lively .step-num {
  background: linear-gradient(var(--ink), var(--ink)) no-repeat left / 0% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  transition: background-size 0.9s var(--ease-in-out);
  transition-delay: calc(0.4s + var(--i, 0) * 0.12s);
}
.motion-lively .step.is-visible .step-num { background-size: 100% 100%; }

/* Footer logo rises up out of the floor */
.motion-lively .footer-logo {
  clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 100%);
  transition: clip-path 1.1s var(--ease-in-out);
}
.motion-lively .footer-logo.is-visible { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }

/* Reading progress: the line under the menu fills as you scroll */
.scroll-progress { display: none; }
.motion-lively .scroll-progress {
  display: block;
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 5px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}

/* Buttons lean toward the mouse (app.js sets translate) */
.motion-lively .btn { transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background-color 0.18s, color 0.18s, translate 0.3s var(--ease-out); }

/* Round sticker that follows the mouse over projects */
.cursor-badge {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 104px;
  height: 104px;
  margin: -52px 0 0 -52px;
  border: 2px solid var(--on-ink);
  border-radius: 50%;
  background: var(--ink);
  color: var(--on-ink);
  font: 900 14px/1 var(--font);
  font-stretch: 125%;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  pointer-events: none;
  scale: 0;
  transition: scale 0.35s var(--spring);
}
.cursor-badge.is-on { scale: 1; }
.cursor-badge .icon { width: 16px; height: 16px; }

/* Mouse-only effects */
@media (hover: hover) and (pointer: fine) {
  .motion-lively .cursor-badge { display: flex; }

  /* Brands: a soft light follows the mouse across the card */
  .motion-lively .brand:hover .brand-link::after { opacity: 1; }

  /* Services: the row floods with ink and the title steps forward */
  .motion-lively .service { position: relative; isolation: isolate; }
  .motion-lively .service::before {
    content: "";
    position: absolute;
    inset: 0 calc(-1 * var(--gutter));
    z-index: -1;
    background: var(--ink);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.45s var(--ease-out);
  }
  .motion-lively .service h3,
  .motion-lively .service p,
  .motion-lively .service-num { transition: color 0.3s var(--ease), background-color 0.3s var(--ease), transform 0.45s var(--ease-out); }
  .motion-lively .service:hover::before { transform: none; }
  .motion-lively .service:hover h3 { color: var(--paper); transform: translateX(14px); }
  .motion-lively .service:hover p { color: var(--muted-dark); }
  .motion-lively .service:hover .service-num { background: var(--paper); color: var(--ink); }

  /* Process steps and the photo lift toward you */
  .motion-lively .step { transition: opacity 0.6s var(--ease), transform 0.6s var(--ease), translate 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out); }
  .motion-lively .step:hover { translate: -4px -4px; box-shadow: 4px 4px 0 var(--ink); }
  .motion-lively .about-photo.reveal.is-visible:hover { transform: translate(-4px, -4px) rotate(1deg); box-shadow: 16px 16px 0 var(--ink); }
}

/* The admin's live preview re-draws on every keystroke: skip the entrance pops there */
.motion-preview .brand,
.motion-preview .toolbox li { animation: none !important; }

@keyframes rise-in { from { transform: translateY(110%); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(26px); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes wipe-in {
  from { clip-path: polygon(0 -40%, 0 -40%, 0 140%, 0 140%); }
  to { clip-path: polygon(0 -40%, 100% -40%, 100% 140%, 0 140%); }
}
@keyframes write-in {
  from { clip-path: polygon(-6% -40%, -6% -40%, -6% 140%, -6% 140%); }
  to { clip-path: polygon(-6% -40%, 106% -40%, 106% 140%, -6% 140%); }
}
@keyframes face-pop {
  from { scale: 0.2; rotate: -45deg; }
  60% { scale: 1.12; rotate: 8deg; }
  to { scale: 1; rotate: 0deg; }
}
@keyframes draw { from { stroke-dashoffset: 1.05; } to { stroke-dashoffset: 0; } }
@keyframes pop-in { from { opacity: 0; scale: 0.85; } }
@keyframes toss-in { from { opacity: 0; translate: 0 22px; scale: 0.6; } }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .marquee-track,
  .status-dot::after,
  .live-dot::after { animation: none; }
  .btn,
  .project-link,
  .project-media svg,
  .project-media img,
  .project-go,
  .tile,
  .tile-media img,
  .site-card,
  .site-shot img,
  .cat-card,
  .nav-links a::after { transition: none; }
  .btn:hover,
  .project-link:hover,
  .project-link:focus-visible,
  .tile:hover,
  .tile:focus-visible,
  .site-card:hover,
  .site-card:focus-visible,
  .cat-card:hover { transform: none; }
  .project-link:hover .project-media svg,
  .project-link:hover .project-media img,
  .project-link:hover .project-go,
  .tile:hover .tile-media img,
  .site-card:hover .site-shot img { transform: none; }
}

/* ---------- Hero: headline ---------- */
.hero-headline {
  max-width: 18ch;
  margin: 0 0 18px;
  font-size: clamp(26px, 3.3vw, 46px);
  font-weight: 900;
  font-stretch: 125%;
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}
.hero-intro .lead { max-width: 46ch; font-size: clamp(17px, 1.4vw, 21px); }
.section-lead { max-width: 52ch; margin: calc(clamp(32px, 5vw, 64px) * -0.5) 0 clamp(32px, 5vw, 56px); }

/* ---------- Results: case studies ---------- */
.studies { display: grid; gap: clamp(20px, 3vw, 32px); }

.study {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 20px clamp(24px, 4vw, 56px);
  padding: clamp(22px, 3.4vw, 44px);
  border: 2px solid var(--ink);
  background: var(--surface);
  box-shadow: 8px 8px 0 var(--ink);
}

.study-head { grid-column: 1 / -1; }
.study-client { margin: 0 0 8px; color: var(--muted); font-size: 13px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.study h3 { max-width: 22ch; margin: 0; font-size: clamp(26px, 3.4vw, 46px); font-weight: 900; font-stretch: 125%; line-height: 0.95; letter-spacing: -0.03em; text-transform: uppercase; }

.study-story { display: grid; gap: 18px; margin: 0; }
.study-story dt { margin-bottom: 4px; font-size: 13px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.study-story dd { margin: 0; color: var(--muted); line-height: 1.5; }

.study-result { align-self: start; padding: 20px; background: var(--ink); color: var(--on-ink); }
.study-result-label { margin: 0 0 14px; color: var(--muted-dark); font-size: 13px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.study-stats { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.study-stats li { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 2px 14px; }
.study-stats .icon { grid-row: span 2; width: 30px; height: 30px; }
.study-stats strong { font-size: clamp(24px, 2.8vw, 38px); font-weight: 900; font-stretch: 125%; line-height: 1; letter-spacing: -0.03em; }
.study-stats span { font-size: 14px; font-weight: 700; color: var(--muted-dark); }
.study-link { grid-column: 1 / -1; justify-self: start; }

@media (max-width: 820px) {
  .study { grid-template-columns: 1fr; box-shadow: 5px 5px 0 var(--ink); }
}

/* ---------- Cost of inaction: comparison ---------- */
.compare-table { border-top: 2px solid var(--ink); }
.compare-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr);
  align-items: stretch;
  border-bottom: 2px solid var(--ink);
}
.compare-head { display: flex; align-items: center; gap: 10px; margin: 0; padding: 16px 0; font-size: 14px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.compare-head .icon { flex: none; width: 22px; height: 22px; }
.compare-head.is-good { grid-column: 3; padding-left: 20px; }
.compare-heads .compare-head.is-bad { color: var(--muted); }
.compare-cell { padding: clamp(20px, 2.6vw, 32px) 0; }
.compare-cell.is-good { padding: clamp(20px, 2.6vw, 32px) 20px; background: var(--ink); color: var(--on-ink); }
.compare-cell h3 { margin: 0 0 8px; font-size: clamp(19px, 1.8vw, 26px); font-weight: 900; font-stretch: 125%; line-height: 1.05; letter-spacing: -0.02em; text-transform: uppercase; }
.compare-cell p { max-width: 42ch; margin: 0; line-height: 1.5; }
.compare-cell.is-bad h3 { text-decoration: line-through; text-decoration-thickness: 3px; text-decoration-color: var(--live); }
.compare-cell.is-bad p { color: var(--muted); }
.compare-cell.is-good p { color: var(--muted-dark); }
.compare-arrow { display: grid; place-items: center; }
.compare-arrow .icon { width: 28px; height: 28px; }
.compare-mobile-head { display: none; }

@media (max-width: 760px) {
  .compare-heads { display: none; }
  .compare-row { grid-template-columns: 1fr; padding: 4px 0 20px; }
  .compare-arrow { padding: 6px 0; transform: rotate(90deg); justify-self: start; margin-left: 4px; }
  .compare-mobile-head { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.7; }
}

/* ---------- Free audit ---------- */
.audit { background: var(--ink); color: var(--paper); border-bottom: 2px solid var(--line-dark); }
.audit .section-label { color: var(--muted-dark); }
.audit :focus-visible { outline-color: var(--paper); }
.audit-title {
  max-width: 16ch;
  margin: 16px 0 clamp(24px, 4vw, 40px);
  font-size: clamp(32px, 7vw, 96px);
  font-weight: 900;
  font-stretch: 125%;
  line-height: 0.92;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}
.audit-body { display: grid; gap: 28px; max-width: 760px; }
.audit-body .lead { max-width: 44ch; }
.audit-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.audit-small { max-width: 34ch; margin: 0; color: var(--muted-dark); font-size: 15px; line-height: 1.45; }
.audit-note { margin: 0; color: var(--paper); transform: rotate(-2deg); }

/* ---------- Motion for the new sections (lively only) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .motion-lively .study-stats li { opacity: 0; transform: translateY(14px) scale(0.96); transition: opacity 0.5s var(--ease-out), transform 0.6s var(--spring); transition-delay: calc(0.35s + var(--i, 0) * 0.12s); }
  .motion-lively .study.is-visible .study-stats li { opacity: 1; transform: none; }
  .motion-lively .compare-row.reveal { transition-delay: calc(var(--i, 0) * 0.08s); }
  .motion-lively .compare-cell.is-bad h3 { text-decoration-color: transparent; transition: text-decoration-color 0.4s var(--ease) 0.5s; }
  .motion-lively .compare-row.is-visible .compare-cell.is-bad h3 { text-decoration-color: var(--live); }
  .motion-lively .compare-row.is-visible .compare-arrow .icon { animation: nudge 1.6s var(--ease-in-out) 0.6s 2; }
  .motion-lively .audit-cta .icon { transition: transform 0.3s var(--ease-out); }
  .motion-lively .audit-cta:hover .icon { transform: translateX(5px); }
  .motion-lively .hero.is-intro .hero-intro > :nth-child(4) { animation-delay: 1s; }
}
@keyframes nudge { 0%, 100% { transform: none; } 50% { transform: translateX(6px); } }

/* Server-built copy of the main text (functions/_middleware.js) for search engines and link previews.
   With JavaScript the full site replaces it; this hides it in the moment before that happens. */
.js .prerender { display: none; }
.prerender ul { padding-left: 20px; }

/* Hero headline split into words by motion.js (Anime.js): each word rises inside its own mask */
.hero-headline .hw { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.hero-headline .hw > span { display: inline-block; }
.motion-lively .hero.is-intro .hero-intro > .hero-headline.is-words { animation: none; }


/* ---------- About, FAQ and blog pages (built by tools/build-seo.js) ---------- */
.seo-crumbs { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 36px; font-weight: 800; }
.seo-crumbs a { color: var(--ink); }
.seo-lead { margin: 14px 0 28px; font-size: clamp(18px, 2vw, 22px); font-weight: 600; line-height: 1.45; }
.seo-meta { margin: 0 0 6px; color: var(--muted); font-size: 14px; font-weight: 700; }
.seo-page .policy-body h3 { margin: 28px 0 4px; font-size: 18px; font-weight: 900; }
.seo-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0; }
.seo-tags a, .seo-tags span { padding: 4px 10px; border: 2px solid var(--ink); background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 800; text-decoration: none; }
.seo-faq { border-bottom: 2px solid var(--ink); }
.seo-faq summary { padding: 14px 0; font-weight: 800; cursor: pointer; }
.seo-faq p { margin: 0 0 16px; }
.seo-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.seo-list a { display: grid; gap: 4px; padding: 16px 18px; border: 2px solid var(--ink); background: var(--surface); color: var(--ink); text-decoration: none; }
.seo-list a:hover { box-shadow: 4px 4px 0 var(--ink); }
.seo-list strong { font-size: 19px; font-weight: 900; line-height: 1.25; }
.seo-list span:last-child { color: var(--muted); }
.seo-related { margin-top: 48px; }
.seo-related h2 { margin: 0 0 14px; font-size: 20px; font-weight: 900; font-stretch: 125%; text-transform: uppercase; }
.seo-cta { margin-top: 56px; padding: 24px; background: var(--ink); color: var(--on-ink); }
.seo-cta-title { margin: 0 0 8px; font-size: clamp(22px, 3vw, 30px); font-weight: 900; font-stretch: 112%; text-transform: uppercase; line-height: 1; }
.seo-cta p { margin: 0 0 16px; }
.seo-cta .btn { background: var(--surface); color: var(--ink); }
.seo-page article .policy-title { font-size: clamp(28px, 5.2vw, 52px); line-height: 1; }

/* "More" dropdown in the top bar (app.js) */
.nav-links { align-items: center; }
.nav-more { position: relative; }
.nav-more-btn { padding: 8px 0; border: 0; background: none; color: var(--ink); font: inherit; font-weight: 700; font-stretch: 105%; cursor: pointer; white-space: nowrap; }
.nav-more-btn span { display: inline-block; transition: transform 0.2s var(--ease); }
.nav-more-btn[aria-expanded="true"] span { transform: rotate(180deg); }
.nav-more-menu { position: absolute; top: calc(100% + 12px); right: 0; z-index: 60; display: grid; min-width: 220px; padding: 8px; border: 2px solid var(--ink); background: var(--surface); box-shadow: 6px 6px 0 var(--ink); }
.nav-more-menu[hidden] { display: none; }
.nav-more-menu a { padding: 10px 12px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.nav-more-menu a::after { display: none; }
.nav-more-menu a:hover, .nav-more-menu a:focus-visible { background: var(--ink); color: var(--on-ink); }

/* Living background: the grid drifts slowly and endlessly (one 44px cell per loop, so it never jumps).
   Still for visitors who ask their device for less motion. */
@keyframes grid-drift {
  from { background-position: -1px -1px; }
  to { background-position: 43px 43px; }
}
@media (prefers-reduced-motion: no-preference) {
  .paper-grid, .mobile-menu { animation: grid-drift 6s linear infinite; will-change: background-position; }
}
