/* Doughbry's design system. Every page loads this file first.
   Colors are measured from the brand files (Zoyes Brand Design R2, December 2025). */

:root {
  /* Brand palette */
  --red: #D04F30;          /* the brand field color (Pantone 7597 C on the box) */
  --red-deep: #BF442A;     /* darker shapes on the red field */
  --orange-logo: #E35729;  /* the logo color on cream */
  --yellow: #F6BE25;
  --orange: #EA8A2D;
  --lime: #A6CA45;
  --forest: #1C5642;
  --cream: #F0F0E7;
  --white: #FFFDF8;
  --ink: #14261E;          /* body text on cream */

  /* Type */
  --font-display: "Bricolage Grotesque", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --step--1: clamp(0.84rem, 0.80rem + 0.2vw, 0.95rem);
  --step-0: clamp(1.02rem, 0.97rem + 0.25vw, 1.16rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.5rem);
  --step-2: clamp(1.6rem, 1.3rem + 1.4vw, 2.4rem);
  --step-3: clamp(2.2rem, 1.6rem + 2.8vw, 3.9rem);
  --step-4: clamp(3rem, 1.6rem + 6.4vw, 7.2rem);

  /* Space and shape */
  --gutter: clamp(1.1rem, 0.6rem + 2.4vw, 2.5rem);
  --section-y: clamp(4rem, 2.5rem + 7vw, 8.5rem);
  --max: 1200px;
  --radius: 26px;
  --radius-sm: 14px;
  --pop: 0 6px 0 0 rgba(20, 38, 30, 0.9);   /* the chunky offset shadow under buttons and cards */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.55;
  font-weight: 450;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 2px; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
button, input { font: inherit; color: inherit; }
::selection { background: var(--yellow); color: var(--ink); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 6px; }
.on-cream :focus-visible, .theme-cream :focus-visible, .theme-yellow :focus-visible { outline-color: var(--forest); }

/* Type roles */
.display, h1, h2, h3 { font-family: var(--font-display); font-weight: 800; line-height: 0.98; letter-spacing: -0.02em; text-wrap: balance; }
h1, .h1 { font-size: var(--step-4); }
h2, .h2 { font-size: var(--step-3); }
h3, .h3 { font-size: var(--step-2); line-height: 1.05; }
.lede { font-size: var(--step-1); line-height: 1.4; font-weight: 600; text-wrap: pretty; }
p { text-wrap: pretty; }
.eyebrow {            /* wide caps, like REAL FOOD. REAL FAST. on the logo */
  font-family: var(--font-body);
  font-stretch: 125%;
  font-weight: 800;
  font-size: var(--step--1);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.small { font-size: var(--step--1); }

/* Layout */
.container { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.section { padding-block: var(--section-y); position: relative; }
.stack > * + * { margin-top: var(--stack, 1.1rem); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Themes: put one on a section. Text sizes on red must stay large (24px, or 19px bold) to stay readable. */
.theme-red { background: var(--red); color: var(--cream); }
.theme-cream { background: var(--cream); color: var(--ink); }
.theme-forest { background: var(--forest); color: var(--cream); }
.theme-yellow { background: var(--yellow); color: var(--ink); }
.theme-cream h2, .theme-cream h3 { color: var(--forest); }

/* Chips: small labels that stay readable on any background */
.chip {
  display: inline-flex; align-items: center; gap: 0.5em;
  padding: 0.5em 1em; border-radius: 999px;
  background: var(--forest); color: var(--cream);
  font-family: var(--font-body); font-stretch: 125%; font-weight: 800; font-size: var(--step--1);
  letter-spacing: 0.14em; text-transform: uppercase; line-height: 1.2;
}
.chip--yellow { background: var(--yellow); color: var(--ink); }
.chip--cream { background: var(--cream); color: var(--forest); }

/* Buttons: chunky, friendly, obvious */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  padding: 0.95em 1.6em; border-radius: 999px; border: 3px solid var(--ink);
  background: var(--yellow); color: var(--ink);
  font-family: var(--font-display); font-weight: 800; font-size: var(--step-0); line-height: 1; letter-spacing: -0.01em;
  text-decoration: none; cursor: pointer; box-shadow: var(--pop);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background-color 0.18s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 0 0 rgba(20, 38, 30, 0.9); }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 0 rgba(20, 38, 30, 0.9); }
.btn--forest { background: var(--forest); color: var(--cream); }
.btn--cream { background: var(--cream); color: var(--ink); }
.btn--ghost { background: transparent; color: inherit; border-color: currentColor; box-shadow: none; }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.14); box-shadow: none; }
.theme-red .btn--ghost { font-size: max(var(--step-0), 1.1875rem); }   /* stays large enough to read on red */
.btn--sm { padding: 0.7em 1.15em; font-size: var(--step--1); border-width: 2px; box-shadow: 0 4px 0 0 rgba(20, 38, 30, 0.9); }

/* Header: sits on the red hero, turns solid once you scroll (site.js adds .is-stuck) */
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--yellow); color: var(--ink); padding: 0.7em 1em; border-radius: 10px; font-weight: 800; }
.skip-link:focus { top: 12px; }
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.85rem max(var(--gutter), calc((100% - var(--max)) / 2));   /* lines up with the page content on wide screens */
  color: var(--cream);
  transition: background-color 0.25s, box-shadow 0.25s;
}
.site-header.is-stuck, .site-header--solid { background: var(--red); box-shadow: 0 2px 0 rgba(20, 38, 30, 0.18); padding-block: 0.6rem; }
.site-header .brand { display: block; width: clamp(132px, 11vw + 80px, 196px); flex: none; padding: 8px 0; }
.site-header .brand img { width: 100%; }
.site-nav { display: flex; align-items: center; gap: clamp(0.9rem, 2vw, 2rem); }
.site-nav a:not(.btn) { font-family: var(--font-display); font-weight: 800; font-size: 1.1875rem; text-decoration: none; padding: 0.4em 0.1em; border-bottom: 3px solid transparent; }
.site-nav a:not(.btn):hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--yellow); }
.nav-toggle { display: none; }
@media (max-width: 760px) {
  html { scroll-padding-top: 66px; }   /* matches the shorter phone header, so a jump lands flush under it */
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px;
    border-radius: 50%; border: 3px solid var(--ink); background: var(--yellow); color: var(--ink); box-shadow: 0 4px 0 0 rgba(20, 38, 30, 0.9); cursor: pointer;
  }
  .site-nav {
    position: fixed; inset: 0; z-index: -1; flex-direction: column; justify-content: center; gap: 1.6rem;
    background: var(--red); padding: 5rem var(--gutter) 3rem;
    opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  }
  .site-nav a:not(.btn) { font-size: 2rem; }
  .site-nav .btn--sm { font-size: 1.15rem; padding: 0.95em 1.9em; min-height: 56px; margin-top: 1.2rem; border-width: 3px; box-shadow: 0 6px 0 0 rgba(20, 38, 30, 0.9); }
  .nav-open .site-nav { opacity: 1; visibility: visible; transform: none; }
  .nav-open { overflow: hidden; }
}

/* Menu button icon: three lines that fold into an X */
.nav-toggle__icon path { transition: transform 0.25s var(--ease), opacity 0.2s; transform-origin: 12px 12px; }
.nav-open .nav-toggle__icon .l1 { transform: translateY(5px) rotate(45deg); }
.nav-open .nav-toggle__icon .l2 { opacity: 0; }
.nav-open .nav-toggle__icon .l3 { transform: translateY(-5px) rotate(-45deg); }

/* Footer */
.site-footer { background: var(--forest); color: var(--cream); padding: clamp(3rem, 6vw, 5rem) 0 2rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; gap: 2.2rem; grid-template-columns: 1.4fr 1fr 1fr; align-items: start; }
.footer-brand img { width: min(260px, 70%); }
.footer-brand p { margin-top: 1rem; }
.footer-list li + li { margin-top: 0; }
.footer-list a { font-weight: 600; display: inline-block; padding-block: 0.7rem; }
.footer-social { margin-top: 1.2rem; }
.footer-bottom { margin-top: 2.6rem; padding-top: 1.4rem; border-top: 2px solid rgba(240, 240, 231, 0.2); display: flex; flex-wrap: wrap; gap: 0.6rem 1.6rem; justify-content: space-between; font-size: var(--step--1); }
.social { display: flex; gap: 0.7rem; }
.social a { display: inline-flex; width: 46px; height: 46px; align-items: center; justify-content: center; border-radius: 50%; background: var(--cream); color: var(--forest); transition: transform 0.18s var(--ease), background-color 0.18s; }
.social a:hover { transform: translateY(-3px) rotate(-6deg); background: var(--yellow); }
.social svg { width: 22px; height: 22px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* Forms */
.field { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.field input[type="email"] {
  flex: 1 1 240px; min-width: 0; padding: 0.95em 1.2em; border-radius: 999px; border: 3px solid var(--ink);
  background: var(--white); color: var(--ink); font-weight: 600; box-shadow: var(--pop);
}
.field input::placeholder { color: #5b6a62; opacity: 1; }
.form-note { margin-top: 0.9rem; font-weight: 600; min-height: 1.5em; }

/* Motion: everything is visible without scripts. site.js adds .reveal-ready to <html> before hiding anything. */
.reveal-ready .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal-ready .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .reveal-ready .reveal { opacity: 1; transform: none; }
}
