/* ==========================================================================
   Todd Bauerle — Author & Bookstore
   Design tokens + base + components
   ========================================================================== */

:root {
  /* Neutral palette */
  --ink:            #1a1a1a;   /* near-black body text */
  --ink-soft:       #3d3d3d;
  --ink-muted:      #6b6b6b;
  --line:           #e6e3dd;   /* hairline borders */
  --line-strong:    #d6d2ca;
  --paper:          #ffffff;   /* page background */
  --paper-warm:     #faf8f4;   /* subtle section tint */
  --paper-warm-2:   #f4f1ea;

  /* Accent — restrained oxblood / ink-blue */
  --accent:         #7a2e2e;   /* oxblood, used sparingly */
  --accent-dark:    #5f2323;
  --accent-ink:     #22303f;   /* deep slate for headings on tint */
  --gold:           #9a7b3f;   /* fine detail only (rules, small caps) */

  --ok:             #2f6f4f;
  --err:            #a3342b;

  /* Typography */
  --serif:  "Iowan Old Style", "Palatino Linotype", "Palatino", "Georgia", "Times New Roman", serif;
  --sans:   "Inter", "Helvetica Neue", "Segoe UI", Arial, system-ui, -apple-system, sans-serif;

  --step--1: clamp(0.82rem, 0.8rem + 0.1vw, 0.9rem);
  --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.08rem);
  --step-1:  clamp(1.2rem, 1.12rem + 0.4vw, 1.4rem);
  --step-2:  clamp(1.45rem, 1.3rem + 0.8vw, 1.9rem);
  --step-3:  clamp(1.8rem, 1.5rem + 1.6vw, 2.7rem);
  --step-4:  clamp(2.2rem, 1.7rem + 2.6vw, 3.6rem);

  /* Spacing */
  --sp-1: 0.5rem;
  --sp-2: 1rem;
  --sp-3: 1.5rem;
  --sp-4: 2.5rem;
  --sp-5: 4rem;
  --sp-6: 6rem;

  --maxw: 1180px;
  --maxw-narrow: 760px;

  --radius: 4px;
  --radius-lg: 8px;

  --shadow-sm: 0 1px 2px rgba(20, 18, 15, 0.06), 0 1px 3px rgba(20, 18, 15, 0.05);
  --shadow-md: 0 6px 20px rgba(20, 18, 15, 0.08), 0 2px 6px rgba(20, 18, 15, 0.05);
  --shadow-book: 0 22px 45px -18px rgba(20, 18, 15, 0.4), 0 8px 18px -10px rgba(20, 18, 15, 0.28);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ------------------------------------------------------------------ reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  font-family: var(--serif);
  font-size: var(--step-0);
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-dark); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.18;
  color: var(--ink);
  margin: 0 0 var(--sp-2);
  letter-spacing: -0.01em;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
p  { margin: 0 0 var(--sp-2); }

.eyebrow {
  font-family: var(--sans);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 var(--sp-2);
}

.lede { font-size: var(--step-1); color: var(--ink-soft); line-height: 1.6; }
.muted { color: var(--ink-muted); }
.center { text-align: center; }

/* ------------------------------------------------------------------ layout */
.wrap { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 2.5rem, var(--maxw-narrow)); margin-inline: auto; }
.section { padding-block: var(--sp-6); }
:target, section[id], [id].section { scroll-margin-top: 96px; }
.section--tight { padding-block: var(--sp-5); }
.section--warm { background: var(--paper-warm); border-block: 1px solid var(--line); }
.section--ink { background: var(--accent-ink); color: #eef1f3; }
.section--ink h1, .section--ink h2, .section--ink h3 { color: #fff; }
.section--ink .muted { color: #b9c4cd; }

.stack > * + * { margin-top: var(--sp-2); }
.stack-lg > * + * { margin-top: var(--sp-3); }

.grid { display: grid; gap: var(--sp-4); }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.divider { border: 0; border-top: 1px solid var(--line-strong); margin-block: var(--sp-4); }
.rule-sm { width: 54px; height: 2px; background: var(--gold); border: 0; margin: 0 0 var(--sp-3); }
.center .rule-sm { margin-inline: auto; }

/* ------------------------------------------------------------------ buttons */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: #fff;
  --btn-bd: var(--ink);
  display: inline-flex; align-items: center; gap: 0.55em;
  font-family: var(--sans);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.95em 1.7em;
  border: 1px solid var(--btn-bd);
  border-radius: var(--radius);
  background: var(--btn-bg);
  color: var(--btn-fg);
  cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease), color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); color: var(--btn-fg); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.btn--accent { --btn-bg: var(--accent); --btn-bd: var(--accent); }
.btn--accent:hover { --btn-bg: var(--accent-dark); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--ink); --btn-bd: var(--line-strong); }
.btn--ghost:hover { --btn-bg: var(--ink); --btn-fg: #fff; }
.btn--light { --btn-bg: #fff; --btn-fg: var(--ink); --btn-bd: #fff; }
.btn--sm { padding: 0.65em 1.1em; }
.btn--block { display: flex; width: 100%; justify-content: center; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.center .btn-row { justify-content: center; }

.link-arrow {
  font-family: var(--sans);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.4em;
}
.link-arrow::after { content: "\2192"; transition: transform 0.18s var(--ease); }
.link-arrow:hover::after { transform: translateX(4px); }

/* ------------------------------------------------------------------ header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.2s var(--ease);
}
.site-header.is-stuck { box-shadow: var(--shadow-sm); }
/* Frosted-glass effect only where it's smooth — real mouse pointers.
   On touch devices backdrop-filter on a sticky bar causes scroll flicker. */
@media (hover: hover) and (pointer: fine) {
  .site-header {
    background: rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    backdrop-filter: saturate(180%) blur(10px);
  }
}
.site-header__inner {
  width: min(100% - 2.5rem, var(--maxw));
  margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-3);
  min-height: 74px;
}
.brand {
  font-family: var(--serif);
  font-size: var(--step-2);
  font-weight: 600;
  letter-spacing: 0.005em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.nav { display: flex; align-items: center; gap: var(--sp-3); }
.nav__links { display: flex; align-items: center; gap: var(--sp-3); list-style: none; margin: 0; padding: 0; }
.nav__links a {
  font-family: var(--sans);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.4em 0;
  position: relative;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1.5px; background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform 0.2s var(--ease);
}
.nav__links a:hover, .nav__links a[aria-current="page"] { color: var(--ink); }
.nav__links a:hover::after, .nav__links a[aria-current="page"]::after { transform: scaleX(1); }

.cart-link { position: relative; display: inline-flex; align-items: center; gap: 0.4em; font-family: var(--sans); font-size: var(--step--1); font-weight: 600; color: var(--ink); text-decoration: none; }
.cart-link__count {
  min-width: 1.4em; height: 1.4em; padding: 0 0.35em;
  display: inline-grid; place-items: center;
  background: var(--accent); color: #fff; border-radius: 999px;
  font-size: 0.7rem; line-height: 1;
}
.cart-link__count[data-count="0"] { background: var(--ink-muted); }

.nav-toggle { display: none; }

@media (max-width: 940px) {
  .nav__links, .header-cta { display: none; }
  .nav-toggle {
    display: inline-grid; place-items: center;
    width: 44px; height: 44px; border: 1px solid var(--line-strong);
    border-radius: var(--radius); background: #fff; cursor: pointer;
  }
  .nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
    content: ""; display: block; width: 20px; height: 2px; background: var(--ink); transition: 0.2s var(--ease);
  }
  .nav-toggle span::before { transform: translateY(-6px); }
  .nav-toggle span::after { transform: translateY(4px); }
  .nav--open .nav-toggle span { background: transparent; }
  .nav--open .nav-toggle span::before { transform: rotate(45deg); }
  .nav--open .nav-toggle span::after { transform: rotate(-45deg) translateY(-1px); }

  .mobile-menu {
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
    padding: var(--sp-3) 1.25rem var(--sp-4);
    max-height: calc(100dvh - 74px); overflow-y: auto;
    transform: translateY(-12px); opacity: 0; pointer-events: none; visibility: hidden;
    transition: transform 0.22s var(--ease), opacity 0.22s var(--ease), visibility 0s linear 0.22s;
    box-shadow: var(--shadow-md);
    z-index: 60;
  }
  .nav--open .mobile-menu {
    transform: translateY(0); opacity: 1; pointer-events: auto; visibility: visible;
    transition: transform 0.22s var(--ease), opacity 0.22s var(--ease), visibility 0s;
  }
  .mobile-menu ul { list-style: none; margin: 0 0 var(--sp-3); padding: 0; }
  .mobile-menu ul a { display: block; padding: 0.85em 0; font-family: var(--sans); font-size: var(--step-0); font-weight: 500; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
  .mobile-menu ul a[aria-current="page"] { color: var(--accent); }
  .mobile-menu .btn { color: #fff; }
}
@media (min-width: 941px) { .mobile-menu { display: none; } }

/* ------------------------------------------------------------------ hero */
.hero { padding-block: var(--sp-6) var(--sp-5); overflow: hidden; }
.hero__grid { display: grid; gap: var(--sp-5); align-items: center; }
@media (min-width: 900px) { .hero__grid { grid-template-columns: 1.05fr 0.95fr; } }
.hero h1 { margin-bottom: var(--sp-3); }
.hero .lede { max-width: 46ch; margin-bottom: var(--sp-4); }
.hero__portrait {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--line);
  background: var(--paper-warm-2);
  aspect-ratio: 3 / 2;
}
.hero__portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.hero__portrait--square { aspect-ratio: 1 / 1; }
.portrait-caption { font-family: var(--sans); font-size: var(--step--1); color: var(--ink-muted); margin-top: var(--sp-2); }

/* ------------------------------------------------------------------ book mockup
   Flat by default (rock-solid on every device). The subtle 3-D tilt is added
   back only for real mouse pointers — touch devices got flicker and a
   stuck-hover glitch from the perspective transform. */
.book {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 2px 4px 4px 2px;
  box-shadow: var(--shadow-book);
  overflow: hidden;
  background: #ece7de;
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.book::after {
  content: ""; position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255,255,255,0.20) 0 2px, rgba(0,0,0,0.10) 4px, rgba(0,0,0,0.03) 12px, rgba(0,0,0,0) 28px, rgba(0,0,0,0) 95%, rgba(0,0,0,0.08) 100%);
  pointer-events: none;
}
.book img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  border-radius: inherit;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.book--flat { transform: translateZ(0); }

@media (hover: hover) and (pointer: fine) {
  .book { transform: perspective(1400px) rotateY(-10deg); }
  .book:hover, .book:focus-visible {
    transform: perspective(1400px) rotateY(-4deg) translateY(-4px);
    box-shadow: 0 30px 60px -20px rgba(20,18,15,0.45);
  }
  .book--flat { transform: translateZ(0); }
  .book--flat:hover { transform: translateY(-4px); }
}

.book-figure { margin: 0; }
.book-figure figcaption { font-family: var(--sans); font-size: var(--step--1); color: var(--ink-muted); margin-top: var(--sp-2); text-align: center; }

/* ------------------------------------------------------------------ book cards */
.book-card {
  display: grid; gap: var(--sp-4);
  align-items: center;
  padding: var(--sp-4);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}
.book-card:hover { box-shadow: var(--shadow-md); }
@media (min-width: 720px) { .book-card { grid-template-columns: 220px 1fr; gap: var(--sp-5); padding: var(--sp-5); } }
.book-card__cover { width: 100%; max-width: 220px; margin-inline: auto; }
.book-card h3 { margin-bottom: var(--sp-1); }
.book-card__byline { font-family: var(--sans); font-size: var(--step--1); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: var(--sp-2); }

.formats { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: var(--sp-2) 0 var(--sp-3); padding: 0; list-style: none; }
.formats li {
  font-family: var(--sans); font-size: 0.74rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.4em 0.7em; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--ink-soft);
}

/* ------------------------------------------------------------------ feature strip / sample */
.sample-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: var(--sp-4); box-shadow: var(--shadow-sm);
  display: grid; gap: var(--sp-3);
}
.sample-card h3 { font-size: var(--step-1); }

/* ------------------------------------------------------------------ forms */
.field { display: grid; gap: 0.4rem; margin-bottom: var(--sp-3); font-family: var(--sans); }
.field label { font-size: var(--step--1); font-weight: 600; letter-spacing: 0.04em; color: var(--ink-soft); }
.field .req { color: var(--accent); }
.field input, .field select, .field textarea {
  font: inherit; font-family: var(--sans); font-size: var(--step-0);
  padding: 0.75em 0.85em;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: #fff; color: var(--ink); width: 100%;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(122, 46, 46, 0.12);
}
.field--inline { grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
@media (max-width: 560px) { .field--inline { grid-template-columns: 1fr; } }
.form-note { font-family: var(--sans); font-size: var(--step--1); color: var(--ink-muted); }
.form-status { font-family: var(--sans); font-size: var(--step-0); padding: 0.9em 1em; border-radius: var(--radius); margin-top: var(--sp-2); display: none; }
.form-status.is-ok { display: block; background: #eef5f0; border: 1px solid #cfe4d8; color: var(--ok); }
.form-status.is-err { display: block; background: #fbeeec; border: 1px solid #f0d3cf; color: var(--err); }

fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: var(--sp-3); margin: 0 0 var(--sp-3); }
legend { font-family: var(--sans); font-size: var(--step--1); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding-inline: 0.5em; color: var(--ink-soft); }
.radio-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); font-family: var(--sans); }
.radio-row label { display: inline-flex; align-items: center; gap: 0.45em; font-weight: 500; }

/* ------------------------------------------------------------------ product page */
.product { display: grid; gap: var(--sp-5); }
.product__media { position: static; }
@media (min-width: 900px) {
  .product { grid-template-columns: 0.85fr 1.15fr; gap: var(--sp-6); align-items: start; }
  .product__media { position: sticky; top: 100px; }
}
.product__title { margin-bottom: var(--sp-1); }
.product__byline { font-family: var(--sans); font-size: var(--step--1); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: var(--sp-3); }
.price { font-family: var(--sans); font-size: var(--step-2); font-weight: 600; color: var(--ink); }
.price small { font-size: var(--step--1); font-weight: 500; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.08em; }

.opt-group { margin: var(--sp-3) 0; }
.opt-group__label { font-family: var(--sans); font-size: var(--step--1); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 0.6rem; }
.opt-list { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.opt {
  position: relative; font-family: var(--sans);
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 0.7em 1em; cursor: pointer; background: #fff;
  font-size: var(--step--1); font-weight: 600; letter-spacing: 0.03em;
  display: flex; flex-direction: column; gap: 0.15em; min-width: 116px;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.opt__price { font-weight: 500; color: var(--ink-muted); }
.opt:hover { border-color: var(--ink-soft); }
.opt:has(input:checked) { border-color: var(--accent); background: #fbf5f4; box-shadow: 0 0 0 2px rgba(122,46,46,0.14); }
.opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.opt--tag::after { content: attr(data-tag); position: absolute; top: -0.7em; right: 0.6em; font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase; background: var(--accent-ink); color: #fff; padding: 0.2em 0.5em; border-radius: 999px; }

.qty { display: inline-flex; align-items: stretch; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; font-family: var(--sans); }
.qty button { width: 42px; border: 0; background: #fff; font-size: 1.1rem; cursor: pointer; color: var(--ink); }
.qty button:hover { background: var(--paper-warm-2); }
.qty input { width: 52px; text-align: center; border: 0; border-inline: 1px solid var(--line-strong); font: inherit; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }

.deliv-note { font-family: var(--sans); font-size: var(--step--1); color: var(--ink-muted); display: flex; gap: 0.5em; align-items: flex-start; margin-top: var(--sp-2); }

.accordion { border-top: 1px solid var(--line); }
.accordion details { border-bottom: 1px solid var(--line); }
.accordion summary { font-family: var(--sans); font-weight: 600; padding: 1em 0; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; font-size: 1.2rem; color: var(--ink-muted); }
.accordion details[open] summary::after { content: "\2013"; }
.accordion details > *:not(summary) { padding-bottom: 1.2em; }

/* ------------------------------------------------------------------ reviews */
.review-grid { display: grid; gap: var(--sp-3); }
@media (min-width: 760px) { .review-grid { grid-template-columns: 1fr 1fr; } }
.review {
  margin: 0;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: var(--sp-4); box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
}
.review__stars { display: block; color: var(--gold); letter-spacing: 0.15em; font-size: 0.95rem; margin-bottom: var(--sp-2); }
.review__text { margin: 0; font-size: var(--step-1); line-height: 1.55; font-style: normal; }
.review__meta { font-family: var(--sans); font-size: var(--step--1); color: var(--ink-muted); margin-top: var(--sp-3); }
.review--placeholder { border-style: dashed; background: var(--paper-warm); color: var(--ink-muted); text-align: center; display: grid; place-items: center; min-height: 160px; font-family: var(--sans); }

/* ------------------------------------------------------------------ cart / checkout */
.cart-layout { display: grid; gap: var(--sp-5); }
@media (min-width: 900px) { .cart-layout { grid-template-columns: 1.4fr 0.85fr; align-items: start; } }
.cart-group + .cart-group { margin-top: var(--sp-4); }
.cart-group__head { font-family: var(--sans); font-size: var(--step--1); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: var(--sp-2); padding-bottom: var(--sp-1); border-bottom: 1px solid var(--line); }
.line {
  display: grid; grid-template-columns: 68px minmax(0, 1fr) auto; gap: var(--sp-3);
  padding: var(--sp-3) 0; border-bottom: 1px solid var(--line); align-items: start;
}
.line__cover { width: 68px; border-radius: 2px; box-shadow: var(--shadow-sm); }
.line__title { font-weight: 600; }
.line__variant { font-family: var(--sans); font-size: var(--step--1); color: var(--ink-muted); }
.line__controls { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin-top: 0.5rem; font-family: var(--sans); font-size: var(--step--1); }
.line__remove { border: 0; background: none; color: var(--ink-muted); cursor: pointer; text-decoration: underline; font: inherit; padding: 0; }
.line__remove:hover { color: var(--err); }
.line__price { font-family: var(--sans); font-weight: 600; white-space: nowrap; }

@media (max-width: 560px) {
  .line { grid-template-columns: 52px minmax(0, 1fr); column-gap: var(--sp-2); row-gap: 0.25rem; }
  .line__cover { width: 52px; grid-row: 1 / 3; }
  .line__price { grid-column: 2; text-align: right; }
  .qty button { width: 38px; }
  .qty input { width: 44px; }
}

.summary { background: var(--paper-warm); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--sp-4); position: sticky; top: 100px; }
.summary h3 { font-size: var(--step-1); }
.summary__row { display: flex; justify-content: space-between; font-family: var(--sans); font-size: var(--step-0); padding: 0.4rem 0; }
.summary__row--total { border-top: 1px solid var(--line-strong); margin-top: var(--sp-2); padding-top: var(--sp-2); font-size: var(--step-1); font-weight: 700; }
.summary .btn { margin-top: var(--sp-3); }
.trust-line { font-family: var(--sans); font-size: var(--step--1); color: var(--ink-muted); margin-top: var(--sp-2); text-align: center; }

.empty-state { text-align: center; padding: var(--sp-6) var(--sp-3); }
.empty-state svg { width: 54px; margin: 0 auto var(--sp-3); opacity: 0.4; }

.steps { display: flex; gap: var(--sp-2); font-family: var(--sans); font-size: var(--step--1); margin-bottom: var(--sp-4); flex-wrap: wrap; }
.steps li { list-style: none; color: var(--ink-muted); }
.steps li[aria-current="step"] { color: var(--ink); font-weight: 700; }

/* ------------------------------------------------------------------ misc */
.badge-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); font-family: var(--sans); font-size: var(--step--1); color: var(--ink-muted); }
.badge-row span { display: inline-flex; align-items: center; gap: 0.4em; }

.cta-band { text-align: center; }
.cta-band h2 { max-width: 20ch; margin-inline: auto; }

.page-head { padding-block: var(--sp-5) var(--sp-4); border-bottom: 1px solid var(--line); background: var(--paper-warm); }
.page-head .lede { max-width: 60ch; }

.prose { max-width: 68ch; }
.prose h2 { margin-top: var(--sp-4); }
.prose h3 { margin-top: var(--sp-3); font-size: var(--step-1); }
.prose img { border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); margin-block: var(--sp-3); }
.pill-note { font-family: var(--sans); font-size: var(--step--1); background: var(--paper-warm-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.9em 1.1em; color: var(--ink-soft); }

/* ------------------------------------------------------------------ footer */
.site-footer { background: var(--accent-ink); color: #cdd6dd; font-family: var(--sans); font-size: var(--step--1); padding-block: var(--sp-5) var(--sp-3); }
.site-footer a { color: #e7ecf0; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; gap: var(--sp-4); }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-brand__name { font-family: var(--serif); font-size: var(--step-1); color: #fff; margin-bottom: 0.2rem; }
.footer-brand__role { letter-spacing: 0.3em; text-transform: uppercase; font-size: 0.68rem; color: #9fb0bb; }
.site-footer h4 { color: #fff; font-family: var(--sans); font-size: var(--step--1); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: var(--sp-2); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.5rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); margin-top: var(--sp-4); padding-top: var(--sp-3); display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-3); justify-content: space-between; align-items: center; color: #9fb0bb; }
.footer-legal { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-3); }
.footer-credit { margin-top: var(--sp-3); padding-top: var(--sp-2); font-size: 0.72rem; letter-spacing: 0.04em; color: #7d8d98; text-align: center; }
.footer-credit strong { color: #b7c3cb; font-weight: 600; }
.footer-credit a { color: #b7c3cb; }
.social-row { display: flex; gap: var(--sp-2); margin-top: var(--sp-2); }
.social-row a { width: 36px; height: 36px; display: inline-grid; place-items: center; border: 1px solid rgba(255,255,255,0.18); border-radius: 999px; }
.social-row svg { width: 16px; fill: currentColor; }

/* ------------------------------------------------------------------ reveal animation
   Content is visible by default. Only when JS confirms it can animate
   (html.js-anim) do we hide-then-reveal, so no-JS and edge cases never
   end up with invisible content. */
.js-anim .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.js-anim .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js-anim .reveal { opacity: 1; transform: none; transition: none; } }

/* ------------------------------------------------------------------ skip link */
.skip-link { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 0.75em 1em; z-index: 100; font-family: var(--sans); border-radius: 0 0 var(--radius) 0; }
.skip-link:focus { left: 0; color: #fff; }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(120%);
  background: var(--ink); color: #fff; font-family: var(--sans); font-size: var(--step--1);
  padding: 0.9em 1.3em; border-radius: var(--radius); box-shadow: var(--shadow-md);
  z-index: 90; transition: transform 0.3s var(--ease); max-width: 90vw;
}
.toast.is-show { transform: translateX(-50%) translateY(0); }
.toast a { color: #fff; text-underline-offset: 3px; }
