/* Daily Prep site styles. Rules and colors: Website/Build_and_Deploy.md, Phase 3. */

:root {
  color-scheme: light;
  --green-900: #1D3322;  /* logo dark green: text, buttons, footer */
  --green-700: #2B4A35;  /* button hover */
  --green-500: #657D33;  /* logo leaf green: decoration only */
  --cream: #FAF6EE;      /* page background */
  --card: #FFFFFF;       /* cards and menus */
  --line: #E6DDCB;       /* borders */
  --muted: #4B5B4F;      /* secondary text */
  --accent: #B04A17;     /* orange: small highlights and the focus ring */
  --radius: 16px;
  --shadow: 0 8px 24px rgba(29, 51, 34, 0.10);
  --font-head: "Fraunces", Georgia, serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max: 1120px;
}

/* Page */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--green-900);
  background: var(--cream);
}

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 16px;
}

h2 { font-size: 2rem; }

p { margin: 0 0 16px; }

a { color: var(--green-900); }

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

main > section { padding: 64px 0; }

/* Skip link */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 16px;
  background: var(--card);
  color: var(--green-900);
  font-weight: 700;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

/* Focus */

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* Header */

.site-header {
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand { display: block; }

.brand img {
  height: 56px;
  width: auto;
  mix-blend-mode: multiply;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.site-nav > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  text-decoration: none;
}

.site-nav > a:hover { text-decoration: underline; }

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--green-900);
  color: var(--cream);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.button:hover { background: var(--green-700); }

summary.button { list-style: none; }

summary.button::-webkit-details-marker { display: none; }

/* Order Now menu */

.order-menu {
  position: relative;
  display: inline-block;
}

.order-menu ul {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  margin: 0;
  padding: 8px 0;
  list-style: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 20;
}

.nav-order .order-menu ul {
  left: auto;
  right: 0;
}

.order-menu a {
  display: block;
  padding: 12px 16px;
  font-weight: 600;
  text-decoration: none;
}

.order-menu a:hover { background: var(--cream); }

.order-menu-up {
  position: static;
  display: block;
}

.order-menu-up ul {
  top: auto;
  bottom: calc(100% + 8px);
  left: 0;
  right: 0;
}

/* Ordering coming soon */

.order-soon {
  max-width: 460px;
  padding: 20px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.order-soon p:last-child { margin-bottom: 0; }

.order-soon-title {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 8px;
}

.order-soon-pill {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.85rem;
}

.order-caption {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Hero */

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-text:only-child { grid-column: 1 / -1; }

.hero h1 { font-size: clamp(2.75rem, 7vw, 4.5rem); }

.tagline {
  font-size: 1.4rem;
  font-weight: 600;
}

.hero img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Menu */

.menu h2 {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.note {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.9rem;
}

.meal-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.meal-body { padding: 20px; }

.meal-card h3 { font-size: 1.3rem; }

.macros {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 0 0 16px;
}

.macros div {
  padding: 8px 4px;
  text-align: center;
  background: var(--cream);
  border-radius: 10px;
}

.macros dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--muted);
}

.macros dd {
  margin: 0;
  font-family: var(--font-head);
  font-size: 1.25rem;
}

.allergens { margin-bottom: 0; }

.allergens strong { color: var(--accent); }

/* FAQ */

.faq-item { border-bottom: 1px solid var(--line); }

.faq-item summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  font-weight: 700;
}

.faq-item[open] summary::after { content: "−"; }

.faq-item p {
  max-width: 65ch;
  margin: 0;
  padding-bottom: 18px;
}

/* Founder */

.founder-row {
  display: flex;
  align-items: center;
  gap: 32px;
}

.founder-row img {
  flex: none;
  width: 200px;
  height: 200px;
  border-radius: 50%;
}

.founder-row p { margin: 0; }

/* Footer */

.site-footer {
  padding: 48px 0;
  background: var(--green-900);
  color: var(--cream);
}

.site-footer a { color: var(--cream); text-decoration: underline; }

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.footer-grid nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer-grid nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.footer-name {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
}

.site-footer :focus-visible { outline-color: var(--cream); }

.legal {
  margin: 32px auto 0;
  font-size: 0.85rem;
}

/* Phone bar */

.mobile-order { display: none; }

/* Phones */

@media (max-width: 719.98px) {
  main > section { padding: 48px 0; }

  .brand img { height: 44px; }

  .site-nav { gap: 16px; }

  .nav-order { display: none; }

  .hero-grid { grid-template-columns: 1fr; }

  .founder-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-grid { grid-template-columns: 1fr; }

  .mobile-order {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: var(--cream);
    border-top: 1px solid var(--line);
  }

  .mobile-order .button,
  .mobile-order .order-menu { width: 100%; }

  body.has-mobile-order { padding-bottom: 88px; }
}
