/* Meet Me Gently V5 — free sampler */
@import url("/assets/brand.css");
*, *::before, *::after { box-sizing: border-box; }
:root {
  --bg:#FBF7EF; --panel:#fffdf8; --ink:#24201a; --ink-soft:#6a6152; --line:#e7ddc9;
  --steady:var(--brand-steady-face, #0A2472); --open:var(--brand-open-face, #E56A50); --reach:var(--brand-reach-face, #EA9E04); --repair:var(--brand-repair-face, #C51F2D);
  --steady-ink:var(--brand-steady-text, #0A2472); --open-ink:var(--brand-open-text, #B23A22); --reach-ink:var(--brand-reach-text, #8A5E00); --repair-ink:var(--brand-repair-text, #B01B28);
  --spicy-ink:var(--brand-spicy-face, #AE0000); --explicit-ink:var(--brand-explicit-text, #B0122E); --explicit:var(--brand-explicit-face, #1A0000);
  --sans:"Noto Sans",system-ui,-apple-system,Segoe UI,Roboto,sans-serif; --serif:"Noto Serif",Georgia,serif;
  --ease-out: cubic-bezier(.16,.84,.44,1); --ease-spring: cubic-bezier(.34,1.56,.64,1);
}
html, body { overflow-x: clip; } /* hard guarantee: no horizontal scroll */
body { margin:0; font-family:var(--sans); background:var(--bg); color:var(--ink);
  background-image: radial-gradient(120% 60% at 50% -10%, #fffef9, var(--bg) 60%); }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--brand-reach-face, #EA9E04); outline-offset: 2px; border-radius: 6px; }
h1,h2 { font-family:var(--serif); font-weight:600; line-height:1.14; margin: 0; }
.eyebrow { font:600 .74rem/1 var(--sans); letter-spacing:.2em; text-transform:uppercase; color:var(--ink-soft); margin:0 0 .8rem; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }

/* ---- persistent global header (replicated from the marketing site) ---- */
.site-header {
  position: sticky; top: 0; z-index: 41;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .85rem clamp(1rem, 4vw, 2.4rem);
  background: rgba(251,247,239,.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .brand { text-decoration: none; color: inherit; display: flex; align-items: center; gap: .55rem;
  font-weight: 700; font-family: var(--serif); }
.brand-mark { position:relative; display:grid; grid-template-columns:1fr 1fr; gap:2px; width:20px; height:20px; }
.brand-mark i { border-radius:2.5px; }
.brand-mark i:nth-child(1){background:var(--brand-steady-face, #0A2472); border-top-left-radius:7px;} .brand-mark i:nth-child(2){background:var(--brand-open-face, #E56A50); border-top-right-radius:7px;}
.brand-mark i:nth-child(3){background:var(--brand-reach-face, #EA9E04); border-bottom-left-radius:7px;} .brand-mark i:nth-child(4){background:var(--brand-repair-face, #C51F2D); border-bottom-right-radius:7px;}
.brand-mark::after { content:""; position:absolute; left:50%; top:50%; width:6px; height:6px; translate:-50% -50%; rotate:45deg; background:var(--bg); border-radius:1px; }
.brand-name em, .brand em { font-style:italic; }
nav#nav { display: flex; align-items: center; gap: clamp(.7rem, 1.8vw, 1.4rem); }
nav#nav a { text-decoration: none; font-size: .9rem; font-weight: 500; color: var(--ink-soft); transition: color .18s ease; }
nav#nav a:hover, nav#nav a:focus-visible { color: var(--ink); }
nav#nav a[aria-current="page"] { color: var(--ink); font-weight: 700; }
.nav-cta { background: var(--ink); color: #fff !important; padding: .5rem 1rem; border-radius: 999px; }
.menu-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 10px;
  font-size: 1.2rem; padding: .3rem .6rem; cursor: pointer; color: var(--ink); }
@media (max-width: 860px) {
  nav#nav { position: fixed; inset: 56px 0 auto; flex-direction: column; align-items: stretch;
    background: var(--panel); border-bottom: 1px solid var(--line); padding: 1rem 1.4rem; gap: .2rem;
    transform: translateY(-140%); visibility: hidden; z-index: 40;
    transition: transform .25s ease, visibility .25s ease; }
  nav#nav.open { transform: translateY(0); visibility: visible; }
  nav#nav a { padding: .7rem 0; font-size: 1rem; border-bottom: 1px solid var(--line); }
  .nav-cta { text-align: center; margin-top: .5rem; border-bottom: none !important; }
  .menu-toggle { display: block; }
}

main { max-width: 1080px; margin: 0 auto; padding: clamp(1.5rem,4vw,3rem) clamp(1.1rem,4vw,2rem); }
.intro { text-align:center; max-width: 680px; margin: 0 auto; }
.intro h1 { font-size: clamp(1.8rem,5vw,3rem); margin: 0 0 1rem; }
.lead { color:var(--ink-soft); font-size:1.08rem; margin: 0; }
.draw-area { margin: 2rem auto 0; display: grid; gap: 1.2rem; justify-items: center; }
.draw-card { width: 100%; max-width: 320px; min-height: 40px; }
.draw-actions { display: flex; gap: .7rem; flex-wrap: wrap; justify-content: center; }

/* The `hidden` ATTRIBUTE MUST WIN over any display rule below.
   Without this, `.btn { display:inline-flex }` beats the UA's `[hidden]{display:none}`
   on specificity, and `<button id="flipBtn" hidden>` renders anyway — so Flip was
   visible and clickable before a card had been drawn, and did nothing when pressed.
   That read as "the flip button is broken". Keep this rule above the display rules. */
[hidden] { display: none !important; }

.btn { display:inline-flex; align-items:center; justify-content:center; text-decoration:none; font-weight:600;
  padding:.8rem 1.6rem; border-radius:999px; cursor:pointer; border:1.5px solid transparent; font-size:.95rem;
  transition: transform .15s var(--ease-out), background .15s ease, color .15s ease, border-color .15s ease; }
.btn.primary { background:var(--steady); color:#fff; }
.btn.primary:hover { transform: translateY(-2px); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: #fff; }
.btn.ghost[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* ---- flip container: front (.mmg-card) / back (.mmg-back); never stretched — the box
   carries aspect-ratio:2.75/4.75 and both faces fill it at width:100% only. ---- */
.card-flip { position: relative; width: 100%; aspect-ratio: 2.75 / 4.75; perspective: 1600px; cursor: pointer; }
.card-flip__inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d;
  transition: transform .58s var(--ease-spring); }
.card-flip.is-flipped .card-flip__inner { transform: rotateY(180deg); }
.card-flip__face { position: absolute; inset: 0; width: 100%; height: 100%;
  backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.card-flip__face--back { transform: rotateY(180deg); }
.card-flip__face .mmg-card, .card-flip__face .mmg-back { width: 100%; }
.card-flip:focus-visible { outline: 3px solid var(--brand-reach-face, #EA9E04); outline-offset: 4px; border-radius: 4.545% / 2.632%; }

/* Dedicated real <button> flip control — small corner affordance, does not
   change card geometry. Screen-reader/keyboard users reach this via Tab; mouse
   users can still click anywhere on the card (see .card-flip click handler). */
.card-flip__btn {
  position: absolute; top: .5rem; right: .5rem; z-index: 3;
  width: 2.1rem; height: 2.1rem; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.85); border: 1.5px solid rgba(36,32,26,.22);
  color: var(--ink); font-size: 1.05rem; line-height: 1; cursor: pointer; padding: 0;
  transition: background .15s ease, transform .15s ease, border-color .15s ease;
}
.card-flip__btn:hover { background: #fff; transform: translateY(-1px); }
.card-flip__btn:focus-visible { outline: 3px solid var(--brand-reach-face, #EA9E04); outline-offset: 2px; }
.card-flip__btn[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
/* The face that is not currently shown is aria-hidden (and inert where supported);
   this belt-and-braces rule also keeps it out of the tab/click path visually. */
.card-flip__face[aria-hidden="true"] { pointer-events: none; }
/* Lazy-mount placeholder (see sampler.js mountCards): reserves the exact card
   footprint via the same .card-flip aspect-ratio, so nothing shifts on swap-in. */
.card-flip--pending { background: var(--line); border-radius: 4.545% / 2.632%; }

.draw-card .card-flip { box-shadow: 0 30px 70px -30px rgba(20,16,10,.55); animation: rise .3s ease; }
@keyframes rise { from { opacity:0; transform: translateY(12px); } to { opacity:1; transform:none; } }

.gallery-wrap { margin-top: clamp(3rem,7vw,5rem); }
.gallery-wrap h2 { text-align:center; font-size: clamp(1.4rem,3.5vw,2rem); margin-bottom: .6rem; }
.gallery-hint { text-align: center; color: var(--ink-soft); font-size: .88rem; margin: 0 0 2rem; }

.cat-group { margin: 0 0 clamp(2.2rem,5vw,3.2rem); }
.cat-group__head { display: flex; align-items: baseline; gap: .6rem; margin-bottom: 1.1rem;
  padding-bottom: .5rem; border-bottom: 2px solid var(--cat, var(--line)); }
.cat-group__head h3 { font-family: var(--serif); font-size: 1.2rem; color: var(--cat-ink, var(--ink)); margin: 0; }
.cat-group__count { color: var(--ink-soft); font-size: .82rem; }
.cat-badge { display: inline-block; font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: .18em .55em; border-radius: 999px; background: color-mix(in srgb, var(--cat-ink, var(--ink)) 16%, transparent);
  color: var(--cat-ink, var(--ink)); }
.afterdark-sub { margin-top: 1.4rem; }
.afterdark-sub__head { font: 600 .78rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-soft); margin: 0 0 .8rem; }

.gallery { display:grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; align-items: start; }
.gallery .card-flip { transition: transform .18s ease; }
.gallery .card-flip:hover { transform: translateY(-6px); }

.cta { text-align:center; margin: clamp(3rem,7vw,5rem) auto 0; max-width: 560px; background:var(--panel);
  border:1px solid var(--line); border-radius:18px; padding: 2.4rem 1.5rem; }
.cta h2 { font-size: clamp(1.4rem,3.5vw,2rem); margin:0 0 .6rem; }
.cta p { color:var(--ink-soft); margin: 0 0 1.4rem; }

/* ---- site footer (persistent) ---- */
.site-footer { position: relative; background: var(--panel); padding: 2.5rem clamp(1.1rem,4vw,2.4rem);
  text-align: center; border-top: 1px solid var(--line); margin-top: 3rem; }
.site-footer .brand { justify-content: center; margin-bottom: 1rem; display: flex; align-items: center; gap: .55rem;
  font-weight: 700; font-family: var(--serif); }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.2rem; margin-bottom: 1.2rem; }
.foot-links a { text-decoration: none; color: var(--ink-soft); font-size: .88rem; }
.foot-links a:hover, .foot-links a[aria-current="page"] { color: var(--ink); }
.fineprint { max-width: 60ch; margin: 0 auto; font-size: .78rem; color: var(--ink-soft); }

@media (max-width: 860px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 380px) { .gallery { grid-template-columns: 1fr; max-width: 300px; margin: 0 auto; } }
@media (prefers-reduced-motion: reduce) {
  .draw-card .card-flip, .cta, .gallery .card-flip { animation: none; }
  .btn:hover, .gallery .card-flip:hover { transform: none; }
  .card-flip__inner { transition: none; }
  * { scroll-behavior: auto; }
}

/* ---- waitlist form ------------------------------------------------------
   Ported verbatim from assets/site.css: the sampler does not load site.css,
   and an unstyled form here is worse than no form. Keep in sync if that
   block changes. */
.waitlist-form { display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: .6rem; max-width: 34rem; margin: 1.25rem auto 0; }
.waitlist-form input[type=email] { flex: 1 1 16rem; min-width: 0; padding: .7rem .9rem;
  border: 1px solid #C9BDA9; border-radius: 8px; background: #FFFDF8; font: inherit;
  font-size: 1rem; color: #2B2118; }
.waitlist-form input[type=email]:focus-visible { outline: 2px solid #0A2472; outline-offset: 1px; }
/* #6A6152 not #93887A: the latter is the footer's faint tone and only works on
   the footer's dark ground — on this light panel it measures 3.42:1, and this
   rule colours the waitlist success/error line. Kept in sync with the same
   block in assets/site.css. */
.waitlist-form .fineprint, .waitlist-status { flex: 1 0 100%; margin: .35rem 0 0;
  font-size: .8rem; line-height: 1.6; color: #6A6152; }
.waitlist-status:empty { display: none; }
.waitlist-status[data-state="success"], .waitlist-status[data-state="duplicate"] { color: #1E7A4C; font-weight: 600; }
.waitlist-status[data-state="error"], .waitlist-status[data-state="network"],
.waitlist-status[data-state="notopen"] { color: #B3261E; font-weight: 600; }

.ord-waitlist { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #E4DACA; }
.ord-waitlist__t { margin: 0 0 .5rem; font-weight: 700; font-size: .9rem; color: #2B2118; }
.ord-waitlist .waitlist-form { margin-top: 0; }

.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

@media (prefers-reduced-motion: no-preference) {

/* 18+ gate in front of the After Dark cards (sampler.js). */
.afterdark-gate { border: 1px dashed var(--line); border-radius: 18px; padding: 1.4rem 1.5rem;
  display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; align-items: center; justify-content: space-between; }
.afterdark-gate p { margin: 0; flex: 1 1 28ch; color: var(--ink-soft); }
