/* ClimeX Burritos — layout on top of the Organic design system.
   Everything here is derived from the Claude Design mockup "ClimeX Burritos.dc.html".
   The mockup is two fixed artboards (1180px desktop, 390px mobile); this file
   reconciles them into one responsive layout with a single breakpoint at 900px.
   Tokens and component classes live in design-system.css — do not redefine them here. */

/* ── layout primitives ─────────────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 44px;
}

.section { padding-block: 56px; }
.section-tight { padding-block: 34px; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}
.section-head h2 { font-size: 34px; margin: 0; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 18px;
  background: var(--color-accent);
  color: var(--color-bg);
  border-radius: 0 0 var(--radius-md) 0;
}
.skip-link:focus { left: 0; }

/* ── header ────────────────────────────────────────────────────────────── */

:root {
  /* Logo height plus the header's vertical padding. The pinned hero starts
     below this, so the scroll hero has to subtract it to stay on screen. */
  --header-h: 106px;
}

.site-header {
  display: flex;
  align-items: center;
  gap: 26px;
  padding-block: 18px;
}
.site-brand {
  flex: none;
  margin-right: auto;
  display: block;
  line-height: 0;
}
.site-logo {
  width: 170px;
  height: 70px;
  object-fit: contain;
}
.site-logo-text {
  font-family: var(--font-heading);
  font-size: 24px;
  margin-right: auto;
  text-decoration: none;
  color: inherit;
}
.site-nav {
  display: flex;
  gap: 26px;
  font-size: 14px;
}
.site-nav a {
  color: inherit;
  text-decoration: none;
}
.site-nav a:hover,
.site-nav a[aria-current='page'] { color: var(--color-accent); }

/* CSS-only mobile navigation: a checkbox toggles the panel, so the menu works
   with JavaScript disabled and needs no script in the theme at all. */
.nav-toggle {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
}
.nav-toggle-label {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--color-surface);
  place-items: center;
  font-size: 16px;
  cursor: pointer;
  flex: none;
}
.nav-toggle:focus-visible + .nav-toggle-label { outline: 2px solid var(--color-accent); outline-offset: 2px; }

/* ── hero ──────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  height: 540px;
}
/* The stage carries the clipping, not .hero — a sticky child cannot be pinned
   inside an ancestor with overflow:hidden. */
.hero-stage {
  position: relative;
  height: 100%;
  overflow: hidden;
  background: #14110f;
}
.hero-media,
.hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── scroll-driven hero ────────────────────────────────────────────────────
   The frames come from media-src/hero-source.mp4, which runs backwards, so
   scrubbing forward assembles the burrito. hero-scrub.js adds .hero-scrub-on
   only when it is actually going to take over; without it, everything below is
   inert and the static poster hero above is what renders. */

.hero-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 400ms ease;
}
.hero.is-scrubbing .hero-canvas { opacity: 1; }
/* Poster stays until the first frame is on the canvas, so there is no black flash. */
.hero.is-scrubbing .hero-media { opacity: 0; }

.hero-scrub-on {
  /* 100vh of pinned stage plus the travel the scrub is spread across. */
  height: 260vh;
}
.hero-scrub-on .hero-stage {
  position: sticky;
  top: 0;
  height: 100vh;
}
.hero-scrub-on .hero-scrim {
  /* Deepen the wash as the burrito forms, so the copy keeps its contrast
     against the brightening centre of the frame. */
  background:
    linear-gradient(100deg,
      rgba(20, 17, 15, calc(0.72 + var(--hero-progress, 0) * 0.12)) 0%,
      rgba(20, 17, 15, calc(0.45 + var(--hero-progress, 0) * 0.15)) 46%,
      rgba(20, 17, 15, calc(0 + var(--hero-progress, 0) * 0.18)) 72%);
}
.hero-scrub-on .hero-inner {
  transform: translateY(calc(var(--hero-progress, 0) * -26px));
}
/* Centre the copy in the part of the stage that is actually on screen. Before
   the stage pins, its bottom --header-h pixels sit below the fold, which is
   exactly where the order button would otherwise land. */
.hero-scrub-on .hero-body {
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  padding-bottom: var(--header-h);
}
.hero-scrub-on .hero-body > .container { width: 100%; }
.hero-scrub-on .hero-cue { bottom: calc(24px + var(--header-h)); }

.hero-cue {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 24px;
  display: none;
  justify-content: center;
  pointer-events: none;
  opacity: calc(1 - var(--hero-progress, 0) * 4);
}
.hero-scrub-on .hero-cue { display: flex; }
.hero-cue span {
  font-family: var(--font-heading);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(245, 234, 216, 0.72);
}
.hero-cue span::after {
  content: '';
  display: block;
  width: 1px;
  height: 26px;
  margin: 8px auto 0;
  background: linear-gradient(rgba(245, 234, 216, 0.72), rgba(245, 234, 216, 0));
}

@media (prefers-reduced-motion: reduce) {
  /* Belt and braces: the script already refuses to start, this makes sure a
     stale class from a mid-session preference change cannot pin the hero. */
  .hero-scrub-on { height: 540px; }
  .hero-scrub-on .hero-stage { position: relative; height: 100%; }
  .hero-scrub-on .hero-inner { transform: none; }
  .hero-cue { display: none !important; }
}
.hero-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(100deg,
    rgba(32, 30, 29, .72) 0%,
    rgba(32, 30, 29, .45) 46%,
    rgba(32, 30, 29, 0) 72%);
}
.hero-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 52px;
  pointer-events: none;
  /* Explicit stacking: .hero-media and .hero-scrim are absolutely positioned and
     would paint over the copy wherever .hero-body is not positioned itself. */
  z-index: 2;
}
.hero-body > .container > * { pointer-events: auto; }
.hero-inner { max-width: 560px; }
.hero h1 {
  font-size: clamp(34px, 4.6vw, 62px);
  color: var(--color-bg);
  margin: 16px 0 14px;
  text-wrap: pretty;
}
.hero-lead {
  font-size: 17px;
  color: rgba(245, 234, 216, .88);
  margin-bottom: 26px;
}
.hero-status {
  display: none;
  margin: 0 0 18px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.hero-actions .btn {
  font-size: 16px;
  padding: 14px 26px;
}
.btn-call {
  background: var(--color-accent-2-500);
  color: var(--color-bg);
  border-color: transparent;
  gap: 10px;
}
.btn-call:hover { background: var(--color-accent-2-600); }
.btn-call svg { flex: none; }

/* ── dish grid ─────────────────────────────────────────────────────────── */

.dish-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.dish {
  background: var(--color-surface);
  border-radius: 34px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.dish-media {
  height: 200px;
  overflow: hidden;
  background: var(--color-neutral-300);
}
.dish-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.dish-body {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.dish-name { margin: 0; }
.dish-desc {
  font-size: 13px;
  margin: 0;
  flex: 1;
}
.dish-price {
  font-family: var(--font-heading);
  font-size: 30px;
  color: var(--color-accent-700);
}

/* Placeholder for a dish or hero without a photo — keeps the layout honest
   instead of collapsing to a zero-height box. */
.media-empty {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 16px;
  text-align: center;
  background: var(--color-neutral-300);
  color: var(--color-neutral-700);
  font-size: 12px;
  line-height: 1.4;
}

/* ── hours + catering pair ─────────────────────────────────────────────── */

.panel-pair {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 34px;
  align-items: stretch;
}
.panel {
  border-radius: 34px;
  padding: 38px 40px;
}
.panel-hours {
  background: var(--color-accent-2-500);
  color: var(--color-accent-2-900);
}
.panel-hours h6 {
  color: var(--color-accent-2-900);
  margin-bottom: 18px;
}
.panel-catering {
  background: var(--color-surface);
  display: flex;
  flex-direction: column;
}
.panel-catering h6 {
  color: var(--color-accent-700);
  margin-bottom: 14px;
}
.panel-catering h3 { margin: 0 0 12px; }
.panel-catering .btn {
  align-self: flex-start;
  margin-top: auto;
}

.hours-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 28px;
  font-size: 17px;
  margin: 0;
}
.hours-list dt { font-family: var(--font-heading); }
.hours-list dd { margin: 0; }
.hours-note {
  font-size: 13px;
  margin: 20px 0 0;
}

/* ── footer ────────────────────────────────────────────────────────────── */

.site-footer {
  background: var(--color-accent-2-800);
  color: var(--color-bg);
  padding-block: 40px;
}
.site-footer .container {
  display: flex;
  gap: 40px;
  align-items: center;
  flex-wrap: wrap;
}
.footer-brand {
  font-family: var(--font-heading);
  font-size: 20px;
  margin-right: auto;
}
.site-footer a {
  color: inherit;
  font-size: 14px;
  opacity: .95;
  text-decoration: none;
}
.site-footer a:hover { text-decoration: underline; }

/* ── sticky order bar (mobile only, from artboard 1c) ──────────────────── */

.order-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  padding: 14px 20px 22px;
  background: linear-gradient(0deg, var(--color-bg) 60%, rgba(245, 234, 216, 0));
}
.order-bar .btn {
  margin: 0;
  font-size: 16px;
  padding: 15px;
}

/* ── open/closed status pill ───────────────────────────────────────────── */

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 14px;
  background: var(--color-accent-2-500);
  color: var(--color-accent-2-900);
}
.status::before {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--color-accent-2-900);
  flex: none;
}
.status-closed {
  background: var(--color-neutral-200);
  color: var(--color-neutral-800);
}
.status-closed::before { background: var(--color-neutral-600); }

/* ── catering page ─────────────────────────────────────────────────────── */

/* Full-bleed split: the media column runs to the viewport edge while the text
   column still starts on the container's left gutter. The padding-left offset
   is the centering margin the .container would have had. */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  padding-left: max(0px, calc((100% - 1180px) / 2));
}
.split-body { padding: 60px 44px; }
.split-body h1 {
  font-size: clamp(34px, 4.4vw, 56px);
  margin: 16px 0 16px;
  text-wrap: pretty;
}
.split-body .lead {
  font-size: 17px;
  max-width: 440px;
}
.split-media {
  min-height: 400px;
  position: relative;
  overflow: hidden;
}
.split-media img,
.split-media .media-empty {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: var(--color-accent);
  color: var(--color-bg);
  display: grid;
  place-items: center;
  font-family: var(--font-heading);
  font-size: 22px;
  margin-bottom: 14px;
}
.steps h4 { margin: 0 0 6px; }
.steps p {
  font-size: 14px;
  margin: 0;
}
.band-surface { background: var(--color-surface); }

.catering-grid {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 56px;
  align-items: start;
}
.checklist {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.checklist .tag {
  font-size: 14px;
  padding: 8px 18px;
  align-self: flex-start;
}
.form-panel {
  background: var(--color-accent-2-500);
  border-radius: 40px;
  padding: 40px;
  color: var(--color-accent-2-900);
}
.form-panel h3 { margin: 0 0 22px; }
.form-panel .form-footnote {
  font-size: 12px;
  margin: 14px 0 0;
  color: var(--color-accent-2-900);
}

/* ── hours & directions page ───────────────────────────────────────────── */

.hours-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  align-items: start;
}
.hours-grid h1 {
  font-size: clamp(32px, 4.2vw, 52px);
  margin: 20px 0 30px;
}
.map-card {
  background: var(--color-surface);
  border-radius: 40px;
  padding: 14px;
}
.map-frame {
  height: 420px;
  border-radius: 30px;
  overflow: hidden;
  position: relative;
}
.map-frame img,
.map-frame iframe,
.map-frame .media-empty {
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}
.map-caption { padding: 22px 26px 12px; }
.map-caption h4 { margin: 0 0 6px; }
.map-caption p {
  font-size: 14px;
  margin: 0;
}

.cta-band {
  background: var(--color-accent);
  color: var(--color-bg);
  border-radius: 40px;
  padding: 40px 44px;
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}
.cta-band h3 {
  margin: 0 0 6px;
  color: var(--color-bg);
}
.cta-band p {
  margin: 0;
  opacity: .9;
  font-size: 15px;
}
.cta-band .btn {
  margin-left: auto;
  background: var(--color-bg);
  color: var(--color-accent-800);
  font-size: 16px;
  padding: 14px 26px;
}

/* ── Grav form plugin ──────────────────────────────────────────────────────
   The plugin renders .form-field > .form-label + .form-data > .form-input-wrapper.
   Fields carry `classes: input` from the form definition, so the design system's
   .input already applies; what follows is the wrapper geometry and the radio
   group, which the design system draws as a segmented control it cannot reach
   through the plugin's markup. */

.form-panel .form-field { margin-bottom: 18px; }
.form-panel .form-label label,
.form-panel label.inline {
  display: block;
  font-size: 12px;
  margin-bottom: 5px;
  color: var(--color-accent-2-900);
}
.form-panel .required { color: var(--color-accent-800); }
.form-panel .form-input-wrapper { width: 100%; }
.form-panel textarea.input { min-height: 90px; }

/* Radio group → pill row. The design system hides the native input and expects a
   .dot sibling the plugin never emits, so the checked state is drawn on the
   wrapper via :has() and the label carries the hit area. */
.form-panel .form-data[data-grav-field='radio'] {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.form-panel .form-data[data-grav-field='radio'] .radio {
  border: 1px solid color-mix(in srgb, var(--color-accent-2-900) 25%, transparent);
  border-radius: 999px;
  padding: 7px 14px;
}
.form-panel .form-data[data-grav-field='radio'] .radio label.inline {
  margin: 0;
  font-size: 13px;
  cursor: pointer;
  color: var(--color-accent-2-900);
}
.form-panel .form-data[data-grav-field='radio'] .radio:has(input:checked) {
  background: var(--color-accent);
  border-color: transparent;
}
.form-panel .form-data[data-grav-field='radio'] .radio:has(input:checked) label.inline { color: var(--color-bg); }
.form-panel .form-data[data-grav-field='radio'] .radio:has(input:focus-visible) {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.form-panel .buttons { margin-top: 6px; }
.form-panel .form-errors,
.form-panel .form-message {
  font-size: 13px;
  color: var(--color-accent-900);
}
.form-messages {
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 18px;
  background: var(--color-accent-100);
  color: var(--color-accent-800);
}
.form-panel .form-messages { background: var(--color-accent-2-200); color: var(--color-accent-2-900); }

/* Two-column field pairs, matching the mockup. The plugin renders fields and
   buttons as direct children of <form>, so the form element itself is the grid;
   fields opt into full width with `outerclasses: span-2` in the form definition. */
@media (min-width: 700px) {
  .form-panel form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 18px;
  }
  .form-panel form > .form-field { grid-column: span 1; }
  .form-panel form > .form-field.span-2,
  .form-panel form > .buttons,
  .form-panel form > .form-messages { grid-column: 1 / -1; }
}

/* ── responsive ────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .container { padding-inline: 20px; }
  .section { padding-block: 34px; }

  .site-header { padding-block: 14px; gap: 12px; }
  .site-logo { width: 120px; height: 50px; }
  .site-header > .btn-primary { display: none; }
  .nav-toggle-label { display: grid; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 30;
    flex-direction: column;
    gap: 0;
    padding: 8px 20px 16px;
    background: var(--color-bg);
    box-shadow: var(--shadow-md);
  }
  .site-nav a {
    padding: 12px 0;
    border-bottom: 1px solid var(--color-divider);
  }
  .nav-toggle:checked ~ .site-nav { display: flex; }
  .header-wrap { position: relative; }

  /* Grow instead of clipping: the hero is absolutely positioned on desktop, but
     on narrow screens a long headline would be cut off by overflow:hidden. */
  .hero,
  .hero-scrub-on {
    height: auto;
    min-height: 340px;
  }
  /* No scrub below 900px — the script does not start there, and the frame set
     is never downloaded. Artboard 1c is a static hero anyway. */
  .hero-scrub-on .hero-stage {
    position: relative;
    height: 100%;
  }
  .hero-scrub-on .hero-inner { transform: none; }
  .hero-cue { display: none !important; }
  .hero-body {
    /* relative, not static — see the z-index note on .hero-body above. */
    position: relative;
    padding: 150px 0 24px;
  }
  .hero-scrim {
    background: linear-gradient(0deg, rgba(32, 30, 29, .78) 0%, rgba(32, 30, 29, .1) 60%);
  }
  .hero-body { bottom: 22px; }
  /* Artboard 1c leads with the live status line instead of the lead sentence. */
  .hero-lead { display: none; }
  .hero-status { display: block; }
  .hero-actions .btn { font-size: 15px; padding: 12px 20px; }

  /* Dishes become the "Beliebt" row of artboard 1c: round thumbnails on one
     horizontally scrollable line. */
  .dish-grid {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }
  .dish {
    flex: none;
    width: 104px;
    background: transparent;
    border-radius: 0;
    scroll-snap-align: start;
    gap: 10px;
  }
  .dish-media {
    height: auto;
    aspect-ratio: 1;
    border-radius: 999px;
  }
  .dish-body { padding: 0; gap: 2px; }
  .dish-name { font-size: 14px; }
  .dish-desc { display: none; }
  .dish-price { font-size: 12px; font-family: var(--font-body); }

  .panel-pair,
  .catering-grid,
  .hours-grid,
  .split { grid-template-columns: 1fr; gap: 20px; }
  .panel { padding: 24px 22px; border-radius: 26px; }
  .hours-list { font-size: 15px; gap: 6px 18px; }

  .split { padding-left: 0; }
  .split-body { padding: 34px 20px; }
  .split-media { min-height: 260px; }
  .steps { grid-template-columns: 1fr; gap: 20px; }
  .form-panel { padding: 24px 22px; border-radius: 28px; }
  .map-frame { height: 260px; }
  .cta-band { padding: 26px 24px; border-radius: 28px; }
  .cta-band .btn { margin-left: 0; }

  .site-footer .container { gap: 16px; }
  .footer-brand { flex-basis: 100%; font-size: 18px; }

  /* The sticky bar repeats the primary action the header drops on mobile. */
  .order-bar { display: block; }
  body { padding-bottom: 88px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
