/* Verzo — styles. Tokens first, then layout, then sections. No build step. */

/* === tokens === */
:root {
  --font-sans: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Space Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* type scale */
  --fs-14: 0.875rem;
  --fs-16: 1rem;
  --fs-18: 1.125rem;
  --fs-22: 1.375rem;
  --fs-30: 1.875rem;
  --fs-44: 2.75rem;
  --fs-h1: clamp(2.75rem, 1.15rem + 5.1vw, 5.25rem);
  --fs-h2: clamp(1.875rem, 1.3rem + 1.9vw, 2.75rem);

  --radius: 2px;
  --radius-sm: 2px;
  --gutter: 20px;
  --section-y: clamp(72px, 9vw, 128px);
  --header-h: 64px;

  /* the made-up café in the demo is its own website: fixed colours in both themes */
  --cafe-bg: #F4EDE2;
  --cafe-text: #2B1E15;
  --cafe-muted: #6B5646;
}

html[data-theme="ink"], html:not([data-theme]) {
  --bg: #0A0B0B;
  --surface: #121414;
  --raise: #1A1D1C;
  --text: #F5F6F2;
  --muted: #A8ADAA;
  --line: rgba(245, 246, 242, .14);
  --line-strong: rgba(245, 246, 242, .32);
  --accent: #F2FF66;
  --on-accent: #0A0B0B;
  --signal: #DDEB76;
  --ai-bg: #0C0E0D;
  --ai-key: #A2AA8C;
  --ai-grid: rgba(242, 255, 102, .055);
  color-scheme: dark;
}

html[data-theme="sand"] {
  --bg: #F3F4EE;
  --surface: #FFFFFF;
  --raise: #E9EDE1;
  --text: #111410;
  --muted: #515951;
  --line: rgba(17, 20, 16, .16);
  --line-strong: rgba(17, 20, 16, .34);
  --accent: #526000;
  --on-accent: #FFFFFF;
  --signal: #526000;
  --ai-bg: #EDF1E8;
  --ai-key: #4C5C40;
  --ai-grid: rgba(82, 96, 0, .10);
  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-16);
  line-height: 1.55;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }

h1, h2, h3, h4 { font-weight: 600; text-wrap: balance; }
h1 { font-size: var(--fs-h1); line-height: 1.02; letter-spacing: -0.055em; font-weight: 500; }
h2 { font-size: var(--fs-h2); line-height: 1.08; letter-spacing: -0.045em; }
h3 { font-size: var(--fs-22); line-height: 1.2; letter-spacing: -0.025em; font-weight: 600; }
h4 { font-size: var(--fs-18); line-height: 1.3; letter-spacing: -0.015em; font-weight: 600; }
p { text-wrap: pretty; }

a {
  color: var(--accent);
  text-decoration-line: underline;
  text-decoration-thickness: from-font;
  text-underline-offset: 0.2em;
  text-decoration-skip-ink: auto;
}

::selection { background: var(--accent); color: var(--on-accent); }

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

/* Theme switch cross-fade; skipped entirely when the user asks for reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  html.theme-anim,
  html.theme-anim *,
  html.theme-anim *::before,
  html.theme-anim *::after {
    transition: background-color .2s ease, color .2s ease, border-color .2s ease, fill .2s ease !important;
  }
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* === layout === */
.wrap {
  width: 100%;
  max-width: calc(1200px + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
@media (min-width: 720px) { :root { --gutter: 32px; } }

.section {
  padding-block: var(--section-y);
  border-top: 1px solid var(--line);
}
.section > .wrap { position: relative; }
@media (min-width: 960px) {
  .section > .wrap::before {
    content: "";
    position: absolute;
    top: calc(-1 * var(--section-y));
    bottom: calc(-1 * var(--section-y));
    left: calc(var(--gutter) - 1px);
    width: 1px;
    background: var(--line);
    pointer-events: none;
  }
}

.split {
  display: grid;
  gap: 32px;
}
@media (min-width: 960px) {
  .split { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }
  .split > .section-head { grid-column: 1 / span 4; align-self: start; position: sticky; top: calc(var(--header-h) + 32px); }
  .split > :not(.section-head) { grid-column: 5 / -1; }
}

.section-head h2 { max-width: 14ch; }
.section-head p {
  margin-top: 16px;
  max-width: 34ch;
  color: var(--muted);
  font-size: var(--fs-18);
  line-height: 1.5;
}

/* === buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: var(--fs-16);
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover:not(:disabled) { background: color-mix(in oklab, var(--accent) 88%, var(--text)); }
.btn--primary:active:not(:disabled) { transform: translateY(1px); }
.btn--quiet { border-color: var(--line-strong); color: var(--text); background: transparent; }
.btn--quiet:hover:not(:disabled) { border-color: var(--text); }
.btn--lg { min-height: 56px; padding: 0 28px; font-size: var(--fs-18); }

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

/* === header === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  backdrop-filter: blur(12px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--header-h);
}

.wordmark {
  display: inline-block;
  flex: none;
  width: 118px;
  height: 38px;
  background: url("../verzo-logo-dark.svg") center / 125% auto no-repeat;
}
html[data-theme="sand"] .wordmark {
  background-image: url("../verzo-logo.svg");
}
@media (max-width: 380px) {
  .header-inner > .wordmark { width: 92px; height: 30px; }
  .nav { gap: 8px; }
}
@media (min-width: 900px) { .header-inner > .wordmark { width: 134px; height: 43px; } }

.theme-toggle {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  height: 36px;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  font-size: var(--fs-14);
  font-weight: 600;
  order: 2;
}
/* Taller hit area (44px) around the compact 36px pill. */
.theme-toggle::after { content: ""; position: absolute; inset: -5px 0; }
.theme-toggle::before {
  content: "";
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  border-radius: 999px;
  background: var(--text);
  transition: transform .2s ease;
}
html[data-theme="sand"] .theme-toggle::before { transform: translateX(100%); }
.theme-opt { position: relative; padding: 0 12px; color: var(--muted); transition: color .2s ease; text-align: center; }
html[data-theme="ink"] .theme-opt[data-opt="ink"],
html[data-theme="sand"] .theme-opt[data-opt="sand"] { color: var(--bg); }
.theme-toggle:focus-visible { border-radius: 999px; }

/* The nav is a flex row on every width: theme toggle + burger on phones, links + toggle + CTA on desktop. */
.nav { display: flex; align-items: center; gap: 16px; margin-left: auto; }
html:not(.js) .theme-toggle { display: none; }

.nav-toggle {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-right: -8px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  order: 3;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 1px;
  background: var(--text);
  transition: transform .2s ease, background-color .2s ease;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

.nav-menu {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  padding: 12px var(--gutter) 28px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.nav-menu.is-open { display: block; }
.nav-links a {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: var(--fs-22);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.nav-cta { margin-top: 24px; width: 100%; }
html.menu-open { overflow: hidden; }
html:not(.js) .nav-toggle { display: none; }

/* Without JS on narrow screens the links sit in a plain row under the wordmark. */
@media (max-width: 899px) {
  html:not(.js) .site-header { position: static; }
  html:not(.js) .header-inner { flex-wrap: wrap; height: auto; min-height: var(--header-h); padding-block: 14px; row-gap: 6px; }
  html:not(.js) .nav { flex-basis: 100%; margin-left: 0; }
  html:not(.js) .nav-menu { display: block; position: static; padding: 0; border: 0; background: none; }
  html:not(.js) .nav-links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
  html:not(.js) .nav-links a { padding: 10px 0; border: 0; font-size: var(--fs-16); font-weight: 500; }
  html:not(.js) .nav-cta { display: none; }
}

@media (min-width: 900px) {
  .nav-menu { display: contents; }
  .nav-toggle { display: none; }
  .nav-menu { position: static; padding: 0; border: 0; background: none; }
  .nav-links { order: 1; display: flex; gap: 28px; margin-left: auto; }
  .nav-links a {
    padding: 8px 0;
    border: 0;
    font-size: var(--fs-16);
    font-weight: 500;
    color: var(--muted);
    transition: color .15s ease;
  }
  .nav-links a:hover { color: var(--text); }
  .theme-toggle { margin-left: 12px; }
  .nav-cta { order: 3; width: auto; margin: 0; min-height: 40px; padding: 0 16px; font-size: var(--fs-14); }
}

/* === hero === */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(48px, 7vw, 96px) clamp(56px, 7vw, 96px);
}
.hero > .wrap { position: relative; z-index: 1; }
.hero-inner { display: grid; gap: clamp(40px, 5vw, 72px); align-items: start; }
.hero-scene {
  position: absolute;
  inset: 0 0 auto;
  height: min(70vh, 650px);
  overflow: hidden;
  pointer-events: none;
  transform-style: preserve-3d;
  transform: perspective(900px) translate3d(var(--pointer-x, 0px), calc(var(--pointer-y, 0px) + var(--scroll-y, 0px)), 0) rotateX(var(--tilt-y, 0deg)) rotateY(var(--tilt-x, 0deg));
  transition: transform .35s ease-out;
}
.hero-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--bg) 0%, transparent 48%), linear-gradient(0deg, var(--bg) 0%, transparent 48%);
}
.hero-slab {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  height: var(--h);
  background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 35%, transparent));
  box-shadow: 0 0 20px color-mix(in srgb, var(--accent) 20%, transparent);
  opacity: .24;
  transform: translate3d(0, 0, var(--depth)) rotateY(-12deg);
}
@media (prefers-reduced-motion: no-preference) {
  .hero-slab { animation: hero-slab-drift 5.8s ease-in-out var(--delay) infinite alternate; }
  .hero-copy h1 { animation: hero-title-in .8s cubic-bezier(.2,.8,.2,1) both; }
}
@keyframes hero-slab-drift {
  from { opacity: .1; transform: translate3d(-8px, 8px, var(--depth)) rotateY(-16deg); }
  to { opacity: .32; transform: translate3d(16px, -16px, var(--depth)) rotateY(8deg); }
}
@keyframes hero-title-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-copy { display: grid; gap: clamp(24px, 3vw, 36px); position: relative; }
.hero h1 { max-width: 16ch; }
.hero-lead { font-size: var(--fs-18); line-height: 1.5; color: var(--muted); max-width: 52ch; }
.hero-side { display: grid; gap: 28px; }
@media (min-width: 960px) {
  .hero-inner { grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); }
  .hero h1 { font-size: clamp(3rem, 4.2vw, 4.6rem); max-width: 14ch; }
  .hero-lead { max-width: 42ch; }
}

/* === demo === */
.demo { min-width: 0; }

.demo-window {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.demo-bar {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}
.demo-url {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  background: var(--raise);
  color: var(--muted);
  font-size: var(--fs-14);
}
.demo-url svg { width: 12px; height: 12px; }
.demo-path { margin-left: -8px; color: var(--text); }

/* Corner sash: the screen is a demo, not a real café site. */
.demo-ribbon {
  position: absolute;
  top: 26px;
  right: -42px;
  z-index: 4;
  width: 170px;
  padding: 6px 0;
  transform: rotate(45deg);
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.24em;
  text-align: center;
  text-transform: uppercase;
  pointer-events: none;
}

.demo-stage {
  position: relative;
  height: 500px;
  overflow: hidden;
}

.demo-tag {
  position: absolute;
  top: 14px;
  z-index: 2;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
}
.demo-tag--human { left: 14px; background: var(--cafe-text); color: var(--cafe-bg); }
.demo-tag--ai { position: static; background: var(--signal); color: var(--ai-bg); font-family: var(--font-mono); font-weight: 500; font-size: 0.75rem; }

/* Person view: the café's own website */
.demo-human {
  position: relative;
  z-index: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--cafe-bg);
  color: var(--cafe-text);
}
.cafe-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 64px 6px 96px;
  font-size: var(--fs-14);
}
.cafe-nav button {
  position: relative;
  min-height: 32px;
  padding: 0 2px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.cafe-logo { font-weight: 800; letter-spacing: 0.14em; font-size: 0.8125rem; }
.cafe-links { display: flex; gap: 16px; color: var(--cafe-muted); }
.cafe-links button { transition: color .15s ease; }
.cafe-links button::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 3px;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}
.cafe-links button:hover, .cafe-links button[aria-pressed="true"] { color: var(--cafe-text); }
.cafe-links button:hover::after, .cafe-links button[aria-pressed="true"]::after { transform: scaleX(1); }
.cafe-nav button:focus-visible { outline: 2px solid var(--cafe-text); outline-offset: 2px; }
html:not(.js) .cafe-nav button { cursor: default; }

.cafe-page {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.cafe-page[hidden], .ai-grid[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .cafe-page, .ai-grid { animation: demo-page-in .3s ease both; }
}
@keyframes demo-page-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.cafe-photo {
  flex: 0 0 42%;
  width: 100%;
  min-height: 0;
  object-fit: cover;
  background: #D9CBB6;
}
.cafe-body {
  flex: 1;
  display: grid;
  gap: 10px;
  align-content: center;
  padding: 20px;
}
.cafe-name {
  font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4.5rem);
  font-weight: 800;
  line-height: .9;
  letter-spacing: -0.04em;
}
.cafe-tagline { max-width: 36ch; font-size: var(--fs-16); line-height: 1.45; }
.cafe-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.cafe-hours { font-size: var(--fs-14); color: var(--cafe-muted); font-variant-numeric: tabular-nums; }
.cafe-btn {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--cafe-text);
  color: var(--cafe-bg);
  font: inherit;
  font-size: var(--fs-14);
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s ease;
}
.cafe-btn:hover { transform: translateY(-1px); }
.cafe-btn:focus-visible { outline: 2px solid var(--cafe-text); outline-offset: 3px; }

/* Café inner pages */
.cafe-title {
  font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}
.cafe-note, .cafe-group { font-size: 0.8125rem; color: var(--cafe-muted); }
.cafe-group { font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 6px; }

.cafe-page--menu { gap: 18px; padding: 32px 20px 20px; }
.cafe-head { display: grid; gap: 6px; }
.cafe-menu { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px 28px; }
.cafe-menu li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px dashed color-mix(in srgb, var(--cafe-text) 25%, transparent);
  font-size: var(--fs-14);
}
.cafe-menu li span:first-child { flex: 1; }
.cafe-menu li span:last-child { font-weight: 700; font-variant-numeric: tabular-nums; }

.cafe-map {
  position: relative;
  flex: 0 0 46%;
  overflow: hidden;
  background: #E6DAC6;
}
.cafe-street { position: absolute; background: var(--cafe-bg); }
.cafe-street--a { left: -10%; right: -10%; top: 58%; height: 14px; transform: rotate(-8deg); }
.cafe-street--b { top: -10%; bottom: -10%; left: 38%; width: 12px; transform: rotate(14deg); }
.cafe-street--c { top: -10%; bottom: -10%; left: 78%; width: 8px; }
.cafe-park { position: absolute; left: 8%; top: 12%; width: 22%; height: 32%; border-radius: 40% 55% 45% 50%; background: #C9D1A8; }
.cafe-pin {
  position: absolute;
  left: 46%;
  top: 30%;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--cafe-text);
  color: var(--cafe-bg);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  box-shadow: 0 6px 14px rgba(43, 30, 21, .25);
}
.cafe-pin::after {
  content: "";
  position: absolute;
  left: 14px;
  bottom: -6px;
  border: 6px solid transparent;
  border-top-color: var(--cafe-text);
  border-bottom: 0;
}
.cafe-visit {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px 24px;
  align-content: center;
  padding: 20px;
}
.cafe-visit .cafe-tagline { margin-top: 8px; }
.cafe-times { display: grid; gap: 8px; align-content: center; font-size: var(--fs-14); }
.cafe-times dt { font-weight: 700; }
.cafe-times dd { color: var(--cafe-muted); font-variant-numeric: tabular-nums; }

.cafe-page--about .cafe-photo { flex-basis: 30%; object-position: 70% 50%; }
.cafe-page--about .cafe-body { gap: 12px; }
.cafe-stats { display: flex; gap: 28px; font-size: 0.8125rem; color: var(--cafe-muted); }
.cafe-stats b { display: block; color: var(--cafe-text); font-size: var(--fs-22); line-height: 1.1; }

/* AI view: the same page as facts */
.demo-ai {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  visibility: hidden;
  background-color: var(--ai-bg);
  background-image:
    linear-gradient(var(--ai-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--ai-grid) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--signal);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.6;
  overflow: auto;
  transition: opacity .32s ease, visibility .32s ease;
}
.demo[data-mode="ai"] .demo-ai { opacity: 1; visibility: visible; }
.ai-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 14px 64px 4px 14px;
}
.ai-routes { display: flex; gap: 4px; }
.ai-routes button {
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--ai-key);
  font: inherit;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.ai-routes button:hover { color: var(--signal); }
.ai-routes button[aria-pressed="true"] { color: var(--signal); border-color: color-mix(in srgb, var(--signal) 55%, transparent); }
.ai-routes button:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.ai-grid {
  display: grid;
  gap: 16px;
  padding: 12px 20px 20px;
  align-content: start;
}
.ai-facts { display: grid; gap: 0; }
.ai-facts > div {
  display: grid;
  grid-template-columns: 9ch minmax(0, 1fr);
  gap: 10px;
  padding: 5px 0;
  border-bottom: 1px dashed color-mix(in srgb, var(--signal) 22%, transparent);
}
.ai-facts dt { color: var(--ai-key); }
.ai-facts dd { color: var(--signal); overflow-wrap: anywhere; }
.ai-answer {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--signal) 45%, transparent);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--ai-bg) 80%, var(--signal) 6%);
}
.ai-answer p { display: block; }
.ai-k { color: var(--ai-key); font-size: 0.6875rem; margin-right: 10px; }
.ai-a { color: var(--text); font-size: 0.875rem; font-weight: 500; line-height: 1.45; }
.ai-src { color: var(--signal); }
@media (min-width: 900px) {
  .ai-grid { padding-inline: 28px; }
}

/* A single lemon scan line marks the switch to the AI view. */
.demo-scan {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent) 20%, var(--accent) 80%, transparent);
  box-shadow: 0 0 18px 3px color-mix(in srgb, var(--accent) 60%, transparent);
  opacity: 0;
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .demo.is-scanning .demo-scan { animation: demo-scan-down .65s ease-in-out forwards; }
}
@keyframes demo-scan-down {
  0% { top: 0; opacity: 0; }
  12% { opacity: 1; }
  85% { opacity: 1; }
  100% { top: calc(100% - 3px); opacity: 0; }
}
html:not(.js) .demo-switch, html:not(.js) .demo-tag--ai { display: none; }

.demo-foot {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}
.demo-switch {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font-size: var(--fs-14);
  font-weight: 600;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.demo-switch:hover, .demo-switch[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
@media (max-width: 959px) { .hero-inner { max-width: 740px; } }
@media (max-width: 599px) {
  .demo-stage { height: 450px; }
  .ai-page--home .ai-facts > div:nth-child(1),
  .ai-page--home .ai-facts > div:nth-child(4),
  .ai-page--home .ai-facts > div:nth-child(6) { display: none; }
  .ai-grid:not(.ai-page--home) .ai-facts > div:first-child { display: none; }
}
@media (max-width: 520px) {
  .cafe-nav { padding-left: 20px; padding-top: 44px; }
  .demo-tag--human { left: 20px; }
  .cafe-nav { padding-right: 20px; }
  .ai-nav { padding-inline: 20px; }
  .cafe-page--menu { gap: 14px; padding-top: 20px; }
  .cafe-menu { grid-template-columns: 1fr 1fr; gap: 16px; }
  .cafe-menu li { font-size: 0.75rem; }
  .cafe-map { flex-basis: 34%; }
  .cafe-visit { gap: 12px; padding-block: 16px; align-content: start; }
  .cafe-times { grid-template-columns: 1fr 1fr; gap: 12px; font-size: 0.8125rem; }
  .cafe-times dd { white-space: nowrap; }
}

/* === services === */
.services { border-top: 1px solid var(--line); }
.service {
  display: grid;
  gap: 6px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.service p { color: var(--muted); max-width: 52ch; }
@media (min-width: 720px) {
  .service { grid-template-columns: 12rem minmax(0, 1fr); gap: 24px; padding: 28px 0; align-items: baseline; }
  .service p { font-size: var(--fs-18); line-height: 1.5; }
}
.found {
  margin-top: 40px;
  padding: 0;
  display: grid;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--line-strong);
}
.found-copy { padding: clamp(24px, 3vw, 36px); border-top: 2px solid var(--accent); }
.found-copy p { margin-top: 12px; font-size: var(--fs-18); line-height: 1.5; max-width: 58ch; }
.terminal { min-width: 0; border-top: 1px solid var(--line-strong); background: var(--bg); font-family: var(--font-mono); }
.terminal-bar { display: flex; justify-content: space-between; gap: 20px; padding: 12px 20px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 0.6875rem; line-height: 1.4; }
.terminal-path { color: var(--text); }
.terminal-status { color: var(--signal); white-space: nowrap; }
.terminal-code { margin: 0; padding: 20px 12px 20px 20px; overflow-x: auto; font-size: 0.6875rem; line-height: 1.9; tab-size: 2; }
.terminal-code code { display: grid; width: max-content; min-width: 100%; }
.terminal-line { display: flex; white-space: pre; color: var(--text); }
.terminal-number { flex: none; width: 3ch; margin-right: 2ch; color: var(--muted); opacity: .65; user-select: none; }
.terminal-key { color: var(--signal); }
.terminal-value { color: var(--text); }
.terminal-result { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.6875rem; line-height: 1.5; }
.terminal-prompt { color: var(--signal); font-weight: 700; }
.terminal-cursor { width: 7px; height: 1.1em; background: var(--signal); }
@media (min-width: 720px) {
  .found { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
  .found-copy { border-top: 0; border-left: 2px solid var(--accent); }
  .terminal { border-top: 0; border-left: 1px solid var(--line-strong); }
}
@media (prefers-reduced-motion: no-preference) {
  html.js .terminal:not(.is-visible) .terminal-line,
  html.js .terminal:not(.is-visible) .terminal-result-text,
  html.js .terminal:not(.is-visible) .terminal-cursor { opacity: 0; }
  html.js .terminal.is-visible .terminal-line { animation: terminal-line-in .35s both; animation-delay: var(--line-delay); }
  html.js .terminal.is-visible .terminal-result-text { animation: terminal-line-in .35s both; animation-delay: 900ms; }
  html.js .terminal.is-visible .terminal-cursor { animation: terminal-line-in .1s 900ms both, terminal-blink 1s steps(1, end) 1s infinite; }
}
@keyframes terminal-line-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes terminal-blink { 50% { opacity: 0; } }
.after { margin-top: 24px; color: var(--muted); max-width: 60ch; }

/* === work === */
.work-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 48px;
  margin-bottom: 48px;
}
.facts { display: flex; gap: 40px; }
.facts > div { display: flex; flex-direction: column-reverse; gap: 2px; }
.facts dt { color: var(--muted); font-size: var(--fs-14); }
.facts dd {
  font-size: var(--fs-44);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
@media (prefers-reduced-motion: no-preference) {
  .facts.is-counting [data-count-to] { animation: stat-arrive .8s cubic-bezier(.16,1,.3,1) both; }
}
@keyframes stat-arrive {
  from { opacity: .2; transform: translateY(14px) scale(.82); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.facts [data-count-to] { display: inline-block; transform-origin: bottom left; }

.sites {
  display: grid;
  gap: 40px 24px;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 720px) {
  .sites { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .sites { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .site { grid-column: span 4; }
  .site--lg, .site--soon { grid-column: span 6; }
}

.site { display: grid; gap: 8px; align-content: start; color: var(--text); text-decoration: none; }
.site-shot {
  position: relative;
  display: block;
  aspect-ratio: 5 / 2;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.site-shot img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; object-position: top; }
/* Hover frame: two lemon lines leave opposite corners, run along the edges and meet.
   ::before draws top then right from the top-left corner; ::after draws bottom then left from the bottom-right. */
.site-shot::before, .site-shot::after {
  content: "";
  position: absolute;
  z-index: 1;
  width: 0;
  height: 0;
  border: 0 solid transparent;
  pointer-events: none;
  /* leaving: sides retract first, then the long edges, then the colour goes */
  transition: width .22s cubic-bezier(.65,0,.35,1) .18s, height .18s cubic-bezier(.65,0,.35,1), border-color 0s .4s;
}
.site-shot::before { top: -1px; left: -1px; border-top-width: 1px; border-right-width: 1px; }
.site-shot::after { right: -1px; bottom: -1px; border-bottom-width: 1px; border-left-width: 1px; }
a.site:is(:hover, :focus-visible) .site-shot::before,
a.site:is(:hover, :focus-visible) .site-shot::after {
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  border-color: var(--accent);
  transition: width .22s cubic-bezier(.65,0,.35,1), height .18s cubic-bezier(.65,0,.35,1) .22s, border-color 0s;
}
.site-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.site-name { font-size: var(--fs-18); font-weight: 650; letter-spacing: -0.01em; }
.site-type { color: var(--muted); font-size: var(--fs-14); }
.site-desc { color: var(--muted); max-width: 48ch; text-wrap: pretty; }
.site-url { color: var(--accent); font-size: var(--fs-14); font-weight: 500; }
a.site:hover .site-name { text-decoration: underline; text-decoration-thickness: from-font; text-underline-offset: 0.2em; }
a.site:focus-visible { outline-offset: 6px; }
.site--lg .site-name { font-size: var(--fs-22); }

.site--soon .site-shot { aspect-ratio: 16 / 10; }
.site-text { display: grid; gap: 8px; align-content: start; }
.soon {
  justify-self: start;
  margin-top: 4px;
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}
@media (min-width: 1024px) {
  .site--soon {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 24px;
    padding-top: 32px;
    border-top: 1px solid var(--line);
  }
  .site--soon .site-shot { margin: 0; }
}

.apps-block {
  display: grid;
  gap: 24px;
  margin-top: clamp(64px, 8vw, 104px);
}
.apps-head p { margin-top: 8px; color: var(--muted); }
.apps { display: grid; gap: 0 32px; border-top: 1px solid var(--line); }
.app { padding: 24px 0; border-bottom: 1px solid var(--line); }
.app-shot {
  display: block;
  aspect-ratio: 16 / 15;
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.app-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.app-shot--phones {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5%;
  background: var(--raise);
}
.app-shot--phones img {
  width: auto;
  height: 84%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.18);
}
.app-for { margin-top: 2px; color: var(--muted); font-size: var(--fs-14); }
.app p:last-child { margin-top: 10px; max-width: 52ch; }
@media (min-width: 720px) { .apps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) {
  .apps-block { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }
  .apps-head { grid-column: 1 / span 4; }
  .apps { grid-column: 5 / -1; }
}

/* === process === */
#process { position: relative; overflow: hidden; isolation: isolate; }
#process > .wrap { position: relative; z-index: 1; }
.process-field {
  position: absolute;
  inset: -5% -3%;
  z-index: 0;
  pointer-events: none;
  background-image: linear-gradient(color-mix(in srgb, var(--text) 6%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--text) 6%, transparent) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 30%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 30%, #000 100%);
  transform: translate3d(var(--pointer-x, 0px), calc(var(--pointer-y, 0px) + var(--scroll-y, 0px)), 0);
  transition: transform .4s ease-out;
}
.process-pixel {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: var(--size);
  background: var(--text);
  box-shadow: 0 0 18px color-mix(in srgb, var(--text) 40%, transparent), 5px 5px 0 color-mix(in srgb, var(--text) 10%, transparent);
  opacity: .1;
  transform: perspective(240px) rotateX(16deg) rotateY(-16deg);
}
.process-pixel:nth-child(3n) { background: var(--accent); box-shadow: 0 0 22px color-mix(in srgb, var(--accent) 40%, transparent), 5px 5px 0 color-mix(in srgb, var(--accent) 12%, transparent); }
@media (prefers-reduced-motion: no-preference) {
  .process-pixel { animation: pixel-glint 6.2s ease-in-out var(--delay) infinite; }
}
@keyframes pixel-glint {
  0%, 15%, 34%, 62%, 100% { opacity: .035; }
  22% { opacity: .28; }
  69% { opacity: .17; }
}
.steps { display: grid; gap: 0; counter-reset: none; }
.step {
  position: relative;
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  column-gap: 12px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.step::before { content: ""; position: absolute; top: -1px; left: 0; width: 100%; height: 1px; background: var(--accent); transform-origin: left; opacity: .75; }
.step:nth-child(1) { --step-index: 0; }
.step:nth-child(2) { --step-index: 1; }
.step:nth-child(3) { --step-index: 2; }
.step:nth-child(4) { --step-index: 3; }
.step-n {
  grid-row: span 2;
  font-size: var(--fs-30);
  font-weight: 500;
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.step h3 { font-size: var(--fs-18); }
.step p { margin-top: 4px; color: var(--muted); }
@media (min-width: 720px) {
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
  .step { display: block; padding: 20px 0 0; border-top: 2px solid var(--line-strong); }
  .step::before { top: -2px; height: 2px; }
  .step:first-child { border-top-color: var(--accent); }
  .step-n { display: block; margin-bottom: 20px; font-size: var(--fs-44); }
  .step p { font-size: var(--fs-16); }
}
@media (prefers-reduced-motion: no-preference) {
  .steps.motion-ready:not(.is-visible) .step { opacity: 0; }
  .steps.motion-ready .step::before { transform: scaleX(0); }
  .steps.motion-ready.is-visible .step { animation: step-enter .75s cubic-bezier(.16,1,.3,1) both; animation-delay: calc(var(--step-index) * 140ms); }
  .steps.motion-ready.is-visible .step::before { animation: step-rule .65s cubic-bezier(.16,1,.3,1) both; animation-delay: calc(var(--step-index) * 140ms + 120ms); }
}
@keyframes step-enter {
  from { opacity: 0; transform: perspective(900px) rotateX(-15deg) translate3d(0, 25px, -25px); }
  to { opacity: 1; transform: perspective(900px) rotateX(0) translate3d(0, 0, 0); }
}
@keyframes step-rule { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.promises {
  display: grid;
  gap: 0 32px;
  margin-top: 56px;
  border-top: 1px solid var(--line);
}
.promises li {
  position: relative;
  padding: 18px 0 18px 32px;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-18);
  line-height: 1.4;
}
.promises li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: calc(18px + 0.35em);
  width: 12px;
  height: 7px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}
@media (min-width: 720px) { .promises { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* === faq === */
.faq { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item > button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  padding: 22px 0;
  border: 0;
  background: transparent;
  text-align: left;
  font-size: var(--fs-18);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.005em;
  cursor: pointer;
  text-wrap: balance;
}
.faq-item > button:hover { color: var(--accent); }
@media (min-width: 720px) { .faq-item > button { font-size: var(--fs-22); padding: 26px 0; } }
.faq-icon { position: relative; flex: none; width: 14px; height: 14px; }
.faq-icon::before, .faq-icon::after {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 14px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transition: transform .2s ease;
}
.faq-icon::after { transform: rotate(90deg); }
.faq-item > button[aria-expanded="true"] .faq-icon::after { transform: rotate(0deg); }
.faq-panel {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows .22s ease, visibility 0s linear .22s;
}
.faq-panel > div { overflow: hidden; }
.faq-panel p { padding-bottom: 26px; max-width: 60ch; color: var(--muted); font-size: var(--fs-18); line-height: 1.55; }
.faq-item > button[aria-expanded="true"] + .faq-panel {
  grid-template-rows: 1fr;
  visibility: visible;
  transition: grid-template-rows .22s ease, visibility 0s;
}
html:not(.js) .faq-panel { grid-template-rows: 1fr; visibility: visible; }

/* === contact === */
.contact h2 {
  max-width: 13ch;
  font-size: clamp(2.75rem, 1.4rem + 4.4vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}
.contact-lead { margin: 24px 0 36px; max-width: 46ch; color: var(--muted); font-size: var(--fs-18); line-height: 1.5; }
@media (min-width: 720px) { .contact-lead { font-size: var(--fs-22); line-height: 1.45; } }

.contact-body { display: grid; gap: 48px; margin-top: 48px; }
@media (min-width: 960px) {
  .contact-body { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }
  .contact-box { grid-column: 1 / span 7; }
  .contact-direct { grid-column: 9 / -1; align-self: start; }
  .contact-direct .actions { flex-direction: column; align-items: stretch; }
}
.contact-box [hidden] { display: none !important; }
html:not(.js) .contact-box { display: none; }
html:not(.js) .contact-direct-title { display: none; }
html:not(.js) .contact-body { margin-top: 0; }

.contact-form { display: grid; gap: 20px; max-width: 640px; }
.field { display: grid; gap: 8px; min-width: 0; }
.field-pair { display: grid; gap: 20px; }
@media (min-width: 560px) { .field-pair { grid-template-columns: 1fr 1fr; } }
.field-pair + .field-note { margin-top: -10px; }
.field-label { font-weight: 600; }
.field-input {
  width: 100%;
  min-height: 56px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--raise);
  color: var(--text);
  font: inherit;
  font-size: var(--fs-18); /* >= 16px: no zoom on iOS */
}
textarea.field-input { min-height: 140px; padding-block: 14px; line-height: 1.5; resize: vertical; }
.field-input::placeholder { color: var(--muted); opacity: 1; }
.field-input:hover { border-color: var(--muted); }
.field-input:focus-visible { outline-offset: 0; border-color: var(--accent); }
.field-input[aria-invalid="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.field-select {
  appearance: none;
  padding-right: 48px;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 24px) 50%, calc(100% - 18px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}
.field-select option { background: var(--surface); color: var(--text); }
.field-hint, .field-note.is-error { color: var(--accent); font-size: var(--fs-14); font-weight: 500; }
.field-note { color: var(--muted); font-size: var(--fs-14); }
.field-note a { color: inherit; }
.field-note a:hover { color: var(--text); }
.field-trap { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.contact-submit { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 4px; }
.contact-submit .btn:disabled { cursor: progress; opacity: .7; }
@media (max-width: 519px) { .contact-submit .btn { width: 100%; } }
.contact-error { color: var(--accent); font-weight: 500; line-height: 1.5; }
.contact-error a { color: inherit; }

.contact-done { display: grid; gap: 12px; justify-items: start; max-width: 640px; padding-top: 24px; border-top: 1px solid var(--accent); color: var(--muted); font-size: var(--fs-18); }
.contact-done:focus { outline: none; }
.contact-done-title { color: var(--text); font-size: var(--fs-30); font-weight: 650; letter-spacing: -0.02em; line-height: 1.15; }
.contact-done .btn { margin-top: 12px; }
.contact-direct-title { margin-bottom: 16px; font-weight: 600; }

/* === footer === */
.site-footer { border-top: 1px solid var(--line); padding-block: 32px 40px; font-size: var(--fs-14); color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.footer-mark { display: flex; align-items: center; gap: 16px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); text-decoration: underline; }

/* === consent === */
/* Built by js/consent.js only when analytics IDs are set. */
.consent {
  position: fixed;
  z-index: 60;
  right: 16px;
  bottom: 16px;
  left: 16px;
  display: grid;
  gap: 16px;
  max-width: 440px;
  margin-left: auto;
  padding: 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .28);
}
.consent-text { color: var(--muted); font-size: var(--fs-14); line-height: 1.5; }
.consent-text a { color: var(--text); }
.consent-actions { display: flex; gap: 10px; }
.consent-actions .btn { flex: 1 1 0; }
.footer-button { padding: 0; border: 0; background: none; color: var(--muted); font: inherit; cursor: pointer; }
.footer-button:hover { color: var(--text); text-decoration: underline; }

/* === motion preferences === */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; animation: none !important; }
}

/* === audit === */
/* Owned by ticket 03. */
.audit { max-width: 640px; }
html:not(.js) .audit-form, html:not(.js) .audit-out { display: none; }
html.js .audit-nojs { display: none; }
.audit-nojs { font-size: var(--fs-18); }
.audit [hidden] { display: none !important; }

.audit-form { display: grid; gap: 10px; }
.audit-label { font-weight: 600; }
.audit-row { display: flex; flex-wrap: wrap; gap: 10px; }
.audit-input {
  flex: 1 1 240px;
  min-width: 0;
  min-height: 56px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--raise);
  color: var(--text);
  font: inherit;
  font-size: var(--fs-18); /* >= 16px: no zoom on iOS */
}
.audit-input::placeholder { color: var(--muted); opacity: 1; }
.audit-input:hover { border-color: var(--muted); }
.audit-input:focus-visible { outline-offset: 0; border-color: var(--accent); }
/* Invalid differs from focus by weight too: a 2px edge, plus the hint line under the field. */
.audit-input[aria-invalid="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.audit-row .btn { min-height: 56px; flex: 0 0 auto; }
@media (max-width: 519px) {
  .audit-row { flex-direction: column; }
  .audit-input { flex: 0 0 auto; }
  .audit-row .btn { width: 100%; }
}
.audit-row .btn:disabled { cursor: progress; opacity: .7; }
.audit-hint { color: var(--accent); font-size: var(--fs-14); font-weight: 500; }
.audit-note { color: var(--muted); font-size: var(--fs-14); }
.audit-note a { color: inherit; }
.audit-note a:hover { color: var(--text); }

.audit-out { display: grid; gap: 28px; }
.audit[data-state="loading"] .audit-out { margin-top: 20px; }
.audit-loading { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.audit-loading::before {
  content: "";
  width: 14px; height: 14px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--signal);
  border-radius: 50%;
  animation: audit-spin .8s linear infinite;
}
@keyframes audit-spin { to { transform: rotate(360deg); } }

.audit-panel { display: grid; gap: 16px; justify-items: start; }
.audit-error { font-size: var(--fs-18); line-height: 1.5; max-width: 44ch; }

.audit-score { display: grid; gap: 6px; }
.audit-figure { font-family: var(--font-mono); font-weight: 500; line-height: 1; letter-spacing: -0.04em; color: var(--signal); font-variant-numeric: tabular-nums; }
.audit-num { font-size: clamp(4rem, 3rem + 4vw, 6rem); }
.audit-of { font-size: var(--fs-30); color: var(--muted); letter-spacing: -0.02em; }
.audit-verdict { font-size: var(--fs-22); font-weight: 650; letter-spacing: -0.012em; line-height: 1.25; }
.audit-site { color: var(--muted); font-size: var(--fs-14); overflow-wrap: anywhere; }
.audit-site:empty { display: none; }
.audit-lead { padding-top: 24px; border-top: 1px solid var(--line); }

.audit-list { width: 100%; border-top: 1px solid var(--line); }
.audit-list:focus { outline: none; } /* script moves focus here after the report opens; not interactive */
.audit-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  text-wrap: pretty;
}
.audit-mark {
  display: inline-grid;
  place-items: center;
  width: 24px; height: 24px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: var(--fs-14);
  font-weight: 500;
  line-height: 1;
}
.audit-item.is-ok .audit-mark { color: var(--signal); background: color-mix(in srgb, var(--signal) 14%, transparent); }
.audit-item.is-bad .audit-mark { color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent); }
.audit-item.is-bad { font-weight: 550; }
.audit-next { color: var(--muted); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* === privacy === */
.legal-header .theme-toggle { margin-left: auto; }
.legal { max-width: calc(720px + 2 * var(--gutter)); padding-block: 40px 96px; }
.legal-back { margin-bottom: 40px; font-size: var(--fs-14); }
.legal-back a { color: var(--muted); }
.legal-back a:hover { color: var(--text); }
.legal h1 { font-size: var(--fs-h2); line-height: 1.06; letter-spacing: -0.025em; }
.legal-updated { margin-top: 12px; color: var(--muted); font-size: var(--fs-14); }
.legal-lead { margin-top: 32px; font-size: var(--fs-18); line-height: 1.55; }
.legal h2 { margin-top: 48px; font-size: var(--fs-22); line-height: 1.2; letter-spacing: -0.012em; }
.legal p, .legal li { max-width: 68ch; }
.legal h2 + p, .legal h2 + ul { margin-top: 12px; }
.legal p + p, .legal ul + p, .legal p + ul { margin-top: 12px; }
.legal ul { display: grid; gap: 8px; }
.legal li { position: relative; padding-left: 20px; }
.legal li::before { content: ""; position: absolute; left: 2px; top: 0.72em; width: 8px; height: 1px; background: var(--muted); }
.legal b { font-weight: 650; }
.placeholder {
  padding: 1px 6px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.legal code { font-family: var(--font-mono); font-size: .88em; }
.legal-contact { display: grid; gap: 8px; margin: 12px 0 0; }
.legal-contact > div { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.legal-contact dt { min-width: 80px; color: var(--muted); }
.legal-contact dd { margin: 0; }
