/* Glean Row — field plan after the harvest
   linen / soil / wheat / cornflower / hedge / chaff */

:root {
  --linen:  #E9E7E1;
  --chaff:  #F6F4EE;
  --soil:   #2E2419;
  --soil-2: #5A4A38;
  --wheat:  #D7A936;
  --corn:   #4466C8;
  --hedge:  #5B6B3A;
  --rule:   #CFCAB9;

  --display: 'Alfa Slab One', 'Rockwell', serif;
  --body:    'Cardo', Georgia, serif;
  --mono:    'Azeret Mono', ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--linen);
  color: var(--soil);
  font-family: var(--body);
  font-size: 1.12rem;
  line-height: 1.6;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--soil); text-decoration-color: var(--corn); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--corn); }
a:focus-visible { outline: 3px solid var(--corn); outline-offset: 3px; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--wheat); color: var(--soil); padding: .6rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 1.5rem; }

/* ---------- header: hedge boundary ---------- */

.hedge {
  background: var(--chaff);
  border-bottom: 2px solid var(--soil);
  position: relative;
}
.hedge::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -10px; height: 8px;
  background: repeating-linear-gradient(90deg, var(--hedge) 0 10px, transparent 10px 16px);
}
.hedge__in { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 0; }
.brand { display: inline-flex; align-items: center; gap: .65rem; font-family: var(--display); font-size: 1.5rem; color: var(--soil); text-decoration: none; letter-spacing: .01em; }
.brand svg { width: 28px; height: 28px; }
.hedge nav { display: flex; gap: 1.4rem; font-family: var(--mono); font-size: .8rem; letter-spacing: .03em; }
.hedge nav a { text-decoration: none; }
.hedge nav a:hover { color: var(--corn); }

/* ---------- type ---------- */

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.08; margin: 0 0 1rem; letter-spacing: .005em; }
h1 { font-size: clamp(2.3rem, 5.4vw, 4.2rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.2rem; }

.plot {
  font-family: var(--mono); font-size: .76rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--hedge); margin: 0 0 1rem;
}
.plot b { background: var(--soil); color: var(--wheat); font-weight: 500; padding: .1rem .45rem; margin-right: .5rem; }

.lede { font-size: 1.28rem; color: var(--soil-2); max-width: 34em; }
.prose { max-width: 40em; }
.prose p { margin: 0 0 1rem; }

/* ---------- hero with field plan ---------- */

.hero { padding: 4rem 0 3rem; }
.hero__grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 3rem; align-items: center; }

.field { margin: 0; background: var(--chaff); border: 2px solid var(--soil); padding: 1.1rem 1.1rem .9rem; }
.field svg { width: 100%; height: auto; }
.field .cut { stroke: var(--soil-2); stroke-width: 1.4; stroke-linecap: round; opacity: .55; }
.field .sheaf { stroke: var(--wheat); stroke-width: 3.2; stroke-linecap: round; }
.field .daylbl { font-family: var(--mono); font-size: 9px; fill: var(--soil); letter-spacing: .05em; }
.field .hrlbl { font-family: var(--mono); font-size: 7px; fill: var(--soil-2); }
.field figcaption { font-family: var(--mono); font-size: .76rem; color: var(--soil-2); margin-top: .7rem; }
.field .sheaf { animation: rise .7s ease-out both; animation-delay: calc(var(--i, 0) * 30ms); transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }

.key { display: flex; flex-wrap: wrap; gap: 1.2rem; font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; margin-top: .6rem; }
.key span { display: inline-flex; align-items: center; gap: .4rem; }
.key .k-cut::before { content: ''; width: 14px; height: 2px; background: var(--soil-2); opacity: .6; }
.key .k-glean::before { content: ''; width: 14px; height: 4px; background: var(--wheat); }

/* ---------- field notes ---------- */

.notes { padding: 3.5rem 0; background: var(--soil); color: var(--chaff); }
.notes .plot { color: var(--wheat); }
.notes .plot b { background: var(--wheat); color: var(--soil); }
.notes__grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 3rem; }
.notes .prose { color: #E4DCCB; }
.rows { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: .6rem; }
.rows li { border-top: 4px solid var(--wheat); padding-top: .5rem; font-family: var(--mono); font-size: .8rem; }
.rows strong { display: block; font-family: var(--display); font-weight: 400; font-size: 1.5rem; color: var(--wheat); }

/* ---------- ledger ---------- */

.ledger-sec { padding: 4rem 0; }
.ledger-wrap { overflow-x: auto; margin-top: 1.5rem; background: var(--chaff); border: 2px solid var(--soil); }
.ledger { width: 100%; min-width: 760px; border-collapse: collapse; }
.ledger caption { caption-side: top; text-align: left; padding: .8rem 1rem; font-family: var(--mono); font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--hedge); border-bottom: 2px solid var(--soil); }
.ledger th, .ledger td { text-align: left; vertical-align: top; padding: .85rem 1rem; border-bottom: 1px solid var(--rule); }
.ledger thead th { font-family: var(--mono); font-weight: 500; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; background: var(--linen); }
.ledger tbody th { font-family: var(--display); font-weight: 400; font-size: 1.05rem; width: 22%; }
.ledger td.row { font-family: var(--mono); font-size: .8rem; white-space: nowrap; }
.bend { display: inline-flex; gap: 3px; margin-right: .5rem; vertical-align: middle; }
.bend i { width: 5px; height: 16px; background: var(--rule); transform: skewX(-12deg); }
.bend i.on { background: var(--hedge); }
.bend-note { font-size: .92rem; color: var(--soil-2); }

/* ---------- hazards ---------- */

.hazards { padding: 4rem 0; background: var(--chaff); border-top: 2px solid var(--soil); border-bottom: 2px solid var(--soil); }
.stones { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.4rem; }
.stone { padding: 1.2rem 1.2rem 1.3rem; background: var(--linen); border-radius: 40px 40px 4px 4px; border: 2px solid var(--soil); }
.stone__mark { font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; color: var(--corn); display: block; margin-bottom: .6rem; }
.stone p { margin: 0; font-size: 1rem; color: var(--soil-2); }

/* ---------- office ---------- */

.office { padding: 4rem 0 4.5rem; }
.office__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.reading { list-style: none; margin: 0; padding: 0; }
.reading li { border-bottom: 2px dotted var(--soil-2); }
.reading a { display: block; padding: .9rem 0; text-decoration: none; }
.reading span { display: block; font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--hedge); }
.reading strong { font-size: 1.15rem; }
.reading a:hover strong { color: var(--corn); text-decoration: underline; }

/* ---------- inner pages ---------- */

.page { padding: 3.5rem 0 4.5rem; }
.page article { max-width: 44em; }
.page h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); }
.page h2 { font-size: 1.5rem; margin-top: 2.2rem; }
.page p, .page li { margin: 0 0 1rem; }
.page ul { padding-left: 1.2rem; }
.meta { font-family: var(--mono); font-size: .78rem; color: var(--soil-2); margin-bottom: 2rem; }
.backlink { display: inline-block; margin-top: 2rem; font-family: var(--mono); font-size: .84rem; }
.aside-box { background: var(--chaff); border: 2px solid var(--soil); border-left-width: 10px; border-left-color: var(--wheat); padding: 1rem 1.2rem; margin: 1.6rem 0; }

/* ---------- footer ---------- */

.foot { background: var(--soil); color: #D9D0BE; padding: 2.2rem 0 2.6rem; font-size: .92rem; }
.foot a { color: var(--chaff); }
.foot nav { display: flex; flex-wrap: wrap; gap: 1.2rem; font-family: var(--mono); font-size: .78rem; margin-bottom: 1rem; }
.foot p { margin: 0; max-width: 60em; }

@media (max-width: 860px) {
  .hero__grid, .notes__grid, .office__grid { grid-template-columns: 1fr; gap: 2rem; }
  .rows { grid-template-columns: repeat(3, 1fr); }
  .hide-sm { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .field .sheaf { animation: none; }
}
