/* ==========================================================================
   Tastemade — Our Story
   Design tokens from Figma references (Home + Welcome + wireframes)
   ========================================================================== */

:root {
  --red:          #dc3238;
  --red-bright:   #e64247;
  --red-dark:     #a8242a;
  --beige:        #ebe9de;
  --beige-border: #e2ddcf;

  --text-1:       #211e1e;
  --text-2:       #393635;
  --text-3:       #6a6763;
  --text-inv:     #ffffff;

  --surf-0:       #fbfbf9;
  --surf-1:       #ffffff;
  --surf-2:       #f4f4f0;
  --surf-dark:    #211e1e;
  --surf-dark-2:  #2d2a29;

  --border:       #e2ddcf;
  --border-s:     #f4f4f0;

  --sh1: -2px 2px 12px 0 rgba(0,0,0,.04);
  --sh2: -4px 8px 24px -4px rgba(0,0,0,.10);
  --sh3: -8px 16px 40px -8px rgba(0,0,0,.14);

  --f-body:    "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --f-head:    "Archivo", "Inter", sans-serif;

  --pad:   80px;
  --max:   1440px;

  --r-s: 4px;
  --r-m: 8px;
  --r-l: 12px;
  --r-xl: 16px;
  --r-pill: 500px;
}

/* ── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-1);
  background-color: var(--surf-0);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a   { color: inherit; text-decoration: none; }
a.inline-link {
  color: var(--red); font-weight: 600; text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: left bottom;
  background-size: 0% 1.5px;
  transition: background-size .25s ease, color .2s ease;
}
a.inline-link:hover { color: var(--red-bright); background-size: 100% 1.5px; }
img { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--f-head); font-weight: 900; margin: 0; line-height: 1.15; letter-spacing: -.02em; }
p  { margin: 0; }
ul, ol { list-style: none; padding: 0; margin: 0; }
figure { margin: 0; }

/* ── Layout helpers ─────────────────────────────────────────────────────── */
.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 4px; height: 40px; padding: 0 16px;
  border-radius: var(--r-s); border: 0;
  font-family: var(--f-body); font-weight: 500; font-size: 14px;
  cursor: pointer; transition: background .15s, color .15s, transform .15s;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-bright); }
.btn-ghost { background: transparent; color: var(--text-1); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surf-2); }
.btn-lg { height: 52px; padding: 0 24px; font-size: 16px; }


/* ── Section base ───────────────────────────────────────────────────────── */
/* Sections use solid backgrounds to mask the body tile behind them */
.section       { padding: 80px 0; background: var(--surf-0); }
.section-alt   {
  background-color: var(--beige);
  /* Tile only in bottom third — linear-gradient masks the upper portion */
  background-image:
    linear-gradient(to bottom, var(--beige) 67%, transparent 67%),
    conic-gradient(var(--beige-border) 25%, transparent 25% 50%, var(--beige-border) 50% 75%, transparent 75%);
  background-size: 100% 100%, 32px 32px;
}
.section-dark  { background: var(--surf-dark); color: var(--text-inv); }

/* ── Chapter header (centered: pill, title, lede) ───────────────────────── */
.chapter-header { max-width: 960px; margin: 0 auto 56px; text-align: center; }
.chapter-range {
  display: inline-block; margin-bottom: 20px;
  padding: 6px 16px; border-radius: var(--r-pill);
  background: var(--surf-1);
  border: 1px solid var(--red); color: var(--red);
  font-family: var(--f-body); font-size: 12px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
}
.chapter-title { font-size: clamp(32px, 3.4vw, 48px); margin-bottom: 12px; }
.chapter-lede  { font-size: 16px; color: var(--text-3); line-height: 1.55; }
.section-alt .chapter-range,
.today-section .chapter-range { background: var(--surf-0); }
.chapter-header-dark .chapter-range { background: var(--surf-dark-2); color: #fff; border-color: rgba(255,255,255,.4); }
.chapter-header-dark .chapter-lede  { color: rgba(255,255,255,.72); }
.chapter-header-wide { margin-bottom: 80px; }

/* ── Inline rule used inside 2016-2017 splits ───────────────────────────── */
.divider-rule {
  height: 1px; background: var(--border); margin: 80px 0;
}

/* ── SEPARATORS (tablecloth stripes) ────────────────────────────────────── */
.separator {
  height: 32px;
  background-image: repeating-linear-gradient(
    90deg,
    var(--beige-border) 0px, var(--beige-border) 16px,
    var(--beige) 16px, var(--beige) 32px
  );
}
/* Red stripes — use when transitioning to/from a dark section */
.separator-red {
  background-image: repeating-linear-gradient(
    90deg,
    #c22b30 0px, #c22b30 16px,
    var(--red) 16px, var(--red) 32px
  );
}
/* Dark stripes — use when leaving the dark video strip */
.separator-dark {
  background-image: repeating-linear-gradient(
    90deg,
    var(--surf-dark) 0px, var(--surf-dark) 16px,
    var(--surf-dark-2) 16px, var(--surf-dark-2) 32px
  );
}

/* ── HERO ───────────────────────────────────────────────────────────────── */
.hero {
  background: var(--red-bright);
  padding: 112px var(--pad) 128px;
  color: #fff; text-align: center;
  position: relative; overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.hero-bg img.active { opacity: 0.16; }
.hero-inner { position: relative; z-index: 1; }
.hero-title {
  font-size: 48px; line-height: 1.2;
  font-family: var(--f-head); font-weight: 900;
  letter-spacing: 0; margin-bottom: 28px;
  text-transform: uppercase;
  text-shadow: -2px 2px 12px rgba(0,0,0,0.04);
}
.hero-sub { font-size: 20px; line-height: 1.5; font-weight: 500; color: #fff; margin: 0 auto; text-shadow: -2px 2px 12px rgba(0,0,0,0.04); }

/* ── 2012 — ORIGIN ──────────────────────────────────────────────────────── */
.origin-section { padding: 96px 0 80px; }

.origin-grid {
  display: grid;
  grid-template-columns: 160px 1fr 440px;
  gap: 64px;
  align-items: start;
}

.year-label {
  display: flex; flex-direction: column; gap: 10px; align-items: flex-end;
}
.year-pill { margin-bottom: 0; }
.year-caption {
  font-size: 11px; font-weight: 600; color: var(--red);
  letter-spacing: .2em; text-transform: uppercase;
  margin-top: 6px; text-align: right;
}

.prose h2 { font-size: clamp(28px, 2.6vw, 38px); margin-bottom: 20px; max-width: 22ch; }
.prose p  { font-size: 16px; line-height: 1.65; color: var(--text-2); margin-bottom: 14px; }

.callout {
  margin: 24px 0 0; padding: 20px 24px;
  background-color: var(--surf-1);
  background-image: radial-gradient(circle, rgba(0,0,0,0.03) 1px, transparent 1px);
  background-size: 6px 6px;
  border-left: 4px solid var(--red);
  border-radius: 0 var(--r-m) var(--r-m) 0;
  font-family: var(--f-head); font-weight: 700; font-size: 18px;
  color: var(--text-1); line-height: 1.45;
  box-shadow: var(--sh1);
}

.origin-photo {
  border-radius: 3px; overflow: hidden;
  box-shadow: var(--sh3);
  background: var(--surf-1);
  padding: 8px 8px 0;
  transition: transform .25s, box-shadow .25s;
}
.origin-photo:hover { transform: translateY(-3px); }
.origin-photo img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover; object-position: center; display: block;
}
.origin-photo figcaption {
  padding: 10px 8px 16px; font-size: 12px; color: var(--text-3);
  font-style: italic;
}

/* ── LOOPING VIDEOS — 5-tile strip ──────────────────────────────────────── */
.loop-strip { background: var(--surf-dark); padding: 24px 0; overflow: hidden; }
.loop-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  padding: 0 var(--pad);
  max-width: var(--max); margin: 0 auto;
}
.loop-tile {
  aspect-ratio: 16/9;
  background-size: cover; background-position: center;
  border-radius: var(--r-m);
  position: relative;
  overflow: hidden;
  transition: transform .3s ease, opacity .3s ease;
  will-change: transform; /* keep compositing layer so border-radius stays stable on hover */
}
.loop-row:has(.loop-tile:hover) .loop-tile { opacity: 0.5; }
.loop-row:has(.loop-tile:hover) .loop-tile:hover { opacity: 1; transform: scale(1.05); }
.loop-tile video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.loop-tile::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,.5) 100%);
}

/* Hover-only pause/play button for all autoplaying videos */
.autoplay-pause-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  z-index: 3;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s, background .15s;
  line-height: 1;
  backdrop-filter: blur(4px);
}
.loop-tile:hover .autoplay-pause-btn,
.story-card-split-video:hover .autoplay-pause-btn { opacity: 1; }
.autoplay-pause-btn:hover { background: rgba(0,0,0,0.75); }

/* Inline loop strip — same tiles/hover as .loop-strip but no dark background,
   sits inside a .section > .container so it uses negative margins to go full-width.
   overflow-x: clip (not hidden) clips the marquee track horizontally without creating a BFC,
   so overflow-y: visible lets scaled/hovered tiles paint above & below without being clipped
   to a sharp rectangular edge (which would make border-radius appear to change on hover). */
.loop-strip-inline {
  overflow-x: clip;
  overflow-y: visible;
  margin: 56px calc(-1 * var(--pad)) 0;
}

/* ── BENTO GRID (2013-2015) ─────────────────────────────────────────────── */
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.bento-cell { border-radius: var(--r-l); }

.story-card {
  background: var(--surf-1);
  border: 1px solid var(--border);
  padding: 28px;
  box-shadow: var(--sh1);
  transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.story-card:hover,
.stat-row:hover { transform: translateY(-2px); box-shadow: var(--sh2); }
.story-tag {
  display: inline-block;
  align-self: flex-start; /* prevent flex-column parent from stretching it full-width */
  font-size: 11px; font-weight: 600; color: var(--red);
  letter-spacing: .14em; text-transform: uppercase;
  margin-bottom: 12px;
  background: rgba(220, 50, 56, 0.07);
  border: 1px solid rgba(220, 50, 56, 0.18);
  padding: 3px 10px;
  border-radius: var(--r-pill);
}
/* Reset pill style in dark awards panel — sits on a dark bg */
.awards-stats .story-tag {
  background: transparent;
  border: none;
  padding: 0;
}
.story-card h3 { font-size: 22px; line-height: 1.22; margin-bottom: 10px; }
.story-card p  { font-size: 16px; line-height: 1.6; color: var(--text-2); }

.bento-span-2 { grid-column: span 2; }

/* Snapchat + Coke ad — merged split card */
.story-card-split {
  flex-direction: row;
  align-items: stretch;
  gap: 0;
  padding: 0;
  overflow: hidden;
}
.story-card-split-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 28px;
}
.story-card-split-video {
  flex: 0 0 140px;
  width: 140px;
  align-self: stretch;
  border-radius: var(--r-l) 0 0 var(--r-l);
  overflow: hidden;
  background: var(--surf-dark);
  position: relative;
}
.story-card-split-video video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Photo cells */
.bento-photo {
  position: relative; overflow: hidden; min-height: 220px;
  background-size: cover; background-position: center;
  transition: transform .2s, box-shadow .2s;
}
.bento-photo:hover { transform: translateY(-2px); box-shadow: var(--sh2); }
.bento-photo-gallivant {
  background-image: url("assets/2026%20About%20Us%20Photos/Gallivant-2015_15-09-24_21-27-10_MG_2193_%C2%A9RyanTanaka2015.jpg");
}
.bento-photo-team {
  background-image: url("assets/2026%20About%20Us%20Photos/Breakfast%20Nook%20-%20tape%20on%20monitors.jpg");
  min-height: 160px;
}

/* Awards combo cell */
.awards-cell { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.awards-top  { padding: 28px 28px 20px; }
.awards-top h3 { font-size: 20px; line-height: 1.22; margin-bottom: 8px; }
.awards-stats {
  margin-top: auto;
  background: var(--surf-dark); color: var(--text-inv);
  display: flex; flex-direction: column; gap: 12px;
  padding: 18px 22px;
}
.awards-stats .story-tag {
  font-size: 11px;
  color: rgba(255,255,255,.5);
  margin-bottom: 0;
}
.awards-stats-row {
  display: grid; grid-template-columns: auto 1fr;
  gap: 16px; align-items: center;
}
.awards-total { display: flex; flex-direction: column; line-height: 1; }
.awards-num   { font-family: var(--f-head); font-weight: 900; font-size: 26px; color: var(--red-bright); letter-spacing: -.02em; }
.awards-lbl   { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.7); margin-top: 4px; }
.awards-list  { display: flex; gap: 14px; justify-content: flex-end; flex-wrap: wrap; }
.awards-list li {
  display: flex; flex-direction: column; line-height: 1.1;
  border-left: 1px solid rgba(255,255,255,.15); padding-left: 14px;
}
.aw-n { font-family: var(--f-head); font-weight: 700; font-size: 14px; color: #fff; }
.aw-l { font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.6); margin-top: 3px; }

/* Wide $300M stat row (bottom of bento) */
.stat-row {
  display: flex; align-items: center; gap: 32px; flex-wrap: wrap;
  background: var(--surf-dark); color: var(--text-inv);
  padding: 28px 36px;
  box-shadow: var(--sh2);
  transition: transform .2s, box-shadow .2s;
}
.stat-row .stat-num {
  font-family: var(--f-head); font-weight: 900; font-size: 52px;
  line-height: 1; color: var(--red-bright); letter-spacing: -.03em; white-space: nowrap;
}
.stat-row .stat-label { font-size: 16px; color: rgba(255,255,255,.8); line-height: 1.5; flex: 1; min-width: 280px; }

/* ── FEATURE SPLITS (2016-2017) ─────────────────────────────────────────── */
.feature-split {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 64px; align-items: center;
}

.feature-eyebrow { display: block; font-size: 11px; font-weight: 600; color: var(--red); letter-spacing: .14em; text-transform: uppercase; margin-bottom: 12px; }
.feature-copy h3 { font-size: clamp(26px, 2.4vw, 34px); line-height: 1.15; margin-bottom: 16px; max-width: 20ch; }
.feature-copy p  { font-size: 16px; color: var(--text-2); line-height: 1.65; margin-bottom: 14px; }

.feature-photo {
  border-radius: 3px; overflow: hidden;
  box-shadow: var(--sh3);
  background: var(--surf-1);
  padding: 8px 8px 0;
  transition: transform .2s, box-shadow .2s;
}
.feature-photo:hover { transform: translateY(-3px); }
.feature-photo img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.feature-photo figcaption {
  padding: 10px 8px 16px; font-size: 12px; color: var(--text-3);
  font-style: italic;
}

/* Stat pills row */
.stat-pills {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-top: 20px;
}
.stat-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 6px;
  background: var(--surf-1);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  font-size: 12px; font-weight: 500; color: var(--text-2);
  text-transform: uppercase; letter-spacing: .04em;
}
.pill-num {
  font-family: var(--f-head); font-weight: 900; font-size: 15px;
  color: #fff; background: var(--red);
  padding: 3px 12px; border-radius: var(--r-pill);
  letter-spacing: -.01em; text-transform: none;
}
.pill-lbl { color: var(--text-3); }


/* ── DARK BENTO (2018-2022) ─────────────────────────────────────────────── */
.dark-bento {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  align-items: center;
}
.dark-card {
  background: var(--surf-dark-2); border-radius: var(--r-l);
  padding: 32px; border: 1px solid rgba(255,255,255,.07);
  display: flex; flex-direction: column;
}
.dark-tag { display: block; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--red-bright); margin-bottom: 12px; }
.dark-card h3 { font-size: 22px; color: var(--text-inv); margin-bottom: 12px; line-height: 1.25; }
.dark-card p  { font-size: 16px; color: rgba(255,255,255,.72); line-height: 1.6; }

.dark-photo-card {
  position: relative; overflow: hidden; padding: 0; min-height: 320px;
  background-size: cover; background-position: center;
}
.dark-photo-bb {
  background-image: url("assets/2026%20About%20Us%20Photos/BB-S2-Junket-02.jpg");
}
.dark-photo-card figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 20px 24px;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.85) 100%);
  font-size: 13px; color: rgba(255,255,255,.92); line-height: 1.4;
}

.dark-video-card { padding: 0; overflow: hidden; display: flex; aspect-ratio: 16/9; }
.dark-video-card iframe {
  display: block;
  width: 100%;
  height: 100%;
  flex: 1;
  border: none;
}

/* ── TIMELINE (2023-2025) ───────────────────────────────────────────────── */
.timeline {
  max-width: 1120px; margin: 0 auto;
  padding-left: 8px;
}
.timeline-item {
  display: grid;
  grid-template-columns: 120px 32px 1fr;
  gap: 24px;
  padding: 24px 0 40px;
}

.timeline-date {
  font-family: var(--f-head); font-weight: 900; font-size: 18px;
  color: var(--red); letter-spacing: .04em; text-transform: uppercase;
  text-align: right; line-height: 1.2;
}

.timeline-track {
  position: relative;
  width: 32px;
}
.timeline-track::before {
  content: ""; position: absolute;
  left: 50%; top: -32px; bottom: -32px;
  width: 2px; transform: translateX(-50%);
  background: var(--border);
}
.timeline-item:first-child .timeline-track::before { top: 16px; }
.timeline-item:last-child  .timeline-track::before { bottom: calc(100% - 16px); }
.timeline-dot {
  position: absolute; left: 50%; top: 11px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--beige-border);
  transform: translateX(-50%);
}
.timeline-item-featured .timeline-dot {
  width: 18px; height: 18px;
  background: var(--red);
  box-shadow: 0 0 0 5px rgba(220,50,56,.16);
  top: 7px;
  transform: translateX(-50%);
}

.timeline-body h3 { font-size: 26px; line-height: 1.2; margin-bottom: 8px; }
.timeline-body p  { font-size: 16px; color: var(--text-2); line-height: 1.6; overflow-wrap: break-word; margin-bottom: 8px; }

.callout-feature {
  margin: 0; padding: 24px 28px;
  background: var(--surf-1);
  border-left: 4px solid var(--red);
  border-radius: 0 var(--r-m) var(--r-m) 0;
  box-shadow: var(--sh2);
}
.callout-feature h3 { font-family: var(--f-head); font-weight: 900; font-size: 24px; margin-bottom: 8px; line-height: 1.2; }
.callout-feature p  { font-size: 16px; color: var(--text-2); line-height: 1.6; }

.callout-halftone { position: relative; overflow: hidden; isolation: isolate; }
.callout-halftone::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background-image: radial-gradient(circle, rgba(0,0,0,0.15) 1px, transparent 1px);
  background-size: 6px 6px;
  mix-blend-mode: multiply;
  opacity: 0.15;
  pointer-events: none;
}
.callout-halftone > * { position: relative; z-index: 1; }

/* Two-column layout inside the Joining Wonder callout */
.callout-inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
@media (min-width: 760px) {
  .callout-inner {
    flex-direction: row;
    align-items: center;
    gap: 32px;
  }
  .callout-text {
    flex: 1;
    min-width: 0;
  }
  .callout-inner .callout-wsj-img {
    flex: 0 0 45%;
    max-width: 45%;
    margin: 0;
  }
}

/* WSJ screenshot inside the Joining Wonder callout — natural aspect ratio, no cropping */
.callout-wsj-img {
  margin: 0;
  border-radius: var(--r-s);
  overflow: hidden;
  max-width: 480px;
  border: 1px solid var(--border);
}
.callout-wsj-img img {
  display: block;
  width: 100%;
  height: auto; /* preserve screenshot's natural aspect ratio so text stays legible */
}


/* Timeline thumbnail groups */
.tl-thumbs { display: grid; gap: 12px; margin-top: 8px; }
.tl-thumbs-1 { grid-template-columns: minmax(0, 440px); }
.tl-thumbs-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 720px; }
.tl-thumbs-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.tl-thumb {
  border-radius: 3px; overflow: hidden;
  box-shadow: var(--sh2);
  background: var(--surf-1);
  padding: 6px 6px 0;
}
.tl-thumb img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.tl-thumbs-square .tl-thumb img { aspect-ratio: 1/1; }
.tl-thumb figcaption {
  padding: 8px 6px 12px; font-size: 11px; color: var(--text-3);
  font-style: italic;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tl-thumb-sm figcaption { font-size: 10.5px; padding: 6px 6px 10px; }

/* ── TODAY (Pull up a chair) ────────────────────────────────────────────── */
.today-section {
  background-color: var(--beige);
  background-image:
    linear-gradient(to right, var(--beige) 75%, transparent 75%),
    conic-gradient(var(--beige-border) 25%, transparent 25% 50%, var(--beige-border) 50% 75%, transparent 75%);
  background-size: 100% 100%, 32px 32px;
  padding: 96px 0;
}

.today-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

/* Left column: text stack */
.today-text { display: flex; flex-direction: column; }
.today-text > .chapter-range { display: block; width: fit-content; margin-bottom: 20px; }
.today-text > .chapter-title { font-size: clamp(36px, 4vw, 54px); margin-bottom: 16px; }
.today-subhead { font-size: 20px; font-weight: 600; color: var(--text-1); line-height: 1.4; margin: 0 0 24px; }

.today-copy {
  font-size: 16px; line-height: 1.65; color: var(--text-2);
  margin-bottom: 16px;
}
.today-copy-close { margin-bottom: 0; }

.today-cta {
  margin-top: 36px;
  display: flex; gap: 12px; flex-wrap: wrap;
}
.today-cta .btn-ghost { background: var(--beige-border); border-color: #d5d0c1; }
.today-cta .btn-ghost:hover { background: #e9e5d8; border-color: #dedad0; }

/* Right column: photo collage — feature on top full-width, two below */
.today-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.today-photo-feature {
  grid-column: 1 / 3;
  border-radius: 3px; overflow: hidden;
  box-shadow: var(--sh3);
  background: var(--surf-1);
  padding: 8px 8px 0;
  transition: transform .25s, box-shadow .25s;
}
.today-photo-feature:hover { transform: translateY(-3px); }
.today-photo-feature img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.today-photo-feature figcaption {
  padding: 10px 8px 16px; font-size: 12px; color: var(--text-3);
  font-style: italic;
}

.today-photo-stack {
  border-radius: 3px; overflow: hidden;
  box-shadow: var(--sh3);
  background: var(--surf-1);
  padding: 8px 8px 0;
  transition: transform .25s, box-shadow .25s;
}
.today-photo-stack:hover { transform: translateY(-3px); }
.today-photo-stack img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.today-photo-stack img.crop-top { object-position: top center; }
.today-photo-stack figcaption {
  padding: 10px 8px 16px; font-size: 12px; color: var(--text-3);
  font-style: italic;
}


/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1200px) {
  :root { --pad: 48px; }
  .origin-grid { grid-template-columns: 140px 1fr 360px; gap: 40px; }
  .timeline { max-width: 100%; }
}

@media (max-width: 960px) {
  :root { --pad: 16px; }

  /* Hero */
  .hero { padding: 64px var(--pad); text-align: center; }

  /* Origin: single column, order = year → image → prose */
  .origin-grid { grid-template-columns: 1fr; gap: 32px; }
  /* Year label on mobile */
  .year-label { flex-direction: column; gap: 6px; align-items: flex-start; }
  /* Photo above prose on mobile */
  .origin-photo { order: 1; }
  .prose { order: 2; }
  .origin-photo img { aspect-ratio: 4/3; }

  /* Loop strip → auto-scrolling marquee */
  .loop-strip { overflow: hidden; }
  .loop-strip-inline { overflow-x: clip; overflow-y: visible; }
  .loop-row {
    display: flex;
    overflow-x: visible;
    padding: 0 0 0 16px;
    gap: 12px;
    width: max-content;
    animation: loop-scroll 28s linear infinite;
  }
  .loop-tile {
    flex-shrink: 0;
    width: 240px;
    aspect-ratio: 16/9;
  }
  .loop-strip:hover .loop-row,
  .loop-strip-inline:hover .loop-row { animation-play-state: paused; }
  .loop-row:has(.loop-tile.touch-active) .loop-tile { opacity: 0.5; }
  .loop-row:has(.loop-tile.touch-active) .loop-tile.touch-active { opacity: 1; transform: scale(1.05); }

  /* Bento: single column, spans reset */
  .bento { grid-template-columns: 1fr; }
  .bento-span-2 { grid-column: span 1; }
  .bento-photo { min-height: 240px; }
  .bento-photo-team { min-height: 200px; }

  /* Awards stats wrap */
  .awards-stats { grid-template-columns: 1fr; gap: 12px; }
  .awards-list { justify-content: flex-start; }

  /* Feature splits: single column, text first → image below */
  .feature-split { grid-template-columns: 1fr; direction: ltr; gap: 24px; }
  .feature-split .feature-photo { order: 1; }

  /* Dark bento: single column */
  .dark-bento { grid-template-columns: 1fr; }
  .dark-photo-card { min-height: 280px; }
  .dark-video-card { aspect-ratio: 16/9; }

  /* Timeline: dot-track left gutter, year above body */
  .timeline-item {
    grid-template-columns: 32px 1fr;
    gap: 16px 20px;
  }
  .timeline-date {
    grid-column: 2; grid-row: 1;
    text-align: left; font-size: 14px; padding-top: 0;
  }
  .timeline-track { grid-column: 1; grid-row: 1 / span 2; }
  .timeline-body  { grid-column: 2; grid-row: 2; min-width: 0; }
  .timeline-body h3 { font-size: 22px; }

  /* Cooking App + LAWFF: horizontal scroll carousels on mobile */
  .tl-thumbs-5,
  .tl-thumbs-2 {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden; /* setting overflow-x:auto implicitly makes overflow-y:auto — lock it to prevent vertical scroll */
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 10px;
    /* vertical padding gives shadows room before the overflow-y:hidden clip boundary;
       top margin is reduced by the same amount so the visual position stays the same */
    margin: 12px calc(-1 * var(--pad)) 0;
    padding: 8px var(--pad) 32px;
    scrollbar-width: none;
  }
  .tl-thumbs-5::-webkit-scrollbar,
  .tl-thumbs-2::-webkit-scrollbar { display: none; }
  .tl-thumbs-5 .tl-thumb { flex: 0 0 42%; scroll-snap-align: start; min-width: 0; }
  .tl-thumbs-2 .tl-thumb { flex: 0 0 82%; scroll-snap-align: start; min-width: 0; }
  /* Keep square ratio for app images in scroll */
  .tl-thumbs-square .tl-thumb img { aspect-ratio: 1/1; }

  /* Today: single column on mobile — switch to bottom-third tile */
  .today-layout { grid-template-columns: 1fr; gap: 40px; }
  /* Checkerboard is anchored to .today-photos::before — remove it from the section bg */
  .today-section { background-image: none; }
  .today-text > .chapter-title { font-size: clamp(32px, 8vw, 44px); }

  /* Today photos: 3-column row when space allows; carousel takes over at ≤640px */
  .today-photos {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    min-width: 0;    /* stacking context so ::before (z-index:-1) sits above section bg
       but below the photo cards */
    position: relative;
    z-index: 0;
  }
  /* Checkerboard: starts at the vertical midpoint of the photos,
     extends left/right to viewport edges, and down through the section bottom padding */
  .today-photos::before {
    content: '';
    position: absolute;
    top: 50%;
    left: calc(-1 * var(--pad));
    right: calc(-1 * var(--pad));
    bottom: -64px;
    background-image: conic-gradient(var(--beige-border) 25%, transparent 25% 50%, var(--beige-border) 50% 75%, transparent 75%);
    background-size: 32px 32px;
    z-index: -1;
    pointer-events: none;
  }
  .today-photo-feature { grid-column: unset; }
  .today-photo-feature img,
  .today-photo-stack img { aspect-ratio: 4/3; }

  /* Closing copy: larger and bolder on mobile */
  .today-copy-close {
    font-size: 16px; font-weight: 600;
    color: var(--text-1); line-height: 1.5;
  }

  /* Chapter header: left-align on mobile */
  .chapter-header { text-align: left; }
  .chapter-range { display: inline-block; }

  /* Sections */
  .section { padding: 64px 0; }
  .origin-section { padding: 64px 0; }
  .today-section { padding: 64px 0; }
  .chapter-header { margin-bottom: 40px; }
  .divider-rule { margin: 40px 0; }
}

/* LAWFF 2-up: once wide enough, drop the scroll and show both images in a grid */
@media (min-width: 600px) and (max-width: 960px) {
  .tl-thumbs-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow-x: visible;
    scroll-snap-type: none;
    margin: 20px 0 0;
    padding: 0;
  }
  .tl-thumbs-2 .tl-thumb { flex: unset; scroll-snap-align: none; }
}

@media (max-width: 640px) {
  /* Today photos → horizontal peek carousel — breaks out of container padding */
  .today-photos {
    display: block;
    position: relative;
    width: calc(100% + 2 * var(--pad));
    margin-left: calc(-1 * var(--pad));
    margin-right: calc(-1 * var(--pad));
    min-width: 0; /* prevent grid-item min-size blowout expanding the 1fr track */
  }
  /* Pile is full-bleed (left edge = viewport left), so ::before uses 0 not -var(--pad) */
  .today-photos::before {
    left: 0;
    right: 0;
  }
  /* Clip wrapper: clips track horizontally only — overflow-x:clip (not hidden)
     lets vertical overflow (box-shadows, hover lift) paint freely */
  .today-photos-clip {
    overflow-x: clip;
    overflow-y: visible;
    position: relative;
  }
  /* Track created by JS */
  .today-photos-track {
    display: flex;
    gap: 16px;
    will-change: transform;
  }
  .today-photos figure {
    flex: 0 0 auto; /* width set by JS */
    position: relative;
    margin: 0;
    cursor: pointer;
    touch-action: manipulation;
  }
  /* Carousel controls */
  .pile-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-top: 16px;
    z-index: 5;
  }
  .pile-dots { display: flex; gap: 10px; align-items: center; }
  .pile-dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: #fff;
    border: none;
    cursor: pointer;
    transition: background .25s, transform .25s, border-color .25s;
  }
  .pile-dot.active { background: var(--red); border-color: var(--red); transform: scale(1.3); }
}

@media (max-width: 560px) {
  :root { --pad: 16px; }
  .hero-title { font-size: 36px; }
  .hero-sub { font-size: 16px; }

  .bento { grid-template-columns: 1fr; }
  .bento-span-2 { grid-column: span 1; }

  /* Split card: text on top, video below */
  .story-card-split { flex-direction: column; }
  .story-card-split-text { order: 1; padding: 28px; }
  .story-card-split-video {
    order: 2;
    flex: none;
    width: 100%;
    max-width: 100%;
    min-height: 200px;
    border-radius: 0 0 var(--r-l) var(--r-l);
  }

  .stat-row .stat-num { font-size: 40px; }
  .stat-row { gap: 8px; }

  .tl-thumbs-5, .tl-thumbs-2 { grid-template-columns: 1fr; }
}

@keyframes loop-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
