/* ==========================================================================
   lensmith.app — one stylesheet for every page.

   It used to be three inline <style> blocks with 47 selectors in common, and
   they had already drifted: index knew a token install did not, and the same
   class carried different values on different pages. One file removes the
   drift by construction.

   The organising idea is `.band-ink`. The identity has two grounds — Paper and
   Ink — and almost every "this page's button is dark, that page's is light"
   difference was really "this control sits on the other ground". So a control
   is written once for Paper, and `.band-ink` states the Ink variant. Nothing
   below needs to know which page it is on.
   ========================================================================== */

/* Archivo, self-hosted: no third-party font request, so the site sets no
   external connections at all. Two static cuts (400 · 600) rather than a
   variable font — those are the only two weights the identity uses, and a
   synthesized weight is what a wordmark cannot afford. The mono labels ride
   the system's own mono (SF Mono on the Macs this app runs on), with
   JetBrains Mono — the identity's data face — used when the visitor has it. */
@font-face {
  font-family: 'Archivo';
  src: url('Archivo-Regular.ttf') format('truetype');
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('Archivo-SemiBold.ttf') format('truetype');
  font-weight: 600; font-display: swap;
}

:root {
  /* Lensmith brand identity v1.0 — paper and ink, three channels, one
     copper. The channel inks ARE the marque's own three bars, taken from
     the artwork (oklch L .63) and lifted to L .70 where they sit on ink. */
  --paper:      #E9E9E6;   /* the ground */
  --paper-2:    #F4F3F1;   /* raised card on paper */
  --paper-3:    #DDD9D2;   /* inset fill */
  --ink:        #121212;   /* the other ground, and every word on paper */
  --ink-2:      #1B1B1A;   /* raised surface on ink */
  --line:       #CFCCC6;   /* rule on paper */
  --line-soft:  #DDD9D2;
  --line-dark:  #2E2D2A;   /* rule on ink */
  --line-dark-2:#3A3833;
  --on-paper-2: #5C5952;   /* body on paper */
  --on-paper-3: #6E6B66;   /* captions on paper */
  --on-ink:     #E9E9E6;
  --on-ink-2:   #A9A29A;   /* body on ink */
  --on-ink-3:   #7E7A73;   /* captions on ink */
  --on-ink-4:   #6E6B66;
  --copper:     #B4501F;   /* the one digital-only accent: links, live state */
  --copper-lit: #D9702E;   /* the same copper, legible on ink */
  --ch-r:       #DA5D25;
  --ch-g:       #00A874;
  --ch-b:       #8D71E6;
  --ch-r-lit:   #F3743F;
  --ch-g-lit:   #00BE8A;
  --ch-b-lit:   #A287FE;
  --sans: 'Archivo', system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "JetBrains Mono", SFMono-Regular, Menlo, monospace;
}

/* ── Base ─────────────────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex; flex-direction: column;
  overflow-x: hidden;
}
main { flex: 1; }

/* Radius 0 is the identity, not an oversight: nothing on this site is
   rounded except drawings of round things (the marque's ring, a window's
   traffic lights). */
a { color: var(--copper); text-decoration: none; }
a:hover { color: #8A3C14; }
em { font-style: normal; color: var(--ch-r-lit); }
::selection { background: rgba(180,80,31,.28); }
:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .hero * { animation: none !important; opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
}

.wrap { width: 100%; max-width: 1260px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 64px); }

/* Full-bleed bands: the identity alternates ink and paper edge to edge,
   so each band owns its ground and the measure lives inside it. */
.band-ink { background: var(--ink); color: var(--on-ink); }
.band-ink a:not(.btn):not(.brand) { color: #B6B1A9; }
.band-ink a:not(.btn):not(.brand):hover { color: var(--copper-lit); }

/* ── Marque ──────────────────────────────────────────────── */
/* Ring plus three channels, drawn at the artwork's own proportions
   (ring ⌀26 wall 3, bars 30/33/30 at y 9/14/19 in a 44×29 box). The ring
   takes currentColor so one drawing serves ink and paper alike. */
.brand { display: flex; align-items: center; gap: 12px; color: inherit; }
.marque { width: 44px; height: 29px; flex: none; display: block; }
.wm { font-size: 19px; font-weight: 400; letter-spacing: -.02em; color: inherit; }
.wm b { font-weight: 600; }

/* The mark is always a link, and hovering it goes MONOCHROME rather than
   copper: the one-ink lockup is one of the three official versions in the
   brand kit, where a copper mark is explicitly not — copper says "live
   state", which is not something a logo can be. */
a.brand, a.brand:hover { color: var(--on-ink); }
a.brand .marque .ch { transition: fill .15s ease; }
a.brand:hover .marque .ch { fill: currentColor; }

/* ── Top bar ─────────────────────────────────────────────── */
.topbar { position: sticky; top: 0; z-index: 20; }
.topbar .wrap { display: flex; align-items: center; gap: 20px; height: 72px; }
.chip {
  font: 500 10px/1 var(--mono);
  letter-spacing: .16em; color: var(--ch-g-lit);
  border: 1px solid var(--line-dark-2);
  padding: 6px 8px; white-space: nowrap;
}
.topbar nav { margin-left: auto; display: flex; gap: 28px; font-size: 14px; }
.topbar nav a { color: #B6B1A9; }
.topbar nav a:hover { color: var(--on-ink); }
/* The page you are on is named, not linked away from: same row, full ink. */
.topbar nav a[aria-current="page"] { color: var(--on-ink); }

/* ── Buttons ─────────────────────────────────────────────── */
/* Written once for Paper; `.band-ink` states the Ink variant. */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 15px/1 var(--sans);
  color: var(--paper); background: var(--ink);
  padding: 16px 26px;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover { background: #000; color: var(--paper); }
.btn svg { width: 17px; height: 17px; fill: currentColor; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); font-weight: 400; }
.btn.ghost:hover { background: var(--paper-2); color: var(--ink); }

.band-ink .btn { color: var(--ink); background: var(--paper); }
.band-ink .btn:hover { background: #FFFFFF; color: var(--ink); }
.band-ink .btn.ghost { background: transparent; color: #B6B1A9; border-color: var(--line-dark-2); }
.band-ink .btn.ghost:hover { border-color: var(--on-ink-2); color: var(--on-ink); background: transparent; }

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

/* ── Shared type ─────────────────────────────────────────── */
.kicker { display: block; font: 500 11px/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--copper); }
h1 { font-size: clamp(34px, 5vw, 58px); line-height: 1.0; letter-spacing: -.035em; font-weight: 600; }
h2 { font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.lede { font-size: 17px; line-height: 1.6; color: var(--on-paper-2); text-wrap: pretty; }
.meta { margin-top: 18px; font: 400 11px/1.7 var(--mono); letter-spacing: .04em; color: var(--on-paper-3); }
.meta a { color: var(--on-paper-2); }
.meta a:hover { color: var(--copper); }
.band-ink .meta { color: var(--on-ink-4); }
.band-ink .meta a { color: var(--on-ink-3); }
.band-ink .meta a:hover { color: var(--copper-lit); }

code {
  font: 400 13px/1 var(--mono); color: var(--ink);
  background: var(--paper-2); border: 1px solid var(--line); padding: 3px 6px;
}

/* A prose page: same gutter as the bands above and below, so the site has one
   left edge; the measure is capped on the children rather than by centring
   the column. Index does not use it — its <main> holds full-bleed bands. */
main.page { width: 100%; max-width: 1260px; margin: 0 auto; padding: clamp(48px, 7vw, 88px) clamp(20px, 4vw, 64px) 8px; }
main.page > * { max-width: 820px; }

/* ── Footer ──────────────────────────────────────────────── */
footer { padding: 48px 0 40px; margin-top: 72px; }
footer .wrap { display: flex; align-items: flex-end; gap: 40px; flex-wrap: wrap; }
footer .who { flex: 1; display: flex; flex-direction: column; gap: 14px; min-width: 240px; }
footer .line { font: 400 13px/1.7 var(--sans); color: var(--on-ink-4); }
footer nav { display: flex; gap: 30px; font-size: 14px; flex-wrap: wrap; }
footer nav a, footer nav .link-btn { color: #B6B1A9; }
/* An icon in a row of words has to sit ON the baseline of the word beside
   it, not float in its own box. */
footer nav a { display: inline-flex; align-items: center; gap: 7px; }
footer nav .ico { width: 15px; height: 15px; flex: none; }
footer nav a:hover, footer nav .link-btn:hover { color: var(--copper-lit); }
/* "Cookie preferences" is a button because it opens something rather than
   going somewhere — screen readers should hear a button. It has to read as
   the links beside it. */
.link-btn { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

/* ==========================================================================
   Home
   ========================================================================== */
.hero { padding: clamp(56px, 8vw, 96px) 0 0; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: end; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; align-items: start; } }
.eyebrow {
  display: block;
  font: 500 11px/1 var(--mono); letter-spacing: .2em; text-transform: uppercase;
  color: var(--ch-g-lit); animation: rise .6s ease both;
}
.hero h1 {
  margin: 26px 0 0;
  font-size: clamp(38px, 5.2vw, 70px);
  line-height: .98; letter-spacing: -.04em;
  text-wrap: pretty;
  animation: rise .7s ease both;
}
.hero p.lede {
  font-size: clamp(16px, 1.4vw, 18px);
  color: var(--on-ink-2); max-width: 46ch;
  animation: rise .8s ease both;
}
.hero .cta-row { margin-top: 30px; animation: rise .9s ease both; }
.hero .meta { animation: rise 1s ease both; }

/* ---- Screenshots ----
   Real captures of the app rather than a drawing of it, so the window's own
   chrome is already in the picture: the page adds a hairline and stays out of
   the way. Width and height are on the <img> so nothing reflows as they load. */
.stage { padding: clamp(48px, 6vw, 80px) 0 clamp(56px, 7vw, 88px); }
.shot { margin: 0; }
/* The one rounded thing on the page, and for the footer's Instagram reason: a
   macOS window IS round-cornered, so a square crop of one prints a black notch
   at each corner. The radius is the window's own ~19pt over the capture's 1512×869
   points, as a percentage of each axis, so it stays right at every display size. */
.shot img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--line-dark); border-radius: 1.25% / 2.2%;
}
.shot figcaption {
  margin-top: 12px; font: 400 11px/1.6 var(--mono); letter-spacing: .04em; color: var(--on-ink-4);
}
.screens .shot img { border-color: var(--line); }
.screens .shot figcaption { color: var(--on-paper-3); }
.screens h2 { margin: 18px 0 0; font-size: clamp(26px, 3.2vw, 40px); line-height: 1.05; letter-spacing: -.03em; }
.screens .lede { margin: 16px 0 0; }   /* full width: it runs with the grid under it, not as a column */
.shot-grid { margin-top: 44px; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 40px); }

/* ---- Closing band ---- */
section.band { padding: clamp(64px, 8vw, 104px) 0; }
.closing { text-align: center; display: flex; flex-direction: column; align-items: center; }
.closing .wrap { display: flex; flex-direction: column; align-items: center; }
.closing h2 { margin: 20px 0 0; font-size: clamp(30px, 3.6vw, 46px); line-height: 1.05; letter-spacing: -.03em; max-width: 20ch; }
.closing .sub { margin: 18px 0 0; font-size: 17px; line-height: 1.6; color: var(--on-paper-2); max-width: 58ch; text-wrap: pretty; }
.closing .cta-row { margin-top: 30px; }

/* ==========================================================================
   Install guide
   ========================================================================== */
main.page h1 { margin: 22px 0 0; }
main.page .lede { margin: 20px 0 0; max-width: 56ch; }

/* A step is a card on paper: raised sheet, hairline, square corners, and a
   numeral set as an ink plate — the identity's "chosen" block inverted. */
.steps { list-style: none; margin-top: 48px; display: flex; flex-direction: column; gap: 20px; }
.step {
  position: relative; border: 1px solid var(--line); background: var(--paper-2);
  padding: 30px 32px 30px 76px;
}
.step .num {
  position: absolute; left: 32px; top: 30px;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  font: 500 12px/1 var(--mono); color: var(--paper); background: var(--ink);
}
.step h2 { font-size: 19px; letter-spacing: -.015em; }
.step p { margin-top: 12px; font-size: 15px; line-height: 1.65; color: var(--on-paper-2); text-wrap: pretty; }
.step strong { color: var(--ink); font-weight: 600; }

.os { margin-top: 18px; border-left: 2px solid var(--copper); padding-left: 16px; }
.os + .os { margin-top: 16px; }
.os .label { font: 500 10px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--copper); }
.os p { margin-top: 8px; font-size: 14.5px; }

kbd {
  font: 400 12.5px/1 var(--mono);
  padding: 4px 7px;
  border: 1px solid var(--line); background: var(--paper);
  color: var(--ink); white-space: nowrap;
}
.codeblock {
  display: block; margin-top: 14px; padding: 14px 16px;
  background: var(--ink); border: 1px solid var(--ink);
  color: var(--on-ink); font: 400 13px/1.5 var(--mono);
  overflow-x: auto; white-space: pre;
}
.tip { margin-top: 16px; font-size: 14px; color: var(--on-paper-3); line-height: 1.6; }
main.page .cta-row { margin: 48px 0 8px; }

/* ==========================================================================
   Privacy & cookies
   ========================================================================== */
.updated { margin-top: 18px; font: 400 11px/1.7 var(--mono); letter-spacing: .04em; color: var(--on-paper-3); }

/* The summary is the page. Everything under it is the same four facts said
   at greater length, for the reader who needs them said at greater length. */
.summary { margin-top: 44px; border: 1px solid var(--line); background: var(--paper-2); padding: 30px 32px; }
.summary h2 { font-size: 19px; letter-spacing: -.015em; }
.summary ul { margin: 16px 0 0; padding: 0; list-style: none; }
.summary li {
  display: flex; gap: 14px; padding: 11px 0; font-size: 15px; line-height: 1.6;
  color: var(--on-paper-2); border-top: 1px solid var(--line);
}
.summary li:first-child { border-top: 0; padding-top: 0; }
.summary li span { min-width: 0; }
.summary li b { color: var(--ink); font-weight: 600; }
.summary li::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 8px; background: var(--copper); }

section.doc { margin-top: 52px; }
section.doc h2 { margin-bottom: 6px; }
section.doc p { margin-top: 14px; font-size: 15.5px; line-height: 1.7; color: var(--on-paper-2); text-wrap: pretty; }
section.doc p strong { color: var(--ink); font-weight: 600; }
section.doc ul { margin: 14px 0 0 0; padding-left: 20px; }
section.doc li { margin-top: 8px; font-size: 15.5px; line-height: 1.7; color: var(--on-paper-2); }
section.doc li strong { color: var(--ink); font-weight: 600; }
section.doc .btn { margin-top: 26px; }

.kv { margin-top: 18px; border: 1px solid var(--line); }
.kv div { display: flex; gap: 16px; padding: 13px 16px; border-top: 1px solid var(--line); font-size: 14.5px; }
.kv div:first-child { border-top: 0; }
.kv dt {
  flex: none; width: 132px; font: 500 10px/1.6 var(--mono);
  letter-spacing: .14em; text-transform: uppercase; color: var(--on-paper-3);
}
.kv dd { margin: 0; color: var(--on-paper-2); }
.kv dd strong { color: var(--ink); font-weight: 600; }

/* ==========================================================================
   Beta request form

   Fields are the identity's inset fill on the raised sheet: square, hairline,
   copper only when live (a focused field), which is the same rule the app's
   own palette follows — "chosen" is a block of ink, "live" is copper.
   ========================================================================== */
.steps.compact { margin-top: 36px; gap: 12px; }
.steps.compact .step { padding: 20px 24px 20px 66px; }
.steps.compact .step .num { top: 20px; left: 24px; }
.steps.compact .step h2 { font-size: 16px; }
.steps.compact .step p { margin-top: 6px; font-size: 14.5px; }

.form { margin-top: 40px; }
.field { display: block; margin-top: 22px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field label,
.check > span { font-size: 14.5px; line-height: 1.6; }
.field label {
  display: flex; align-items: baseline; gap: 10px;
  font-weight: 600; color: var(--ink);
}
.req {
  font: 400 9.5px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase;
  color: var(--copper);
}
.field input, .field textarea {
  display: block; width: 100%; margin-top: 8px;
  font: 400 15px/1.5 var(--sans); color: var(--ink);
  background: var(--paper-2); border: 1px solid var(--line);
  padding: 12px 14px; border-radius: 0;
  -webkit-appearance: none; appearance: none;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input::placeholder, .field textarea::placeholder { color: #9C9891; }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--copper); background: #FFFFFF;
}
.help { display: block; margin-top: 8px; font-size: 13.5px; line-height: 1.6; color: var(--on-paper-3); }
.field-row + .help { margin-top: 10px; }

/* The checkbox is a real one: a hand-drawn div would lose the keyboard, the
   form validation and every assistive technology in one go. */
.check {
  display: flex; gap: 12px; align-items: flex-start;
  margin-top: 28px; padding: 18px 20px;
  border: 1px solid var(--line); background: var(--paper-2);
}
.check input { flex: none; width: 17px; height: 17px; margin-top: 2px; accent-color: var(--copper); }
.check > span { color: var(--on-paper-2); }

.form-note {
  margin-top: 16px; border-left: 2px solid var(--copper); padding: 2px 0 2px 16px;
}
.form-note p { font-size: 13.5px; line-height: 1.65; color: var(--on-paper-3); }
.form-note b { color: var(--on-paper-2); font-weight: 600; }

.captcha { margin-top: 24px; min-height: 65px; }

.form-actions { margin-top: 22px; }
.form-actions .help { margin-top: 14px; max-width: 56ch; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* The status line is the only place a submission can report anything, so it is
   never allowed to be silent: empty means nothing has happened yet. */
.form-status:empty { display: none; }
.form-status {
  margin-top: 18px; padding: 12px 16px;
  font-size: 14.5px; line-height: 1.6;
  border: 1px solid var(--line); background: var(--paper-2); color: var(--on-paper-2);
}
.form-status.error { border-color: var(--copper); color: var(--ink); }

@media (max-width: 620px) {
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .check { padding: 16px; }
  /* Il numero passa sopra al titolo (regola di .step qui sotto): la rientranza
     che gli faceva posto non serve più. */
  .steps.compact .step { padding: 18px 20px; }
}

/* ==========================================================================
   Narrow
   ========================================================================== */
@media (max-width: 900px) {
  .shot-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .topbar nav { display: none; }
  .step { padding: 24px 20px; }
  .step .num { position: static; margin-bottom: 14px; }
  .summary { padding: 24px 20px; }
  .kv div { flex-direction: column; gap: 4px; }
  .kv dt { width: auto; }
}
