/* Carnet landing: the Lettera look (app/lib/theme/lettera.dart) as plain CSS. Putty page, paper plates, ivory keys
   with travel, graphite ink, one signal red. The drafting rule is the only decoration. */

@font-face {
  font-family: "Archivo";
  src: url("archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --chassis: #D8D5CC;
  --chassis-deep: #CAC6BB;
  --paper: #ECE9E2;
  --key: #F4F3EF;
  --key-edge: #B3AEA2;
  --ink: #232321;
  --ink-2: #4F4C46;
  --ink-3: #57534C;
  --rule: rgba(35, 35, 33, .14);
  --rule-strong: rgba(35, 35, 33, .32);
  --signal: #C42A1F;
  --signal-deep: #93190F;
  --signal-ink: #94201A;
  --r-key: 7px;
  --r-plate: 14px;
  --r-paper: 10px;
  --measure: 62ch;
  --gutter: clamp(16px, 4vw, 48px);
  --page: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--chassis);
  color: var(--ink);
  font: 400 17px/1.5 "Archivo", system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  font-variation-settings: "wdth" 100;
}
@media (max-width: 480px) { body { font-size: 16px; } }

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
p, ul, ol, figure, h1, h2, h3, blockquote, table { margin: 0; }
ul, ol { padding: 0; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------- type */
h1 {
  font-variation-settings: "wdth" 125;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1;
  font-size: clamp(1.75rem, .5rem + 4vw, 4rem);
  text-wrap: balance;
}
h2 {
  font-variation-settings: "wdth" 112;
  font-weight: 750;
  letter-spacing: -.01em;
  line-height: 1.1;
  font-size: clamp(1.6rem, 1.1rem + 2vw, 2.4rem);
  text-wrap: balance;
}
.lede { font-size: clamp(1.1rem, 1rem + .6vw, 1.35rem); line-height: 1.4; color: var(--ink); max-width: var(--measure); text-wrap: pretty; }
p { max-width: var(--measure); text-wrap: pretty; }
.small { font-size: .9rem; line-height: 1.4; color: var(--ink-2); }
.rx { font-weight: 700; font-variation-settings: "wdth" 112; white-space: nowrap; }
.num { font-variation-settings: "wdth" 125; font-weight: 850; letter-spacing: -.03em; line-height: .9; }

/* ---------------------------------------------------------------- layout */
.wrap { width: min(100% - 2 * var(--gutter), var(--page)); margin-inline: auto; }
.section { padding-block: clamp(48px, 8vw, 112px); }
.section + .section { border-top: 1px solid var(--rule); }
.stack > * + * { margin-top: 1em; }

/* ---------------------------------------------------------------- keys */
.key {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 44px; padding: .55em 1.1em;
  background: var(--key); color: var(--ink);
  border: 1px solid var(--key-edge); border-bottom-width: 3px; border-radius: var(--r-key);
  box-shadow: inset 0 1px 0 #fff;
  font-weight: 700; font-size: 1rem; line-height: 1.2; text-decoration: none; white-space: nowrap;
  cursor: pointer;
}
.key:active { transform: translateY(1px); border-bottom-width: 2px; margin-bottom: 1px; }
.key--signal { background: var(--signal); color: #fff; border-color: var(--signal-deep); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); }
.key--lg { font-size: 1.15rem; padding: .7em 1.4em; min-height: 56px; }
.key--signal:focus-visible { outline-color: var(--ink); }

/* ---------------------------------------------------------------- plates */
.paper { background: var(--paper); border-radius: var(--r-paper); }

/* ---------------------------------------------------------------- device frames (flat) */
.frame { border: 1px solid var(--key-edge); border-radius: var(--r-paper); overflow: hidden; background: var(--paper); }
.frame img { width: 100%; }
.phone { border: 2px solid var(--ink); border-radius: 36px; overflow: hidden; background: var(--chassis); width: 100%; max-width: 390px; }
.phone img { width: 100%; }

/* ---------------------------------------------------------------- header, notice, footer */
.site-header { padding-block: 18px; }
.site-header .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.lockup { display: flex; align-items: center; gap: 10px; }
/* The beside lockup, the mark and the wordmark as the app's rail shows them (brand minimum: 20 px high). */
.lockup img { height: 32px; width: auto; }
.site-header nav { display: flex; gap: 12px; }
.site-footer { border-top: 1px solid var(--rule-strong); padding-block: 36px 48px; font-size: .9rem; color: var(--ink-2); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 32px; align-items: baseline; }
.site-footer a { color: var(--ink); }

/* ---------------------------------------------------------------- invite block */
.invite { display: grid; gap: 20px; align-items: start; }
.invite-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.invite-actions .small { max-width: 36ch; }

/* ---------------------------------------------------------------- grid helpers */
.cols { display: grid; gap: clamp(24px, 4vw, 56px); align-items: start; }
@media (min-width: 820px) {
  .cols-3-2 { grid-template-columns: 3fr 2fr; }
  .cols-2-3 { grid-template-columns: 2fr 3fr; }
}

/* ---------------------------------------------------------------- figure */
figure.fig { display: grid; gap: 14px; }
figure.fig figcaption { font-size: .95rem; color: var(--ink-2); max-width: var(--measure); }

@media (prefers-reduced-motion: no-preference) {
  .key { transition: transform 60ms ease-out, border-bottom-width 60ms ease-out; }
}
@media print { .site-header nav { display: none; } }
