/* ===========================================================================
   One Life Meals — page furniture and page-specific components.
   Loaded after app.css, which defines every token used here.
   =========================================================================== */

/* ===== staging bar ====================================================== */
.staging-bar {
  background: #2A2016; color: #FFE9C7;
  font-size: var(--t-sm); text-align: center;
  padding: var(--sp-2) var(--sp-4);
}
.staging-bar b { color: #FFF; }
.staging-bar strong { color: #FFD48A; }

/* ===== header =========================================================== */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(251,250,246,.88);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: var(--sp-5);
  min-height: var(--header-h);
}
.brand { display: flex; align-items: center; gap: var(--sp-3); text-decoration: none; color: var(--ink); }
.brand-mark { width: 40px; height: 40px; object-fit: contain; }
.brand-word {
  font-family: var(--disp); font-weight: 700; font-size: 1.125rem;
  letter-spacing: -0.03em; line-height: 1;
}
.brand-word em { font-style: normal; display: block; font-size: .72rem; letter-spacing: .18em;
  text-transform: uppercase; font-family: var(--sans); font-weight: 600; color: var(--forest-ink); }

.site-nav { margin-inline-start: auto; }
.site-nav ul { display: flex; gap: var(--sp-5); list-style: none; margin: 0; padding: 0; }
.site-nav a {
  color: var(--ink-2); text-decoration: none; font-weight: 550; font-size: var(--t-sm);
  padding: var(--sp-2) 0; position: relative; white-space: nowrap;
}
.site-nav a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--lime); border-radius: 2px; transform: scaleX(0); transform-origin: left;
  transition: transform .2s var(--ease);
}
.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::after, .site-nav a[aria-current='page']::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: var(--sp-3); margin-inline-start: auto; }
.site-nav + .header-actions { margin-inline-start: 0; }

.cart-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: var(--r-pill);
  color: var(--ink); text-decoration: none; border: 1px solid var(--line-2); background: var(--white);
}
.cart-btn:hover { border-color: var(--forest-ink); }
.cart-count {
  position: absolute; top: -3px; inset-inline-end: -3px;
  min-width: 20px; height: 20px; padding: 0 5px;
  background: var(--accent); color: var(--white);
  border-radius: var(--r-pill); font-size: 11px; font-weight: 700;
  display: grid; place-items: center;
}

.nav-toggle {
  display: none; width: 44px; height: 44px; padding: 10px;
  background: var(--white); border: 1px solid var(--line-2); border-radius: var(--r-pill);
  cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: var(--ink); border-radius: 2px; margin: 4px 0;
  transition: transform .2s var(--ease), opacity .2s var(--ease); }
.nav-toggle[aria-expanded='true'] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded='true'] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded='true'] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mobile-nav { border-top: 1px solid var(--line); background: var(--paper); padding-block: var(--sp-3); }
.mobile-nav ul { list-style: none; margin: 0; padding: 0; }
.mobile-nav a {
  display: block; padding: var(--sp-3) 0; font-size: var(--t-md); font-weight: 550;
  color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line);
}

@media (max-width: 1000px) {
  .site-nav { display: none; }
  .nav-toggle { display: block; }
  .hide-sm { display: none; }
}
@media (min-width: 1001px) { .mobile-nav { display: none !important; } }

/* ===== hero ============================================================= */
.hero {
  position: relative; overflow: hidden;
  background: var(--forest); color: var(--paper);
  padding-block: clamp(3rem, 7vw, 6.5rem);
}
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media img, .hero-media video { width: 100%; height: 100%; object-fit: cover; }
/* Tuned for BRIGHT footage (plates on white). A scrim heavy enough to hold
   white text everywhere would turn the white backdrop into grey sludge, so it
   stays opaque only across the copy and falls away fast to the right, where
   there is no text and the plate can read clean. */
.hero-media::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(100deg,
      rgba(12,20,10,.95) 0%,
      rgba(12,20,10,.90) 34%,
      rgba(12,20,10,.62) 52%,
      rgba(12,20,10,.22) 72%,
      rgba(12,20,10,.10) 100%),
    linear-gradient(to top, rgba(12,20,10,.35) 0%, rgba(12,20,10,0) 38%);
}
.hero-inner { position: relative; z-index: 1; display: grid; gap: var(--sp-7); align-items: center;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); }
@media (max-width: 900px) { .hero-inner { grid-template-columns: 1fr; } }

/* Held below --t-3xl: the hero column is ~600px, and the full display size
   breaks the headline into four ragged lines at desktop width. */
.hero h1 { font-size: clamp(2.25rem, 3.1vw + 1.15rem, 3.5rem); color: #fff; text-wrap: balance; }
.hero h1 em { font-style: normal; color: var(--lime); }
.hero .lede { color: #CFDAC4; font-size: var(--t-md); margin-top: var(--sp-4); }
.hero-cta { display: flex; gap: var(--sp-3); flex-wrap: wrap; margin-top: var(--sp-6); }

.hero-stats {
  display: flex; flex-wrap: wrap; gap: var(--sp-5); margin-top: var(--sp-7);
  padding-top: var(--sp-5); border-top: 1px solid rgba(255,255,255,.16);
}
.hero-stat b { display: block; font-family: var(--disp); font-size: var(--t-xl); color: #fff; line-height: 1; }
.hero-stat span { font-size: var(--t-sm); color: #B9C4AE; }

/* floating cut-out plates */
.hero-plates { position: relative; min-height: 320px; }
.hero-plate { position: absolute; filter: drop-shadow(0 24px 40px rgba(0,0,0,.45)); }
.hero-plate img { width: 100%; height: auto; }
/* Two plates read as a considered composition; three crowd the column and the
   third ends up half-behind the others. */
.hero-plate--1 { width: 70%; left: 2%;   top: 0;     z-index: 3; }
.hero-plate--2 { width: 46%; right: -2%; bottom: 2%; z-index: 2; }
.hero-plate--3 { display: none; }
@media (max-width: 900px) {
  .hero-plates { min-height: 300px; }
  .hero-plate--1 { width: 60%; left: 4%; }
  .hero-plate--2 { width: 40%; right: 2%; }

  /* Stacked layout puts the copy across the full width, so the desktop
     left-to-right scrim would have to darken everything. Go top-to-bottom
     instead: hold it dark behind the text, then open up over the lower half
     so the food is actually visible. */
  .hero-media::after {
    background:
      linear-gradient(to bottom,
        rgba(12,20,10,.94) 0%,
        rgba(12,20,10,.88) 36%,
        rgba(12,20,10,.62) 58%,
        rgba(12,20,10,.26) 80%,
        rgba(12,20,10,.16) 100%);
  }
  /* The stats sit lowest in the copy block and would otherwise land on the
     bright part of the gradient. */
  .hero-stats { border-top-color: rgba(255,255,255,.26); }
  .hero-stat b, .hero-stat span { text-shadow: 0 1px 10px rgba(8,14,7,.8); }
}

/* cutoff pill */
.cutoff {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.22);
  border-radius: var(--r-pill); padding: 6px var(--sp-4);
  font-size: var(--t-sm); color: #E4EDD8;
}
.cutoff b { color: var(--lime); }
.cutoff .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--lime);
  box-shadow: 0 0 0 0 rgba(140,190,63,.6); animation: ping 2.6s var(--ease) infinite;
}
@keyframes ping {
  0%   { box-shadow: 0 0 0 0 rgba(140,190,63,.55); }
  70%  { box-shadow: 0 0 0 10px rgba(140,190,63,0); }
  100% { box-shadow: 0 0 0 0 rgba(140,190,63,0); }
}

/* ===== marquee of trust marks =========================================== */
.marks { border-block: 1px solid var(--line); background: var(--paper-2); }
.marks ul {
  display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-3) var(--sp-7);
  list-style: none; margin: 0; padding: var(--sp-4) 0;
  font-size: var(--t-sm); font-weight: 600; color: var(--ink-2);
}
.marks li { display: flex; align-items: center; gap: var(--sp-2); }
.marks svg { color: var(--forest-ink); flex: none; }

/* ===== step cards ======================================================= */
.steps { counter-reset: step; }
.step { position: relative; padding-top: var(--sp-6); }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; top: 0; left: 0;
  font-family: var(--disp); font-size: var(--t-lg); font-weight: 600;
  color: var(--forest-ink); letter-spacing: -0.02em;
}
.step::after {
  content: ''; position: absolute; top: 12px; left: 46px; right: 0; height: 1px; background: var(--line-2);
}
.step h3 { font-size: var(--t-lg); margin-bottom: var(--sp-2); }

/* ===== plan cards ======================================================= */
.plan-cards { display: grid; gap: var(--sp-5); grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.plan {
  display: flex; flex-direction: column; gap: var(--sp-4);
  background: var(--white); border: 1px solid var(--line-2);
  border-radius: var(--r-xl); padding: var(--sp-6); position: relative;
}
.plan.is-featured { border-color: var(--forest-ink); border-width: 2px; padding: calc(var(--sp-6) - 1px); }
.plan-flag {
  position: absolute; top: -12px; left: var(--sp-6);
  background: var(--lime); color: var(--ink);
  font-size: var(--t-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 12px; border-radius: var(--r-pill);
}
.plan h3 { font-family: var(--disp); font-size: var(--t-xl); }
.plan-macros { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.plan-macros div { background: var(--paper); padding: var(--sp-3) var(--sp-2); text-align: center; }
.plan-macros b { display: block; font-size: var(--t-md); font-weight: 700; }
.plan-macros span { font-size: 10px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.plan-from { font-size: var(--t-sm); color: var(--muted); }
.plan-from b { font-size: var(--t-xl); color: var(--ink); font-weight: 700; letter-spacing: -0.02em; }

/* ===== menu page ======================================================== */
.menu-toolbar { position: sticky; top: var(--header-h); z-index: 40;
  background: var(--paper); border-bottom: 1px solid var(--line); padding-block: var(--sp-3); }
.menu-toolbar .row { gap: var(--sp-2); }
.seg {
  display: inline-flex; background: var(--paper-2); border: 1px solid var(--line-2);
  border-radius: var(--r-pill); padding: 3px;
}
.seg a, .seg button {
  min-height: 38px; padding: 0 var(--sp-4); border: 0; background: transparent;
  border-radius: var(--r-pill); font-size: var(--t-sm); font-weight: 650;
  color: var(--ink-2); text-decoration: none; display: inline-flex; align-items: center; cursor: pointer;
}
.seg [aria-current='true'], .seg .is-on { background: var(--white); color: var(--ink); box-shadow: var(--shadow-sm); }

.menu-layout { display: grid; gap: var(--sp-6); align-items: start;
  grid-template-columns: minmax(0,1fr) 340px; }
@media (max-width: 1080px) { .menu-layout { grid-template-columns: 1fr; } }

.order-rail { position: sticky; top: calc(var(--header-h) + 72px); }
@media (max-width: 1080px) { .order-rail { position: static; } }

.rail {
  background: var(--white); border: 1px solid var(--line-2);
  border-radius: var(--r-lg); overflow: hidden;
}
.rail-head { padding: var(--sp-4); border-bottom: 1px solid var(--line); background: var(--paper-2); }
.rail-body { padding: var(--sp-4); max-height: 46vh; overflow-y: auto; }
.rail-foot { padding: var(--sp-4); border-top: 1px solid var(--line); }
.rail-line { display: flex; gap: var(--sp-3); align-items: center; padding: var(--sp-2) 0; font-size: var(--t-sm); }
.rail-line + .rail-line { border-top: 1px solid var(--line); }
.rail-line .nm { flex: 1; min-width: 0; }
.rail-line .nm b { display: block; font-weight: 600; }
.rail-empty { text-align: center; color: var(--muted); padding: var(--sp-6) var(--sp-4); font-size: var(--t-sm); }
.rail-tot { display: flex; justify-content: space-between; font-size: var(--t-sm); padding: 3px 0; }
.rail-tot.grand { font-size: var(--t-md); font-weight: 700; border-top: 1px solid var(--line);
  margin-top: var(--sp-2); padding-top: var(--sp-3); }

.progress { height: 6px; background: var(--paper-3); border-radius: 3px; overflow: hidden; margin: var(--sp-2) 0; }
.progress i { display: block; height: 100%; background: var(--lime); border-radius: 3px;
  transition: width .3s var(--ease); }

/* sticky mobile summary */
.mobile-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
  background: var(--white); border-top: 1px solid var(--line-2);
  padding: var(--sp-3) var(--sp-4) calc(var(--sp-3) + env(safe-area-inset-bottom));
  display: none; box-shadow: 0 -8px 24px rgba(20,24,15,.10);
}
@media (max-width: 1080px) { .mobile-bar.is-live { display: block; } }
.mobile-bar .row-between { gap: var(--sp-3); flex-wrap: nowrap; }

/* ===== drawer =========================================================== */
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 90; background: rgba(15,20,12,.5);
  opacity: 0; pointer-events: none; transition: opacity .22s var(--ease);
}
.drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; z-index: 91; top: 0; inset-inline-end: 0; height: 100dvh;
  width: min(520px, 100%); background: var(--paper);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .28s var(--ease);
  box-shadow: var(--shadow-lg);
}
.drawer.is-open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  padding: var(--sp-4); border-bottom: 1px solid var(--line); }
.drawer-body { flex: 1; overflow-y: auto; padding: var(--sp-5); }
.drawer-foot { border-top: 1px solid var(--line); padding: var(--sp-4); background: var(--white); }
.drawer-close { width: 44px; height: 44px; border-radius: var(--r-pill);
  border: 1px solid var(--line-2); background: var(--white); cursor: pointer; font-size: 1.25rem; line-height: 1; }
@media (max-width: 560px) {
  .drawer { width: 100%; top: auto; bottom: 0; height: min(88dvh, 100dvh);
    border-radius: var(--r-xl) var(--r-xl) 0 0; transform: translateY(100%); }
  .drawer.is-open { transform: none; }
}

/* ===== plan builder ===================================================== */
.builder { display: grid; gap: var(--sp-6); grid-template-columns: minmax(0,1fr) 360px; align-items: start; }
@media (max-width: 1000px) { .builder { grid-template-columns: 1fr; } }
.builder-step { border-top: 1px solid var(--line); padding-top: var(--sp-5); margin-top: var(--sp-5); }
.builder-step:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.builder-step h2 { font-size: var(--t-lg); margin-bottom: var(--sp-2); }
.quote {
  position: sticky; top: calc(var(--header-h) + 24px);
  background: var(--forest); color: var(--paper);
  border-radius: var(--r-xl); padding: var(--sp-6);
}
@media (max-width: 1000px) { .quote { position: static; } }
.quote .big { font-family: var(--disp); font-size: var(--t-2xl); color: #fff; line-height: 1; }
.quote .per { color: var(--lime); font-weight: 650; }
.quote-row { display: flex; justify-content: space-between; gap: var(--sp-3);
  font-size: var(--t-sm); padding: 5px 0; color: #C6D2BA; }
.quote-row b { color: #fff; font-weight: 600; }
.quote hr { border-top-color: rgba(255,255,255,.18); margin: var(--sp-4) 0; }

/* week strip */
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.week div {
  text-align: center; padding: var(--sp-2) 2px; border-radius: var(--r-sm);
  font-size: var(--t-xs); font-weight: 650; background: var(--paper-2); color: var(--muted);
}
.week div.on { background: var(--lime-soft); color: #2C4A0E; }
.week div.drop { background: var(--forest-ink); color: #fff; }

/* ===== footer =========================================================== */
.site-footer { padding-block: clamp(3rem, 6vw, 5rem) var(--sp-6); }
.footer-top { display: grid; gap: var(--sp-7); grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
@media (max-width: 860px) { .footer-top { grid-template-columns: 1fr; } }
.footer-brand img { margin-bottom: var(--sp-4); }
.footer-cols { display: grid; gap: var(--sp-5); grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.footer-cols h3 { font-size: var(--t-sm); letter-spacing: .12em; text-transform: uppercase;
  color: var(--lime); margin-bottom: var(--sp-3); }
.footer-cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-2); }
.footer-cols a { color: #D6DFCC; text-decoration: none; font-size: var(--t-sm); }
.footer-cols a:hover { color: #fff; text-decoration: underline; }
.footer-addr {
  display: grid; gap: var(--sp-5); grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  margin-top: var(--sp-7); padding-top: var(--sp-5); border-top: 1px solid rgba(255,255,255,.14);
  font-size: var(--t-sm); color: #C6D2BA;
}
.footer-addr b { color: #fff; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; align-items: center;
  margin-top: var(--sp-6); padding-top: var(--sp-4); border-top: 1px solid rgba(255,255,255,.14);
  color: #A9B69D;
}
.footer-bottom ul { display: flex; gap: var(--sp-4); list-style: none; margin: 0; padding: 0; }
.footer-bottom a { color: #A9B69D; }

/* ===== prose ============================================================ */
.prose { max-width: 72ch; }
.prose h2 { font-family: var(--disp); font-size: var(--t-xl); margin-top: var(--sp-7); margin-bottom: var(--sp-3); }
.prose h3 { font-size: var(--t-lg); margin-top: var(--sp-6); margin-bottom: var(--sp-2); }
.prose p, .prose li { color: var(--ink-2); }
.prose > :first-child { margin-top: 0; }

.faq details {
  border: 1px solid var(--line-2); border-radius: var(--r-md);
  padding: var(--sp-4); background: var(--white); margin-bottom: var(--sp-3);
}
.faq summary { font-weight: 650; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: var(--sp-3); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.25rem; line-height: 1; color: var(--forest-ink); }
.faq details[open] summary::after { content: '\2212'; }
.faq details[open] summary { margin-bottom: var(--sp-3); }

/* ===== scroll reveal ==================================================== */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
  .reveal.is-in { opacity: 1; transform: none; }
}
