/* site.css — shared chrome for every page on eatwithmaui.com, index.html included.
 *
 * This is the implementation half of the website design system. The
 * documentation half lives in ../maui-design-system/web/ and POINTS AT THIS
 * FILE rather than copying it, so the two cannot drift.
 *
 * Load order on a page is always:
 *   tokens.css   design tokens (colors, fonts) - shared with the app
 *   site.css     this file - chrome + page layouts
 *   site.js      the header's burger, scrolled state and smooth anchors
 *   <style>      page-specific rules only, and ideally none at all
 *
 * The site has no build step on purpose (see maui-site/CLAUDE.md), so
 * "component" here means a documented class + markup contract, not a
 * compiled partial. Copy _page-template.html to start a new page and the
 * chrome comes with it.
 *
 * index.html joined this file on 2026-09-13 when the header became the
 * floating pill. Its landing-only sections (hero, the week, the feature grid,
 * chat, about, the final signup) still live inline there; everything below
 * that a landing rule could collide with is namespaced (.site-*, .recipe-*,
 * .page*) for exactly that reason.
 */

/* ── reset + page ground ──────────────────────────────────────────────
 * index.html carries its own identical copy of these three rules inline.
 * They live here so a page that loads site.css needs no <style> block at
 * all, which is the whole point of the file.                            */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--color-text-primary);
  background: var(--color-bg);
  line-height: 1.65;
}

/* ── header ───────────────────────────────────────────────────────────
 * A floating pill, fixed to the top of the viewport and centred: logo,
 * three links, the waitlist pill. Translucent over whatever scrolls under
 * it, a touch more opaque once the page has moved (.is-scrolled, set by
 * site.js). Below 880px the links and the CTA fold into a full-screen menu
 * behind the burger.
 *
 * Because it is out of flow, every page owes the content underneath a top
 * offset: .page carries it for long-form pages, .recipe for recipe pages,
 * and index.html's hero carries its own.                               */
.site-nav {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  z-index: 100;
  display: flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 7px 7px 7px 16px;
  border-radius: 999px;
  background: rgba(254, 251, 249, 0.78);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
          backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: inset 0 0 0 1px rgba(44, 26, 14, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: box-shadow 0.4s ease, background 0.4s ease;
}
.site-nav.is-scrolled {
  background: rgba(254, 251, 249, 0.92);
  box-shadow: inset 0 0 0 1px rgba(44, 26, 14, 0.10), 0 12px 40px -12px rgba(44, 26, 14, 0.28);
}
.site-nav__logo { display: block; line-height: 0; margin-right: 10px; }
.site-nav__logo img { height: 34px; display: block; }
.site-nav__links { display: flex; align-items: center; gap: 2px; }
.site-nav__links a {
  font-size: 14.5px; font-weight: 600; color: var(--color-text-secondary);
  text-decoration: none; padding: 8px 13px; border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}
.site-nav__links a:hover { color: var(--color-text-primary); background: rgba(44, 26, 14, 0.05); }
.site-nav__cta { margin-left: 8px; }
.site-nav__burger {
  display: none; position: relative; width: 40px; height: 40px; flex: none;
  border: 0; border-radius: 999px; background: rgba(44, 26, 14, 0.05); cursor: pointer;
}
.site-nav__burger span {
  position: absolute; left: 12px; width: 16px; height: 1.8px; border-radius: 2px;
  background: var(--color-text-primary);
  transition: transform 0.35s ease, top 0.35s ease;
}
.site-nav__burger span:nth-child(1) { top: 16px; }
.site-nav__burger span:nth-child(2) { top: 22px; }
body.menu-open .site-nav__burger span:nth-child(1) { top: 19px; transform: rotate(45deg); }
body.menu-open .site-nav__burger span:nth-child(2) { top: 19px; transform: rotate(-45deg); }

/* The small-screen menu: same four destinations, set large in the serif. */
.site-menu {
  position: fixed; inset: 0; z-index: 90;
  display: flex; flex-direction: column; justify-content: center; padding: 32px;
  background: rgba(254, 251, 249, 0.88);
  -webkit-backdrop-filter: blur(28px) saturate(1.3);
          backdrop-filter: blur(28px) saturate(1.3);
  opacity: 0; visibility: hidden;
  transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}
body.menu-open { overflow: hidden; }
body.menu-open .site-menu { opacity: 1; visibility: visible; transition: opacity 0.4s ease; }
.site-menu a {
  display: block; overflow: hidden; text-decoration: none;
  font-family: 'Playfair Display', serif; font-weight: 600; letter-spacing: -0.02em;
  font-size: clamp(34px, 9vw, 50px); line-height: 1.35; color: var(--color-text-primary);
}
.site-menu a > span { display: block; transform: translateY(110%); transition: transform 0.6s ease; }
body.menu-open .site-menu a > span { transform: translateY(0); }
body.menu-open .site-menu a:nth-child(1) > span { transition-delay: 0.06s; }
body.menu-open .site-menu a:nth-child(2) > span { transition-delay: 0.12s; }
body.menu-open .site-menu a:nth-child(3) > span { transition-delay: 0.18s; }
body.menu-open .site-menu a:nth-child(4) > span { transition-delay: 0.24s; }
.site-menu a.site-menu__cta { color: var(--color-primary-hover); }
.site-menu__foot {
  position: absolute; left: 32px; right: 32px; bottom: 36px;
  display: flex; justify-content: space-between; gap: 16px;
  font-size: 13.5px; color: var(--color-text-tertiary);
}

@media (max-width: 880px) {
  .site-nav { top: 14px; width: calc(100vw - 28px); justify-content: space-between;
              padding: 6px 6px 6px 14px; }
  .site-nav__logo img { height: 30px; }
  .site-nav .site-nav__links, .site-nav .site-nav__cta { display: none; }   /* outranks .btn's display */
  .site-nav__burger { display: block; }
}

/* The header's right-hand action. On subpages it is a LINK to the landing
 * page's signup anchor, not a button, because there is no form here. */
.btn {
  font-family: 'DM Sans', sans-serif; font-weight: 700; font-size: 16px;
  background: var(--color-primary); color: #FFFEFE;
  border: none; border-radius: 999px; padding: 14px 28px;
  cursor: pointer; text-decoration: none; display: inline-block;
  white-space: nowrap;
  transition: background 0.15s, transform 0.1s;
}
.btn--small { padding: 10px 20px; font-size: 14px; }
.btn:active { transform: scale(0.98); }
@media (hover: hover) {
  .btn:hover { background: var(--color-primary-hover); }
}

/* ── back to home ─────────────────────────────────────────────────────
 * Sits at the top of the content column, under the header. The chevron is
 * allowed here: per the design system, arrows live on text-link CTAs and
 * are banned only on pill-shaped primary buttons.                       */
.back-home {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 15px; font-weight: 500; color: var(--color-text-tertiary);
  text-decoration: none; margin-bottom: 28px;
  transition: color 0.15s;
}
.back-home svg { width: 15px; height: 15px; flex: none; }
@media (hover: hover) {
  .back-home:hover { color: var(--color-primary); }
}

/* ── long-form page column ────────────────────────────────────────────
 * Deliberately NOT called `.wrap`: index.html already owns that name at a
 * much wider max-width, and the two would collide the day anyone loads
 * this file there.                                                      */
.page { max-width: 680px; margin: 0 auto; padding: 112px 28px 100px; }

.page h1 { font-family: 'Playfair Display', serif; font-size: 40px; margin-bottom: 8px; }
.page h2 { font-family: 'Playfair Display', serif; font-size: 23px; margin: 34px 0 10px; }
.page h3 { font-size: 17px; margin: 22px 0 6px; color: var(--color-text-primary); }
.page p, .page li { color: var(--color-text-secondary); font-size: 17px; }
.page p + p { margin-top: 12px; }
.page ul { padding-left: 22px; margin-top: 8px; }
.page li { margin-bottom: 6px; }
.page a { color: var(--color-primary); }

.page .updated { color: var(--color-text-tertiary); font-size: 15px; margin-bottom: 36px; }

/* Pulled-out emphasis inside long-form copy: the allergy note on /privacy,
 * the "aid, not a guarantee" note on /terms. */
.callout {
  border-left: 3px solid var(--color-primary);
  background: var(--color-surface-hover);
  padding: 16px 20px; margin: 20px 0; border-radius: 0 8px 8px 0;
}
.callout p, .callout li { font-size: 16px; }

/* All-caps legal text. Kept smaller and quieter than body copy so a wall of
 * capitals does not shout down the page it sits in. */
.legalese { font-size: 15px; color: var(--color-text-tertiary); }

/* Label-then-description list. Used for the processor list on /privacy. */
.def-list { list-style: none; padding-left: 0; margin-top: 12px; }
.def-list li { margin-bottom: 12px; }
.def-list strong { color: var(--color-text-primary); }

/* ── page footer ──────────────────────────────────────────────────────
 * The entity line plus sibling-page links. Every page carries the legal
 * entity name; that is the point of it. */
.page-foot {
  margin-top: 44px; padding-top: 20px;
  border-top: 1px solid var(--color-border);
  font-size: 15px; color: var(--color-text-tertiary);
}

/* ── small screens ────────────────────────────────────────────────────── */
@media (max-width: 560px) {
  .page { padding: 96px 20px 80px; }
  .page h1 { font-size: 33px; }
}

/* ── mono label ───────────────────────────────────────────────────────
 * The small uppercase label the app uses over data: recipe kickers, meta
 * strip headings, "Maui says". */
.mono {
  font-family: 'DM Mono', monospace; font-size: 11px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
}

/* ── wide-page footer ─────────────────────────────────────────────────
 * For pages that are not a single long-form column (recipes). The
 * long-form column keeps .page-foot. */
.site-foot {
  border-top: 1px solid var(--color-border); margin-top: 40px;
  padding: 30px 0 60px; font-size: 13.5px; color: var(--color-text-tertiary);
}
.site-foot a { color: var(--color-text-secondary); }

/* ── recipe pages ─────────────────────────────────────────────────────
 * /recipes/[slug]. Ported from ../maui-design-system/recipe-page-prototype.html
 * on 2026-09-13; the prototype stays the design source. Every class is
 * namespaced .recipe-* so nothing here can reach a landing-page rule. */
.recipe { max-width: 1060px; margin: 0 auto; padding: 112px 28px 0; }
.recipe h1, .recipe h2, .recipe h3 { font-family: 'Playfair Display', serif; font-weight: 700; text-wrap: balance; }

.recipe-hero { display: grid; grid-template-columns: 1fr 420px; gap: 52px; align-items: center;
               padding: 14px 0 56px; }
.recipe-kicker { color: var(--color-primary); display: block; margin-bottom: 14px; }
.recipe-hero h1 { font-size: clamp(38px, 5vw, 56px); line-height: 1.05; margin-bottom: 14px;
                  letter-spacing: -0.015em; }
.recipe-tagline { font-size: 19px; color: var(--color-text-secondary); line-height: 1.5;
                  margin-bottom: 26px; max-width: 42ch; }
.recipe-hero__what { font-size: 15.5px; color: var(--color-text-secondary); max-width: 44ch; line-height: 1.55; }
.recipe-hero__link { font-size: 15.5px; font-weight: 500; color: var(--color-primary-hover);
                     text-decoration: none; border-bottom: 1.5px solid var(--color-primary-border-muted);
                     padding-bottom: 2px; }
.recipe-hero__link:hover { border-bottom-color: var(--color-primary); }
.recipe-hero__dish { width: 100%; height: auto; aspect-ratio: 1; border-radius: 50%; display: block; }

.recipe-meta { display: flex; flex-wrap: wrap; border-top: 1px solid var(--color-border); }
.recipe-meta div { flex: 1 1 120px; padding: 14px 20px 16px;
                   border-right: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.recipe-meta div:last-child { border-right: none; }
.recipe-meta dt { color: var(--color-text-tertiary); margin-bottom: 4px; }
.recipe-meta dd { font-size: 17px; font-weight: 500; }

.recipe-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.recipe-chip { font-size: 13px; padding: 5px 13px; border-radius: 999px;
               background: var(--color-primary-surface); color: var(--color-text-secondary);
               border: 1px solid var(--color-primary-border-muted); }
.recipe-chip--warn { background: var(--color-surface); border-color: var(--color-border); }
.recipe-chip--warn b { color: var(--color-text-primary); font-weight: 700; }

.recipe-tip { display: grid; grid-template-columns: 56px 1fr; gap: 18px; align-items: start;
              background: var(--color-primary-surface); border-radius: 20px;
              padding: 22px 26px; margin: 44px 0; }
.recipe-tip__cat { width: 56px; height: 56px; border-radius: 50%; display: block;
                   background: var(--color-primary); object-fit: contain; padding: 4px; }
.recipe-tip .mono { color: var(--color-primary-hover); display: block; margin-bottom: 6px; }
.recipe-tip p { font-size: 16.5px; color: var(--color-text-primary); line-height: 1.6; }

.recipe-cols { display: grid; grid-template-columns: 340px 1fr; gap: 56px; align-items: start;
               padding-bottom: 20px; }
.recipe-sec { margin-bottom: 52px; }
.recipe-sec h2 { font-size: 29px; margin-bottom: 6px; letter-spacing: -0.01em; }
.recipe-lede { color: var(--color-text-secondary); font-size: 15.5px; margin-bottom: 20px; }
.recipe-note { margin-top: 14px; font-size: 13.5px; color: var(--color-text-tertiary); line-height: 1.55; }

.recipe-nutri { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr);
                border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.recipe-nutri li { padding: 16px 18px 18px; border-right: 1px solid var(--color-border); }
.recipe-nutri li:last-child { border-right: none; }
.recipe-nutri .v { display: block; font-family: 'DM Mono', monospace; font-size: 24px;
                   font-variant-numeric: tabular-nums; margin-bottom: 2px; }
.recipe-nutri .k { display: block; font-family: 'DM Mono', monospace; font-size: 11px;
                   letter-spacing: 0.11em; text-transform: uppercase; color: var(--color-text-tertiary); }

.recipe-ing { list-style: none; }
.recipe-ing li { display: flex; gap: 14px; padding: 11px 0; align-items: baseline;
                 border-bottom: 1px solid var(--color-border); font-size: 15.5px; }
.recipe-ing li:first-child { border-top: 1px solid var(--color-border); }
.recipe-ing .q { font-family: 'DM Mono', monospace; font-size: 13px; color: var(--color-text-primary);
                 flex: 0 0 78px; font-variant-numeric: tabular-nums; }
.recipe-ing .n { flex: 1; }
.recipe-ing .p { display: block; color: var(--color-text-tertiary); font-size: 13.5px; }

.recipe-prep { background: var(--color-surface); border-radius: 16px; padding: 20px 24px 22px; margin-bottom: 32px; }
.recipe-prep .mono { color: var(--color-text-tertiary); display: block; margin-bottom: 10px; }
.recipe-prep ol { padding-left: 19px; }
.recipe-prep li { margin-bottom: 7px; font-size: 15.5px; color: var(--color-text-secondary); }
.recipe-prep li:last-child { margin-bottom: 0; }

.recipe-step { display: grid; grid-template-columns: 38px 1fr; gap: 18px; padding: 20px 0;
               border-bottom: 1px solid var(--color-border); }
.recipe-step:first-of-type { border-top: 1px solid var(--color-border); }
.recipe-step__n { width: 38px; height: 38px; border-radius: 50%;
                  background: var(--color-text-primary); color: var(--color-bg);
                  display: flex; align-items: center; justify-content: center;
                  font-family: 'DM Mono', monospace; font-size: 14px; }
.recipe-step h3 { font-family: 'DM Sans', sans-serif; font-size: 17px; font-weight: 700; margin-bottom: 5px; }
.recipe-step p { font-size: 15.5px; color: var(--color-text-secondary); }
.recipe-timer { display: inline-block; margin-top: 9px; font-family: 'DM Mono', monospace;
                font-size: 11px; letter-spacing: 0.06em; padding: 3px 10px; border-radius: 999px;
                background: var(--color-surface); color: var(--color-text-secondary);
                border: 1px solid var(--color-border); }

.recipe-swaps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.recipe-swap { border: 1px solid var(--color-border); border-radius: 16px; padding: 18px 20px 20px;
               background: var(--color-surface-elevated); box-shadow: var(--shadow-card-soft); }
.recipe-swap .mono { color: var(--color-text-tertiary); display: block; margin-bottom: 8px; }
.recipe-swap b { display: block; font-size: 16px; margin-bottom: 4px; }
.recipe-swap p { font-size: 14px; color: var(--color-text-secondary); }

.recipe-keeps { border-left: 4px solid var(--color-primary); padding: 4px 0 4px 22px; }
.recipe-keeps p { font-size: 15.5px; color: var(--color-text-secondary); }
.recipe-keeps p + p { margin-top: 10px; }

/* The conversion block at the foot of every recipe page and the index. */
.recipe-cta { background: var(--color-surface); border-radius: 24px; padding: 48px 52px 52px; margin: 16px 0 24px; }
.recipe-cta h2 { font-size: clamp(28px, 3.4vw, 38px); max-width: 24ch; margin-bottom: 12px; }
.recipe-cta h2 em { font-style: italic; font-weight: 600; }
.recipe-cta > p { font-size: 17.5px; color: var(--color-text-secondary); max-width: 56ch; margin-bottom: 26px; }
.recipe-cta .btn--lg { padding: 16px 34px; font-size: 17px; }
.recipe-cta__note { margin-top: 14px; font-size: 13.5px; color: var(--color-text-tertiary); }
.recipe-shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; margin-top: 44px; }
.recipe-shots figure { margin: 0; }
.recipe-shots img { width: 100%; height: auto; display: block; border-radius: 20px; box-shadow: var(--shadow-lg);
                    background: var(--color-bg); }
.recipe-shots figcaption { margin-top: 18px; }
.recipe-shots figcaption b { display: block; font-size: 16px; margin-bottom: 5px; }
.recipe-shots figcaption span { font-size: 14.5px; color: var(--color-text-secondary); line-height: 1.55; display: block; }

/* ── recipes index ────────────────────────────────────────────────────
 * /recipes. A grid of cards, one per published recipe. */
.recipe-index__head { max-width: 62ch; padding: 14px 0 40px; }
.recipe-index__head h1 { font-size: clamp(38px, 5vw, 54px); line-height: 1.05; margin-bottom: 14px;
                         letter-spacing: -0.015em; }
.recipe-index__head p { font-size: 18px; color: var(--color-text-secondary); line-height: 1.55; }
.recipe-index__jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.recipe-index__jump a { text-decoration: none; }
.recipe-index__group { scroll-margin-top: 100px; }
.recipe-index__group > h2 { font-size: 26px; margin: 8px 0 18px; padding-top: 24px;
                            border-top: 1px solid var(--color-border); }
.recipe-grid { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
               padding-bottom: 40px; }
.recipe-card { display: block; text-decoration: none; color: inherit;
               border: 1px solid var(--color-border); border-radius: 20px; overflow: hidden;
               background: var(--color-surface-elevated); box-shadow: var(--shadow-card-soft);
               transition: transform 0.2s, box-shadow 0.2s; }
.recipe-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.recipe-card img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; display: block;
                   background: var(--color-bg); }
.recipe-card__body { padding: 18px 20px 22px; }
.recipe-card__body .mono { color: var(--color-primary); display: block; margin-bottom: 8px; }
.recipe-card h2 { font-size: 22px; margin-bottom: 6px; }
.recipe-card p { font-size: 14.5px; color: var(--color-text-secondary); line-height: 1.5; }
.recipe-card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

@media (max-width: 900px) {
  .recipe { padding: 96px 20px 0; }
  .recipe-hero { grid-template-columns: 1fr; gap: 30px; }
  .recipe-hero__art { order: -1; max-width: 360px; margin: 0 auto; }
  .recipe-cols { grid-template-columns: 1fr; gap: 34px; }
  .recipe-swaps { grid-template-columns: 1fr 1fr; }
  .recipe-shots { grid-template-columns: 1fr; gap: 40px; }
  .recipe-nutri { grid-template-columns: repeat(2, 1fr); }
  .recipe-cta { padding: 34px 26px 38px; }
  .recipe-cta h2 br { display: none; }
  .recipe-grid { grid-template-columns: 1fr 1fr; gap: 18px; }
}
@media (max-width: 560px) {
  .recipe-grid { grid-template-columns: 1fr; }
  .recipe-swaps { grid-template-columns: 1fr; }
}
