/* ============================================================
   CELL 1 · Morning on Main (HERO) — scoped under #cell-1.
   Bright Main-Street-morning anchor: wordmark + stamp masthead,
   "Morning / on Main." signature headline, daypart toggle, marigold
   VIEW MENU, hours cue, appetite tray (real Milo Sampler), and the
   full-width ticket value-rail. Light-dominant (T2.34), alive at t0.
   Kill-gate: whole at 100% zoom @ 1440 / 1280 / 390.
   ============================================================ */

#cell-1 {
  /* full-viewport hero, but content-height wins if it needs more room
     (no clipping — kill-gate law). nav is fixed, so pad the top. */
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-block: calc(var(--nav-h) + var(--space-l)) var(--space-l);
  overflow: hidden;
}
/* a faint warm sun-wash behind the whole hero (ambient, at rest) */
#cell-1::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 78% 8%, rgba(255, 240, 214, 0.75), transparent 55%),
    radial-gradient(90% 70% at 8% 4%, rgba(76, 181, 200, 0.06), transparent 60%);
  z-index: 0;
}

#cell-1 .c1 {
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  gap: clamp(1.5rem, 1rem + 2vw, 2.75rem);
}

/* ---- masthead: wordmark lockup + PORTLAND TN stamp ---- */
#cell-1 .c1__masthead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-m);
}

/* CSS text lockup — crisper than the near-square PNG at this scale;
   matches the mockup: teal "Milo" + tracked "COFFEE HOUSE" + place line. */
#cell-1 .c1-wordmark { display: grid; gap: 0.12em; line-height: 1; }
#cell-1 .c1-wordmark__name {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 1.6rem + 3vw, 3.6rem);
  color: var(--accent);
  letter-spacing: 0.005em;
}
#cell-1 .c1-wordmark__sub {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(0.72rem, 0.62rem + 0.4vw, 0.92rem);
  text-transform: uppercase;
  letter-spacing: 0.34em;
  color: var(--ink);
  padding-left: 0.12em;
}
#cell-1 .c1-wordmark__place {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin-top: 0.35em;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--support);
}
#cell-1 .c1-wordmark__dash {
  width: 18px;
  height: 1.5px;
  background: var(--support);
  opacity: 0.75;
}

/* the round "MADE · PORTLAND · TN" rubber stamp */
#cell-1 .c1-stamp {
  flex: 0 0 auto;
  display: grid;
  place-content: center;
  gap: 0.05em;
  width: clamp(88px, 8vw, 108px);
  height: clamp(88px, 8vw, 108px);
  border-radius: 50%;
  border: 2px solid var(--teal-deep);
  color: var(--teal-deep);
  text-align: center;
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  box-shadow: inset 0 0 0 3px rgba(31, 109, 121, 0.14);
  opacity: 0.92;
}
#cell-1 .c1-stamp__l1 { font-size: 0.62rem; letter-spacing: 0.2em; }
#cell-1 .c1-stamp__l2 { font-size: 0.82rem; letter-spacing: 0.08em; }
#cell-1 .c1-stamp__l3 { font-size: 0.62rem; letter-spacing: 0.24em; }

/* ---- body: two columns (pitch | tray) ---- */
#cell-1 .c1__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  align-items: center;
  gap: clamp(1.75rem, 1rem + 3vw, 3.5rem);
}

/* LEFT column */
#cell-1 .c1__left { display: grid; gap: var(--space-s); align-content: center; }

/* the little sun rule above the headline (mockup) */
#cell-1 .c1__rule {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75em;
  max-width: 26rem;
  color: var(--paper-line-strong);
}
#cell-1 .c1__rule-line { height: 1px; background: currentColor; }
#cell-1 .c1__rule-sun { display: inline-flex; color: var(--support); }

/* the signature headline — line 1 ink roman, line 2 marigold italic + period */
#cell-1 .c1__headline {
  margin: 0;
  font-size: var(--step-hero);
  line-height: 0.92;
  letter-spacing: -0.01em;
}
#cell-1 .c1__headline-1,
#cell-1 .c1__headline-2 { display: block; }
#cell-1 .c1__headline-1 { color: var(--ink); }
#cell-1 .c1__headline-2 .em { font-style: italic; color: var(--support); }

#cell-1 .c1__lede {
  max-width: 34ch;
  color: var(--ink-soft);
  font-size: clamp(1rem, 0.95rem + 0.35vw, 1.18rem);
  line-height: 1.5;
}

/* daypart toggle + cue */
#cell-1 .c1__toggle { display: grid; gap: 0.55rem; margin-top: 0.15rem; }
#cell-1 .c1__daypart { gap: 0; padding: 4px; width: max-content; max-width: 100%;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid var(--paper-line);
  border-radius: 999px;
}
/* segmented look: chips sit flush inside the pill track */
#cell-1 .c1__daypart .daypart-chip {
  border: 1px solid transparent;
  background: transparent;
  min-height: 40px;
}
#cell-1 .c1__daypart .daypart-chip.is-active {
  /* deeper teal so the small uppercase label clears AA (white on #1f6d79 = 5.73:1;
     the lighter --accent fill was only 2.31:1 = FAIL). Keeps the teal identity. */
  background: var(--teal-deep);
  color: var(--paper-raised);
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(31, 109, 121, 0.22);
}
#cell-1 .c1__chip-glyph { flex: 0 0 auto; }
#cell-1 .c1__daypart-cue {
  font-size: 0.82rem;
  color: var(--ink-soft);
  padding-left: 0.25rem;
  min-height: 1.2em;
}

/* primary CTA + secondary cue */
#cell-1 .c1__cta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.9rem 1.1rem;
  margin-top: 0.35rem;
}
#cell-1 .c1__btn {
  min-height: 52px;
  padding: 0 1.7em;
  font-size: 0.94rem;
  letter-spacing: 0.1em;
  box-shadow: 0 12px 26px rgba(201, 114, 59, 0.26);
}
#cell-1 .c1__btn-icon { margin-right: 0.15em; }
#cell-1 .c1__cta-cue {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--teal-deep);
}

/* hours cue — small, verified, broad */
#cell-1 .c1__hours {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  margin-top: 0.15rem;
  font-size: 0.86rem;
  color: var(--ink-soft);
}
#cell-1 .c1__hours-icon { color: var(--support); flex: 0 0 auto; }

/* ---- RIGHT column: the appetite tray ---- */
#cell-1 .c1__right { position: relative; }
#cell-1 .c1__tray {
  position: relative;
  border-radius: calc(var(--radius) + 6px);
  padding: clamp(0.7rem, 0.4rem + 1vw, 1.1rem);
  background:
    linear-gradient(150deg, #fffaf1 0%, #f3e8d5 100%);
  border: 1px solid var(--paper-line);
  box-shadow: var(--shadow);
}
/* an enamel-tray inner rim */
#cell-1 .c1__tray::after {
  content: "";
  position: absolute;
  inset: clamp(0.7rem, 0.4rem + 1vw, 1.1rem);
  border-radius: var(--radius);
  border: 1.5px solid rgba(31, 109, 121, 0.16);
  pointer-events: none;
  z-index: 3;
}
#cell-1 .c1__plate {
  aspect-ratio: 4 / 3.35;
  border-radius: var(--radius);
  box-shadow: none;
}
/* hero photo = the DAY-GRADED sampler (dark granite counter lifted to warm
   bright morning; food unchanged — see partial). Bias the square-image crop
   DOWN toward the plate so even less of the (now warm) counter shows, and add
   a gentle warm polish so the hero seat reads bright + appetizing (C4). */
#cell-1 .c1__plate > img {
  object-position: 50% 64%;
  filter: saturate(1.05) contrast(1.02) brightness(1.02);
}

/* "That's Milo" ticket card — a CSS card, NOT a photo, NOT a claim.
   Seated on the tray's TOP-LEFT corner, overhanging UP + LEFT partly OUTSIDE
   the frame. That corner is the calm image area — clean warm counter, above
   the fruit bowl; the plated food sits center/right. It no longer covers any
   food: the hero photo stays fully visible (T2.8 / T2.18). Compact + lifted
   so it reads as a ticket card resting on the tray edge. */
#cell-1 .c1__sign {
  position: absolute;
  /* rests on the tray's top-left corner, overhanging up+left over the calm page
     field — clear of the plate. (The figure is now a SIBLING of the tray, so the
     tray's amb-sun overflow:hidden no longer shears it — audit clip fix.) */
  top: clamp(-0.9rem, -1.9vw, -1.5rem);
  left: clamp(-0.85rem, -1.9vw, -1.5rem);
  z-index: 4;
  width: clamp(7.25rem, 5.75rem + 3.2vw, 9rem);
  padding: 0.72rem 0.88rem 0.64rem;
  text-align: center;
  transform: rotate(-2.4deg);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.5), transparent 45%),
    var(--paper-raised);
  box-shadow: 0 14px 30px rgba(86, 63, 43, 0.18);
}
#cell-1 .c1__sign-lines {
  display: grid;
  gap: 0.12em;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(0.74rem, 0.66rem + 0.3vw, 0.9rem);
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--teal-deep);
}
#cell-1 .c1__sign-mark {
  display: block;
  margin-top: 0.32em;
  font-size: clamp(1.1rem, 0.9rem + 0.7vw, 1.42rem);
  color: var(--support);
}

/* ============================================================
   THE TICKET VALUE-RAIL — a REAL torn order-slip.
   Not a flat bar: the top + bottom edges are PUNCHED with real half-circle
   perforations bitten out via a CSS radial-gradient mask (so the paper edge
   is scalloped, not straight); a dashed "tear-here" perforation column sits
   at every chip seam; and the teal MILO stub reads as a stamped tear-off tab
   (dashed tear-line on its detach edge + inset stamp ring). The whole slip
   casts an edge-following drop-shadow. This is the hero's signature (WOW C6).
   --perf: punched-notch radius · --perf-gap: pitch between notches.
   ============================================================ */
#cell-1 .c1__rail {
  --perf: 7px;                 /* punched-notch radius */
  --perf-gap: 22px;            /* pitch between notches along the edge */
  --rail-paper: var(--paper-raised);
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0;
  /* the paper strip itself (no border/box-shadow here — the mask would clip a
     hard border into ragged arcs; the drop-shadow filter below follows the
     scalloped silhouette instead, so the whole torn edge casts a real shadow) */
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.45), transparent 42%),
    var(--rail-paper);
  border-radius: var(--radius);
  /* PUNCHED PERFORATION: bite half-circles out of the top + bottom edges.
     Two radial-gradient masks (top row + bottom row of holes) are subtracted
     from a full-cover fill via mask-composite. */
  -webkit-mask:
    radial-gradient(var(--perf) at 50% 0, transparent 98%, #000) 50% 0 / var(--perf-gap) 100% repeat-x,
    radial-gradient(var(--perf) at 50% 100%, transparent 98%, #000) 50% 100% / var(--perf-gap) 100% repeat-x,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: source-in, source-in;
          mask:
    radial-gradient(var(--perf) at 50% 0, transparent 98%, #000) 50% 0 / var(--perf-gap) 100% repeat-x,
    radial-gradient(var(--perf) at 50% 100%, transparent 98%, #000) 50% 100% / var(--perf-gap) 100% repeat-x,
    linear-gradient(#000 0 0);
          mask-composite: intersect;
  /* the torn edge casts a real, edge-following soft shadow */
  filter: drop-shadow(0 14px 30px rgba(86, 63, 43, 0.12));
}
/* hairline INK rule that hugs the scalloped top + bottom edges, so the paper
   reads as a printed slip (a plain border can't follow the punched arcs) */
#cell-1 .c1__rail::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  border-radius: var(--radius);
  /* faint top/bottom stroke via inset shadow (survives the mask because it's
     painted inside the masked box, following the same silhouette) */
  box-shadow:
    inset 0 1px 0 rgba(59, 46, 40, 0.10),
    inset 0 -1px 0 rgba(59, 46, 40, 0.10);
}

#cell-1 .c1-chip {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: clamp(0.85rem, 0.6rem + 0.8vw, 1.2rem) clamp(0.85rem, 0.5rem + 1vw, 1.4rem);
  min-width: 0;
}
#cell-1 .c1-chip__icon { flex: 0 0 auto; display: inline-flex; }
#cell-1 .c1-chip__icon--teal { color: var(--teal-deep); }
#cell-1 .c1-chip__icon--clay { color: var(--support); }
#cell-1 .c1-chip__text { min-width: 0; }
#cell-1 .c1-chip__head {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(0.82rem, 0.76rem + 0.25vw, 0.95rem);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.12;
}
#cell-1 .c1-chip__head--teal { color: var(--teal-deep); }
#cell-1 .c1-chip__head--clay { color: var(--support); }
#cell-1 .c1-chip__sub {
  margin-top: 0.15em;
  font-size: 0.8rem;
  line-height: 1.32;
  color: var(--ink-soft);
}

/* the TEAR-LINE between chips: a dashed "tear here" perforation column that
   runs between the top + bottom punched edges — the vertical seam of an order
   slip. The punched half-circles are already bitten out of the top/bottom
   edges by the rail mask (they land at this seam too, since the seam sits on
   the notch grid), so the dashed column + the edge bites read as one tear. */
#cell-1 .c1-rail-div {
  position: relative;
  flex: 0 0 0;
  align-self: stretch;
  width: 0;
  background-image: repeating-linear-gradient(
    rgba(59, 46, 40, 0.34) 0 5px, transparent 5px 10px);
  background-size: 1.5px calc(100% - 0.6rem);
  background-position: center;
  background-repeat: no-repeat;
}

/* teal MILO ticket-stub tab — the stamped TEAR-OFF tab at the slip's end.
   Deep teal so cream clears AA (cream on --teal-deep = 5.73:1; the light
   --accent top was only 2.31:1 = FAIL). A dashed tear-line hugs its left
   edge (where it detaches) + an inset stamp ring reads as a rubber stamp. */
#cell-1 .c1-rail-stub {
  position: relative;
  flex: 0 0 auto;
  align-self: stretch;
  display: grid;
  place-content: center;
  gap: 0.12em;
  padding: 0 1.35rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  background: linear-gradient(155deg, var(--teal-deep) 0%, var(--espresso-teal) 100%);
  color: var(--paper-raised);
  text-align: center;
  /* the inset stamp ring */
  box-shadow: inset 0 0 0 1.5px rgba(255, 250, 241, 0.28);
}
/* dashed tear-line on the stub's left edge — "tear here to keep the stub" */
#cell-1 .c1-rail-stub::before {
  content: "";
  position: absolute;
  top: 0.55rem;
  bottom: 0.55rem;
  left: 0;
  width: 1.5px;
  background-image: repeating-linear-gradient(
    rgba(255, 250, 241, 0.55) 0 4px, transparent 4px 9px);
  background-size: 1.5px 100%;
}
#cell-1 .c1-rail-stub__name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  line-height: 1;
}
#cell-1 .c1-rail-stub__sub {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.54rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  opacity: 0.92;
}

/* ============================================================
   RESPONSIVE — mobile recomposition (DESIGN.md plan):
   stack headline, hours cue, CTA BEFORE the hero plate/tray pair;
   the value-rail becomes a 2-col then 1-col ticket grid.
   ============================================================ */

/* CHIP-HEAD WRAP PARITY (T2.2): in the single-row desktop rail the two long
   heads ("DOWNTOWN PORTLAND" / "MADE FOR OUR PEOPLE") wrapped to two lines
   while the two short heads held one — ragged siblings. Tighten head size +
   tracking so all four fit; force one line only from 1180px up (where the
   chips are wide enough — this covers DAVID_SIM's cited 1280–1560 range).
   Between 961–1179 the heads may wrap but do NOT overflow (no nowrap there).
   (Below 961px the rail wraps to 2×2 and heads have full tile width again.) */
@media (min-width: 961px) {
  #cell-1 .c1-chip__head {
    font-size: clamp(0.8rem, 0.58rem + 0.5vw, 0.92rem);
    letter-spacing: 0.02em;
  }
}
@media (min-width: 1180px) {
  #cell-1 .c1-chip__head { white-space: nowrap; }
}

/* tablet / narrow-desktop: tighten the two-column body */
@media (max-width: 1080px) {
  #cell-1 .c1__body { gap: clamp(1.5rem, 1rem + 2vw, 2.5rem); }
  #cell-1 .c1__sign { width: clamp(7.5rem, 6rem + 5vw, 9.75rem); }
}

/* rail collapses to 2×2 before it cramps; stub spans the row */
@media (max-width: 960px) {
  #cell-1 .c1__rail { flex-wrap: wrap; }
  #cell-1 .c1-rail-div { display: none; }
  #cell-1 .c1-chip {
    flex: 1 1 45%;
    border-top: 1px solid var(--paper-line);
    border-right: 1px dashed var(--paper-line-strong);
  }
  /* the two chips on the top row (1st + 2nd) keep no top border;
     odd chips (left column) keep the right divider, even ones drop it. */
  #cell-1 .c1-chip:nth-child(1),
  #cell-1 .c1-chip:nth-child(3) { border-top: 0; }        /* chip 1 (idx1) + chip 2 (idx3) = top row */
  #cell-1 .c1-chip:nth-child(3),
  #cell-1 .c1-chip:nth-child(7) { border-right: 0; }       /* chip 2 (idx3) + chip 4 (idx7) = right column */
  #cell-1 .c1-rail-stub {
    flex: 1 1 100%;
    grid-auto-flow: column;
    place-content: center;
    gap: 0.5em;
    padding: 0.7rem;
    border-radius: 0 0 var(--radius) var(--radius);
  }
  #cell-1 .c1-rail-stub__sub { letter-spacing: 0.16em; }
}

/* MOBILE — recompose: single column, tray follows the pitch (DESIGN.md) */
@media (max-width: 760px) {
  #cell-1 {
    min-height: 0;
    padding-block: calc(var(--nav-h) + var(--space-m)) var(--space-l);
    align-items: flex-start;
  }
  #cell-1 .c1 { gap: var(--space-l); }

  #cell-1 .c1__masthead { align-items: center; }
  #cell-1 .c1-wordmark__name { font-size: clamp(2rem, 1.4rem + 6vw, 2.7rem); }

  #cell-1 .c1__body {
    grid-template-columns: 1fr;
    gap: var(--space-l);
  }
  /* order: headline/toggle/CTA/hours FIRST, tray SECOND */
  #cell-1 .c1__left { order: 1; gap: var(--space-s); text-align: left; }
  #cell-1 .c1__right { order: 2; }

  #cell-1 .c1__lede { max-width: 40ch; }
  #cell-1 .c1__daypart { width: 100%; }
  #cell-1 .c1__daypart .daypart-chip { flex: 1 1 0; justify-content: center; padding: 0 0.4em; }
  #cell-1 .c1__cta { gap: 0.75rem; }
  #cell-1 .c1__btn { width: 100%; }
  #cell-1 .c1__cta-cue { width: 100%; text-align: center; }

  /* a touch taller crop on mobile pushes the plate down so the top-left
     counter corner (where the card sits) has more clean room */
  #cell-1 .c1__plate { aspect-ratio: 4 / 3.55; }
  #cell-1 .c1__plate > img { object-position: 50% 70%; }
  /* keep the card OFF the plate on mobile too — top-left overhang over the
     clean counter corner, compact so it never eats the food or the fruit
     bowl (DAVID_SIM: was worse on mobile) */
  #cell-1 .c1__sign {
    width: clamp(6.5rem, 25vw, 8rem);
    top: clamp(-0.8rem, -3vw, -1.3rem);
    left: clamp(-0.6rem, -2.2vw, -1rem);
    padding: 0.6rem 0.7rem 0.54rem;
  }
  #cell-1 .c1__sign-lines { font-size: clamp(0.66rem, 0.6rem + 0.3vw, 0.78rem); }
  #cell-1 .c1__sign-mark { font-size: clamp(0.98rem, 0.85rem + 0.5vw, 1.2rem); }
}

/* very small phones: single-column rail */
@media (max-width: 480px) {
  #cell-1 .c1-chip {
    flex: 1 1 100%;
    border-right: 0;
    border-top: 1px dashed var(--paper-line-strong);
  }
  #cell-1 .c1-chip:nth-child(1) { border-top: 0; }
  #cell-1 .c1-stamp { width: 74px; height: 74px; }
  #cell-1 .c1-stamp__l2 { font-size: 0.72rem; }
}

/* reduced-motion: the stamp/sun stop pulsing (belt + suspenders w/ motion.css) */
@media (prefers-reduced-motion: reduce) {
  #cell-1 .amb-pulse { animation: none; }
}
