/* ============================================
   Hitsplot — design tokens & base
   Light and dark, system font stack, strictly black and white: every
   colour below is a neutral grey, so nothing on the site carries a hue.
   ============================================ */

:root {
  color-scheme: light;

  --bg: #ffffff;
  --bg-panel: #f4f4f4;
  --bg-elev: #ffffff;

  --border: #cfcfcf;
  --border-soft: #e6e6e6;

  --text: #111111;
  --text-muted: #555555;
  --text-faint: #868686;

  --accent: #111111;
  --accent-hover: #333333;
  --accent-soft: rgba(0, 0, 0, 0.06);
  --on-accent: #ffffff;

  /* With no hue to lean on, status reads through tone instead: full black
     for live / sent / invalid, mid grey for in-progress. */
  --success: #111111;
  --warning: #6e6e6e;
  --danger: #111111;

  --gradient-panel: linear-gradient(160deg, #f8f8f8, #ebebeb);
  --accent-sheen: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0));

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px -16px rgba(0, 0, 0, 0.18);
  --shadow: 0 2px 6px rgba(0, 0, 0, 0.05), 0 24px 48px -24px rgba(0, 0, 0, 0.22);

  /* Liquid glass, for the nav: a see-through tint, a hairline edge so the
     glass still reads on a plain page, and the rim where light catches it. */
  --glass-bg: rgba(255, 255, 255, 0.5);
  --glass-edge: rgba(0, 0, 0, 0.07);
  --glass-rim: rgba(255, 255, 255, 0.95);
  --glass-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 32px -14px rgba(0, 0, 0, 0.28);

  --container: 1160px;
  --nav-height: 80px;
}

/* Dark tokens are declared twice on purpose: once for the OS preference and
   once for the manual toggle. Keeping the media-query copy means dark mode
   still works if JavaScript never runs. Edit both together. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --bg: #000000;
    --bg-panel: #111111;
    --bg-elev: #171717;

    --border: #3a3a3a;
    --border-soft: #272727;

    --text: #f4f4f4;
    --text-muted: #a3a3a3;
    --text-faint: #868686;

    --accent: #e8e8e8;
    --accent-hover: #ffffff;
    --accent-soft: rgba(255, 255, 255, 0.12);
    --on-accent: #111111;

    --success: #f4f4f4;
    --warning: #9c9c9c;
    --danger: #f4f4f4;

    --gradient-panel: linear-gradient(160deg, #181818, #0a0a0a);
    --accent-sheen: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.16));

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5), 0 8px 24px -16px rgba(0, 0, 0, 0.8);
    --shadow: 0 2px 6px rgba(0, 0, 0, 0.5), 0 24px 48px -24px rgba(0, 0, 0, 0.9);

    --glass-bg: rgba(24, 24, 24, 0.5);
    --glass-edge: rgba(255, 255, 255, 0.07);
    --glass-rim: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 12px 32px -14px rgba(0, 0, 0, 0.9);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #000000;
  --bg-panel: #111111;
  --bg-elev: #171717;

  --border: #3a3a3a;
  --border-soft: #272727;

  --text: #f4f4f4;
  --text-muted: #a3a3a3;
  --text-faint: #868686;

  --accent: #e8e8e8;
  --accent-hover: #ffffff;
  --accent-soft: rgba(255, 255, 255, 0.12);
  --on-accent: #111111;

  --success: #f4f4f4;
  --warning: #9c9c9c;
  --danger: #f4f4f4;

  --gradient-panel: linear-gradient(160deg, #181818, #0a0a0a);
  --accent-sheen: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.16));

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5), 0 8px 24px -16px rgba(0, 0, 0, 0.8);
  --shadow: 0 2px 6px rgba(0, 0, 0, 0.5), 0 24px 48px -24px rgba(0, 0, 0, 0.9);

  --glass-bg: rgba(24, 24, 24, 0.5);
  --glass-edge: rgba(255, 255, 255, 0.07);
  --glass-rim: rgba(255, 255, 255, 0.4);
  --glass-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 12px 32px -14px rgba(0, 0, 0, 0.9);
}

* { box-sizing: border-box; }

/* Browser-drawn colour (checkbox ticks, tap flashes, text selection) defaults
   to blue; hold it to the theme as well. */
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  accent-color: var(--accent);
  -webkit-tap-highlight-color: var(--accent-soft);
}

::selection { background: var(--text); color: var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Grain texture overlay. Sits above everything and ignores the pointer, so it
   textures whatever --bg is underneath without changing the colour itself.
   The feColorMatrix desaturates the noise, which is otherwise faintly tinted. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 0.6em;
  letter-spacing: -0.021em;
  color: var(--text);
  text-wrap: balance;
}

p { margin: 0 0 1em; color: var(--text-muted); }

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

/* Images are the one exception to the black-and-white theme: they keep their
   own colour, so don't add a greyscale filter here. (The logo mark is black
   to begin with; see .logo-mark for how it is handled on the dark theme.) */
img { max-width: 100%; display: block; }

ul { margin: 0; padding: 0; list-style: none; }

svg { display: block; }

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  background: var(--accent);
  color: var(--on-accent);
  padding: 10px 18px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-size: 0.9rem;
  transition: top 0.2s ease;
}

.skip-link:focus { top: 0; }

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

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.section { padding: 104px 0; }

.section-head {
  max-width: 640px;
  margin: 0 0 56px;
}

.section-head p { font-size: 1.05rem; margin-bottom: 0; }

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

.section h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }

.actions-center { margin-top: 40px; text-align: center; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 980px;
  font-weight: 500;
  font-size: 0.95rem;
  font-family: inherit;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.btn:active { transform: scale(0.98); }

.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn-primary { background: var(--accent) var(--accent-sheen); color: var(--on-accent); }
.btn-primary:hover { background-color: var(--accent-hover); }

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

.btn-outline:hover { border-color: var(--text); }

.btn-whatsapp { background: var(--gradient-panel); border-color: var(--border); color: var(--text); }
.btn-whatsapp:hover { border-color: var(--text); }

.btn-sm { padding: 8px 18px; font-size: 0.85rem; }

.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ============================================
   Header / navigation
   A floating pill of liquid glass with the page scrolling underneath it.
   In Chromium on wider screens, script.js adds a lens that bends the
   backdrop at the rim (.has-lens); other browsers keep the frosted pill.
   ============================================ */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  /* Only the pill takes clicks; the strip around it lets them through. */
  pointer-events: none;
}

.nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: calc(100% - 24px);
  max-width: calc(var(--container) - 48px);
  height: 56px;
  padding: 0 8px 0 18px;
  border-radius: 999px;
  pointer-events: auto;
}

/* The glass and its rim are pseudo-elements, not styles on .nav itself: an
   element with a backdrop-filter hides the page from its children's own
   backdrop-filters, and the mobile menu (a child) needs to blur the page. */
.nav::before,
.nav::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
}

.nav::before {
  background: var(--glass-bg);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  box-shadow: inset 0 0 0 1px var(--glass-edge), var(--glass-shadow);
}

/* The rim: a 1px ring, brightest top-left and bottom-right where the light
   would catch it. The mask cuts away everything inside the ring. */
.nav::after {
  padding: 1px;
  background: linear-gradient(135deg, var(--glass-rim), transparent 30% 70%, var(--glass-rim));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

@media (min-width: 721px) {
  .has-lens .nav::before { backdrop-filter: blur(3px) url(#liquid-lens) saturate(180%); }
}

@media (prefers-reduced-transparency: reduce) {
  .nav::before {
    background: var(--bg);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.015em;
  color: var(--text);
  flex-shrink: 0;
}

.logo-mark {
  width: auto;
  height: 40px;
  flex-shrink: 0;
}

.site-footer .logo-mark { height: 48px; }

/* The mark is black artwork, so on the dark theme it is flipped to white —
   otherwise it would vanish against the black header. */
:root[data-theme="dark"] .logo-mark { filter: invert(1); }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-mark { filter: invert(1); }
}

.nav-links {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-links > a {
  position: relative;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.86rem;
  color: var(--text-muted);
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-links > a:hover,
.nav-links > a.active { color: var(--text); background: var(--accent-soft); }

/* With script running, one droplet slides between the links instead of each
   link lighting up on its own (see script.js). */
.nav-links.has-indicator > a { background: none; }

/* The menu's own Get in touch button, shown only in the phone menu. */
.nav-menu-foot { display: none; }

.nav-indicator {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 999px;
  background: var(--accent-soft);
  box-shadow: inset 0 1px 0 var(--glass-rim);
  opacity: 0;
  transition:
    transform 0.5s cubic-bezier(0.3, 1.3, 0.5, 1),
    width 0.5s cubic-bezier(0.3, 1.3, 0.5, 1),
    opacity 0.2s ease;
}

.nav-cta { display: flex; align-items: center; gap: 12px; }

.theme-toggle {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.theme-toggle:hover { color: var(--text); border-color: var(--border); }

.theme-toggle svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}

.theme-toggle .icon-moon { display: none; }

:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@keyframes menu-in {
  from { opacity: 0; transform: translateY(-8px); }
}

/* ============================================
   Opener
   The first screen of the homepage: one typed line over a scatter of
   line-drawn sketches. Everything takes its colour from the theme tokens,
   so the page background stays whatever --bg is.
   ============================================ */

.opener {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: radial-gradient(ellipse at center, var(--bg-panel) 0%, var(--bg) 70%);
}

/* The sketches fade out towards the middle, so they never run under the text
   (which matters on phones, where the text spans the full width). */
.opener-sketches {
  position: absolute;
  inset: 0;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 360px 190px at center, transparent 60%, #000);
  mask-image: radial-gradient(ellipse 360px 190px at center, transparent 60%, #000);
}

.sketch {
  position: absolute;
  pointer-events: none;
  color: var(--text);
  opacity: 0.12;
  animation: sketch-in 1s ease both;
}

.sketch svg {
  width: 100%;
  height: auto;
  fill: none;
  stroke: currentColor;
}

@keyframes sketch-in {
  from { opacity: 0; scale: 0.6; }
}

.opener-inner {
  position: relative;
  z-index: 1;
  padding: 0 24px;
  text-align: center;
}

.opener-title {
  margin: 0 0 20px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: clamp(1rem, 4.6vw, 2.25rem);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0.025em;
  white-space: nowrap;
  color: var(--text);
}

/* Typewriter. As with .reveal, the line is only hidden once JS is confirmed
   running; without JS it simply reads as normal text. */
.js [data-typewriter]:not(.typewriter-on) { visibility: hidden; }

/* The untyped remainder stays in the flow, invisible, so the line holds its
   final size and the typed letters never shift. */
.typewriter-rest { opacity: 0; }

@keyframes blink-caret {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.typewriter-cursor::after {
  content: "";
  display: inline-block;
  width: 3px;
  height: 1em;
  background-color: var(--accent);
  margin-left: 4px;
  vertical-align: text-bottom;
  animation: blink-caret 0.8s step-end infinite;
}

.opener-lead {
  max-width: 34em;
  margin: 0 auto 30px;
  font-size: 1.1rem;
  text-wrap: balance;
}

/* The description and button wait for the line to finish typing. */
.opener-after { transition: opacity 0.6s ease; }

.js .opener:not(.is-typed) .opener-after {
  opacity: 0;
  visibility: hidden;
}

.opener-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  translate: -50% 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
  animation: opener-fade 0.4s ease 1.5s both, opener-bob 2s ease-in-out 1.5s infinite;
}

.opener-scroll i {
  width: 1px;
  height: 32px;
  background: linear-gradient(var(--text-faint), transparent);
}

@keyframes opener-fade {
  from { opacity: 0; }
}

@keyframes opener-bob {
  50% { transform: translateY(8px); }
}

/* ============================================
   Page hero (inner pages)
   ============================================ */

.page-hero {
  padding: calc(var(--nav-height) + 80px) 0 56px;
  border-bottom: 1px solid var(--border-soft);
}

/* The inner block shares the element with .container, so constrain the children
   rather than the box itself — narrowing the container would centre the hero
   text while every other section stays left-aligned to the container edge. */
.page-hero-inner > * { max-width: 700px; }

.page-hero h1 { font-size: clamp(2rem, 4vw, 2.9rem); }

.page-hero p.lead {
  font-size: 1.12rem;
  margin-bottom: 0;
}

/* About: the monogram, large and faint, fills the empty side of the hero.
   It shares .logo-mark so it flips to white on the dark theme. */
.about-hero {
  position: relative;
  overflow: hidden;
}

.about-hero .about-mark {
  position: absolute;
  right: max(24px, calc((100% - var(--container)) / 2 + 24px));
  bottom: -60px;
  height: 420px;
  opacity: 0.08;
  pointer-events: none;
}

/* ============================================
   Steps (numbered, About page)
   ============================================ */

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

.step {
  counter-increment: step;
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

.step::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 20px;
  font-size: 2.6rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--text-faint);
}

.step h3 { font-size: 1.15rem; margin-bottom: 8px; }
.step p { margin-bottom: 0; font-size: 0.97rem; }

/* ============================================
   At a glance (About page)
   A short fact sheet: label on the left, fact on the right.
   ============================================ */

.glance {
  background: var(--gradient-panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 34px 36px 16px;
}

.glance .eyebrow { margin-bottom: 10px; }

.glance dl { margin: 0; }

.glance dl > div {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--border);
}

.glance dl > div:first-child { border-top: 0; }

.glance dt {
  font-size: 0.86rem;
  color: var(--text-faint);
}

.glance dd {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.45;
  color: var(--text);
}

/* ============================================
   Browser frame (screenshots)
   ============================================ */

.browser {
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-soft);
  background: var(--bg-elev);
  box-shadow: var(--shadow);
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border-soft);
}

.browser-bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
}

.browser-bar em {
  font-style: normal;
  margin: 0 auto;
  font-size: 0.72rem;
  color: var(--text-faint);
  letter-spacing: 0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* height:auto is required — the width/height attributes on the <img> are
   presentational hints that would otherwise pin the height and defeat
   aspect-ratio. The attributes stay so the browser can reserve space. */
.browser img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
}

/* ============================================
   Cards
   ============================================ */

.grid { display: grid; gap: 28px; }

.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }


.card {
  background: var(--gradient-panel);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 32px 28px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
  border-color: var(--border-soft);
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.card-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.card p { margin-bottom: 0; font-size: 0.95rem; }

/* ============================================
   Carousel
   Without script, or for visitors who ask for reduced motion, this is the
   ordinary grid of cards. script.js adds .is-moving, copies the cards once,
   and the row then drifts left in an endless loop: when the first set has
   gone by, the copies sit exactly where it started, so the jump back is
   invisible.
   ============================================ */

.carousel.is-moving .carousel-viewport {
  container-type: inline-size;
  overflow: hidden;
  /* Room for the cards' hover lift and shadow, which overflow would clip;
     the negative margin keeps the spacing as it was. */
  padding: 8px 0 28px;
  margin: -8px 0 -28px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent);
}

.carousel.is-moving .carousel-track {
  display: flex;
  width: max-content;
  animation: carousel-drift var(--drift-duration, 30s) linear infinite;
}

/* Same size as in the grid: three across. */
.carousel.is-moving .card { flex: 0 0 calc((100cqi - 56px) / 3); }

.carousel.is-paused .carousel-track,
.carousel.is-moving .carousel-viewport:hover .carousel-track { animation-play-state: paused; }

/* One set of cards plus the gap after it: half the track and half a gap. */
@keyframes carousel-drift {
  to { transform: translateX(calc(-50% - 14px)); }
}

.carousel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 40px;
}

/* Anything that moves on its own needs a way to stop it (WCAG 2.2.2). */
.carousel-pause {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.15s ease;
}

.carousel.is-moving .carousel-pause { display: flex; }
.carousel-pause:hover { border-color: var(--text); }
.carousel-pause:active { transform: scale(0.94); }

.carousel-pause svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.carousel-pause .icon-play,
.carousel-pause[aria-pressed="true"] .icon-pause { display: none; }
.carousel-pause[aria-pressed="true"] .icon-play { display: block; }

/* ============================================
   Work / portfolio / product cards
   ============================================ */

.work-card {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-elev);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.work-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.work-shot {
  position: relative;
  overflow: hidden;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border-soft);
}

.work-shot img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.work-card:hover .work-shot img { transform: scale(1.035); }

.work-body {
  padding: 26px 26px 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.work-tag {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
  display: block;
}

.work-body h3 { font-size: 1.2rem; margin-bottom: 8px; }
.work-body p { font-size: 0.95rem; }

.work-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-top: auto;
  padding-top: 10px;
}

.work-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--accent);
  transition: gap 0.2s ease;
}

.work-link:hover { gap: 9px; }

/* ============================================
   Engagement / offer list
   ============================================ */

.offer {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 30px 28px;
  background: var(--bg-elev);
  display: flex;
  flex-direction: column;
}

.offer h3 { font-size: 1.08rem; margin-bottom: 6px; }

.offer p { font-size: 0.94rem; }

.offer ul { margin-top: auto; padding-top: 8px; }

.offer li {
  position: relative;
  padding-left: 24px;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.offer li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.55em;
  width: 8px;
  height: 4px;
  border-left: 1.8px solid var(--accent);
  border-bottom: 1.8px solid var(--accent);
  transform: rotate(-45deg);
}

/* ============================================
   CTA banner
   ============================================ */

.cta-banner {
  border-radius: var(--radius-lg);
  padding: 60px 56px;
  background: var(--gradient-panel);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.cta-banner h2 { margin-bottom: 8px; font-size: 1.75rem; }
.cta-banner p { margin-bottom: 0; max-width: 46ch; }

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

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

.contact-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 64px;
  align-items: start;
}

.contact-info-item {
  display: flex;
  gap: 16px;
  margin-bottom: 26px;
}

.contact-info-item .card-icon { margin-bottom: 0; }

.contact-info-item h4 { font-size: 0.95rem; margin-bottom: 2px; }
.contact-info-item p { font-size: 0.94rem; margin-bottom: 0; }
.contact-info-item a:hover { color: var(--accent); }

.social-row { display: flex; gap: 10px; margin-top: 14px; }

.social-row a {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.social-row a svg { width: 16px; height: 16px; }

.social-row a:hover { border-color: var(--accent); color: var(--accent); }

.form-card {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 34px;
  background: var(--bg-elev);
  box-shadow: var(--shadow-sm);
}

.form-group { margin-bottom: 18px; }

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

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 7px;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.form-group input:user-invalid,
.form-group textarea:user-invalid {
  border-color: var(--danger);
}

/* Browsers tint autofilled fields pale blue or yellow; repaint them in grey. */
.form-group input:-webkit-autofill {
  -webkit-text-fill-color: var(--text);
  box-shadow: 0 0 0 1000px var(--bg-panel) inset;
}

/* Honeypot — hidden from people, tempting to bots. */
.hp-field {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-note {
  font-size: 0.85rem;
  margin: 14px 0 0;
  min-height: 1.2em;
}

.form-note.ok { color: var(--success); }
.form-note.err { color: var(--danger); font-weight: 600; }

.form-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.form-alt {
  font-size: 0.85rem;
  color: var(--text-faint);
  margin: 0;
}

.form-alt a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ============================================
   Prose (privacy / terms)
   ============================================ */

.prose { max-width: 720px; }
.prose h2 { font-size: 1.3rem; margin-top: 40px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { font-size: 1rem; color: var(--text-muted); }

.prose ul { margin: 0 0 1.4em; }

.prose ul li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 8px;
}

.prose ul li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.72em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-faint);
}

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

.prose-meta { font-size: 0.85rem; color: var(--text-faint); margin-bottom: 36px; }

/* ============================================
   404
   ============================================ */

.error-page {
  min-height: 62vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-height) + 100px) 24px 100px;
}

.error-page .code {
  font-size: 4.5rem;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 12px;
}

.error-page p { max-width: 44ch; }
.error-page p a { color: var(--accent); }

.error-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

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

.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 64px 0 32px;
  background: var(--bg-panel);
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 44px;
}

.footer-brand p { font-size: 0.92rem; max-width: 30ch; margin-top: 14px; }

.footer-brand .social-row a { width: 34px; height: 34px; }

.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}

.footer-col li { margin-bottom: 11px; }

.footer-col a,
.footer-col li {
  font-size: 0.89rem;
  color: var(--text-muted);
}

.footer-col a { transition: color 0.2s ease; }
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 26px;
  border-top: 1px solid var(--border-soft);
  font-size: 0.8rem;
  color: var(--text-faint);
  flex-wrap: wrap;
  gap: 12px;
}

.footer-legal { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-legal a:hover { color: var(--accent); }

/* ============================================
   Scroll reveal
   Only armed once JS is confirmed running, so the page is never
   blank when scripts are blocked or fail.
   ============================================ */

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

.js .reveal.in-view {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .sketch, .opener-scroll { animation: none; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   Responsive
   ============================================ */

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

@media (max-width: 980px) {
  .contact-layout { grid-template-columns: 1fr; gap: 44px; }
}

@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .carousel.is-moving .card { flex-basis: calc((100cqi - 28px) / 2); }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }

  .nav-links { display: none; }
  .nav-cta .btn { display: none; }
  .nav-cta { margin-left: auto; }
  .nav-toggle { display: flex; }

  .nav-indicator { display: none; }

  body.nav-open { overflow: hidden; }

  body.nav-open .nav-links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: fixed;
    inset: 0;
    /* Below the pill's glass (z-index -1), so the pill stays on top. */
    z-index: -2;
    overflow-y: auto;
    padding: calc(var(--nav-height) + 20px) 24px calc(24px + env(safe-area-inset-bottom));
    gap: 4px;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    animation: menu-in 0.25s ease;
  }

  body.nav-open .nav-links > a {
    padding: 14px 16px;
    border-radius: var(--radius-md);
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: -0.01em;
  }

  body.nav-open .nav-links > a.active { background: var(--accent-soft); }

  body.nav-open .nav-menu-foot {
    display: block;
    margin-top: auto;
    padding-top: 24px;
  }

  body.nav-open .nav-menu-foot .btn {
    width: 100%;
    padding: 16px 24px;
    font-size: 1rem;
  }

  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .carousel.is-moving .card { flex-basis: 85cqi; }
  .form-row { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }

  .cta-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 40px 28px;
  }

  .form-card { padding: 26px 22px; }

  .section { padding: 72px 0; }
  .page-hero { padding: calc(var(--nav-height) + 48px) 0 44px; }
  .about-hero .about-mark { right: -90px; opacity: 0.05; }
  .glance { padding: 28px 24px 10px; }
  .glance dl > div { grid-template-columns: 1fr; gap: 4px; }
}
