/* Roe Cabin Farm. Colors and type come from docs/BRAND.md. */

@font-face { font-family: "Alfa Slab One"; src: url("../fonts/AlfaSlabOne-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Lora"; src: url("../fonts/Lora-Medium.ttf") format("truetype"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Lora"; src: url("../fonts/Lora-MediumItalic.ttf") format("truetype"); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: "Lora"; src: url("../fonts/Lora-Bold.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --red: #B31942;
  --blue: #0A3161;
  --white: #FFFFFF;
  --paper: #fbf8f0;
  --tomato: #f04a49;
  --sun: #fecd59;
  --ink: #1c1710;
  --kelp: #3ba76b;
  --kelp-dark: #2a7a4e;
  --field: #9fc65a;
  --sky: #cfe7f9;

  --display: "Alfa Slab One", Rockwell, "Roboto Slab", Georgia, serif;
  --text: "Lora", Georgia, "Times New Roman", serif;

  --line: 2px solid var(--ink);
  --radius: 10px;
  --gutter: clamp(16px, 4vw, 40px);
  --band: clamp(56px, 9vw, 112px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--text);
  font-weight: 500;
  font-size: clamp(1.0625rem, 0.98rem + 0.35vw, 1.1875rem);
  line-height: 1.62;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; box-shadow: 0 0 0 6px var(--sun); border-radius: 4px; }

.skip { position: absolute; left: 12px; top: -60px; background: var(--sun); border: var(--line); padding: 8px 14px; z-index: 20; }
.skip:focus { top: 12px; }

.wrap { width: min(1160px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.wrap--narrow { width: min(720px, 100% - 2 * var(--gutter)); }

/* The one button: the logo's own colors. A flag blue plate like the EST. 2026 plate,
   a thin white line inside and a red line outside, as on the roundel. */
.btn {
  display: inline-block;
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1;
  color: var(--white);
  background: var(--blue);
  border: 2px solid var(--white);
  border-radius: 6px;
  padding: 0.95em 1.4em 0.85em;
  box-shadow: 0 0 0 3px var(--red);
  cursor: pointer;
}
.btn:hover { background: var(--red); box-shadow: 0 0 0 3px var(--blue); }
.btn:active { background: var(--ink); }
.btn:focus-visible { outline: 3px solid var(--sun); outline-offset: 5px; box-shadow: 0 0 0 3px var(--red); }
.btn--small { font-size: 0.85rem; }

/* Top bar */
.bar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: clamp(12px, 3vw, 32px);
  padding: 10px var(--gutter);
  background: var(--white);
  border-bottom: var(--line);
}
/* The roundel hangs from the bar like a badge so it stays large enough to read. */
.bar { min-height: 68px; }
.bar__home { flex: none; width: 132px; height: 46px; position: relative; }
.bar__home img { position: absolute; left: 0; top: -4px; width: 132px; height: 132px; }
.bar__nav { display: flex; gap: clamp(14px, 2.4vw, 30px); margin-left: auto; font-weight: 700; font-size: 1rem; }
.bar__nav a { text-decoration: none; padding: 6px 0; border-bottom: 3px solid transparent; }
.bar__nav a:hover { border-bottom-color: var(--red); }
@media (max-width: 860px) {
  .bar { display: grid; grid-template-columns: 96px 1fr; column-gap: 14px; row-gap: 6px; align-items: center; padding-block: 8px; }
  .bar__home { grid-row: 1 / span 2; width: 96px; height: 96px; }
  .bar__home img { position: static; width: 96px; height: 96px; }
  .bar .btn { justify-self: end; }
  .bar__nav { margin: 0; display: grid; grid-template-columns: auto auto; justify-content: end; gap: 0 18px; font-size: 0.9rem; text-align: right; }
  html { scroll-padding-top: 124px; }
}

/* Arrival animation (see js/intro.js): one sheet of blur over the whole screen, the logo above it */
.intro .bar::before, .intro-go .bar::before {
  content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none;
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
}
.intro-go .bar::before {
  -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0);
  transition: backdrop-filter 1.1s ease, -webkit-backdrop-filter 1.1s ease;
}
.intro .bar, .intro-go .bar { z-index: 30; }
.intro .bar__home, .intro-go .bar__home { z-index: 2; }
.intro .bar__home img { opacity: 0; }
.intro.intro-set .bar__home img { opacity: 1; }
.intro-go .bar__home img { transition: transform 1.1s cubic-bezier(0.65, 0, 0.2, 1); }

/* Hero: the tagline stands on the farm's own lawn */
.hero { position: relative; display: grid; border-bottom: var(--line); background: var(--kelp-dark); }
.hero__photo { grid-area: 1 / 1; width: 100%; height: min(86vh, 860px); min-height: 560px; object-fit: cover; object-position: 62% 60%; }
.hero::after { content: ""; grid-area: 1 / 1; background: linear-gradient(to bottom, rgba(28,23,16,0) 42%, rgba(16,30,24,0.78) 100%); pointer-events: none; }
.hero__words { grid-area: 1 / 1; z-index: 1; align-self: end; padding: 0 var(--gutter) clamp(24px, 4vw, 40px); width: min(1240px, 100%); margin-inline: auto; color: var(--white); }
.hero h1 {
  margin: 0 0 0.35em;
  font-family: var(--display); font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(1.75rem, 8.4vw, 3.5rem);
  line-height: 1;
  letter-spacing: 0.005em;
  text-shadow: 3px 3px 0 var(--ink);
}
.hero h1 span { display: block; }
.hero__line { font-size: clamp(1.1rem, 1rem + 0.7vw, 1.5rem); font-weight: 700; max-width: 40em; margin-bottom: 1.1em; text-shadow: 1px 1px 0 var(--ink); }

/* Restore: three columns keyed to the three sentences */
.restore { border-bottom: var(--line); }
.restore__grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.restore__panel { padding: clamp(32px, 5vw, 64px) clamp(18px, 3vw, 40px); border-left: var(--line); }
.restore__panel:first-child { border-left: 0; padding-left: 0; }
.restore__panel:last-child { padding-right: 0; }
.restore__panel h2 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(1.7rem, 3.4vw, 2.6rem); line-height: 1; margin: 0.5em 0 0.4em; }
.restore__panel--ground h2 { color: var(--kelp-dark); }
.restore__panel--food h2 { color: var(--red); }
.restore__panel--health h2 { color: var(--blue); }
.restore__panel p { margin: 0; max-width: 30em; }
.spot { width: 96px; height: 96px; }
@media (max-width: 760px) {
  .restore__grid { grid-template-columns: 1fr; }
  .restore__panel, .restore__panel:first-child, .restore__panel:last-child { border-left: 0; border-top: var(--line); padding: 28px 0; display: grid; grid-template-columns: 72px 1fr; column-gap: 18px; align-items: start; }
  .restore__panel:first-child { border-top: 0; }
  .restore__panel .spot { width: 72px; height: 72px; grid-row: span 2; }
  .restore__panel h2 { margin-top: 0.1em; }
}

/* Bands */
.band { padding-block: var(--band); border-bottom: var(--line); }
.band--sun { background: var(--sun); }
.band--paper { background: var(--paper); }
.band--blue { background: var(--blue); color: var(--white); }
.band--green { background: var(--kelp-dark); color: var(--white); }
.band--red { background: var(--red); color: var(--white); }

.title { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(2.1rem, 5.4vw, 3.9rem); line-height: 1; letter-spacing: 0.005em; margin: 0 0 0.45em; }
.lede { font-size: 1.2em; max-width: 34em; margin-bottom: 1.6em; }
.lede--wide { max-width: 44em; }
.band a:hover { text-decoration-color: var(--red); }

/* From the farm */
.goods { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.card { background: var(--white); border: var(--line); border-radius: var(--radius); padding: 20px 18px 18px; display: flex; flex-direction: column; }
.card .spot { width: 84px; height: 84px; margin-bottom: 8px; }
.card h3 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 1.3rem; line-height: 1.05; margin: 0 0 0.4em; }
.card p { font-size: 0.97em; line-height: 1.45; margin-bottom: 1em; }
.status { margin-top: auto; align-self: flex-start; font-family: var(--display); text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.78rem; line-height: 1; color: var(--white); background: var(--blue); border-radius: 4px; padding: 0.55em 0.8em 0.45em; }
@media (max-width: 1040px) { .goods { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) {
  .goods { grid-template-columns: 1fr; }
  .card { display: grid; grid-template-columns: 68px 1fr; column-gap: 16px; align-items: start; }
  .card .spot { width: 68px; height: 68px; grid-row: span 3; margin: 0; }
  .card p { margin-bottom: 0.6em; }
  .status { justify-self: start; }
}

/* How we farm */
.map { margin: 0 0 clamp(28px, 4vw, 48px); }
.map__scroll { border: var(--line); border-radius: var(--radius); overflow-x: auto; background: var(--field); }
.map__art { width: 100%; min-width: 760px; height: auto; }
.map__labels text { font-family: var(--text); font-weight: 700; font-size: 15px; fill: var(--ink); paint-order: stroke; stroke: #fffdf6; stroke-width: 5px; stroke-linejoin: round; }
.map__hint { display: none; font-style: normal; font-weight: 700; }
@media (max-width: 800px) { .map__hint { display: inline; } }
.map__labels .map__small { font-size: 12.5px; }
.map figcaption { font-size: 0.9em; font-style: italic; margin-top: 8px; }
.points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px 36px; }
.points li, .word li { display: grid; grid-template-columns: 26px 1fr; column-gap: 12px; align-items: start; }
.points p { margin: 0; }
.star { width: 22px; height: 22px; margin-top: 0.28em; fill: var(--red); }
.aside { margin: clamp(28px, 4vw, 44px) 0 0; padding-top: 20px; border-top: var(--line); font-size: 1.1em; font-weight: 700; max-width: 40em; }
@media (max-width: 900px) { .points { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .points { grid-template-columns: 1fr; } }

/* Our word */
.word { display: grid; gap: 0; }
.word li { padding: 18px 0; border-top: 2px solid rgba(255,255,255,0.35); font-size: clamp(1.2rem, 1.05rem + 0.8vw, 1.55rem); line-height: 1.35; }
.word li:last-child { border-bottom: 2px solid rgba(255,255,255,0.35); }
.word p { margin: 0; }
.word .star { fill: var(--sun); margin-top: 0.22em; }

/* About us: the story. On wide screens the photographs stack in one column beside the text;
   on narrow screens the same photographs sit between the paragraphs instead. */
.story__text { max-width: 62ch; }
.story__title { font-family: var(--display); font-weight: 400; font-size: clamp(1.6rem, 3.2vw, 2.3rem); line-height: 1.05; color: var(--red); margin: 0 0 0.8em; }
.story p { margin-bottom: 1.15em; }
.story__sign { font-family: var(--display); font-size: 1.4rem; margin-top: 1.4em; }
.photo { margin: 0; }
.photo img { width: 100%; border: var(--line); border-radius: var(--radius); background: var(--sky); }
.photo--inline { margin: 0 0 1.4em; }
.photo--marine { width: min(230px, 60%); }
.photo--nicole img { aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 45%; }
.story__photos { display: none; }
@media (min-width: 1000px) {
  .story { display: grid; grid-template-columns: minmax(0, 62ch) minmax(240px, 340px); column-gap: clamp(32px, 5vw, 72px); align-items: start; }
  .story__text { grid-column: 1; grid-row: 1; }
  .story__photos { grid-column: 2; grid-row: 1; display: grid; gap: 20px; margin-top: 3.6rem; }
  .photo--inline { display: none; }
}
.place { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: clamp(36px, 6vw, 72px); }
.place img { aspect-ratio: 3 / 2; object-fit: cover; }
@media (max-width: 700px) { .place { grid-template-columns: 1fr; } }

/* Indiana */
.indiana { display: grid; grid-template-columns: minmax(120px, 220px) 1fr; gap: clamp(24px, 6vw, 80px); align-items: center; }
.indiana__map { width: 100%; height: auto; }
.facts { font-size: clamp(1.15rem, 1rem + 0.7vw, 1.5rem); font-weight: 700; line-height: 1.35; margin-bottom: 1em; }
.facts li { padding: 10px 0; border-top: 2px solid rgba(255,255,255,0.4); }
.facts li:last-child { border-bottom: 2px solid rgba(255,255,255,0.4); }
.motto { margin: 0; font-style: italic; }
@media (max-width: 620px) { .indiana { grid-template-columns: 1fr; } .indiana__map { width: 130px; } }

/* Join */
.join__field { margin-bottom: 18px; }
.join label { display: block; font-weight: 700; margin-bottom: 6px; }
.join input, .join textarea { display: block; width: 100%; font: inherit; color: var(--ink); background: var(--white); border: var(--line); border-radius: 6px; padding: 0.7em 1em; }
.join textarea { resize: vertical; min-height: 6.5em; line-height: 1.45; }
.join [aria-invalid="true"] { box-shadow: 0 0 0 4px var(--sun); }
.join__hint { font-size: 0.9em; margin: 6px 0 0; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.join__check:not(:empty) { margin: 4px 0 14px; }
.join .btn { margin-top: 6px; }
.join__status { min-height: 1.6em; margin: 16px 0 0; font-weight: 700; }

/* Footer */
.foot { background: var(--white); padding-block: clamp(40px, 6vw, 72px); }
.foot__grid { display: grid; grid-template-columns: minmax(120px, 190px) 1fr; gap: clamp(20px, 5vw, 56px); align-items: center; }
.foot__logo { width: 100%; height: auto; }
.foot p { margin: 0 0 0.5em; }
.foot__tag { font-family: var(--display); text-transform: uppercase; font-size: clamp(1.05rem, 2.4vw, 1.5rem); line-height: 1.15; color: var(--blue); }
.foot__fine { font-size: 0.88em; margin-top: 1em; }
@media (max-width: 520px) { .foot__grid { grid-template-columns: 1fr; } .foot__logo { width: 150px; } }
