/* Urban Provisions NYC: every style for every page.

   Tokens live in :root at the top; the dark theme redefines only the tokens
   that change, directly below. Nothing else in this file branches on theme,
   so a component that reads tokens gets dark mode for free.

   Blocks are labelled  ---------- name ----------  and the README's feature
   map points at them by that name. Breakpoints are at the bottom.

   The palette and faces here are STARTER VALUES, chosen to clear WCAG AA in
   both themes while the brand handbook is in progress. Swap them for the
   handbook's values in :root and the dark block, keep the ratio comments
   honest, and run `python3 tools/check.py` (contrast-check reads the pairs
   it lists straight from these two blocks). */

:root {
  /* ---- palette: light ---- TODO(r1): the brand palette */
  --paper: #f7f3ec; /* main page band */
  --paper2: #eee8dd; /* alternate band */
  --surface: #ffffff; /* cards and fields */
  --ink: #1f1b16; /* 15.5:1 on paper */
  --ink2: #4a433a; /* 8.8:1 on paper */
  --muted: #6b6257; /* 5.4:1 on paper, 4.9:1 on paper2 */
  --accent: #c24a2e; /* large display accents and decoration only: 4.4:1 */
  --accent-btn: #a83d24; /* button fill: 6.3:1 under white text */
  --accent-btn-hover: #8f331e; /* sinks on a light page: 7.9:1 under white */
  --accent-ink: #9a3720; /* accent text on a light surface: 6.5:1 on paper */
  --focus: #2a5c9a; /* 6.1:1 on paper */
  --line: rgba(
    31,
    27,
    22,
    0.12
  ); /* divider hairline, ~1.3:1: never an outline */
  /* outline for controls with no fill. Must clear 3:1 against the page
     (WCAG 1.4.11), which --line is far too faint for. 3.2:1 */
  --btn-line: rgba(31, 27, 22, 0.5);
  --nav-scrim: rgba(247, 243, 236, 0.92);
  /* the footer band is dark in both themes */
  --band: #1f1b16;
  --band-ink: #f2ece2; /* 14.6:1 on band */
  --band-note: #bdb2a3; /* 8.2:1 on band */
  --band-accent: #f08a6c; /* 7.0:1 on band */
  --band-line: rgba(255, 255, 255, 0.12);
  /* the holding page is one brand surface in both themes, like the band,
     so these have no dark values. TODO(r1): they leave with the page */
  --hold: #343d2a;
  --hold-ink: #ece9e0; /* 9.4:1 on hold */
  --hold-note: #acada0; /* 5.0:1 on hold */
  color-scheme: light;

  /* ---- type ---- TODO(r1): the brand type pairing */
  --disp: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --body:
    system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --hold-face: "Montserrat", var(--body); /* the holding page's seal */
  /* type scale: five steps covering 10-17px, where every label, caption,
     note and body string lives. Headings above 17px size themselves with
     clamp() and are not on the ladder. tools/scale-check.py holds it.
     --t-xl cannot move off 16px: form fields read it, and under 16px iOS
     zooms the whole page when a field takes focus. */
  --t-xs: 10.5px; /* micro-label: captions, tags, stamps */
  --t-sm: 11.5px; /* tight display labels: kickers */
  --t-md: 12.5px; /* the standard display label: footer links, toggles */
  --t-lg: 14px; /* buttons, notes, card copy */
  --t-xl: 16px; /* reading text, and fields. PINNED for iOS */
  --label-track: 0.14em; /* a label attached to something */
  --label-track-wide: 0.2em; /* a label standing on its own */

  /* ---- shape ----
     Four radius steps, no one-offs. Every rule that sets --r-md, --r-lg or
     --r-full carries `corner-shape: squircle` beside it (scale-check holds
     this). --r-xs stays round: at 6px there is nothing to tell apart. A
     browser without corner-shape keeps the ordinary corner. */
  --r-xs: 6px; /* tags, focus rings */
  --r-md: 12px; /* fields, the skip link, images in cards */
  --r-lg: 20px; /* cards and panels */
  --r-full: 999px; /* pill buttons */

  /* ---- rhythm ----
     One set of section-header gaps for every section at every width:
     kicker -> h2 -> sub -> content. */
  --head-kicker-gap: 14px;
  --head-sub-gap: 16px;
  --head-content-gap: 44px;
  --band-pad: clamp(64px, 9vw, 112px);
  --nav-h: 72px;
  --ctl-h: 44px; /* header controls: the menu button and icon links */
}

/* ---------- dark mode ----------
   shell.js resolves Light / Dark / Auto and stamps data-theme on <html>, so
   the palette only answers to one attribute. */
:root[data-theme="dark"] {
  --paper: #16130f;
  --paper2: #100e0b;
  --surface: #221e19;
  --ink: #f2ede4; /* 15.9:1 on paper */
  --ink2: #cfc6b8; /* 11.0:1 on paper */
  --muted: #a79d8f; /* 6.9:1 on paper, 6.2:1 on surface */
  --accent: #e47a5e; /* 6.4:1 on paper */
  --accent-btn: #b3452b; /* fill: 5.5:1 under white text */
  /* hover LIFTS on a dark page rather than sinking: a darker fill loses its
     edge against the page (1.4.11), and the light accent text colour would
     put white at 2.3:1. 5.0:1 under white, 3.7:1 against the page */
  --accent-btn-hover: #bd4b30;
  --accent-ink: #f09378; /* 8.1:1 on paper */
  --focus: #8db6ee; /* 8.9:1 on paper */
  --line: rgba(255, 255, 255, 0.12);
  --btn-line: rgba(255, 255, 255, 0.6); /* 7.1:1 on paper */
  --nav-scrim: rgba(22, 19, 15, 0.92);
  --band: #0c0a08;
  --band-note: #b3a899; /* 8.5:1 on band */
  color-scheme: dark;
}
:root[data-theme="dark"] img:not([src$=".svg"]) {
  /* photos are treated for a light page; take the edge off the glare */
  filter: brightness(0.92) contrast(1.02);
}

/* ---------- base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  /* keep anchor targets and keyboard focus clear of the fixed header
     (WCAG 2.4.11 Focus Not Obscured) */
  scroll-padding-top: calc(var(--nav-h) + 24px);
}
[hidden] {
  display: none !important;
}
body {
  font-family: var(--body);
  font-size: var(--t-xl);
  line-height: 1.6;
  background: var(--paper);
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection {
  background: var(--accent-btn);
  color: #fff;
}
img,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
h1,
h2,
h3 {
  font-family: var(--disp);
  font-weight: 600;
  line-height: 1.1;
  text-wrap: balance;
}
p {
  text-wrap: pretty;
}

/* focus visibility (WCAG 2.4.7) */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.foot :focus-visible {
  outline-color: var(--band-accent);
}
main:focus-visible,
.form-done:focus-visible {
  outline: none; /* focus is moved here by script; the content is the cue */
}

/* visually hidden, still read by screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* skip link (WCAG 2.4.1): the first focusable thing on every page */
.skip {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 200;
  background: var(--band);
  color: var(--band-ink);
  padding: 12px 20px;
  border-radius: 0 0 var(--r-md) var(--r-md);
  corner-shape: squircle;
  font-weight: 600;
  font-size: var(--t-lg);
  text-decoration: none;
  transition: top 0.2s;
}
.skip:focus {
  top: 0;
}

/* ---------- micro-label ----------
   The small tracked mono line for captions, tags and stamps. One rule
   naming every member: add a selector here rather than restating the
   declarations (scale-check flags a rule that restates them). */
.label,
.card-tag,
.foot-h,
.field-hint,
.ss-egg {
  font-family: var(--mono);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: var(--label-track);
  text-transform: uppercase;
}
/* standing on its own rather than attached to something */
.foot-h {
  letter-spacing: var(--label-track-wide);
}
/* the signature keeps its own tracking: its opened-out width is measured */
.ss-egg {
  letter-spacing: 0.08em;
}

/* ---------- shared ---------- */
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
}
.band {
  padding: var(--band-pad) 0;
}
.band-alt {
  background: var(--paper2);
}
.kicker {
  font-family: var(--body);
  font-weight: 700;
  font-size: var(--t-sm);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.sec-head {
  max-width: 46rem;
  margin-bottom: var(--head-content-gap);
}
.sec-head h2,
.notfound h1,
.page-head h1 {
  margin-top: var(--head-kicker-gap);
  font-size: clamp(30px, 4.4vw, 46px);
}
.sec-sub {
  margin-top: var(--head-sub-gap);
  color: var(--ink2);
  max-width: 40rem;
}
.sec-cta {
  margin-top: 40px;
}
.text-link {
  color: var(--accent-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.text-link:hover {
  text-decoration-thickness: 2px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--r-full);
  corner-shape: squircle;
  border: 1.5px solid transparent;
  font-family: var(--body);
  font-weight: 650;
  font-size: var(--t-lg);
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s,
    transform 0.2s;
}
.btn-lg {
  min-height: 52px;
  padding: 0 26px;
}
.btn-primary {
  background: var(--accent-btn);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-btn-hover);
}
.btn-ghost {
  border-color: var(--btn-line);
  color: var(--ink);
}
.btn-ghost:hover {
  border-color: var(--ink);
}
.btn:active {
  transform: translateY(1px);
}
/* loading: the label stays, the button says it is busy */
.btn[aria-disabled="true"] {
  cursor: progress;
  opacity: 0.85;
}
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: var(--ctl-h);
  height: var(--ctl-h);
  border-radius: var(--r-full);
  corner-shape: squircle;
  border: 1.5px solid var(--btn-line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.icon-btn:hover {
  border-color: var(--ink);
}
.icon-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
.icon-btn svg .fill {
  fill: currentColor;
  stroke: none;
}

/* ---------- header ---------- */
.topnav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  transition:
    background 0.25s,
    box-shadow 0.25s;
}
.topnav.scrolled {
  background: var(--nav-scrim);
  backdrop-filter: saturate(1.4) blur(10px);
  box-shadow: 0 1px 0 var(--line);
}
.nav-in {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: var(--nav-h);
}
.nav-logo {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-height: 44px;
  align-content: center;
  padding: 10px 0;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
}
.nav-word {
  font-family: var(--disp);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.nav-sub {
  font-family: var(--body);
  font-weight: 700;
  font-size: var(--t-sm);
  letter-spacing: 0.18em;
  color: var(--accent-ink);
}
.nav-links {
  display: flex;
  gap: 4px;
}
.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  font-size: var(--t-lg);
  font-weight: 550;
  color: var(--ink2);
  text-decoration: none;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}
.nav-menu {
  display: none;
}

/* ---------- mobile menu ----------
   Below 920px the rail moves into a disclosure under the menu button.
   Not a modal: the page behind stays readable, there is no focus trap,
   and leaving the panel closes it (js/shell.js). */
.nm-bars {
  display: grid;
  gap: 4px;
  width: 18px;
}
.nm-bars span {
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transition:
    transform 0.25s,
    opacity 0.2s;
}
.nav-menu[aria-expanded="true"] .nm-bars span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-menu[aria-expanded="true"] .nm-bars span:nth-child(2) {
  opacity: 0;
}
.nav-menu[aria-expanded="true"] .nm-bars span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}
.nav-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  display: grid;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  corner-shape: squircle;
  box-shadow: 0 18px 40px rgba(31, 27, 22, 0.16);
}
.nav-menu-panel a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--r-md);
  corner-shape: squircle;
  font-weight: 550;
  text-decoration: none;
}
.nav-menu-panel a:hover,
.nav-menu-panel a[aria-current="page"] {
  background: var(--paper2);
}

/* ---------- opening ----------
   Release 1's entrance: the lines rise in once, on load. Release 2's
   custom opening replaces this block. */
.hero {
  padding: calc(var(--nav-h) + clamp(56px, 10vw, 128px)) 0
    clamp(64px, 9vw, 112px);
}
.hero-in {
  max-width: 1200px;
}
.hero-title {
  margin-top: 18px;
  font-size: clamp(40px, 7.2vw, 88px);
  letter-spacing: -0.02em;
  line-height: 1.02;
}
.hero-line {
  display: block;
  animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
}
.hero-line:nth-child(2) {
  animation-delay: 0.12s;
  color: var(--accent-ink);
}
.hero-lede {
  margin-top: 24px;
  max-width: 36rem;
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--ink2);
  animation: rise 0.8s 0.24s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
  animation: rise 0.8s 0.36s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

/* ---------- reveal ----------
   .rv elements fade up as they enter the viewport (js/main.js adds .in).
   Without script, a <noscript> style in each page's head shows them. */
.rv {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.6s ease,
    transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.rv.in {
  opacity: 1;
  transform: none;
}

/* ---------- ordering cards ---------- */
.cards {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  corner-shape: squircle;
  padding: 28px;
}
.card h3 {
  margin: 12px 0 10px;
  font-size: 24px;
}
.card p:not(.card-tag) {
  font-size: var(--t-lg);
  color: var(--ink2);
}
.card-tag {
  color: var(--accent-ink);
}

/* ---------- contact form ---------- */
.contact-in {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 48px;
  align-items: start;
}
.contact-in .sec-head {
  margin-bottom: 0;
}
.form,
.form-done {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  corner-shape: squircle;
  padding: 32px;
}
.form {
  display: grid;
  gap: 20px;
}
.field {
  display: grid;
  gap: 8px;
}
.field label {
  font-weight: 600;
  font-size: var(--t-lg);
}
.field input,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  /* 16px, or iOS zooms the page when the field takes focus */
  font-size: var(--t-xl);
  background: var(--paper);
  border: 1.5px solid var(--btn-line);
  border-radius: var(--r-md);
  corner-shape: squircle;
}
.field textarea {
  resize: vertical;
  min-height: 140px;
}
.field input:hover,
.field textarea:hover {
  border-color: var(--ink2);
}
.field [aria-invalid="true"] {
  border-color: var(--accent-ink);
  border-width: 2px;
}
.field-err {
  font-size: var(--t-lg);
  font-weight: 600;
  color: var(--accent-ink);
}
.field-hint {
  color: var(--muted);
}
.form-status {
  padding: 12px 14px;
  border-radius: var(--r-md);
  corner-shape: squircle;
  background: var(--paper2);
  font-size: var(--t-lg);
  font-weight: 600;
  color: var(--accent-ink);
}
.form-done h3 {
  font-size: 26px;
  margin-bottom: 10px;
}
.form-done p {
  color: var(--ink2);
}

/* ---------- journal list ----------
   Release 2: js/journal.js renders data/journal.json into #journalList. */
.journal-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 20px;
}
.journal-list a {
  display: block;
  height: 100%;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  corner-shape: squircle;
  text-decoration: none;
}
.journal-list a:hover h3 {
  text-decoration: underline;
}
.journal-list time {
  font-size: var(--t-md);
  color: var(--muted);
}
.journal-list h3 {
  margin: 8px 0;
  font-size: 22px;
}
.journal-list p {
  font-size: var(--t-lg);
  color: var(--ink2);
}

/* ---------- footer ---------- */
.foot {
  position: relative;
  background: var(--band);
  color: var(--band-ink);
  padding-top: 72px;
}
.foot-in {
  display: grid;
  /* the contact column is wider: the address is one unbreakable word */
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(
      0,
      1.4fr
    );
  gap: 40px;
  padding-bottom: 48px;
}
.foot-word {
  font-family: var(--disp);
  font-weight: 700;
  font-size: 24px;
}
.foot-word span {
  font-family: var(--body);
  font-size: var(--t-sm);
  letter-spacing: 0.18em;
  color: var(--band-accent);
}
.foot-blurb {
  margin-top: 12px;
  max-width: 28rem;
  font-size: var(--t-lg);
  color: var(--band-note);
}
.foot-h {
  color: var(--band-note);
  margin-bottom: 10px;
}
.foot-col ul {
  list-style: none;
}
/* the padding is on the anchor, so the whole row is the target (2.5.8) */
.foot-col a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  font-size: var(--t-lg);
  color: var(--band-ink);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.foot-col a:hover {
  color: var(--band-accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.foot-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  padding-bottom: 28px;
  border-top: 1px solid var(--band-line);
}
.foot-legal {
  font-size: var(--t-md);
  color: var(--band-note);
  /* room for the corner signature, so it never sits over the type */
  margin-right: 200px;
}
.theme-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--band-line);
  border-radius: var(--r-full);
  corner-shape: squircle;
}
.theme-opt {
  min-height: 32px;
  min-width: 56px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--r-full);
  corner-shape: squircle;
  background: transparent;
  font-size: var(--t-md);
  font-weight: 600;
  color: var(--band-accent);
  cursor: pointer;
  transition:
    background 0.2s,
    color 0.2s;
}
.theme-opt:hover {
  background: rgba(240, 138, 108, 0.14);
}
.theme-opt[aria-checked="true"] {
  background: var(--accent-btn);
  color: #fff;
}

/* ---------- signature ----------
   The StoryStack mark, parked in the bottom-right corner. At rest it is
   only the mark; hovering or focusing opens the wordmark and rebuilds the
   stack. shell.js shows it once the opening has scrolled away. Below
   920px it drops into the footer flow with the wordmark already out. */
.ss-egg {
  position: fixed;
  right: 18px;
  bottom: 22px;
  z-index: 80; /* under the header (100) */
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 11px;
  border-radius: var(--r-full);
  corner-shape: squircle;
  background: var(--band);
  color: var(--band-note);
  text-decoration: none;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 6px 18px rgba(31, 27, 22, 0.22);
  transition:
    opacity 0.35s,
    color 0.3s;
}
@media (min-width: 921px) {
  .ss-egg.is-on {
    opacity: 1;
    pointer-events: auto;
  }
}
.ss-egg.is-on:hover,
.ss-egg.is-on:focus-visible {
  color: var(--band-accent);
}
/* clipped rather than removed, so the link keeps its accessible name */
.ss-egg-word {
  max-width: 0;
  overflow: hidden;
  transition: max-width 0.45s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.ss-egg:hover .ss-egg-word,
.ss-egg:focus-visible .ss-egg-word {
  max-width: 190px;
  padding-left: 6px;
}
/* three stacked bars with the top one lit */
.stackmark {
  display: inline-block;
  position: relative;
  width: 11px;
  height: 11px;
}
.stackmark span {
  position: absolute;
  left: 0;
  height: 2px;
  border-radius: 1px;
  background: #8d8478;
  transform-origin: left center;
}
.stackmark span:nth-child(1) {
  top: 1px;
  width: 70%;
  background: var(--band-accent);
}
.stackmark span:nth-child(2) {
  top: 5px;
  width: 100%;
}
.stackmark span:nth-child(3) {
  top: 9px;
  width: 55%;
}
/* the stack builds upward: bottom bar first, the lit one last, each
   tossed in on a small arc, the middle one from the right */
@keyframes stack-drop {
  0% {
    transform: translate(-11px, -6px) rotate(-14deg) scaleX(1);
    opacity: 0;
    animation-timing-function: cubic-bezier(0.2, 0.6, 0.4, 1);
  }
  28% {
    transform: translate(-6px, -8px) rotate(-9deg) scaleX(1);
    opacity: 1;
    animation-timing-function: cubic-bezier(0.55, 0, 0.85, 0.5);
  }
  62% {
    transform: translate(0, 0) rotate(0deg) scaleX(1);
    animation-timing-function: ease-out;
  }
  75% {
    transform: translate(0, 0) rotate(0deg) scaleX(1.14);
  }
  100% {
    transform: translate(0, 0) rotate(0deg) scaleX(1);
    opacity: 1;
  }
}
@keyframes stack-drop-right {
  0% {
    transform: translate(11px, -6px) rotate(14deg) scaleX(1);
    opacity: 0;
    animation-timing-function: cubic-bezier(0.2, 0.6, 0.4, 1);
  }
  28% {
    transform: translate(6px, -8px) rotate(9deg) scaleX(1);
    opacity: 1;
    animation-timing-function: cubic-bezier(0.55, 0, 0.85, 0.5);
  }
  62% {
    transform: translate(0, 0) rotate(0deg) scaleX(1);
    animation-timing-function: ease-out;
  }
  75% {
    transform: translate(0, 0) rotate(0deg) scaleX(1.14);
  }
  100% {
    transform: translate(0, 0) rotate(0deg) scaleX(1);
    opacity: 1;
  }
}
.ss-egg:hover .stackmark span,
.ss-egg:focus-visible .stackmark span {
  animation: stack-drop 0.56s backwards;
}
.ss-egg:hover .stackmark span:nth-child(3),
.ss-egg:focus-visible .stackmark span:nth-child(3) {
  animation-delay: 0s;
}
.ss-egg:hover .stackmark span:nth-child(2),
.ss-egg:focus-visible .stackmark span:nth-child(2) {
  animation-name: stack-drop-right;
  animation-delay: 0.16s;
}
.ss-egg:hover .stackmark span:nth-child(1),
.ss-egg:focus-visible .stackmark span:nth-child(1) {
  animation-delay: 0.32s;
}

/* ---------- holding page ----------
   The pre-launch splash at /: the seal and one line on the brand green.
   TODO(r1): remove this block, the --hold tokens, their contrast pairs and
   site/fonts/ when templates/landing.html moves back to site/index.html. */
@font-face {
  font-family: "Montserrat";
  src: url("/fonts/montserrat-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("/fonts/montserrat-latin-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
.hold {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--hold);
  color: var(--hold-ink);
  font-family: var(--hold-face);
  color-scheme: dark;
}
.hold :focus-visible {
  outline-color: var(--hold-ink);
}
.hold-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(32px, 5vh, 56px);
  padding: 48px 24px;
  text-align: center;
}
.hold-seal {
  width: min(72vw, 52vh, 420px);
  height: auto;
  animation: hold-fade 1.2s ease-out both;
}
.hold-seal text {
  fill: currentColor;
  font-family: inherit;
  font-weight: 400;
}
.hold-title {
  font-family: inherit;
  font-size: var(--t-lg);
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  margin-right: -0.4em; /* balance the trailing letter-spacing */
  animation: hold-fade 1.2s ease-out 0.3s both;
}
.hold-foot {
  padding: 24px;
  text-align: center;
  font-size: var(--t-sm);
  letter-spacing: var(--label-track-wide);
  text-transform: uppercase;
  color: var(--hold-note);
}
@keyframes hold-fade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (min-width: 600px) {
  .hold-title {
    font-size: var(--t-xl);
  }
}
@media (max-width: 480px) {
  .hold-foot {
    font-size: var(--t-xs);
    letter-spacing: var(--label-track);
  }
}

/* ---------- not found ---------- */
.notfound {
  padding-top: calc(var(--nav-h) + clamp(56px, 10vw, 128px));
  min-height: 70vh;
}
.page-head {
  padding-top: calc(var(--nav-h) + clamp(48px, 8vw, 96px));
}

/* ---------- reduced motion ----------
   One block switches off every animation and transition on the site.
   JS checks the same query before binding anything that moves
   (js/main.js). Any new animation needs both. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .rv {
    opacity: 1;
    transform: none;
  }
}

/* ---------- breakpoints ---------- */
@media (max-width: 920px) {
  .nav-links {
    display: none;
  }
  .nav-menu {
    display: inline-grid;
  }
  .cards {
    grid-template-columns: minmax(0, 1fr);
  }
  .contact-in {
    grid-template-columns: minmax(0, 1fr);
  }
  .foot-in {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .foot-brand,
  .foot-contact {
    grid-column: 1 / -1;
  }
  .foot-legal {
    margin-right: 0;
  }
  /* on a phone there is no hover to open the wordmark, so the signature
     simply signs the page, in the flow under the legal line */
  .ss-egg {
    position: static;
    height: auto;
    padding: 0;
    margin: 0 0 28px 28px;
    background: none;
    box-shadow: none;
    opacity: 1;
    pointer-events: auto;
  }
  .ss-egg-word {
    max-width: none;
    padding-left: 6px;
  }
}
@media (max-width: 640px) {
  .wrap {
    padding: 0 20px;
  }
  .ss-egg {
    margin-left: 20px;
  }
  /* the header row has the wordmark, Shop and the menu button and almost
     no slack: Instagram moves into the menu, and the wordmark steps down
     and never wraps. Re-check from 320px up before adding anything here */
  .nav-in {
    gap: 12px;
  }
  .nav-insta {
    display: none;
  }
  .nav-logo {
    white-space: nowrap;
  }
  .nav-word {
    font-size: 19px;
  }
  .nav-shop {
    padding: 0 16px;
  }
  .form,
  .form-done {
    padding: 22px;
  }
  .hero-ctas .btn {
    flex: 1 1 auto;
  }
}
/* the narrowest phones: "NYC" leaves the row visually but stays in the
   link's name, so the menu button keeps its place at 320px */
@media (max-width: 380px) {
  .nav-word {
    font-size: 18px;
  }
  .nav-sub {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}
