/* ============================================================
   The Daily Plate — shared styles
   Pages: index.html (why nutrition matters) · guide.html (guide)
   ============================================================ */

:root {
  /* color */
  --paper: #f6f7f1;
  --card: #fffdf8;
  --ink: #1b2a22;
  --ink-60: rgba(27, 42, 34, 0.62);
  --ink-15: rgba(27, 42, 34, 0.15);
  --leaf: #2e6b3f;
  --leaf-deep: #143626;
  --tomato: #e4572e;
  --tomato-deep: #bf3f1b;
  --butter: #f2c94c;
  --butter-tint: #fbf3d9;

  /* plate slices */
  --veg: #3e7c4f;
  --fruit: #8fb954;
  --grains: #d9a441;
  --protein: #c6573f;
  --water: #5e93be;

  /* type */
  --display: "Bricolage Grotesque", Georgia, serif;
  --body: "Public Sans", "Helvetica Neue", Arial, sans-serif;
  --label: "Anton", "Arial Narrow", sans-serif;

  --rule-heavy: 2.5px solid var(--ink);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--display);
  line-height: 1.08;
  margin: 0;
  font-weight: 700;
  text-wrap: balance;
}

p { margin: 0; }

a { color: var(--leaf); text-underline-offset: 3px; }
a:hover { color: var(--tomato-deep); }

:focus-visible {
  outline: 3px solid var(--tomato);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2.5rem);
}

/* ------------------------------------------------ nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper);
  border-bottom: var(--rule-heavy);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.8rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.brand:hover { color: var(--leaf); }

.brand svg { display: block; }

.nav-right {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
}

.nav-links {
  display: flex;
  gap: clamp(0.9rem, 3vw, 2rem);
}

.nav-social {
  display: flex;
  gap: 0.6rem;
}

.nav-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ink-15);
  color: var(--ink);
  transition: background-color 160ms ease, color 160ms ease;
}

.nav-social svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.nav-social a:hover,
.nav-social a:focus-visible {
  background: var(--leaf);
  color: var(--paper);
}

.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  padding-block: 0.35rem;
  border-bottom: 3px solid transparent;
}

.nav-links a:hover { color: var(--leaf); }

.nav-links a[aria-current="page"] {
  color: var(--tomato-deep);
  border-bottom-color: var(--tomato);
}

/* ------------------------------------------------ hero */

.hero {
  padding-block: clamp(3rem, 8vw, 5.5rem) clamp(2.5rem, 6vw, 4rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.4rem);
  letter-spacing: -0.02em;
  max-width: 13ch;
}

.hero h1 .soft {
  font-weight: 300;
}

.hero .lede {
  margin-top: 1.4rem;
  font-size: clamp(1.08rem, 1.6vw, 1.25rem);
  color: var(--ink-60);
  max-width: 52ch;
}

.hero-actions {
  margin-top: 2rem;
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
}

/* primary button */
.btn {
  display: inline-block;
  background: var(--tomato-deep);
  color: var(--paper);
  font-family: var(--body);
  font-weight: 700;
  font-size: 1.02rem;
  text-decoration: none;
  padding: 0.78rem 1.5rem;
  border-radius: 12px;
  transition: background-color 160ms ease, transform 160ms ease;
}

.btn:hover {
  background: var(--tomato);
  color: var(--paper);
  transform: translateY(-1px);
}

.btn:active { transform: translateY(0); }

.quiet-link { font-weight: 600; }

/* one orchestrated page-load moment: the hero rises once */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero h1, .hero .lede, .hero-actions {
  animation: rise 520ms ease-out backwards;
}
.hero .lede      { animation-delay: 90ms; }
.hero-actions    { animation-delay: 180ms; }

/* ------------------------------------------------ diet facts panel
   (the FDA-nutrition-label device — page 1's bold move) */

.facts {
  background: var(--card);
  border: 2.5px solid var(--ink);
  border-radius: 10px;
  padding: 1.4rem 1.5rem 1.1rem;
  box-shadow: 6px 6px 0 var(--ink-15);
}

.facts-title {
  font-family: var(--label);
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  letter-spacing: 0.01em;
  line-height: 1;
  margin: 0;
}

.facts-sub {
  font-size: 0.92rem;
  color: var(--ink-60);
  margin-top: 0.35rem;
}

.facts-bar {
  height: 9px;
  background: var(--ink);
  margin-block: 0.85rem 0.2rem;
}

.fact-row {
  display: grid;
  grid-template-columns: minmax(4.6rem, auto) 1fr;
  gap: 1rem;
  align-items: baseline;
  padding-block: 0.72rem;
  border-bottom: 4px solid var(--ink);
}

.fact-row:last-of-type {
  border-bottom: 2px solid var(--ink);
}

.fact-num {
  font-family: var(--label);
  font-size: 1.55rem;
  line-height: 1;
  color: var(--ink);
}

.fact-desc {
  font-size: 0.95rem;
  line-height: 1.45;
}

.fact-desc strong { font-weight: 700; }

.facts-foot {
  padding-top: 0.7rem;
  font-size: 0.8rem;
  color: var(--ink-60);
  line-height: 1.45;
}

/* ------------------------------------------------ sections */

.section {
  padding-block: clamp(2.8rem, 7vw, 4.75rem);
}

.section-head {
  border-top: var(--rule-heavy);
  padding-top: 1.1rem;
  margin-bottom: 0.6rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
}

.section-head h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  letter-spacing: -0.015em;
  max-width: 24ch;
}

.section-head .aside {
  font-size: 0.98rem;
  color: var(--ink-60);
  max-width: 38ch;
}

/* editorial rows (benefits, macros) */
.rows { margin-top: 1.2rem; }

.row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.9fr) minmax(0, 0.9fr);
  gap: 1.2rem 2.5rem;
  padding-block: 1.6rem;
  border-top: 1px solid var(--ink-15);
}

.row h3 {
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}

.row .why {
  color: var(--ink);
  max-width: 58ch;
}

.row .why .detail {
  display: block;
  margin-top: 0.55rem;
  font-size: 0.92rem;
  color: var(--ink-60);
}

.row .stat {
  font-family: var(--label);
  font-size: 1.35rem;
  line-height: 1.25;
  color: var(--leaf);
  max-width: 15ch;
}

.row .stat small {
  display: block;
  font-family: var(--body);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-60);
  margin-top: 0.35rem;
  letter-spacing: 0;
  line-height: 1.4;
}

/* ------------------------------------------------ dark band */

.dark {
  background: var(--leaf-deep);
  color: var(--paper);
  border-radius: 26px;
  padding: clamp(2.2rem, 6vw, 4rem);
  margin-block: clamp(1rem, 3vw, 2rem);
}

.dark h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.7rem);
  letter-spacing: -0.015em;
  max-width: 26ch;
}

.dark h2 em {
  font-style: normal;
  color: var(--butter);
}

.dark .follow {
  margin-top: 1.1rem;
  color: rgba(246, 247, 241, 0.78);
  max-width: 58ch;
}

.dark-stats {
  margin-top: 2.4rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  border-top: 1px solid rgba(246, 247, 241, 0.25);
  padding-top: 1.6rem;
}

.dark-stat .n {
  font-family: var(--label);
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  line-height: 1;
  color: var(--butter);
}

.dark-stat .c {
  margin-top: 0.5rem;
  font-size: 0.92rem;
  color: rgba(246, 247, 241, 0.82);
  max-width: 26ch;
}

/* ------------------------------------------------ plate (page 2) */

.plate-scene {
  margin-top: 1.4rem;
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.plate-svg { width: 100%; height: auto; display: block; }

.plate-svg path {
  stroke: var(--paper);
  stroke-width: 5;
  transition: transform 220ms ease, opacity 220ms ease;
  transform-box: view-box;
  transform-origin: 200px 200px;
  cursor: default;
}

.plate-svg path:hover,
.plate-scene:has(.l-veg:hover) .s-veg,
.plate-scene:has(.l-fruit:hover) .s-fruit,
.plate-scene:has(.l-grains:hover) .s-grains,
.plate-scene:has(.l-protein:hover) .s-protein {
  transform: scale(1.035);
}

.plate-scene:has(.s-veg:hover) .l-veg,
.plate-scene:has(.s-fruit:hover) .l-fruit,
.plate-scene:has(.s-grains:hover) .l-grains,
.plate-scene:has(.s-protein:hover) .l-protein {
  color: var(--ink);
  border-left-color: var(--tomato);
}

.plate-side {
  display: flex;
  gap: 2rem;
  margin-top: 0.6rem;
  padding-left: 0.4rem;
}

.plate-side .side {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.9rem;
  color: var(--ink-60);
  max-width: 14rem;
}

.side-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex: none;
  border: 3.5px solid var(--water);
}
.side-dot.oil { border-color: var(--grains); }

.legend {
  list-style: none;
  margin: 0;
  padding: 0;
}

.legend li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.9rem;
  align-items: baseline;
  padding-block: 1rem;
  border-bottom: 1px solid var(--ink-15);
  color: var(--ink-60);
  transition: color 160ms ease, border-color 160ms ease;
}

.legend li:first-child { border-top: 1px solid var(--ink-15); }

.legend .swatch {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  align-self: center;
}

.legend .name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.12rem;
  color: var(--ink);
}

.legend .name small {
  display: block;
  font-family: var(--body);
  font-weight: 400;
  font-size: 0.88rem;
  color: var(--ink-60);
  margin-top: 0.2rem;
}

.legend .pct {
  font-family: var(--label);
  font-size: 1.4rem;
  color: var(--ink);
}

/* ------------------------------------------------ quiet essentials (page 2) */

.essentials {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
  margin-top: 1.4rem;
}

.essential {
  background: var(--card);
  border: 1.5px solid var(--ink-15);
  border-radius: 16px;
  padding: 1.5rem 1.5rem 1.3rem;
}

.essential h3 {
  font-size: 1.2rem;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.essential h3 .amt {
  font-family: var(--label);
  font-size: 1.05rem;
  color: var(--leaf);
  letter-spacing: 0.02em;
}

.essential p {
  margin-top: 0.6rem;
  font-size: 0.95rem;
  color: var(--ink-60);
}

/* ------------------------------------------------ sample day (page 2) */

.day {
  margin-top: 1.4rem;
  max-width: 46rem;
}

.meal {
  position: relative;
  display: grid;
  grid-template-columns: 4.6rem 1fr;
  gap: 1.4rem;
  padding-block: 1.3rem;
  border-left: 2px solid var(--ink-15);
  margin-left: 0.4rem;
  padding-left: 1.6rem;
}

.meal::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 2.05rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--dot, var(--leaf));
  border: 2.5px solid var(--paper);
}

.meal .time {
  font-family: var(--label);
  font-size: 1.1rem;
  color: var(--leaf);
  padding-top: 0.2rem;
}

.meal h3 { font-size: 1.18rem; }

.meal p {
  margin-top: 0.35rem;
  font-size: 0.95rem;
  color: var(--ink-60);
  max-width: 52ch;
}

.meal.m1 { --dot: var(--veg); }
.meal.m2 { --dot: var(--grains); }
.meal.m3 { --dot: var(--fruit); }
.meal.m4 { --dot: var(--protein); }

/* ------------------------------------------------ habits (page 2) */

.habits {
  margin-top: 0.9rem;
  max-width: 56rem;
}

.habit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: 1rem 2.5rem;
  padding-block: 1.25rem;
  border-top: 1px solid var(--ink-15);
}

.habit h3 { font-size: 1.15rem; }
.habit p { font-size: 0.97rem; color: var(--ink-60); max-width: 56ch; }

/* ------------------------------------------------ cross-page CTA */

.cross {
  background: var(--butter-tint);
  border-radius: 26px;
  padding: clamp(2rem, 5vw, 3.2rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.cross h2 {
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  letter-spacing: -0.015em;
  max-width: 22ch;
}

/* ------------------------------------------------ contact page */

.contact-grid {
  margin-top: 1.4rem;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: stretch;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.contact-side {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field label {
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.95rem;
}

.field input,
.field textarea {
  font-family: var(--body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--card);
  border: 2px solid var(--ink-15);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  transition: border-color 160ms ease;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--leaf);
  outline: none;
}

.field textarea {
  resize: vertical;
  min-height: 8.5rem;
}

.botcheck {
  display: none;
}

.form-note {
  font-size: 0.85rem;
  color: var(--ink-60);
}

/* ------------------------------------------------ map embed */

.map-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.95rem;
}

.map-embed {
  flex: 1 1 auto;
  min-height: 220px;
  border: 2.5px solid var(--ink);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 6px 6px 0 var(--ink-15);
}

.map-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
}

/* ------------------------------------------------ whatsapp widget */

.wa-float {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 30;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #25D366;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.wa-float svg {
  width: 30px;
  height: 30px;
  fill: #fff;
}

.wa-float:hover,
.wa-float:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* ------------------------------------------------ pulse live chat widget */

/* The visible bubble lives inside sp-live-chat's shadow DOM, positioned fixed
   against the viewport — so raising the host's bottom moves nothing. A transform
   makes the host the containing block for its fixed descendants and shifts the
   whole widget up as a unit. 84px clears the WhatsApp float (1.25rem bottom
   + 56px height) with a small gap. */
sp-live-chat {
  transform: translateY(-84px);
}

/* ------------------------------------------------ footer */

.footer {
  border-top: var(--rule-heavy);
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding-block: 1.6rem 2.2rem;
  font-size: 0.88rem;
  color: var(--ink-60);
}

.footer .brandline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  margin-bottom: 0.6rem;
}

.footer .brandline a { font-weight: 700; color: var(--ink); }
.footer p { max-width: 70ch; }
.footer .fine { margin-top: 0.35rem; font-size: 0.8rem; }

.social-links {
  display: flex;
  gap: 0.7rem;
  margin-bottom: 0.9rem;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ink-15);
  color: var(--ink);
  transition: background-color 160ms ease, color 160ms ease;
}

.social-links svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.social-links a:hover,
.social-links a:focus-visible {
  background: var(--leaf);
  color: var(--paper);
}

/* ------------------------------------------------ responsive */

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero h1 { max-width: 18ch; }
  .row { grid-template-columns: 1fr; gap: 0.55rem; }
  .row .stat { max-width: none; }
  .plate-scene { grid-template-columns: 1fr; }
  .plate-svg { max-width: 380px; margin-inline: auto; }
  .essentials { grid-template-columns: 1fr; }
  .dark-stats { grid-template-columns: 1fr; gap: 1.4rem; }
  .habit { grid-template-columns: 1fr; gap: 0.3rem; }
  .contact-grid { grid-template-columns: 1fr; }
  .map-embed { flex: none; aspect-ratio: 16 / 9; min-height: 200px; }
}

@media (max-width: 560px) {
  .nav-inner { flex-direction: column; gap: 0.3rem; }
  .nav-right { flex-direction: column; gap: 0.6rem; }
  .nav-links { flex-wrap: wrap; justify-content: center; }
  .meal { grid-template-columns: 1fr; gap: 0.2rem; }
  .meal .time { padding-top: 0; }
  .plate-side { flex-direction: column; gap: 0.8rem; }
}

/* ------------------------------------------------ reduced motion */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero h1, .hero .lede, .hero-actions { animation: none; }
  .btn, .plate-svg path, .legend li { transition: none; }
  .plate-svg path:hover,
  .plate-scene:has(.l-veg:hover) .s-veg,
  .plate-scene:has(.l-fruit:hover) .s-fruit,
  .plate-scene:has(.l-grains:hover) .s-grains,
  .plate-scene:has(.l-protein:hover) .s-protein {
    transform: none;
  }
}
