/* Tvarkom — landing page styles. Mobile-first: base rules target phones,
   min-width media queries layer on tablet (≥720px) and desktop (≥1100px). */

/* Fonts: Geist and Geist Mono (SIL Open Font License, assets/fonts/OFL.txt), served from
   this site so no visitor data goes to a font CDN. One variable file per family. */
@font-face { font-family: 'Geist'; src: url('fonts/Geist-Variable.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('fonts/GeistMono-Variable.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --ink: #1C1D1B;
  --paper: #F8F8F4;
  --panel: #EFEFE9;
  --surface: #FFFFFF;
  --line: #E0E0D8;
  --line-strong: #D0D0C7;
  --muted: #585A55;
  --subtle: #6B6D67;
  --green: #00FF41;
  --green-dark: #00992E;
  --night: #0F110F;
  --night-2: #121412;
  --night-line: #232723;
  --night-text: #D9DDD5;
  --night-muted: #7E857C;
  --sans: 'Geist', system-ui, -apple-system, sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;
  --gutter: 20px;
  --max: 1200px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 16px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 16px; line-height: 1.6; background: var(--paper); color: var(--ink); overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--green-dark); outline-offset: 3px; }

.container { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 56px 0; }
.section--line { border-top: 1px solid var(--line); }
.section--panel { background: var(--panel); }
.section__head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; max-width: 760px; }
.section__title { font-size: 34px; line-height: 1.1; font-weight: 600; letter-spacing: -0.03em; }
.section__lead { font-size: 17px; color: var(--muted); }

.eyebrow { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.eyebrow::before { content: ""; width: 8px; height: 8px; background: var(--green); flex-shrink: 0; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 22px; border-radius: 6px; border: 1px solid transparent; font: 600 16px/1.2 var(--sans); text-decoration: none; cursor: pointer; text-align: center; }
.btn svg { flex-shrink: 0; }
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { background: #000; }
.btn--secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--secondary:hover { border-color: var(--ink); }
.btn--small { min-height: 40px; padding: 0 16px; font-size: 14px; font-weight: 500; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header__inner { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.site-header__logo img { height: 34px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 32px; font-family: var(--mono); font-size: 14px; }
.site-nav__link { display: none; color: #4A4C47; text-decoration: none; }
.site-nav__link:hover { color: var(--ink); }

/* Hero */
.hero { padding: 28px 0 56px; }
.hero__inner { display: grid; gap: 40px; align-items: center; }
.hero__copy { display: flex; flex-direction: column; gap: 18px; }
.hero__title { font-size: 34px; line-height: 1.06; font-weight: 600; letter-spacing: -0.035em; }
.hero__title > span { display: block; }
.nowrap { white-space: nowrap; }
.hero__sub { font-size: 17px; color: var(--muted); max-width: 620px; }
.hero__ctas { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.hero__note { font-family: var(--mono); font-size: 13px; color: var(--subtle); }

/* Pipeline visual */
.pipeline { background: var(--night-2); border: 1px solid var(--night-line); border-radius: 20px; overflow: hidden; color: var(--night-text); font-family: var(--mono); font-size: 13px; line-height: 1.7; box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 40px 80px -40px rgba(15,17,15,0.55); }
.pipeline__bar { height: 42px; display: flex; align-items: center; gap: 7px; padding: 0 16px; border-bottom: 1px solid var(--night-line); color: var(--night-muted); font-size: 12px; }
.pipeline__dot { width: 9px; height: 9px; border-radius: 999px; background: #2A2F2A; }
.pipeline__title { margin-left: 8px; }
.pipeline__preview { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; padding: 2px 10px; border: 1px solid #2E4A2E; border-radius: 999px; background: #152015; color: var(--green); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.pipeline__preview::before { content: ""; width: 7px; height: 7px; border-radius: 999px; background: var(--green); box-shadow: 0 0 10px var(--green); animation: pulse 4.5s ease-in-out infinite; }
.pipeline__body { padding: 18px; }
.pipeline__cmd { color: var(--night-text); }
.pipeline__cmd::after { content: ""; display: inline-block; width: 8px; height: 14px; margin-left: 6px; vertical-align: -2px; background: var(--green); opacity: 0.85; animation: blink 1.6s steps(1) infinite; }
.pipeline__list { list-style: none; margin: 14px 0 0; padding: 0; }
.pipeline__row { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid #1E221E; opacity: 0; animation: rowIn 0.5s ease-out forwards; }
.pipeline__row:nth-child(2) { animation-delay: 0.4s; }
.pipeline__row:nth-child(3) { animation-delay: 0.8s; }
.pipeline__row:nth-child(4) { animation-delay: 1.2s; }
.pipeline__check { color: var(--green); }
/* Status flip: "awaiting label" -> "label ready", timed per row by --flip. */
.swap { display: grid; }
.swap > * { grid-area: 1 / 1; }
.swap__from { color: var(--night-muted); animation: swapOut 0.35s ease-out forwards; animation-delay: var(--flip, 2s); }
.swap__to { opacity: 0; animation: swapIn 0.35s ease-out forwards; animation-delay: var(--flip, 2s); }
.pipeline__done { margin-top: 14px; padding: 10px 12px; border: 1px solid #243024; border-radius: 10px; background: #151A15; display: flex; gap: 10px; align-items: center; color: #E8EAE4; opacity: 0; animation: rowIn 0.5s ease-out forwards; animation-delay: 4.4s; }
.pipeline__muted { margin-left: auto; color: var(--night-muted); }
.pipeline__flow { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pipeline__flow b { font-weight: 400; color: var(--night-muted); }
.pipeline__state { color: var(--green); font-size: 12px; text-align: right; white-space: nowrap; }
.pipeline__foot { border-top: 1px solid var(--night-line); background: #0E100E; padding: 12px 18px; display: flex; flex-wrap: wrap; gap: 6px; color: var(--night-muted); font-size: 11px; }
.pipeline__tag { padding: 3px 8px; border: 1px solid #2A2F2A; border-radius: 6px; white-space: nowrap; }

/* How it works */
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.card__num { align-self: flex-start; font-family: var(--mono); font-size: 13px; font-weight: 600; padding: 5px 10px; border-radius: 7px; border: 1px solid var(--green-dark); }
.card__title { font-size: 21px; line-height: 1.25; font-weight: 600; letter-spacing: -0.015em; }
.card__text { font-size: 16px; color: var(--muted); }

/* Pricing: 3-step offer ladder */
.ladder { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.offer { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.offer--featured { border-color: var(--ink); }
.offer__step { display: flex; }
.offer__title { font-size: 21px; line-height: 1.25; font-weight: 600; letter-spacing: -0.015em; }
.offer__price { font-size: 44px; line-height: 1; font-weight: 600; letter-spacing: -0.035em; }
.offer__note { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.offer__text { font-size: 16px; color: var(--muted); }
.offer__list { margin: 0; padding-left: 18px; font-size: 15px; line-height: 1.6; }
.offer__list li + li { margin-top: 4px; }
.offer__badge { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--green-dark); border-radius: 10px; font-family: var(--mono); font-size: 13px; line-height: 1.5; }
.offer__badge::before { content: ""; width: 8px; height: 8px; margin-top: 6px; background: var(--green); flex-shrink: 0; }
.offer__cta { margin-top: auto; align-self: stretch; }

/* Who it's for */
.who__inner { display: grid; gap: 8px; }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { position: relative; padding: 16px 0 16px 38px; border-bottom: 1px solid var(--line); font-size: 16px; line-height: 1.55; }
.checklist li:last-child { border-bottom: 0; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 18px; width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--line-strong); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2300992E' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat; }
.boundary { margin-top: 12px; padding: 16px 18px; border: 1px solid var(--line-strong); border-left: 4px solid var(--ink); border-radius: 12px; background: var(--surface); font-size: 15px; line-height: 1.6; }
.boundary strong { font-weight: 600; }

/* Daily routine (before / after) */
.section--night { background: var(--night); color: #E8EAE4; }
.section--night .section__title { color: var(--paper); }
.eyebrow--night { color: var(--green); }
.eyebrow--night::before { display: none; }
.compare { display: grid; gap: 12px; }
.compare__card { background: #171A17; border: 1px solid #262A26; border-radius: 18px; padding: 22px; }
.compare__card--after { border-color: #2E4A2E; }
.compare__label { font-family: var(--mono); font-size: 12px; color: #9AA197; margin-bottom: 10px; }
.compare__card--after .compare__label { color: var(--green); }
.flow { list-style: none; margin: 0; padding: 0; counter-reset: flow; font-family: var(--mono); font-size: 14px; color: #C9CEC5; }
.flow li { counter-increment: flow; display: flex; gap: 12px; padding: 8px 0; border-top: 1px solid #262A26; }
.flow li::before { content: counter(flow, decimal-leading-zero); width: 26px; flex-shrink: 0; color: #9AA197; }
.compare__card--after .flow li::before { color: var(--green); }

/* Why */
.why__inner { display: grid; gap: 28px; align-items: center; }
.definition { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.definition__word { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.definition__word strong { font-size: 32px; font-weight: 700; letter-spacing: -0.03em; }
.definition__word span { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.definition__rule { height: 3px; width: 48px; background: var(--green); }
.definition__list { margin: 0; padding: 0; list-style: none; font-size: 18px; line-height: 1.55; counter-reset: def; }
.definition__list li { counter-increment: def; }
.definition__list li::before { content: counter(def) "."; font-family: var(--mono); color: var(--muted); margin-right: 8px; }
.why__copy { display: flex; flex-direction: column; gap: 16px; }
.why__copy p { font-size: 17px; line-height: 1.65; color: var(--muted); }
.why__copy p.why__strong { color: var(--ink); font-weight: 500; }

/* Forms */
.intake { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px; display: flex; flex-direction: column; gap: 18px; }
.intake__grid { display: grid; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field label, .field legend { font-size: 15px; font-weight: 500; padding: 0; }
.field__hint { color: var(--subtle); font-weight: 400; }
.field input[type="text"], .field input[type="email"], .field input[type="url"], .field textarea, .field select {
  width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: #FCFCFA; font: 16px/1.4 var(--sans); color: var(--ink);
}
.field textarea { min-height: 120px; resize: vertical; }
.field select { -webkit-appearance: none; appearance: none; cursor: pointer; padding-right: 44px; background: #FCFCFA url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231C1D1B' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 16px center / 16px no-repeat; }
.field select:invalid { color: var(--subtle); }
.field select option { color: var(--ink); }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px rgba(0,153,46,0.18); }
.intake__submit { width: 100%; min-height: 56px; font-size: 17px; }
.intake__fine { font-family: var(--mono); font-size: 12px; line-height: 1.6; color: var(--muted); text-align: center; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.notice { border-radius: 12px; padding: 20px 22px; line-height: 1.6; }
.notice--ok { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--green-dark); }
.notice--ok p { margin-top: 6px; color: var(--muted); }
.notice--error { background: #FFF1EE; border: 1px solid #E8B9A3; }

/* Hero scanner form (assets/scanner-form.js) */
.scan { margin-top: 6px; }
.field input[aria-invalid="true"] { border-color: #E8B9A3; background: #FFF1EE; }
.field__error { font-size: 14px; line-height: 1.4; color: var(--ink); }
.scan__submit:disabled { cursor: progress; opacity: 0.8; }
.scan__check { color: var(--green-dark); }
.scan__done strong { overflow-wrap: anywhere; }
.scan__done p { overflow-wrap: anywhere; }

/* Footer */
.site-footer { background: var(--night); color: #A3A89F; font-family: var(--mono); font-size: 13px; line-height: 1.7; }
.site-footer__inner { padding-top: 32px; padding-bottom: 36px; display: flex; flex-direction: column; gap: 16px; }
.site-footer__logo { height: 24px; width: auto; align-self: flex-start; }
.site-footer__text { display: flex; flex-direction: column; gap: 6px; }
.site-footer__meta { display: flex; flex-direction: column; }
.site-footer a { color: #E8EAE4; }
.site-footer a.site-footer__muted { color: #A3A89F; }

/* Cookie consent banner (added by assets/analytics.js) */
.consent { position: fixed; left: 50%; bottom: 16px; z-index: 50; transform: translateX(-50%); width: min(640px, calc(100% - 32px)); background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; align-items: stretch; gap: 14px; box-shadow: 0 24px 60px -24px rgba(15,17,15,0.45); }
.consent__text { font-size: 14px; line-height: 1.5; color: var(--muted); }
.consent__actions { display: flex; gap: 10px; }
.consent__btn { flex: 1; height: 40px; padding: 0 18px; border-radius: 6px; font: 500 14px var(--sans); cursor: pointer; }
.consent__btn--dark { border: 0; background: var(--ink); color: var(--paper); }
.consent__btn--light { border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); }

@keyframes blink { 50% { opacity: 0; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
@keyframes rowIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes swapOut { to { opacity: 0; } }
@keyframes swapIn { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pipeline__row, .pipeline__done { animation: none; opacity: 1; }
  .swap__from { animation: none; opacity: 0; }
  .swap__to { animation: none; opacity: 1; }
  .pipeline__cmd::after, .pipeline__preview::before { animation: none; }
}

/* ≥720px: tablet */
@media (min-width: 720px) {
  :root { --gutter: 40px; }
  .section { padding: 80px 0; }
  .section__title { font-size: 44px; }
  .section__lead { font-size: 19px; }
  .eyebrow { font-size: 14px; }
  .eyebrow::before { width: 10px; height: 10px; }
  .hero { padding: 64px 0 80px; }
  .hero__title { font-size: 56px; }
  .hero__sub { font-size: 20px; }
  .hero__ctas { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .btn { min-height: 56px; padding: 0 26px; font-size: 17px; }
  .btn--small { min-height: 44px; padding: 0 20px; font-size: 15px; }
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .card { padding: 28px; }
  .ladder { gap: 20px; }
  .offer { padding: 32px; }
  .offer__price { font-size: 52px; }
  .offer__cta { align-self: flex-start; }
  .intake { padding: 32px; }
  .intake__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compare { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .compare__card { padding: 32px; border-radius: 20px; }
  .compare__label { font-size: 13px; }
  .flow { font-size: 16px; }
  .flow li { padding: 10px 0; }
  .checklist li { padding: 22px 0 22px 46px; font-size: 19px; }
  .checklist li::before { top: 24px; width: 26px; height: 26px; border-radius: 7px; background-size: 16px; }
  .boundary { margin-top: 16px; padding: 20px 24px; font-size: 17px; }
  .site-header__inner { height: 88px; }
  .site-header__logo img { height: 44px; }
  .site-footer__inner { flex-direction: row; align-items: center; justify-content: space-between; min-height: 100px; padding-top: 0; padding-bottom: 0; }
  .site-footer__text { align-items: flex-end; text-align: right; }
  .site-footer__meta { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; gap: 0 10px; }
  .site-footer__logo { align-self: center; }
  .site-footer__meta > * + *::before { content: "·"; display: inline-block; margin-right: 10px; text-decoration: none; }
  .consent { flex-direction: row; align-items: center; gap: 20px; padding: 20px 24px; bottom: 24px; }
  .consent__btn { flex: none; }
}

/* ≥1100px: desktop */
@media (min-width: 1100px) {
  .site-nav__link { display: inline; }
  .hero__inner { grid-template-columns: minmax(0, 1fr) 460px; gap: 72px; }
  .hero__title { font-size: 60px; }
  .pipeline { font-size: 14px; border-radius: 24px; }
  .pipeline__body { padding: 24px 26px; }
  .pipeline__done { padding: 12px 14px; }
  .who__inner { grid-template-columns: 440px minmax(0, 1fr); gap: 72px; align-items: start; }
  .ladder { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .offer { padding: 28px; }
  .offer__cta { align-self: stretch; }
  .why__inner { grid-template-columns: 460px minmax(0, 1fr); gap: 72px; }
  .definition { padding: 40px; }
  .definition__word strong { font-size: 44px; }
  .definition__list { font-size: 22px; }
  .section__title { font-size: 52px; }
}

/* ---- Wide section heads (title on one line on desktop) ---- */
.section__head--wide { max-width: none; }

/* ---- Careers page ---- */
.site-nav__link[aria-current="page"] { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; }
.roles { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.role { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.role__meta { display: flex; flex-wrap: wrap; gap: 6px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.role__meta span { border: 1px solid var(--line-strong); border-radius: 6px; padding: 3px 8px; }
.role__title { font-size: 22px; line-height: 1.25; font-weight: 600; letter-spacing: -0.015em; }
.role__text { font-size: 16px; color: var(--muted); }
.role__list { margin: 0; padding-left: 18px; font-size: 15px; line-height: 1.6; color: var(--ink); }
.role__list li + li { margin-top: 4px; }
.role__apply { margin-top: auto; align-self: flex-start; }
@media (min-width: 720px) {
  .roles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .role { padding: 32px; }
}

/* ---- Privacy page ---- */
.legal__updated { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.legal { max-width: 760px; }
.legal h2 { font-size: 22px; line-height: 1.25; font-weight: 600; letter-spacing: -0.015em; margin: 40px 0 12px; }
.legal h2:first-child { margin-top: 0; }
.legal p, .legal ul { font-size: 16px; line-height: 1.65; color: var(--ink); }
.legal p + p, .legal ul + p, .legal p + ul { margin-top: 12px; }
.legal ul { margin: 12px 0 0; padding-left: 20px; }
.legal li + li { margin-top: 6px; }
.legal a { text-underline-offset: 3px; }
