/* Flour Commons — one page, no JavaScript.
   Palette is Puget Sound in flat light: overcast gray-green ground, fir-dark ink,
   pale straw for the grain itself. Type is feed-sack signage (condensed display)
   over an almanac serif, with a mono face for anything the co-op measures. */

:root {
  --overcast: #dce2dd;
  --paper: #f2efe6;
  --paper-warm: #ece4cf;
  --fir: #16261e;
  --field: #2c4a37;
  --straw: #d9c48e;
  --straw-ink: #8f7538;
  --chicory: #2f5273;

  --ink: var(--fir);
  --muted: #4a5a50;
  --rule: rgba(22, 38, 30, 0.18);
  --accent: var(--straw-ink);
  --focus: var(--chicory);

  --display: "Big Shoulders Display", "Arial Narrow", "Helvetica Neue", system-ui, sans-serif;
  --body: "Newsreader", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --gutter: clamp(20px, 5vw, 64px);
  --measure: 1180px;
}

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

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

body {
  margin: 0;
  background: var(--overcast);
  color: var(--ink);
  font-family: var(--body);
  font-size: clamp(1.02rem, 0.35vw + 0.96rem, 1.14rem);
  line-height: 1.6;
  font-synthesis-weight: none;
}

h1, h2, h3 { margin: 0; font-weight: 700; }
p { margin: 0; }
a { color: var(--chicory); }
img, svg { max-width: 100%; }
::selection { background: var(--straw); color: var(--fir); }

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

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus {
  left: 10px; top: 10px; z-index: 20;
  background: var(--fir); color: var(--paper);
  padding: 10px 14px;
  font-family: var(--mono); font-size: 0.78rem; text-decoration: none;
}

/* ---------- shell ---------- */

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.band { padding-block: clamp(60px, 8.5vw, 118px); }
.band--overcast { background: var(--overcast); }
.band--paper { background: var(--paper); }
.band--hero { padding-block: clamp(40px, 5.5vw, 76px) clamp(64px, 9vw, 124px); }

.band--fir {
  --ink: var(--paper);
  --muted: #a4b3a8;
  --rule: rgba(242, 239, 230, 0.2);
  --accent: var(--straw);
  --focus: var(--straw);
  color: var(--ink);
}
.band--fir { background: var(--fir); }

section[id] { scroll-margin-top: 14px; }

/* ---------- shared type ---------- */

.eyebrow {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-title {
  font-family: var(--display);
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
  line-height: 1.02;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-top: 14px;
}

.section-lede {
  margin-top: 16px;
  max-width: 56ch;
  color: var(--muted);
}

.lede { max-width: 46ch; }

.onward {
  margin-top: 36px;
  font-family: var(--mono);
  font-size: 0.79rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.onward a {
  color: var(--fir);
  text-decoration: none;
  border-bottom: 1px solid var(--straw-ink);
  padding-bottom: 4px;
}
.onward a::after { content: " \2193"; }
.onward a:hover { border-bottom-color: var(--fir); }

.footnote {
  margin-top: 26px;
  max-width: 64ch;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.75;
  color: var(--muted);
}

/* ---------- masthead ---------- */

.masthead { background: var(--overcast); border-bottom: 1px solid var(--rule); }
.masthead-inner {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding: 16px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px 28px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--fir);
}
.brand-mark {
  width: 34px; height: 34px;
  color: currentColor;
  transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.brand:hover .brand-mark { transform: rotate(60deg); }
.brand-word {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 22px;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
  padding-block: 3px;
  border-bottom: 1px solid transparent;
}
.nav a:hover { color: var(--fir); border-bottom-color: var(--straw-ink); }

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

.hero { display: grid; gap: clamp(40px, 5vw, 76px); align-items: center; }

.hero-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.9rem, 7.4vw, 5.4rem);
  line-height: 0.93;
  letter-spacing: -0.005em;
  margin-top: 18px;
  max-width: 19ch;
  text-wrap: balance;
}

.hero-copy .lede { margin-top: 22px; color: var(--muted); }

/* the millstone: the one animated thing on the page */
.hero-figure { margin: 0; }
.stone { display: block; width: 100%; height: auto; }

.rotor {
  animation: turn 150s linear infinite;
  transform-box: fill-box;
  transform-origin: center;
}
@keyframes turn { to { transform: rotate(360deg); } }

.stone-edge { fill: none; stroke: var(--fir); stroke-width: 3; }
.stone-hair { fill: none; stroke: var(--fir); stroke-width: 1; opacity: 0.32; }
.furrows {
  fill: none;
  stroke: var(--fir);
  stroke-width: 1.6;
  stroke-linecap: round;
  opacity: 0.55;
}
.eye { fill: var(--fir); stroke: var(--straw); stroke-width: 7; }

.dial line { stroke: var(--straw-ink); stroke-width: 2; }
.dial-labels text {
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  fill: var(--muted);
}

figcaption {
  margin-top: 14px;
  max-width: 40ch;
  font-family: var(--mono);
  font-size: 0.74rem;
  line-height: 1.7;
  color: var(--muted);
}

/* ---------- the cycle ---------- */

.cycle-list {
  list-style: none;
  display: grid;
  gap: 0 clamp(20px, 3vw, 40px);
  margin: 48px 0 0;
  padding: 0;
}
.cycle-item {
  position: relative;
  padding: 26px 0 22px;
  border-top: 1px solid var(--rule);
}
.cycle-item::before {
  content: "";
  position: absolute;
  top: -5px; left: 0;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--straw-ink);
}
.cycle-when {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.cycle-what {
  font-family: var(--display);
  font-size: 1.5rem;
  line-height: 1.05;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin: 10px 0 10px;
}
.cycle-item p:last-child { color: var(--muted); font-size: 0.98rem; }

/* ---------- ledger ---------- */

.table-scroll {
  margin-top: 44px;
  overflow-x: auto;
  border-top: 1px solid var(--rule);
}
.ledger { width: 100%; min-width: 720px; border-collapse: collapse; }
.ledger th, .ledger td {
  text-align: left;
  vertical-align: baseline;
  padding: 17px 24px 17px 0;
  border-bottom: 1px solid var(--rule);
}
.ledger thead th {
  padding-top: 15px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.ledger tbody th {
  font-family: var(--body);
  font-weight: 600;
  font-size: 1.18rem;
  color: var(--straw);
  white-space: nowrap;
}
.ledger td { font-size: 0.98rem; color: var(--muted); }
.ledger tbody tr:last-child th,
.ledger tbody tr:last-child td { border-bottom: 0; }

/* ---------- shares ---------- */

.shares {
  list-style: none;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(248px, 1fr));
  margin: 48px 0 0;
  padding: 0;
}
.share {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 30px 26px 32px;
}
.share--picked {
  background: var(--paper-warm);
  border-color: rgba(22, 38, 30, 0.45);
}
.share--picked::before {
  content: "";
  position: absolute;
  inset: -1px -1px auto -1px;
  height: 4px;
  background: var(--straw-ink);
  border-radius: 3px 3px 0 0;
}
.share-flag {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--straw-ink);
  margin-bottom: 8px;
}
.share-name {
  font-family: var(--display);
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.share-who { margin-top: 14px; font-size: 0.98rem; color: var(--muted); }
/* Photographs are treated as plates: framed, captioned in mono. */
.band-photo {
  background: var(--paper);
  padding-bottom: clamp(56px, 8vw, 100px);
}
.band--tight-bottom { padding-bottom: clamp(34px, 5vw, 60px); }

.plate { margin: 0; }

/* The ratio lives on the frame, as percentage padding, and the image fills it
   absolutely. Putting aspect-ratio on the <img> itself distorts the photo on
   iOS Safari, which sizes replaced elements from their own attributes. */
.plate .frame {
  position: relative;
  display: block;
  overflow: hidden;
  background: #e9ede6;
  border: 1px solid var(--rule);
}
.plate .frame img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  border: 0;
}
.plate figcaption {
  margin-top: 13px;
  max-width: 62ch;
  font-family: var(--mono);
  font-size: 0.74rem;
  line-height: 1.7;
  color: var(--muted);
}

.plate--wide figcaption { max-width: var(--measure); }
.plate-note { display: block; max-width: 64ch; }

.plate--wide .frame {
  padding-top: 34.48%; /* 2.9 : 1 */
  border-inline: 0;
}
.plate--wide .frame img { object-position: 50% 48%; }

.plate--tall .frame { padding-top: 125%; /* 4 : 5 */ }
.plate--tall { max-width: 400px; }

/* ---------- hubs ---------- */

.hubs { display: grid; gap: clamp(38px, 5vw, 68px); align-items: start; }

.hub-list {
  list-style: none;
  margin: 38px 0 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}
.hub {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
}
.hub-name {
  font-family: var(--display);
  font-size: 1.3rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hub-detail {
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* ---------- co-op notes + questions ---------- */

.faq-wrap { display: grid; gap: clamp(44px, 6vw, 84px); align-items: start; }

.note-list { margin: 34px 0 0; }
.note { border-top: 1px solid var(--rule); padding: 15px 0; }
.note dt {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.note dd { margin: 7px 0 0; font-size: 1rem; }

.faq .section-title { margin-bottom: 30px; }
.qa { border-top: 1px solid var(--rule); }
.qa:last-of-type { border-bottom: 1px solid var(--rule); }
.qa summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: 19px 46px 19px 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.01em;
  line-height: 1.15;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: "+";
  position: absolute;
  right: 6px; top: 18px;
  font-family: var(--mono);
  font-size: 1.15rem;
  color: var(--straw-ink);
}
.qa[open] summary::after { content: "\2212"; }
.qa summary:hover { color: var(--field); }
.qa p {
  padding: 0 6ch 24px 0;
  max-width: 68ch;
  color: var(--muted);
  font-size: 1rem;
}

/* ---------- join + footer ---------- */

.footer {
  --ink: var(--paper);
  --muted: #a4b3a8;
  --rule: rgba(242, 239, 230, 0.2);
  background: var(--fir);
  color: var(--ink);
  padding-block: 54px 62px;
}
.footer-inner { display: grid; gap: 18px; }
.footer-brand { display: flex; align-items: center; gap: 12px; color: var(--straw); }
.footer .brand-word { font-size: 1.35rem; }
.footer-line { max-width: 54ch; color: var(--muted); font-size: 1rem; }
.footer-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin: 10px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.footer-links a { color: var(--straw); text-decoration-thickness: 1px; text-underline-offset: 4px; }
.footer-links a:hover { color: var(--paper); }

/* ---------- wider screens ---------- */

@media (min-width: 720px) {
  .cycle-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr); }
  .hubs { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); }
  .plate--tall { justify-self: end; }
  .cycle-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .faq-wrap { grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); }
}

/* Single-column: keep the drawings from ballooning to full band width. */
@media (max-width: 899px) {
  .hero-figure { max-width: 600px; }
}

/* Below the label breakpoint the dial names would be unreadable; the ledger
   carries them anyway, so drop them and let the stone fill the column. */
@media (max-width: 719px) {
  .dial-labels { display: none; }
  /* a 2.9:1 strip is a letterbox slit on a phone */
  .plate--wide .frame { padding-top: 75%; /* 4 : 3 */ }
}
@media (max-width: 599px) {
  /* With the rim labels gone, the viewBox margin they needed is dead space, so
     let the stone spill past the gutter and clip it there. */
  .band { overflow-x: hidden; }
  .stone { width: 138%; max-width: none; margin-left: -19%; }
}

@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;
  }
}
