/* Catalano Family Farm: shared site styles.
   Load order: components/bundle.css (design system components), then this file. */

/* ==========================================================================
   Fonts: Vollkorn, Libre Franklin and Stardos Stencil (SIL Open Font License)
   ========================================================================== */
@font-face { font-family: "Vollkorn"; src: url("fonts/vollkorn-latin-wght-normal.woff2") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Vollkorn"; src: url("fonts/vollkorn-latin-wght-italic.woff2") format("woff2"); font-weight: 400 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Libre Franklin"; src: url("fonts/libre-franklin-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Libre Franklin"; src: url("fonts/libre-franklin-latin-wght-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Stardos Stencil"; src: url("fonts/stardos-stencil-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Stardos Stencil"; src: url("fonts/stardos-stencil-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

/* ==========================================================================
   Design tokens: generated from the design system's tokens.json (version 1).
   Change values in the design system, not here.
   ========================================================================== */
:root {
  /* Palette: build with the semantic tokens below, not these. */
  --charcoal-950: #1b1a18;
  --charcoal-900: #252422;
  --charcoal-800: #2f2d2a;
  --charcoal-700: #45413b;
  --charcoal-400: #8f8676;
  --paper-50: #fbf8f1;
  --cream-100: #f6f0e1;
  --cream-200: #f1ebd5;
  --cream-300: #e4d9bd;
  --cream-400: #c9bea4;
  --straw-200: #efdcb6;
  --straw-300: #e2c18f;
  --straw-500: #c59c6a;
  --straw-900: #4a3d28;
  --clay-500: #a55a2a;
  --clay-600: #8f4a22;
  --clay-700: #743a1a;
  --soil-400: #8c7b60;
  --soil-600: #66573f;
  --soil-700: #574632;
  --soil-800: #3f3122;
  --sage-200: #dfe0c4;
  --sage-300: #b9bf8c;
  --sage-600: #59633a;
  --sage-700: #4a5330;
  --sage-900: #363b26;
  --pumpkin-400: #ee8a3c;
  --pumpkin-700: #a64d10;
  --beet-300: #f0a3b3;
  --beet-600: #9a2a45;
  --beet-900: #4a2230;

  /* Type families */
  --font-serif: "Vollkorn", Georgia, "Times New Roman", serif;
  --font-sans: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;
  --font-stencil: "Stardos Stencil", "Vollkorn", Georgia, serif;

  /* Spacing, radius, stroke, layout */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;
  --radius-sm: 3px;
  --radius-md: 6px;
  --radius-lg: 12px;
  --radius-round: 9999px;
  --stroke-hairline: 1px;
  --stroke-rule: 1.5px;
  --stroke-focus: 2px;
  --container: 1120px;
  --measure: 680px;
  --rule-inset: 8px;
}

/* Cream theme (default page) */
:root, [data-theme="cream"] {
  --surface: var(--cream-100);
  --surface-raised: var(--paper-50);
  --surface-alt: var(--cream-200);
  --ink: var(--charcoal-900);
  --ink-muted: var(--soil-700);
  --line: var(--cream-300);
  --line-strong: var(--soil-400);
  --action: var(--clay-600);
  --action-hover: var(--clay-700);
  --on-action: var(--paper-50);
  --link: var(--clay-700);
  --accent: var(--sage-600);
  --accent-soft: var(--sage-200);
  --highlight: var(--straw-200);
  --seasonal: var(--pumpkin-400);
  --on-seasonal: var(--charcoal-900);
  --seasonal-ink: var(--pumpkin-700);
  --danger: var(--beet-600);
  --danger-soft: #f6e2e3;
  --focus: var(--clay-600);
  --shadow-raised: 0 1px 2px rgba(37,36,34,0.08), 0 6px 16px rgba(37,36,34,0.08);
}

/* Sign theme: charcoal, like the farm sign. One band per page. */
[data-theme="sign"] {
  --surface: var(--charcoal-900);
  --surface-raised: var(--charcoal-800);
  --surface-alt: var(--charcoal-950);
  --ink: var(--cream-200);
  --ink-muted: var(--cream-400);
  --line: var(--charcoal-700);
  --line-strong: var(--charcoal-400);
  --action: var(--straw-300);
  --action-hover: var(--straw-200);
  --on-action: var(--charcoal-900);
  --link: var(--straw-300);
  --accent: var(--sage-300);
  --accent-soft: var(--sage-900);
  --highlight: var(--straw-900);
  --seasonal: var(--pumpkin-400);
  --on-seasonal: var(--charcoal-900);
  --seasonal-ink: var(--pumpkin-400);
  --danger: var(--beet-300);
  --danger-soft: var(--beet-900);
  --focus: var(--straw-300);
  --shadow-raised: 0 1px 2px rgba(0,0,0,0.4), 0 6px 16px rgba(0,0,0,0.35);
}

/* ==========================================================================
   Type styles: one class per style in the design system
   ========================================================================== */
.display-xl { font-family: var(--font-serif); font-size: 64px; line-height: 68px; font-weight: 600; letter-spacing: -0.01em; }
.display-l { font-family: var(--font-serif); font-size: 48px; line-height: 54px; font-weight: 600; letter-spacing: -0.005em; }
.heading-1 { font-family: var(--font-serif); font-size: 36px; line-height: 42px; font-weight: 600; }
.heading-2 { font-family: var(--font-serif); font-size: 28px; line-height: 34px; font-weight: 600; }
.heading-3 { font-family: var(--font-serif); font-size: 22px; line-height: 28px; font-weight: 600; }
.quote { font-family: var(--font-serif); font-size: 24px; line-height: 34px; font-weight: 400; font-style: italic; }
.price { font-family: var(--font-serif); font-size: 24px; line-height: 28px; font-weight: 700; }
.body-l { font-family: var(--font-sans); font-size: 18px; line-height: 29px; font-weight: 400; }
.body { font-family: var(--font-sans); font-size: 16px; line-height: 26px; font-weight: 400; }
.body-s { font-family: var(--font-sans); font-size: 14px; line-height: 22px; font-weight: 400; }
.label { font-family: var(--font-sans); font-size: 15px; line-height: 20px; font-weight: 600; }
.caption { font-family: var(--font-sans); font-size: 13px; line-height: 18px; font-weight: 400; }
.stamp { font-family: var(--font-stencil); font-size: 13px; line-height: 16px; font-weight: 700; letter-spacing: 0.12em; }
.eyebrow { font-family: var(--font-stencil); font-size: 15px; line-height: 20px; font-weight: 700; letter-spacing: 0.14em; }

/* Under 640px, step titles down one size: display-xl to display-l, display-l to heading-1. */
@media (max-width: 640px) {
  .display-xl { font-size: 48px; line-height: 54px; letter-spacing: -0.005em; }
  .display-l { font-size: 36px; line-height: 42px; letter-spacing: normal; }
}

/* ==========================================================================
   Page layout: the site's own rules, built only from the tokens above.
   Components (header, cards, stamps, sign panel, footer) are styled by
   components/bundle.css from the design system.
   ========================================================================== */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { font-size: 16px; line-height: 26px; }
img { max-width: 100%; }
[id] { scroll-margin-top: var(--space-5); }

.skip-link { position: absolute; left: var(--space-4); top: calc(-1 * var(--space-9)); z-index: 10; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: var(--action); color: var(--on-action); }
.skip-link:focus { top: var(--space-4); }

.noscript-note { max-width: var(--measure); margin: var(--space-9) auto; padding: 0 var(--space-6); }

/* Container and section bands */
.container { box-sizing: border-box; max-width: var(--container); margin-inline: auto; padding-inline: var(--space-6); }
.section { padding-block: var(--space-9); }
.section--alt { background: var(--surface-alt); }
.section__body { margin-top: var(--space-6); }

/* Hero: the farm sign, the opening line, then a wide three-photo spread */
.hero { padding-top: var(--space-8); padding-bottom: var(--space-9); }
.hero__intro { display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero__logo { display: block; height: 168px; width: auto; margin-bottom: var(--space-6); }
.hero__intro .cf-section-header { max-width: calc(var(--measure) + 2 * var(--space-7)); }
.hero__intro .cf-section-header__intro { max-width: var(--measure); margin-inline: auto; }
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3); margin-top: var(--space-6); }
.hero__note { margin: var(--space-4) 0 0; color: var(--ink-muted); display: flex; align-items: center; justify-content: center; gap: var(--space-2); }
.hero__note .cf-icon { color: var(--accent); }

/* Side photos are 3:4 and the center photo 3:2 across two columns, so all three share one height. */
.hero__photos { box-sizing: border-box; max-width: calc(var(--container) + 2 * var(--space-9)); margin: var(--space-8) auto 0; padding-inline: var(--space-5);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr); grid-template-areas: "left main right"; gap: var(--space-5); }
.hero__photo--left { grid-area: left; }
.hero__photo--main { grid-area: main; }
.hero__photo--right { grid-area: right; }

/* Card rows: three on desktop, two on tablets, one on phones */
.card-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); align-items: stretch; }

/* How to reserve: a hay-tint note beside the egg cards */
.reserve-note { box-sizing: border-box; display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-5); border-radius: var(--radius-md); background: var(--highlight); color: var(--ink); }
.reserve-note__title { margin: 0; }
.reserve-note__steps { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--space-4); counter-reset: step; }
.reserve-note__steps li { display: grid; grid-template-columns: var(--space-6) 1fr; gap: var(--space-3); align-items: start; counter-increment: step; color: var(--ink-muted); }
.reserve-note__steps li::before { content: counter(step); font-family: var(--font-serif); font-weight: 700; font-size: 22px; line-height: 22px; color: var(--ink); font-variant-numeric: lining-nums; }
.reserve-note__steps strong { color: var(--ink); font-weight: 600; }
.reserve-note__foot { margin-top: auto; }
.reserve-note .cf-btn--quiet { padding-inline: 0; }

/* Visit card: same shell as the design system's cards */
.visit-card .cf-card__foot { justify-content: flex-start; }

/* Life on the farm: photo grid with captions */
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6) var(--space-5); }
.farm-notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); margin: var(--space-7) 0 0; padding: var(--space-6) 0 0; list-style: none; border-top: var(--stroke-hairline) solid var(--line); }
.farm-notes li { display: grid; grid-template-columns: auto 1fr; gap: var(--space-3); align-items: start; color: var(--ink-muted); }
.farm-notes .cf-icon { color: var(--accent); margin-top: 1px; }
.farm-notes strong { display: block; color: var(--ink); font-weight: 600; }

/* Our story */
.story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-7); align-items: center; }
.story__text { display: grid; gap: var(--space-5); }
.story__text p { margin: 0; }
.story__body { display: grid; gap: var(--space-4); max-width: var(--measure); }
.pull-quote { margin: var(--space-2) 0 0; display: grid; gap: var(--space-3); }
.pull-quote blockquote { margin: 0; color: var(--ink); }
.pull-quote figcaption { color: var(--ink-muted); }

/* Find the farm */
.visit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-7); align-items: center; }
.visit__text { display: grid; gap: var(--space-6); justify-items: start; }
.visit__card { display: flex; align-items: flex-start; gap: var(--space-4); padding: var(--space-5); background: var(--surface-raised); border: var(--stroke-hairline) solid var(--line); border-radius: var(--radius-md); }
.visit__card > .cf-icon { color: var(--accent); margin-top: 2px; }
.visit__details { display: grid; gap: var(--space-2); }
.visit__address { display: grid; margin: 0; font-style: normal; color: var(--ink); }
.visit__hours { margin: 0; color: var(--ink-muted); }
.visit__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* Tablets */
@media (max-width: 1024px) {
  .card-row, .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .farm-notes { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .story, .visit { grid-template-columns: minmax(0, 1fr); }
  .hero__photos { gap: var(--space-4); padding-inline: var(--space-4); }
}

/* Phones */
@media (max-width: 640px) {
  .container { padding-inline: var(--space-4); }
  .section { padding-block: var(--space-8); }
  .hero { padding-top: var(--space-8); padding-bottom: var(--space-8); }
  .card-row, .gallery { grid-template-columns: minmax(0, 1fr); }
  .hero__actions { align-self: stretch; }
  .hero__actions .cf-btn { flex: 1 1 auto; }
  .hero__logo { height: 120px; margin-bottom: var(--space-5); }
  .hero__photos { margin-top: var(--space-7); grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "main main" "left right"; gap: var(--space-3); }
}
