/* ==========================================================================
   Sister Sister — frontend shell (Launch A)
   DESIGN.md §2 visual foundations · mobile-first · no build step

   TOKEN ASSUMPTION (flagged): DESIGN.md §2.1 locks only --pink (#FF87E2)
   and says the cream/mint/ink values come from the approved prototype.
   No approved prototype was available to this build, so the values below
   are tasteful stand-ins for founder review before final visual QA.
   ========================================================================== */

:root {
  /* ---- Color tokens ---- */
  --bg: #FAF5EC;            /* warm cream page background        (assumed) */
  --surface: #FFFDF8;       /* warm off-white panels/sheets      (assumed) */
  --surface-sunk: #F1E9D8; /* quiet chip rests, skeletons        (assumed) */
  --mint: #DDEFD9;          /* supporting informational surface  (assumed) */
  --mint-strong: #C4E3BE;   /* mint hover / pressed              (assumed) */
  --pink: #FF87E2;          /* LOCKED — active state, primary action */
  --pink-pressed: #F062C8;  /* darker pressed pink               (assumed) */
  --ink: #17130E;           /* near-black text / strong borders  (assumed) */
  --ink-muted: #5C544A;     /* secondary copy                    (assumed) */
  --ink-faint: #998F81;     /* past dates, tertiary info         (assumed) */
  --line: #E4DCC9;          /* quiet dividers                    (assumed) */
  --focus: #1D4ED8;         /* high-contrast focus — NOT pink    (assumed) */
  --status-warn: #B45309;   /* sold out / postponed              (assumed) */
  --status-stop: #B91C1C;   /* cancelled                         (assumed) */

  /* ---- Spacing scale ---- */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  --s-14: 56px;
  --s-20: 80px;

  --gutter: 16px;            /* mobile */
  --bottomnav-h: 68px;       /* mobile bottom nav visual height */

  /* ---- Typography ---- */
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia,
    "Times New Roman", serif;
  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ==========================================================================
   Reset / base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;                 /* sustained body copy ≥16px on mobile */
  line-height: 1.5;
  padding-bottom: calc(var(--bottomnav-h) + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 1024px) {
  body { padding-bottom: 0; }
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

/* Pink rule §2.2: pink is never small body text. Enforce by never styling
   text pink unless it is a large, paired selected-state label (see nav). */

/* ---- Focus: visible, high-contrast, never pink (§19.3) ---- */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---- Skip link (keyboard, §19.4) ---- */
.ss-skip {
  position: absolute;
  left: var(--s-4);
  top: -100px;
  z-index: 200;
  background: var(--ink);
  color: var(--surface);
  padding: var(--s-3) var(--s-4);
  border-radius: 8px;
  font-weight: 600;
}
.ss-skip:focus-visible { top: var(--s-4); }

/* ---- Type roles (§2.3) ---- */
.ss-display { font-family: var(--font-display); }
.ss-context-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;      /* only for short labels (§2.3) */
  color: var(--ink-muted);
}
.ss-meta {
  font-variant-numeric: tabular-nums;   /* logistics: time/price (§2.3) */
  color: var(--ink-muted);
  font-size: 14px;
}

/* ==========================================================================
   Layout containers (§2.4)
   ========================================================================== */
.ss-wrap {
  width: 100%;
  max-width: 1200px;                 /* discovery width */
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.ss-wrap--read { max-width: 720px; }  /* long reading / profile story */

@media (min-width: 640px) {
  :root { --gutter: 24px; }
}
@media (min-width: 1024px) {
  :root { --gutter: 32px; }
}

/* ==========================================================================
   Header — desktop (§4.2)
   ========================================================================== */
.ss-header { display: none; }

@media (min-width: 1024px) {
  .ss-header {
    display: block;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
    position: sticky;
    top: 0;
    z-index: 50;
  }
  .ss-header-inner {
    display: flex;
    align-items: center;
    gap: var(--s-6);
    height: 64px;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: var(--gutter);
    padding-right: var(--gutter);
  }
  .ss-header-left { display: flex; align-items: center; gap: var(--s-6); }
  .ss-header-center {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.25;
  }
  .ss-header-center .ss-context-label { color: var(--ink); }
  .ss-header-center time {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--ink-muted);
    text-transform: uppercase;
  }
  .ss-header-right { display: flex; align-items: center; gap: var(--s-2); }
  .ss-header-nav { display: flex; gap: var(--s-5); }
}

/* Wordmark (§2.3 display role: identity) */
.ss-wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.14em;
  text-decoration: none;
  white-space: nowrap;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/* Desktop header nav links — active pairs pink fill + weight (§2.2) */
.ss-header-link {
  text-decoration: none;
  font-weight: 500;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 var(--s-3);
  border-radius: 999px;
  border: 1px solid transparent;
}
.ss-header-link.is-active {
  background: var(--pink);
  color: var(--ink);              /* text on pink is near-black */
  font-weight: 700;
  border-color: var(--ink);
}

/* ==========================================================================
   Mobile top bar (§4.3) — identity + location/date context only
   ========================================================================== */
.ss-topbar {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) var(--gutter);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  min-height: 56px;
}
.ss-topbar .ss-wordmark { font-size: 17px; }
.ss-topbar-context {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  white-space: nowrap;
  /* 2026-09-29: the date ran off the edge on narrow phones — let it shrink
     with an ellipsis instead of overflowing. */
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
@media (min-width: 1024px) {
  .ss-topbar { display: none; }
}

/* ==========================================================================
   Mobile bottom navigation (§4.3)
   ========================================================================== */
.ss-bottomnav {
  display: flex;
  align-items: stretch;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 100;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  min-height: calc(var(--bottomnav-h) + env(safe-area-inset-bottom, 0px));
}
.ss-bnav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: var(--bottomnav-h);
  text-decoration: none;
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.ss-bnav-item .icon { width: 24px; height: 24px; }

/* Active destination: pink + bold + filled reinforcement (§2.2, §4.3).
   Icon fill pairs with weight so state reads in grayscale. */
.ss-bnav-item.is-active { color: var(--ink); }
.ss-bnav-item.is-active .icon {
  background: var(--pink);
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 4px;
  width: 32px;
  height: 32px;
}

/* Create: raised pink center action, black + glyph */
.ss-bnav-create {
  flex: 0 0 auto;
  align-self: center;
  width: 56px;
  height: 56px;
  margin: -20px var(--s-2) 0;
  border-radius: 50%;
  background: var(--pink);
  border: 2px solid var(--ink);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ss-bnav-create .icon { width: 28px; height: 28px; stroke-width: 2.5; }
.ss-bnav-create:active { background: var(--pink-pressed); }

@media (min-width: 1024px) {
  .ss-bottomnav { display: none; }
}

/* ==========================================================================
   Footer (§4.5)
   ========================================================================== */
.ss-footer {
  border-top: 1px solid var(--line);
  margin-top: var(--s-14);
  padding-top: var(--s-8);
  padding-bottom: var(--s-8);
  background: var(--bg);
}
.ss-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
}
.ss-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-5);
  font-size: 14px;
}
.ss-footer-nav a { font-weight: 500; min-height: 44px; display: inline-flex; align-items: center; }
.ss-footer-quiet { color: var(--ink-faint); min-height: 44px; display: inline-flex; align-items: center; }
.ss-footer-note {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ==========================================================================
   Buttons (§2.6)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 44px;               /* §2.6 / §19.2 */
  min-width: 44px;
  padding: var(--s-3) var(--s-5);
  border-radius: 12px;
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid var(--ink);
  transition: background-color 150ms ease, transform 150ms ease;  /* §17.1 */
}
.btn-primary {
  background: var(--pink);
  color: var(--ink);              /* text on pink is near-black (§2.2) */
}
.btn-primary:active { background: var(--pink-pressed); }
.btn-secondary {
  background: var(--surface);
  color: var(--ink);
}
.btn-secondary:active { background: var(--surface-sunk); }
.btn-quiet {
  background: transparent;
  border-color: transparent;
  color: var(--ink);
  padding-left: var(--s-3);
  padding-right: var(--s-3);
}
.btn-quiet:active { background: var(--surface-sunk); }

.btn .icon { width: 20px; height: 20px; }

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   Toast (§17.3) — one at a time, never over the bottom nav
   ========================================================================== */
.ss-toast-region {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--bottomnav-h) + env(safe-area-inset-bottom, 0px) + var(--s-4));
  z-index: 150;
  width: max-content;
  max-width: calc(100vw - 2 * var(--gutter));
  pointer-events: none;
}
.ss-toast {
  background: var(--ink);
  color: var(--surface);
  font-size: 14px;
  font-weight: 500;
  padding: var(--s-3) var(--s-4);
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(23, 19, 14, 0.25);   /* floating layer only (§2.5) */
  text-align: center;
}
@media (min-width: 1024px) {
  .ss-toast-region { bottom: var(--s-6); }
}

/* ==========================================================================
   Generic icon sizing
   ========================================================================== */
.icon { width: 24px; height: 24px; flex: none; }

/* Small-text pink guardrail (§2.2): any component author tempted to set
   body text pink should use one of these instead. */
.ss-on-pink { background: var(--pink); color: var(--ink); }

/* ==========================================================================
   Typographic image fallback (founder-approved 2026-09-29)
   Media URLs in the dataset are source attributions (bare domains, event or
   product page links) — never real image files. Wherever an event image was
   attempted but isn't a usable image file, the event's own title is set in
   large type instead of rendering a broken <img>. Nothing is invented.
   ========================================================================== */
.tfallback {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: var(--s-2);
  padding: var(--s-4);
  background: var(--surface-sunk);
  border-top: 3px solid var(--pink);
  color: var(--ink);
  height: 100%;
  overflow: hidden;
}
.tfallback-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.tfallback-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* Featured slot: match the 16/9 image it replaces, with larger type. */
.featured > a { display: block; height: 100%; }
.featured .tfallback { aspect-ratio: 16 / 9; }
.featured .tfallback-title { font-size: 1.75rem; }
@media (min-width: 48rem) {
  .featured .tfallback { aspect-ratio: auto; }
}
/* List-view thumbs (4.5rem) and map results (72px): compact, no kicker. */
.ss-thumb .tfallback {
  padding: var(--s-2);
  border-top-width: 2px;
  justify-content: center;
}
.ss-thumb .tfallback-kicker { display: none; }
.ss-thumb .tfallback-title {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  line-height: 1.25;
  -webkit-line-clamp: 3;
}
.map-result .tfallback {
  width: 72px;
  height: 72px;
  padding: var(--s-2);
  border-top-width: 2px;
  border-radius: 8px;
  justify-content: center;
  flex: none;
}
.map-result .tfallback-kicker { display: none; }
.map-result .tfallback-title {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  line-height: 1.25;
  -webkit-line-clamp: 3;
}

/* ==========================================================================
   Click-to-play event video (founder direction 2026-09-30)
   A declared, playable clip from the event page leads the card the way a
   feed video card plays: native controls, no autoplay, poster until played.
   Dense rows show the poster with a play badge instead of a tiny player.
   ========================================================================== */
.ss-video {
  background: #111;
}
.ss-video video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 70vh;
  background: #111;
}
.ev-hero .ss-video {
  border-radius: 12px;
  overflow: hidden;
}
.video-tease {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.video-tease img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video-play-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.video-play-badge > span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--pink);
  color: #111;
  font-size: 0.8rem;
  line-height: 1;
  padding-left: 0.15rem;
}
.ss-thumb .video-play-badge > span {
  width: 1.5rem;
  height: 1.5rem;
  font-size: 0.6rem;
}
