/* ==========================================================================
   SudokuPacking — site styles
   Colors, fonts and the hard offset shadow are ported 1:1 from the app's
   theme/tokens.ts so the site and the app read as one product.
   ========================================================================== */

:root {
  --ink: #38291f;
  --muted: #63513f;
  --paper: #fff4e5;
  --card: #fffaf1;
  --teal: #207a70;
  --mint: #cfeee7;
  --coral: #ec6847;
  --coral-dark: #d75337;
  --sky: #cde9f4;
  --yellow: #ffd86a;
  --line: rgba(87, 54, 34, 0.14);
  --dot: #e8ab95;
  --card-soft: rgba(255, 250, 241, 0.72);
  --nav-glass: rgba(255, 244, 229, 0.91);
  --piece-top: rgba(207, 238, 231, 0.28);
  --piece-bottom: rgba(205, 233, 244, 0.25);
  --piece-layer: rgba(255, 216, 106, 0.14);
  --thumb-bg: #eeeae2;
  /* The app's translucent row tints, flattened onto the card colour */
  --piece-top-solid: #f2f8f4;
  --piece-bottom-solid: #f2f7f9;
  --piece-layer-solid: #fdf7e9;

  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 22px;
  --r-pill: 999px;

  --shadow: 6px 7px 0 var(--ink);
  --shadow-sm: 3px 4px 0 var(--ink);
  --max: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--paper);
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: 22px 22px;
  color: var(--ink);
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.3rem, 7vw, 4rem); color: var(--coral-dark); font-weight: 900; }
h2 { font-size: clamp(1.7rem, 4.4vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 2.6vw, 1.4rem); }

p { margin: 0 0 1.1em; }

a { color: var(--teal); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--coral-dark); }

.wrap {
  width: min(100% - 40px, var(--max));
  margin-inline: auto;
}

.narrow { width: min(100% - 40px, 760px); margin-inline: auto; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-glass);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 2px solid var(--ink);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 900;
  font-size: 1.2rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.brand:hover { color: var(--ink); }

/* Brand lockup — coral sudoku square + yellow hanger disc, ported from
   components/Brand.tsx (mark 28, hanger 22, offsets 18/13, rotations -5/+5). */

.brand-mark {
  position: relative;
  width: 44px;
  height: 38px;
  flex: none;
}

.brand-mark .sq {
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  background: var(--coral);
  border: 1.5px solid var(--ink);
  border-radius: 9px;
  transform: rotate(-5deg);
  box-shadow: 2px 2px 0 var(--ink);
  display: grid;
  grid-template-columns: repeat(3, 3px);
  grid-template-rows: repeat(3, 3px);
  gap: 2.2px;
  place-content: center;
}

.brand-mark .sq i { background: #fff; border-radius: 1px; }

.brand-mark .disc {
  position: absolute;
  left: 18px;
  top: 13px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--yellow);
  border: 1.5px solid var(--ink);
  box-shadow: 1.5px 2px 0 var(--ink);
  transform: rotate(5deg);
  display: grid;
  place-items: center;
}

.brand-mark .disc svg { width: 14px; height: 14px; display: block; }

.brand .word { transform: rotate(-0.5deg); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-weight: 700;
  font-size: 0.95rem;
}

.nav-links a { color: var(--ink); text-decoration: none; }
.nav-links a:hover { color: var(--coral-dark); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 24px;
  border: 2px solid var(--ink);
  border-radius: var(--r-pill);
  background: var(--coral);
  color: #fff;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  cursor: pointer;
}

.btn:hover { color: #fff; transform: translate(-1px, -2px); box-shadow: 5px 6px 0 var(--ink); }
.btn:active { transform: translate(2px, 3px); box-shadow: 1px 1px 0 var(--ink); }

.btn-ghost { background: var(--card); color: var(--ink); }
.btn-ghost:hover { color: var(--ink); }

.btn-soon {
  background: var(--ink);
  color: var(--paper);
  cursor: default;
}
.btn-soon:hover { color: var(--paper); transform: none; box-shadow: var(--shadow-sm); }
.btn-soon:active { transform: none; box-shadow: var(--shadow-sm); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 2px solid var(--ink);
  border-radius: var(--r-pill);
  background: var(--yellow);
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---------- Hero ---------- */

.hero { padding: 72px 0 56px; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero p.lede {
  font-size: 1.18rem;
  color: var(--muted);
  max-width: 52ch;
}

.hero-note {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 14px;
}

/* The grid editor card — mirrors the app's Grid screen */

.grid-demo {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow);
  padding: 18px;
}

.grid-demo-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.grid-demo-head .plan {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 900;
  font-size: 1.05rem;
}

.grid-demo-head .count {
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: var(--r-pill);
  padding: 3px 11px;
}

.grid-row { margin-bottom: 12px; }
.grid-row:last-of-type { margin-bottom: 0; }

.row-label {
  font-weight: 900;
  font-size: 0.63rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.row-label::after {
  content: '';
  flex: 1;
  height: 1.5px;
  background: var(--line);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.cell {
  aspect-ratio: 3 / 4;
  border: 1.5px solid var(--ink);
  border-radius: var(--r-md);
  background: var(--thumb-bg, #eeeae2);
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 5px;
}

.cell img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.cell.top { background: var(--piece-top-solid); }
.cell.bottom { background: var(--piece-bottom-solid); }
.cell.layer { background: var(--piece-layer-solid); }

.grid-demo-foot {
  margin-top: 15px;
  padding-top: 13px;
  border-top: 2px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 900;
  font-size: 1.15rem;
}

.grid-demo-foot em {
  font-style: normal;
  color: var(--coral-dark);
  font-size: 1.8rem;
}

/* ---------- Combo reels (slot machine) ---------- */

.reels-card {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow);
  padding: 24px;
  max-width: 460px;
  margin-inline: auto;
}

.reels {
  display: flex;
  gap: 8px;
}

.reel {
  flex: 1;
  border: 1.5px solid var(--ink);
  border-radius: 17px;
  background: var(--card);
  overflow: hidden;
  box-shadow: 2px 3px 0 rgba(56, 41, 31, 0.45);
  height: 148px;
  position: relative;
}

.reel-track { will-change: transform; }

.reel-item {
  height: 148px;
  display: grid;
  place-items: center;
  padding: 8px 7px;
}

.reel-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.reel-labels {
  display: flex;
  gap: 8px;
  margin-top: 7px;
}

.reel-labels span {
  flex: 1;
  text-align: center;
  font-weight: 900;
  font-size: 0.56rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
}

.reels-status {
  text-align: center;
  margin: 18px 0 0;
  min-height: 2.9em;
}

.reels-status .look {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 900;
  font-size: 1.15rem;
  display: block;
  margin-bottom: 2px;
}

.reels-status .sub {
  font-size: 0.85rem;
  color: var(--muted);
}

.reels-card .btn { width: 100%; margin-top: 14px; }

/* ---------- TikTok origin ---------- */

.origin {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 44px;
  align-items: center;
  background: var(--mint);
  border: 2px solid var(--ink);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow);
  padding: 46px 42px;
  overflow: hidden;
}

/* Warm wash so the mint block does not read flat */
.origin::before {
  content: '';
  position: absolute;
  right: -140px;
  top: -160px;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  /* soft glow, not a hard disc — a solid circle reads as a colour split on mobile */
  background: radial-gradient(circle, rgba(255, 216, 106, 0.62) 0%, rgba(255, 216, 106, 0.28) 45%, rgba(255, 216, 106, 0) 72%);
  pointer-events: none;
}

.origin > * { position: relative; }

.origin-flag {
  display: inline-block;
  margin-bottom: 14px;
  /* deeper than --coral so the small uppercase label clears 4.5:1 */
  background: #c9452a;
  color: #fff;
  border: 2px solid var(--ink);
  border-radius: var(--r-pill);
  box-shadow: 2px 3px 0 var(--ink);
  padding: 5px 16px;
  font-weight: 900;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transform: rotate(-2deg);
}

.origin h2 {
  color: var(--ink);
  margin-bottom: 0.4em;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.origin p {
  color: var(--ink);
  font-size: 1.06rem;
}

.origin p:last-child { margin-bottom: 0; }

.origin-kicker {
  font-weight: 800;
  border-left: 4px solid var(--coral);
  padding-left: 14px;
}

.origin-quote {
  position: relative;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--r-lg);
  padding: 30px 28px 24px;
  box-shadow: var(--shadow);
  transform: rotate(1.4deg);
}

.origin-quote .qmark {
  position: absolute;
  top: -20px;
  left: 18px;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 900;
  font-size: 5rem;
  line-height: 1;
  color: var(--coral);
}

.origin-quote blockquote {
  margin: 0 0 14px;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.34;
  color: var(--ink);
}

.origin-quote cite {
  font-style: normal;
  font-size: 0.85rem;
  font-weight: 800;
  color: #a83a24;
}

/* ---------- Sections ---------- */

section { padding: 56px 0; }

.section-head { max-width: 62ch; margin-bottom: 34px; }
.section-head p { color: var(--muted); margin-bottom: 0; }

.eyebrow {
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 10px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}

.card {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: 26px 24px;
}

.card h3 { margin-bottom: 0.4em; }
.card p { color: var(--muted); margin-bottom: 0; font-size: 0.98rem; }

.step-num {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: var(--r-pill);
  background: var(--yellow);
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 900;
  margin-bottom: 14px;
}

.card.tinted-mint { background: var(--mint); }
.card.tinted-sky { background: var(--sky); }
.card.tinted-yellow { background: var(--yellow); }

.card.tinted-mint p,
.card.tinted-sky p,
.card.tinted-yellow p { color: var(--ink); }

/* Big stat band */

.band {
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r-xl);
  padding: 40px 32px;
  text-align: center;
}

.band h2 { color: var(--paper); }
.band p { color: rgba(255, 244, 229, 0.88); margin: 0 auto; max-width: 56ch; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 24px;
  margin-top: 30px;
}

.stat .n {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 900;
  font-size: 2.6rem;
  color: var(--yellow);
  line-height: 1;
}

.stat .l {
  font-size: 0.88rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(255, 244, 229, 0.85);
}

/* FAQ */

.faq-wrap .faq-list { max-width: 780px; }

details.faq {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  padding: 16px 20px;
  margin-bottom: 14px;
}

details.faq summary {
  font-weight: 800;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: '+';
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--coral-dark);
  flex: none;
}
details.faq[open] summary::after { content: '\2013'; }
details.faq p { margin: 12px 0 2px; color: var(--muted); font-size: 0.97rem; }

/* CTA block */

.cta {
  /* A shade deeper than --coral so white body text clears 4.5:1 */
  background: #c9452a;
  border: 2px solid var(--ink);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow);
  padding: 44px 32px;
  text-align: center;
  color: #fff;
}

.cta h2 { color: #fff; }
.cta p { color: rgba(255, 255, 255, 0.95); max-width: 50ch; margin-inline: auto; }
.cta .btn-row { justify-content: center; margin-top: 24px; }

/* ---------- Legal / long-form pages ---------- */

.page-head {
  padding: 56px 0 26px;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 40px;
}

.page-head h1 { font-size: clamp(2rem, 5.5vw, 3rem); margin-bottom: 0.25em; }
.page-head .updated { color: var(--muted); font-size: 0.94rem; margin: 0; }

.legal { padding-bottom: 60px; }
.legal h2 {
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  margin-top: 2em;
  padding-top: 0.6em;
  border-top: 2px solid var(--line);
}
.legal h2:first-of-type { margin-top: 0; border-top: 0; padding-top: 0; }
.legal h3 { font-size: 1.1rem; margin-top: 1.6em; }
.legal ul, .legal ol { padding-left: 22px; margin: 0 0 1.1em; }
.legal li { margin-bottom: 0.5em; }
.legal strong { font-weight: 800; }

.toc {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: 22px 26px;
  margin-bottom: 36px;
}
.toc h2 {
  font-size: 0.82rem !important;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border: 0 !important;
  margin: 0 0 12px !important;
  padding: 0 !important;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
}
.toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 30px; }
.toc li { margin-bottom: 6px; break-inside: avoid; }

.callout {
  background: var(--mint);
  border: 2px solid var(--ink);
  border-radius: var(--r-md);
  padding: 18px 22px;
  margin: 24px 0;
}
.callout p:last-child { margin-bottom: 0; }
.callout.warn { background: var(--yellow); }

.contact-card {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 30px 28px;
  text-align: center;
  margin: 10px 0 40px;
}
.contact-card h3 { margin-bottom: 0.3em; }
.contact-card p { color: var(--muted); }
.contact-card .email {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 900;
  font-size: clamp(1.1rem, 3.4vw, 1.5rem);
  word-break: break-word;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 2px solid var(--ink);
  background: var(--card-soft);
  padding: 44px 0 34px;
  margin-top: 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
  margin-bottom: 30px;
}

.footer-grid h4 {
  font-family: 'Nunito', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 800;
  margin-bottom: 12px;
}

.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 9px; }
.footer-grid a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 0.95rem; }
.footer-grid a:hover { color: var(--coral-dark); text-decoration: underline; }
.footer-blurb { color: var(--muted); font-size: 0.95rem; max-width: 34ch; margin: 12px 0 0; }

.footer-bottom {
  border-top: 2px solid var(--line);
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.88rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 38px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .toc ol { columns: 1; }
  .origin { grid-template-columns: 1fr; gap: 30px; padding: 38px 24px 32px; }
  .origin::before { right: -180px; top: -210px; width: 420px; height: 420px; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .hero { padding: 44px 0 36px; }
  section { padding: 40px 0; }
  .nav-links { gap: 14px; font-size: 0.88rem; }
  .nav-links .hide-sm { display: none; }
  .btn { width: 100%; }
  .btn-row { flex-direction: column; align-items: stretch; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .cta, .band { padding: 32px 22px; }
  .grid-demo { padding: 14px; }
  .reels-card { padding: 18px; }
  .reel, .reel-item { height: 124px; }
  .origin-quote { transform: none; padding: 28px 22px 20px; }
  .origin-quote blockquote { font-size: 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Variant A: live look highlighting in the hero grid ---------- */

.grid-demo.is-live .cell {
  transition: opacity 0.45s ease, box-shadow 0.35s ease, border-color 0.35s ease, transform 0.35s ease;
  opacity: 0.38;
}

.grid-demo.is-live .cell.is-on {
  opacity: 1;
  border-color: var(--ink);
  box-shadow: 3px 4px 0 var(--coral);
  transform: translate(-1px, -2px);
}

.look-strip {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 2px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.look-thumbs {
  display: flex;
  gap: 6px;
}

.look-thumb {
  width: 42px;
  height: 46px;
  border: 1.5px solid var(--ink);
  border-radius: 9px;
  background: var(--thumb-bg);
  display: grid;
  place-items: center;
  padding: 3px;
  overflow: hidden;
}

.look-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.look-label {
  text-align: right;
  line-height: 1.15;
}

.look-label strong {
  display: block;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 900;
  font-size: 1.3rem;
  color: var(--coral-dark);
}

.look-label span {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  .grid-demo.is-live .cell { transition: none; }
}

/* ---------- Variant B: grid + reels side by side ---------- */

.hero-stack .hero-copy {
  max-width: 62ch;
  margin-bottom: 40px;
}

.hero-duo {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 26px;
  align-items: center;
}

.hero-duo .reel,
.hero-duo .reel-item { height: 190px; }

.hero-duo .grid-demo,
.hero-duo .reels-card { margin: 0; max-width: none; }

.hero-duo .reels-card { padding: 20px; }

.duo-tag {
  font-weight: 900;
  font-size: 0.63rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 6px;
}

@media (max-width: 900px) {
  .hero-duo { grid-template-columns: 1fr; gap: 20px; }
}

/* ---------- Compact hero: centred copy, grid + reels side by side ---------- */

.hero-compact { padding: 18px 0 22px; }

.hero-compact h1 {
  font-size: clamp(1.95rem, 4.2vw, 2.65rem);
  margin-bottom: 0.3em;
}

.hero-copy.centered {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 20px;
}

.hero-copy.centered .lede {
  font-size: 1.02rem;
  max-width: 52ch;
  margin: 0 auto 16px;
}

.hero-copy.centered .btn-row { justify-content: center; }
.hero-copy.centered .badge { margin-bottom: 11px; }
.hero-compact .hero-note { margin-top: 10px; margin-bottom: 0; font-size: 0.8rem; }

.hero-compact .hero-duo {
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 690px;
  margin-inline: auto;
  align-items: stretch;
}

/* Square tiles rather than the app's 3:4, purely to keep the hero short */
.hero-compact .cell { aspect-ratio: 1 / 1; }
.hero-compact .reel,
.hero-compact .reel-item { height: 218px; }

.hero-compact .hero-duo > div { display: flex; }
.hero-compact .grid-demo,
.hero-compact .reels-card { flex: 1; padding: 12px; }

/* Tighter grid card */

.hero-compact .grid-demo-head { margin-bottom: 7px; }
.hero-compact .grid-demo-head .plan { font-size: 0.92rem; }
.hero-compact .grid-demo-head .count { font-size: 0.6rem; padding: 2px 9px; }
.hero-compact .grid-row { margin-bottom: 6px; }
.hero-compact .row-label { font-size: 0.53rem; margin-bottom: 3px; letter-spacing: 0.12em; }
.hero-compact .grid-3 { gap: 6px; }
.hero-compact .cell { border-radius: 9px; padding: 3px; }

/* Tighter reels card */

.reels-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.reels-head .plan {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 900;
  font-size: 0.92rem;
}

.reels-head .count {
  font-weight: 800;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: var(--r-pill);
  padding: 2px 9px;
}

.hero-compact .reels-card {
  display: flex;
  flex-direction: column;
  max-width: none;
}

.hero-compact .reels { gap: 6px; }
.hero-compact .reel { border-radius: 13px; }
.hero-compact .reel-labels { margin-top: 5px; }

.hero-compact .reels-status {
  margin: auto 0 0;
  padding-top: 12px;
  min-height: 0;
}

.hero-compact .reels-status .look { font-size: 1rem; }
.hero-compact .reels-status .sub { font-size: 0.78rem; }
.hero-compact .reels-card .btn { margin-top: 9px; padding: 10px 20px; }

@media (max-width: 900px) {
  .hero-compact .hero-duo { grid-template-columns: 1fr; gap: 18px; }
  .hero-compact .hero-duo > div { display: block; }
}

@media (max-width: 620px) {
  .hero-compact { padding: 24px 0 30px; }
  .hero-copy.centered { margin-bottom: 22px; }
}

/* ==========================================================================
   Mobile pass — fits 320px+, 44px tap targets, no text under 12px
   ========================================================================== */

/* Long emails and URLs must never force a horizontal scrollbar */
body { overflow-wrap: break-word; }
.legal a, .footer-grid a, .contact-card .email { word-break: break-word; }

@media (max-width: 620px) {
  /* The legal pages carry three nav links; shrink the lockup so they fit 360px */
  .brand { font-size: 1.05rem; gap: 7px; }
  .brand-mark { transform: scale(0.84); transform-origin: left center; width: 37px; }
  .nav { padding: 8px 0; gap: 10px; }
  .nav-links { gap: 13px; font-size: 0.87rem; }

  /* 44px tap targets */
  .nav-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; }
  .brand { min-height: 44px; }

  details.faq { padding: 6px 18px; }
  details.faq summary { min-height: 46px; padding: 10px 0; }
  details.faq p { margin-top: 4px; }

  .toc li { margin-bottom: 4px; }
  .toc a { display: inline-block; padding: 7px 0; }

  .footer-grid li { margin-bottom: 2px; }
  .footer-grid a { display: inline-block; padding: 14px 0; }

  .contact-card .email a { display: inline-block; padding: 8px 0; }
  .legal li { margin-bottom: 0.7em; }

  /* Nothing under 12px */
  .grid-demo-head .count,
  .reels-head .count,
  .hero-compact .grid-demo-head .count { font-size: 0.76rem; padding: 3px 10px; }
  .hero-compact .row-label { font-size: 0.68rem; letter-spacing: 0.1em; }
  .reel-labels span { font-size: 0.66rem; }
  .origin-flag { font-size: 0.76rem; padding: 6px 15px; }
  .eyebrow { font-size: 0.78rem; }
  .badge { font-size: 0.78rem; }
  .footer-bottom { font-size: 0.85rem; }
  .page-head .updated { font-size: 0.95rem; }

  /* The two hero cards are full width when stacked, so the pieces can breathe */
  .hero-compact .hero-duo { max-width: none; }
  .hero-compact .reel,
  .hero-compact .reel-item { height: 210px; }
}

@media (max-width: 340px) {
  /* Very narrow phones: mark only, no wordmark */
  .brand .word { display: none; }
}

@media (max-width: 380px) {
  /* Squeeze the three-link nav on the legal pages onto one line at 360px */
  .wrap { width: min(100% - 28px, var(--max)); }
  .narrow { width: min(100% - 28px, 760px); }
  .brand { font-size: 0.98rem; gap: 5px; }
  .nav-links { gap: 11px; font-size: 0.83rem; }
}
