/* KemiQR — a product site for a chemical-inventory app. Lab paper, graphite ink, GHS red only
   where a hazard mark belongs, teal where the app has found something. Archivo carries the
   display, Barlow the reading, Overpass Mono the data the app actually reads. */

@font-face { font-family: 'Archivo'; src: url(archivo-var.woff2) format('woff2'); font-weight: 600 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url(barlow-400.woff2) format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url(barlow-600.woff2) format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Overpass Mono'; src: url(overpass-mono-600.woff2) format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  /* Dark is the product's own theme — the app is dark with an orange accent. `paper`,
     `ink` and the rest keep their names so every component reads the same in both themes;
     only the values swap under data-theme="light". */
  --paper: #121417;
  --paper-2: #1B1F24;
  --paper-3: #2A3038;
  --ink: #F3F4F1;
  --ink-2: #B9C0C6;
  --ink-3: #8E979E;
  --signal: #FF3B3B;
  --found: #4ED0A6;
  --found-soft: rgba(78, 208, 166, 0.18);
  --white: #1F242A;
  --accent: #FF6A1F;
  --accent-ink: #121417;
  --card-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  --label-bg: #FFFFFF;
  --label-ink: #15191D;
  --stats-bg: #1B1F24;
  --stats-ink: #F3F4F1;
  --qr-bg: #FF6A1F;
  --qr-ink: #121417;
  --qr-sub: rgba(18, 20, 23, 0.72);
  --header-bg: rgba(18, 20, 23, 0.9);
  color-scheme: dark;
  --f-display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --f-body: 'Barlow', system-ui, sans-serif;
  --f-mono: 'Overpass Mono', ui-monospace, monospace;

  --t-h1: clamp(2.5rem, 5.6vw, 4.75rem);
  --t-h2: clamp(1.75rem, 3.2vw, 2.75rem);
  --t-h3: 1.25rem;
  --t-lede: clamp(1.125rem, 1.5vw, 1.3125rem);
  --t-body: 1.0625rem;
  --t-meta: 0.8125rem;

  --gutter: clamp(20px, 5vw, 88px);
  --header-h: 68px;
  --r: 6px;
}
:root[data-theme="light"] {
  --paper: #F3F4F1;
  --paper-2: #E9EBE6;
  --paper-3: #DDE0DA;
  --ink: #15191D;
  --ink-2: #4A5259;
  --ink-3: #5B636A;
  --signal: #D0021B;
  --found: #0E6E6A;
  --found-soft: #D9ECE9;
  --white: #FFFFFF;
  --accent: #E85D0C;
  --accent-ink: #FFFFFF;
  --card-shadow: 0 24px 60px rgba(21, 25, 29, 0.14);
  --label-bg: #FFFFFF;
  --label-ink: #15191D;
  --stats-bg: #15191D;
  --stats-ink: #F3F4F1;
  --qr-bg: #15191D;
  --qr-ink: #F3F4F1;
  --qr-sub: #DDE0DA;
  --header-bg: rgba(243, 244, 241, 0.92);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--f-body); font-size: var(--t-body); line-height: 1.6; overflow-x: hidden; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--accent); color: var(--accent-ink); }
:where(a, button, [tabindex]):focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: 16px; top: -200px; z-index: 90; background: var(--ink); color: var(--paper); padding: 12px 18px; font-weight: 600; text-decoration: none; border-radius: var(--r); }
.skip:focus { top: 16px; }

/* --- type --------------------------------------------------------------------------- */
.h1, h1 { font-family: var(--f-display); font-weight: 700; font-size: var(--t-h1); line-height: 1.02; letter-spacing: -0.02em; text-wrap: balance; }
.h2 { font-family: var(--f-display); font-weight: 700; font-size: var(--t-h2); line-height: 1.08; letter-spacing: -0.015em; max-width: 24ch; text-wrap: balance; }
h3 { font-family: var(--f-display); font-weight: 600; font-size: var(--t-h3); line-height: 1.2; }
.standfirst, .lede { font-size: var(--t-lede); line-height: 1.5; max-width: 56ch; text-wrap: pretty; }
.note { font-size: var(--t-meta); color: var(--ink-2); line-height: 1.5; max-width: 60ch; }
.mono, .stat-s, .bar-n, .fields-k, .found-h, .found-ok, .label-maker, .qr-cap, .fact, .contact-k, .step-n { font-family: var(--f-mono); font-weight: 600; font-size: var(--t-meta); letter-spacing: 0.02em; }

/* --- header ------------------------------------------------------------------------- */
.top { position: sticky; top: 0; z-index: 60; height: var(--header-h); display: flex; align-items: center; gap: 32px; padding-inline: var(--gutter); background: var(--header-bg); backdrop-filter: blur(8px); border-bottom: 1px solid transparent; transition: border-color 200ms ease-out; }
html.scrolled .top { border-bottom-color: var(--paper-3); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.brand-mark { width: 22px; height: 22px; border-radius: 4px; background:
  linear-gradient(var(--ink), var(--ink)) 0 0 / 9px 9px no-repeat,
  linear-gradient(var(--ink), var(--ink)) 100% 0 / 9px 9px no-repeat,
  linear-gradient(var(--ink), var(--ink)) 0 100% / 9px 9px no-repeat,
  linear-gradient(var(--accent), var(--accent)) 100% 100% / 6px 6px no-repeat; }
.nav { margin-left: auto; display: flex; align-items: center; gap: clamp(16px, 2.4vw, 36px); }
.nav a { position: relative; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.9375rem; padding: 8px 0; }
.nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 160ms ease-out; }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav-login { border: 1.5px solid var(--ink); border-radius: 999px; padding: 6px 16px !important; }
.nav-login::after { content: none !important; }
.nav-login:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.burger { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; flex-direction: column; justify-content: center; gap: 7px; padding: 8px; }
.burger-bar { display: block; height: 2px; width: 28px; background: var(--ink); transition: transform 200ms ease-out; }
.burger[aria-expanded="true"] .burger-bar:first-child { transform: translateY(4.5px) rotate(45deg); }
.burger[aria-expanded="true"] .burger-bar:last-child { transform: translateY(-4.5px) rotate(-45deg); }
.no-js .burger { display: none; }
.menu { position: fixed; inset: 0; z-index: 50; background: var(--paper); padding: calc(var(--header-h) + 24px) var(--gutter) 40px; opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity 160ms ease-out, transform 160ms ease-out, visibility 0s linear 160ms; }
.menu.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.menu-nav { display: grid; gap: 8px; }
.menu-nav a { font-family: var(--f-display); font-weight: 700; font-size: clamp(2rem, 8vw, 2.75rem); color: var(--ink); text-decoration: none; padding: 8px 0; }

/* --- buttons ------------------------------------------------------------------------ */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 26px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-family: var(--f-display); font-weight: 600; font-size: 1.0625rem; text-decoration: none; transition: background-color 160ms ease-out, transform 120ms ease-out, box-shadow 160ms ease-out; }
.btn:hover { background: var(--ink); color: var(--paper); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25); }
.btn:active { transform: translateY(0); }
.btn--light { background: var(--qr-ink); color: var(--qr-bg); }
.btn--light:hover { background: var(--paper); color: var(--ink); box-shadow: 0 8px 24px rgba(0,0,0,0.25); }
.link { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1.5px; padding: 8px 0; }
.link:hover { color: var(--accent); }
.cta-row { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 32px); flex-wrap: wrap; margin-top: clamp(20px, 2.6vw, 32px); }

/* --- sections ----------------------------------------------------------------------- */
.sec { padding: clamp(56px, 8vw, 120px) var(--gutter); }
.page-hero { padding: clamp(48px, 7vw, 96px) var(--gutter) clamp(24px, 3vw, 40px); }
.page-hero .standfirst { margin-top: 20px; }

/* --- hero: copy left, the scan right --------------------------------------------------- */
.hero { padding: clamp(40px, 6vw, 88px) var(--gutter) clamp(48px, 6vw, 80px); display: grid; gap: clamp(40px, 5vw, 80px); align-items: center; }
@media (min-width: 960px) { .hero { grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr); min-height: calc(100svh - var(--header-h)); } }
.hero-copy .standfirst { margin-top: clamp(20px, 2.6vw, 32px); }
.hero-copy .note { margin-top: clamp(20px, 2.6vw, 32px); }

.scan { margin: 0; display: grid; gap: 14px; }
.scan-stage { position: relative; aspect-ratio: 1 / 1.02; max-width: 520px; width: 100%; margin-inline: auto; }
.scan-cap { font-size: var(--t-meta); color: var(--ink-2); text-align: center; }

/* the label: a bottle label as the app's camera sees it */
.label { position: absolute; left: 6%; top: 0; width: 66%; aspect-ratio: 3 / 4; background: var(--label-bg); color: var(--label-ink); border-radius: 10px; box-shadow: var(--card-shadow); padding: 7% 8%; display: grid; grid-template-rows: auto auto auto 1fr; gap: 4%; overflow: hidden; transform: rotate(-3deg); }
.label-top { display: flex; gap: 6%; }
.ghs { width: 22%; }
.label-name { font-family: var(--f-display); font-weight: 800; font-size: clamp(1.4rem, 3.2vw, 2.2rem); line-height: 1; letter-spacing: -0.02em; margin-top: 4%; }
.label-maker { color: #4A5259; }
.barcode { align-self: end; height: 18%; background: repeating-linear-gradient(90deg, #15191D 0 2px, transparent 2px 5px, #15191D 5px 6px, transparent 6px 10px, #15191D 10px 13px, transparent 13px 16px); opacity: 0.9; }
.corners i { position: absolute; width: 18%; height: 18%; border: 3px solid var(--found); opacity: 0; }
.corners i:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; border-radius: 10px 0 0 0; }
.corners i:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; border-radius: 0 10px 0 0; }
.corners i:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 10px; }
.corners i:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; border-radius: 0 0 10px 0; }
.beam { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--signal); box-shadow: 0 0 18px 4px rgba(208, 2, 27, 0.35); opacity: 0; }

/* the row: what the app writes into the list */
.found { position: absolute; right: 0; bottom: 4%; width: 78%; background: var(--white); color: var(--ink); border-radius: 10px; border-left: 5px solid var(--found); box-shadow: var(--card-shadow); padding: 18px 20px 18px 22px; display: grid; grid-template-columns: auto 1fr; column-gap: 12px; row-gap: 4px; align-items: center; opacity: 0; transform: translateY(16px); }
.found-dot { grid-row: 1 / 3; width: 12px; height: 12px; border-radius: 50%; background: var(--found); box-shadow: 0 0 0 4px var(--found-soft); }
.found-name { font-family: var(--f-display); font-weight: 700; font-size: 1.125rem; }
.found-maker { color: var(--ink-2); font-size: 0.9375rem; }
.found-h { grid-column: 2; color: var(--ink); background: var(--paper-2); border-radius: 4px; padding: 3px 8px; justify-self: start; margin-top: 4px; }
.found-ok { grid-column: 2; color: var(--found); }

/* reduced motion and no-JS: the finished state, static */
.found { opacity: 1; transform: none; }
.corners i { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  html.motion .found { animation: found-in 9s ease-out infinite; }
  html.motion .corners i { animation: corners 9s ease-out infinite; }
  html.motion .beam { animation: beam 9s ease-in-out infinite; }
  @keyframes beam {
    0% { opacity: 0; top: 4%; }
    6% { opacity: 1; }
    30% { top: 96%; opacity: 1; }
    36% { opacity: 0; top: 96%; }
    100% { opacity: 0; top: 96%; }
  }
  @keyframes corners {
    0%, 30% { opacity: 0; }
    38%, 92% { opacity: 1; }
    100% { opacity: 0; }
  }
  @keyframes found-in {
    0%, 40% { opacity: 0; transform: translateY(16px); }
    50%, 92% { opacity: 1; transform: none; }
    100% { opacity: 0; transform: translateY(16px); }
  }
  /* the copy lands in a cascade on first paint */
  .hero-copy > * { opacity: 0; transform: translateY(12px); animation: rise 700ms cubic-bezier(0.16, 1, 0.3, 1) forwards; }
  .hero-copy > :nth-child(2) { animation-delay: 90ms; }
  .hero-copy > :nth-child(3) { animation-delay: 180ms; }
  .hero-copy > :nth-child(4) { animation-delay: 270ms; }
  .scan { opacity: 0; animation: rise 800ms cubic-bezier(0.16, 1, 0.3, 1) 200ms forwards; }
  @keyframes rise { to { opacity: 1; transform: none; } }
}

/* --- stats ------------------------------------------------------------------------ */
.stats { background: var(--stats-bg); color: var(--stats-ink); border-block: 1px solid var(--paper-3); padding: clamp(32px, 4vw, 56px) var(--gutter); }
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: clamp(24px, 4vw, 64px); }
.stat-n { font-family: var(--f-display); font-weight: 800; font-size: clamp(3rem, 6vw, 5.5rem); line-height: 1; letter-spacing: -0.03em; color: var(--accent); font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 0.08em; }
.stat-u { font-size: 0.4em; font-weight: 600; color: var(--accent); }
.stat-s { margin-top: 10px; color: var(--ink-2); }

/* --- problems: a hazard diamond per claim ---------------------------------------------- */
.sec--problems { background: var(--paper-2); }
.problems { margin-top: clamp(32px, 4vw, 56px); display: grid; gap: clamp(24px, 3vw, 40px); }
@media (min-width: 900px) { .problems { grid-template-columns: repeat(3, 1fr); } }
.problem { position: relative; padding-top: 34px; display: grid; gap: 12px; align-content: start; max-width: 40ch; }
.problem p { color: var(--ink-2); }
.diamond { position: absolute; left: 0; top: 0; width: 18px; height: 18px; border: 3px solid var(--signal); transform: rotate(45deg); border-radius: 2px; }
.diamond--x { border-color: var(--ink-3); }
.diamond::after { content: ''; position: absolute; inset: 4px; background: var(--signal); }
.diamond--x::after { background: none; }
.problem:hover .diamond { animation: pulse 900ms ease-out; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(208, 2, 27, 0.4); } 100% { box-shadow: 0 0 0 14px rgba(208, 2, 27, 0); } }

/* --- time bars ------------------------------------------------------------------------ */
.time-head { display: grid; gap: 16px; }
.time-head .lede { color: var(--ink-2); }
.bars { margin-top: clamp(32px, 4vw, 56px); display: grid; gap: clamp(18px, 2.4vw, 28px); max-width: 880px; }
.bars-legend { display: flex; gap: 20px; font-size: var(--t-meta); color: var(--ink-2); }
.lg { display: inline-flex; align-items: center; gap: 8px; }
.lg::before { content: ''; width: 14px; height: 14px; border-radius: 3px; }
.lg--hand::before { background: var(--ink-3); }
.lg--app::before { background: var(--accent); }
.bar-row { display: grid; gap: 8px; }
.bar-t { font-weight: 600; }
.bar-pair { display: grid; gap: 6px; }
.bar { position: relative; height: 26px; display: flex; align-items: center; }
.bar-fill { display: block; height: 100%; width: calc(var(--v) / 1020 * 100%); min-width: 4px; border-radius: 3px; transform: scaleX(0); transform-origin: left; transition: transform 900ms cubic-bezier(0.16, 1, 0.3, 1); }
.bar--hand .bar-fill { background: var(--ink-3); }
.bar--app .bar-fill { background: var(--accent); transition-delay: 240ms; }
.bar-n { margin-left: 10px; color: var(--ink-2); white-space: nowrap; }
.bar--app .bar-n { color: var(--accent); }
.bars[data-inview] .bar-fill, html:not(.motion) .bar-fill { transform: none; }
.bars-sum { margin-top: 8px; font-family: var(--f-display); font-weight: 700; font-size: 1.25rem; }
.upkeep { margin-top: clamp(32px, 4vw, 56px); max-width: 60ch; color: var(--ink-2); padding-left: 20px; border-left: 3px solid var(--accent); }

/* --- fields chips ---------------------------------------------------------------------- */
.sec--fields { padding-block: 0 clamp(56px, 8vw, 120px); display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.fields-k { color: var(--ink-3); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--paper-3); background: var(--white); font-weight: 600; font-size: 0.9375rem; transition: border-color 160ms ease-out, transform 160ms ease-out; }
.chips li:hover { border-color: var(--accent); transform: translateY(-2px); }

/* --- QR: the cupboard-door sheet ------------------------------------------------------- */
.sec--qr { background: var(--qr-bg); color: var(--qr-ink); display: grid; gap: clamp(32px, 5vw, 80px); align-items: center; }
@media (min-width: 900px) { .sec--qr { grid-template-columns: minmax(0, 1fr) minmax(300px, 420px); } }
.sec--qr .lede { color: var(--qr-sub); margin-top: 20px; }
.sec--qr .h2 { color: var(--qr-ink); }
.sec--qr .btn { margin-top: 28px; }
.qr-art { display: grid; justify-items: center; }
.qr-sheet { background: #FFFFFF; color: #15191D; border-radius: 8px; padding: 24px; width: min(100%, 340px); display: grid; gap: 16px; box-shadow: 0 30px 80px rgba(0,0,0,0.45); transform: rotate(2deg); transition: transform 400ms cubic-bezier(0.16, 1, 0.3, 1); }
.qr-art:hover .qr-sheet { transform: rotate(0deg) scale(1.02); }
.qr-img { width: 100%; height: auto; aspect-ratio: 1; image-rendering: pixelated; border: 6px solid #FFFFFF; }
.qr-cap { color: #4A5259; text-align: center; }

/* --- plan + cta ------------------------------------------------------------------------ */
.sec--plan { padding-block: clamp(56px, 8vw, 120px) 0; }
.plan { padding: clamp(28px, 4vw, 48px); border-radius: 12px; background: var(--white); display: grid; gap: clamp(16px, 3vw, 48px); border: 1px solid var(--paper-3); align-items: start; }
@media (min-width: 900px) { .plan { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); } }
.plan-body { display: grid; gap: 14px; }
.sec--cta { display: grid; gap: 16px; }
.sec--cta .lede { color: var(--ink-2); }
.legal-note { padding: 0 var(--gutter) clamp(40px, 5vw, 64px); font-size: var(--t-meta); color: var(--ink-3); max-width: 76ch; line-height: 1.5; }

/* --- steps page --------------------------------------------------------------------- */
.sec--steps { position: relative; display: grid; grid-template-columns: 1fr; }
.steps { display: grid; gap: clamp(40px, 6vw, 96px); max-width: 760px; }
.step { display: grid; grid-template-columns: 56px 1fr; gap: 20px; align-items: start; transition: opacity 300ms ease-out; }
.step-n { width: 48px; height: 48px; display: grid; place-content: center; border-radius: 50%; background: var(--paper-2); color: var(--ink); font-size: 1.125rem; transition: background-color 300ms ease-out, color 300ms ease-out, transform 300ms ease-out; }
.step.is-on .step-n { background: var(--accent); color: var(--accent-ink); transform: scale(1.1); }
html.motion .step:not(.is-on) { opacity: 0.55; }
.step h2 { font-family: var(--f-display); font-weight: 700; font-size: var(--t-h2); line-height: 1.1; letter-spacing: -0.015em; }
.step p { margin-top: 12px; font-size: var(--t-lede); line-height: 1.5; color: var(--ink-2); max-width: 52ch; }
.rail { position: absolute; left: calc(var(--gutter) + 23px); top: clamp(56px, 8vw, 120px); bottom: clamp(56px, 8vw, 120px); width: 2px; background: var(--paper-3); z-index: -1; }
.rail-fill { position: absolute; left: 0; top: 0; width: 100%; height: 0; background: var(--accent); transition: height 200ms linear; }

.sec--cases { background: var(--paper-2); }
.cases { margin-top: clamp(28px, 4vw, 48px); display: grid; gap: 2px; }
@media (min-width: 760px) { .cases { grid-template-columns: 1fr 1fr; } }
.case { background: var(--white); padding: clamp(22px, 3vw, 36px); display: grid; gap: 10px; transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 200ms ease-out; }
.case:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(21, 25, 29, 0.10); position: relative; z-index: 1; }
.case p { color: var(--ink-2); }
.limits { margin-top: clamp(24px, 3vw, 40px); display: grid; gap: 18px; max-width: 64ch; }
.limits li { position: relative; padding-left: 34px; }
.limits .diamond { top: 6px; }

/* --- contact page ------------------------------------------------------------------------ */
.sec--contact { display: grid; gap: clamp(32px, 5vw, 80px); align-items: start; }
@media (min-width: 900px) { .sec--contact { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.contact-plate { background: var(--accent); color: var(--accent-ink); border-radius: 12px; padding: clamp(28px, 4vw, 48px); display: grid; gap: 12px; }
.contact-k { color: var(--accent-ink); opacity: 0.75; }
.contact-v { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.5rem, 3vw, 2.5rem); letter-spacing: -0.02em; color: var(--accent-ink); text-decoration: none; overflow-wrap: anywhere; }
.contact-v:hover { text-decoration: underline; text-underline-offset: 6px; }
.contact-plate .note { color: var(--accent-ink); opacity: 0.8; }
.contact-aside { display: grid; gap: 20px; }
.fact { color: var(--ink-3); }

/* --- footer ------------------------------------------------------------------------------ */
.foot { padding: clamp(40px, 5vw, 64px) var(--gutter); border-top: 1px solid var(--paper-3); display: grid; gap: 32px; }
.foot-grid { display: grid; gap: 32px; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: minmax(0, 520px) 1fr; } }
.foot-brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 700; font-size: 1.125rem; }
.foot-desc { margin-top: 10px; color: var(--ink-2); max-width: 50ch; }
.foot-nav { display: grid; gap: 10px; justify-items: start; }
@media (min-width: 760px) { .foot-nav { justify-self: end; } }
.foot-nav a { color: var(--ink); text-decoration: none; font-weight: 600; }
.foot-nav a:hover, .foot-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 5px; }
.foot-legal { font-size: var(--t-meta); color: var(--ink-3); }

/* --- entrance grammar (JS-gated, once) ----------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  html.motion .rv { opacity: 0; transform: translateY(14px); transition: opacity 560ms cubic-bezier(0.16, 1, 0.3, 1) var(--d, 0ms), transform 560ms cubic-bezier(0.16, 1, 0.3, 1) var(--d, 0ms); }
  html.motion [data-inview].rv, html.motion [data-inview] > .rv { opacity: 1; transform: none; }
}

/* --- breakpoints ---------------------------------------------------------------------------- */
@media (max-width: 899px) {
  .nav { display: none; }
  .burger { display: flex; }
  .rail { display: none; }
  .step { grid-template-columns: 40px 1fr; gap: 14px; }
  .step-n { width: 36px; height: 36px; font-size: 1rem; }
}
@media (max-width: 560px) {
  .btn { width: 100%; }
  .scan-stage { max-width: 400px; }
  .found { width: 88%; padding: 14px 14px 14px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .chips li, .case, .qr-sheet, .step-n, .nav a::after, .bar-fill { transition: none; }
  .btn:hover, .chips li:hover, .case:hover, .qr-art:hover .qr-sheet { transform: none; }
  .problem:hover .diamond { animation: none; }
}


/* --- theme toggle ----------------------------------------------------------------------- */
.theme-toggle { height: 40px; padding: 0 16px 0 12px; border-radius: 999px; border: 1.5px solid var(--paper-3); background: var(--paper-2); color: var(--ink); display: inline-flex; align-items: center; gap: 8px; font-family: var(--f-body); font-weight: 600; font-size: 0.875rem; white-space: nowrap; cursor: pointer; transition: background-color 160ms ease-out, transform 200ms cubic-bezier(0.16, 1, 0.3, 1); }
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle:hover svg { transform: rotate(20deg); }
.theme-toggle svg { transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1); }
.theme-label--dark { display: none; }
:root[data-theme="light"] .theme-label--light { display: none; }
:root[data-theme="light"] .theme-label--dark { display: inline; }
.theme-toggle .ico-moon { display: none; }
:root[data-theme="light"] .theme-toggle .ico-sun { display: none; }
:root[data-theme="light"] .theme-toggle .ico-moon { display: block; }
.no-js .theme-toggle { display: none; }
@media (max-width: 899px) { .theme-toggle { margin-left: auto; padding: 0 10px; } .theme-toggle .theme-label { display: none !important; } .burger { margin-left: 0; } }
html.theming, html.theming * { transition: background-color 300ms ease-out, color 300ms ease-out, border-color 300ms ease-out !important; }

/* ==== Priimo Appit — demo placeholders ==================================================
   Flow: three questions, one result. Ask: an inline question with a canned answer. Pop: an
   exit-intent card, once per visit. Nothing is sent anywhere, and each says so. */
.sec--flow { padding-bottom: 0; }
.pflow { display: grid; gap: 2px; border-radius: 14px; overflow: hidden; border: 1px solid var(--paper-3); }
@media (min-width: 960px) { .pflow { grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr); } }
.pflow-ask { background: var(--paper-2); padding: clamp(28px, 4vw, 48px); display: grid; gap: 16px; align-content: start; }
.pflow-panel { position: relative; background: var(--white); padding: clamp(28px, 4vw, 48px); display: grid; gap: 20px; align-content: start; }
.pflow-k, .pask-k, .ppop-k { font-family: var(--f-mono); font-weight: 600; font-size: var(--t-meta); letter-spacing: 0.04em; color: var(--ink-3); }
.pflow-steps { display: grid; gap: 22px; margin-top: 8px; }
.pflow-step { display: grid; gap: 10px; opacity: 0.45; transition: opacity 240ms ease-out; }
.pflow-step.is-on, .pflow-step.is-done { opacity: 1; }
.pflow-step:not(.is-on):not(.is-done) .pflow-opts { display: none; }
.pflow-q { display: flex; align-items: center; gap: 12px; font-family: var(--f-display); font-weight: 600; font-size: 1.25rem; }
.pflow-n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-content: center; background: var(--paper-3); color: var(--ink); font-family: var(--f-mono); font-size: var(--t-meta); flex: none; }
.pflow-step.is-done .pflow-n { background: var(--accent); color: var(--accent-ink); }
.pflow-opts { display: flex; flex-wrap: wrap; gap: 8px; padding-left: 42px; }
.pflow-opt { border: 1.5px solid var(--paper-3); background: var(--white); color: var(--ink); border-radius: 999px; padding: 9px 16px; font-family: var(--f-body); font-weight: 600; font-size: 0.9375rem; cursor: pointer; transition: border-color 160ms ease-out, background-color 160ms ease-out, transform 160ms ease-out; }
.pflow-opt:hover { border-color: var(--accent); transform: translateY(-1px); }
.pflow-opt.is-picked { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.pflow-step.is-done .pflow-opt:not(.is-picked) { display: none; }
.pflow-bar { position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--paper-3); margin: 0; }
.pflow-bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 400ms cubic-bezier(0.16, 1, 0.3, 1); }
.pflow-picks { display: flex; flex-wrap: wrap; gap: 8px; min-height: 34px; }
.pflow-picks:empty { display: none; }
.pflow-picks li { padding: 6px 12px; border-radius: 999px; background: var(--paper-2); font-family: var(--f-mono); font-weight: 600; font-size: var(--t-meta); color: var(--ink-2); animation: rise 320ms cubic-bezier(0.16, 1, 0.3, 1); }
.pflow-wait { display: grid; gap: 18px; }
.pflow-wait[hidden] { display: none; }
.pflow-ring { font-family: var(--f-display); font-weight: 800; font-size: clamp(3rem, 5vw, 4.5rem); line-height: 1; letter-spacing: -0.03em; color: var(--accent); display: flex; align-items: baseline; }
.pflow-ring-d { font-size: 0.4em; color: var(--ink-3); margin-left: 4px; }
.pflow-result { display: grid; gap: 12px; }
.pflow-result[hidden] { display: none; }
.pflow-result h3 { font-size: var(--t-h2); }
.no-js .sec--flow { display: none; }

.sec--ask { padding-top: 0; }
.pask { max-width: 820px; display: grid; gap: 14px; }
.pask-form { display: grid; grid-template-columns: 1fr auto; border: 1.5px solid var(--paper-3); border-radius: 999px; overflow: hidden; background: var(--white); }
.pask-form:focus-within { border-color: var(--accent); }
.pask-form input { border: 0; background: none; color: var(--ink); padding: 14px 22px; font-family: var(--f-body); font-size: var(--t-lede); min-width: 0; }
.pask-form input:focus { outline: none; }
.pask-form input::placeholder { color: var(--ink-3); }
.pask-form button { border: 0; background: var(--accent); color: var(--accent-ink); padding: 0 24px; font-family: var(--f-display); font-weight: 600; font-size: 1rem; cursor: pointer; }
.pask-form button:hover { background: var(--ink); color: var(--paper); }
.pask-sugg { display: flex; flex-wrap: wrap; gap: 8px; }
.pask-chip { border: 1px solid var(--paper-3); background: none; color: var(--ink-2); border-radius: 999px; padding: 6px 12px; font-family: var(--f-body); font-size: 0.875rem; cursor: pointer; }
.pask-chip:hover { border-color: var(--accent); color: var(--ink); }
.pask-out { display: grid; gap: 10px; }
.pask-out:empty { display: none; }
.pask-q { font-weight: 600; }
.pask-a { padding: 18px 22px; border-left: 4px solid var(--accent); background: var(--paper-2); border-radius: 0 10px 10px 0; font-size: var(--t-lede); line-height: 1.5; }
.pask-a.is-typing { color: var(--ink-3); }
.pask-demo { font-family: var(--f-mono); font-weight: 600; font-size: var(--t-meta); color: var(--ink-3); }
.no-js .sec--ask { display: none; }

.ppop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(4px); }
.ppop[hidden] { display: none; }
.ppop-card { width: min(100%, 520px); background: var(--paper); color: var(--ink); border: 1px solid var(--paper-3); border-radius: 14px; padding: clamp(24px, 4vw, 40px); display: grid; gap: 12px; box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5); animation: pop-in 320ms cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes pop-in { from { opacity: 0; transform: translateY(16px) scale(0.98); } }
.ppop-h { font-family: var(--f-display); font-weight: 700; font-size: var(--t-h2); line-height: 1.08; letter-spacing: -0.015em; }
.ppop-t { color: var(--ink-2); font-size: var(--t-lede); line-height: 1.5; }
.ppop-close { border: 0; background: none; cursor: pointer; font-family: var(--f-body); font-size: var(--t-body); }
@media (prefers-reduced-motion: reduce) { .ppop-card { animation: none; } .theme-toggle, .pflow-opt, .pflow-bar span, .pflow-step { transition: none; } .theme-toggle:hover, .pflow-opt:hover { transform: none; } }

/* an element with display:grid ignores the hidden attribute unless told otherwise */
.pask-out[hidden] { display: none; }
button.link { background: none; border: 0; cursor: pointer; font-family: var(--f-body); font-size: var(--t-body); }

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