/* FieldNoteReference site. Colours and faces come from brand/hudson/tokens.css (the shop brand).
   Rules from the apple-design skill: size-specific tracking and leading, rem spacing, translucent sticky header
   with a soft scroll edge, press feedback, light and dark, and fallbacks for reduced motion, transparency and more contrast. */

@font-face { font-family: "Bricolage Grotesque"; font-weight: 800; font-display: swap; src: url("fonts/BricolageGrotesque-ExtraBold.woff2") format("woff2"); }
@font-face { font-family: "Bricolage Grotesque"; font-weight: 600; font-display: swap; src: url("fonts/BricolageGrotesque-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 400; font-display: swap; src: url("fonts/InstrumentSans-Regular.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 600; font-display: swap; src: url("fonts/InstrumentSans-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 400; font-style: italic; font-display: swap; src: url("fonts/InstrumentSans-Italic.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("fonts/IBMPlexMono-Regular.woff2") format("woff2"); }

:root {
  --paper: #F5F6F4;
  --surface: #FFFFFF;
  --ink: #14181C;
  --muted: #5A6470;
  --rule: #D3D8DC;
  --tint: #E9EDEF;
  --accent: #0F5C63;
  --on-accent: #F5F6F4;
  --glass: rgba(245, 246, 244, 0.72);
  --shadow: 0 1px 2px rgba(20, 24, 28, 0.06), 0 0.5rem 1.5rem rgba(20, 24, 28, 0.06);
  --shadow-lift: 0 2px 4px rgba(20, 24, 28, 0.08), 0 1rem 2.5rem rgba(20, 24, 28, 0.10);
  --f-display: "Bricolage Grotesque", system-ui, sans-serif;
  --f-body: "Instrument Sans", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, monospace;
  --radius: 0.875rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --measure: 68rem;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #101418;
    --surface: #171C21;
    --ink: #E6EAEC;
    --muted: #9AA4AE;
    --rule: #2A3138;
    --tint: #1D2329;
    --accent: #6FB7BD;
    --on-accent: #0B1013;
    --glass: rgba(16, 20, 24, 0.72);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 0.5rem 1.5rem rgba(0, 0, 0, 0.3);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.45), 0 1rem 2.5rem rgba(0, 0, 0, 0.4);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--f-body);
  letter-spacing: 0.003em;
  transition: background-color 300ms ease, color 300ms ease;
}
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: var(--gutter); top: 0.5rem; z-index: 10; background: var(--surface); padding: 0.5rem 0.75rem; }

/* Header: a translucent layer, content scrolls under it; a soft fade replaces a hard divider. */
.masthead {
  position: sticky; top: 0; z-index: 5;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem;
  padding: 0.85rem var(--gutter);
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
}
.masthead::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 1rem; pointer-events: none;
  background: linear-gradient(to bottom, var(--glass), transparent);
}
.wordmark {
  font: 800 1.2rem/1 var(--f-display); letter-spacing: -0.02em; color: var(--ink); text-decoration: none;
}
.wordmark span { color: var(--accent); }
.masthead nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }
.masthead nav a {
  font-weight: 600; font-size: 0.9375rem; letter-spacing: 0.01em; color: var(--muted); text-decoration: none;
  padding: 0.35rem 0; border-bottom: 2px solid transparent;
}
.masthead nav a:hover { color: var(--ink); }
.masthead nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

main { max-width: var(--measure); margin: 0 auto; padding: 1.5rem var(--gutter) 3rem; }

/* Type: tracking tightens and leading closes as size grows; body stays near zero. */
h1, h2, .h { font-family: var(--f-display); color: var(--ink); }
h1 { font-weight: 800; font-size: clamp(2.25rem, 6vw, 4rem); line-height: 1.04; letter-spacing: -0.03em; margin: 0.25rem 0 1rem; }
h2 { font-weight: 600; font-size: clamp(1.3rem, 2.4vw, 1.6rem); line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 0.75rem; }
.eyebrow { font: 400 0.8125rem/1.4 var(--f-mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); margin: 0; }
.lede { font-size: clamp(1.125rem, 2vw, 1.3rem); line-height: 1.5; max-width: 40rem; }
.lede p { margin: 0 0 0.75rem; }
.small { font-size: 0.875rem; line-height: 1.5; letter-spacing: 0.01em; color: var(--muted); }
.meta { font: 400 0.8125rem/1.5 var(--f-mono); color: var(--muted); }

/* Buttons: feedback on press, at once. */
.btn, button {
  display: inline-block; font: 600 1rem/1 var(--f-body); letter-spacing: 0.005em;
  padding: 0.85rem 1.2rem; border-radius: 999px; border: 1.5px solid var(--accent);
  background: var(--accent); color: var(--on-accent); text-decoration: none; cursor: pointer;
  margin: 0.25rem 0.5rem 0.25rem 0;
  transition: transform 100ms ease-out, box-shadow 200ms ease;
}
.btn.ghost { background: transparent; color: var(--accent); }
.btn:hover, button:hover { box-shadow: var(--shadow); }
.btn:active, button:active { transform: scale(0.97); }

/* Hero */
.hero { padding: clamp(1.5rem, 6vw, 4.5rem) 0 2rem; }
.hero h1 { max-width: 14ch; }

/* Signature: the index tab from the printed guides, set on the right edge of each sheet and card. */
.sheet, .card {
  position: relative; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: clamp(1.25rem, 4vw, 2.25rem); padding-right: calc(clamp(1.25rem, 4vw, 2.25rem) + 2.5rem);
}
.sheet { margin: 1rem 0 2.5rem; }
.tab {
  position: absolute; top: 1.25rem; right: 0; width: 2.1rem; padding: 1rem 0;
  background: var(--accent); color: var(--on-accent); border-radius: 0.5rem 0 0 0.5rem;
  writing-mode: vertical-rl; text-orientation: mixed;
  font: 800 0.8125rem/1 var(--f-display); letter-spacing: 0.08em; text-transform: uppercase;
  display: flex; align-items: center; justify-content: center;
}

.cards { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); margin: 1rem 0 3rem; }
.card {
  display: flex; flex-direction: column; gap: 0.6rem; color: var(--ink); text-decoration: none; min-height: 15rem;
  transition: transform 200ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 200ms ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.card:active { transform: scale(0.985); transition-duration: 100ms; }
.card .h { font-weight: 800; font-size: 1.6rem; line-height: 1.1; letter-spacing: -0.02em; }
.card .d { color: var(--muted); line-height: 1.5; }
.card .n { margin-top: auto; font: 400 0.8125rem/1 var(--f-mono); color: var(--accent); }

.split { display: grid; gap: 1.5rem 2.5rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); padding-top: 1rem; }
.split p { color: var(--muted); }

/* Product lists: one row per guide, price in mono on the right. */
.group { margin: 0 0 2.5rem; }
.prods { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.prods li + li { border-top: 1px solid var(--rule); }
.prod {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: 0.95rem 1.25rem; color: var(--ink); text-decoration: none; transition: background-color 150ms ease;
}
.prod:hover { background: var(--tint); }
.prod:active { background: var(--rule); }
.prod .t { line-height: 1.4; }
.prod .p { font: 400 0.9375rem/1 var(--f-mono); color: var(--accent); white-space: nowrap; }

.fine { max-width: 44rem; }
.fine p { color: var(--muted); }
.fine h2 { margin-top: 1.75rem; }
.prose { max-width: 38rem; font-size: 1.125rem; line-height: 1.65; }
.prose .sign { font: 600 1.25rem/1 var(--f-display); color: var(--ink); }

.tiers { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); margin: 0 0 2rem; }
.tier { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; display: flex; flex-direction: column; gap: 0.4rem; }
.tier .price { font: 800 2.5rem/1 var(--f-display); letter-spacing: -0.03em; color: var(--accent); }
.tier .h { font-weight: 600; font-size: 1.2rem; letter-spacing: -0.01em; }
.tier .d { color: var(--muted); font-size: 0.975rem; }

/* Sign-up form; the field shows a problem only after the person has typed. */
.signup label { display: block; font-weight: 600; margin-bottom: 0.4rem; }
.signup .row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.signup input {
  flex: 1 1 16rem; min-width: 0; font: 400 1rem/1.2 var(--f-body); color: var(--ink);
  padding: 0.8rem 1rem; border-radius: 999px; border: 1.5px solid var(--rule); background: var(--surface);
}
.signup input:focus-visible { border-color: var(--accent); outline-offset: 2px; }
.signup input:user-invalid { border-color: #B3261E; }
.signup button { margin: 0; }

.foot { max-width: var(--measure); margin: 0 auto; padding: 2rem var(--gutter) 3rem; border-top: 1px solid var(--rule); }
.foot p { margin: 0 0 0.5rem; }
.foot .small a { margin-right: 1rem; }

@media (max-width: 40rem) {
  .masthead { padding-top: 0.6rem; padding-bottom: 0.4rem; }
  .masthead nav { flex-wrap: nowrap; overflow-x: auto; width: 100%; gap: 1rem; scrollbar-width: none; }
  .masthead nav a { white-space: nowrap; }
  .prod { flex-direction: column; gap: 0.35rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation: none !important; }
  .card:hover, .card:active, .btn:active, button:active { transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .masthead { background: var(--paper); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .masthead::after { display: none; }
}
@media (prefers-contrast: more) {
  :root { --muted: var(--ink); --glass: var(--paper); }
  .sheet, .card, .prods, .tier { box-shadow: none; border: 1.5px solid var(--ink); }
}
