/* theme.css: Got Grass Sonora. Tokens and reasons live in DESIGN-PLAN.md.
   Two colours do the talking, like the ad the name tips its cap to: grass
   green and milk white. Everything else is a shade of the green. */

@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("/fonts/figtree-var.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ---- Colours */
  --paper: #ffffff;        /* milk white: the white ground and all type on green */
  --mist: #e9f6e1;         /* clippings: the pale ground */
  --ink: #0b2a14;          /* shade under the oaks: text on pale grounds */
  --night: #0d3319;        /* deep turf: the dark ground and footer */
  --accent: #0d7529;       /* fresh-cut grass: the accent ground and primary buttons. White on it 5.8:1 */
  --accent-deep: #095c20;  /* the same green, darker: links and outline buttons on pale grounds (7.3:1 on mist) */
  --accent-soft: #a8ee7a;  /* new blade: links, ticks and focus on the dark ground (11:1 on night) */

  /* ---- Roles derived from the colours (base.css reads only these names) */
  --ink-muted: color-mix(in srgb, var(--ink) 78%, var(--paper));
  --paper-muted: color-mix(in srgb, var(--paper) 84%, var(--night));
  --line: color-mix(in srgb, var(--ink) 16%, var(--paper));
  --line-on-dark: color-mix(in srgb, var(--paper) 26%, var(--night));
  --field-line: color-mix(in srgb, var(--ink) 58%, var(--paper));
  --alert: #9b2c2c;
  --shadow: color-mix(in srgb, var(--ink) 18%, transparent);

  /* ---- Type */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-text: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --weight-display: 800;
  --step--1: 1rem;
  --step-0: 1.125rem;
  --step-1: 1.3125rem;
  --step-2: 1.625rem;
  --step-3: clamp(1.85rem, 1.4rem + 1.7vw, 2.6rem);
  --step-4: clamp(2rem, 1.5rem + 2.2vw, 3rem);
  --step-got: clamp(2.6rem, 1.6rem + 4.6vw, 4.75rem);   /* the "got weeds?" lines */
  --step-shout: clamp(5.4rem, 1rem + 21vw, 19rem);      /* the hero's "got grass?" */
  --leading: 1.6;
  --measure: 64ch;

  /* ---- Space and shape */
  --wrap: 1200px;
  --gutter: clamp(18px, 4vw, 40px);
  --band: clamp(56px, 8vw, 112px);
  --radius: 10px;
  --focus-width: 2px;
  --bar-h: 66px;
  --blade-h: clamp(22px, 3.2vw, 40px);
}

/* ---- Grounds: links and outline buttons on pale grounds use the deeper
   green, and "muted" on the green ground is plain white (a grey-green there
   falls under 4.5:1). Custom properties only, so the nearest ground wins. */
[data-ground="white"], [data-ground="light"] {
  --link: var(--accent-deep); --btn2-fg: var(--accent-deep); --btn2-bd: var(--accent-deep); --tick: var(--accent);
}
[data-ground="accent"] { --muted: var(--paper); --rule: color-mix(in srgb, var(--paper) 38%, var(--accent)); }

h1, h2, h3, .got, .shout, .wordmark, details[data-faq] > summary {
  font-variation-settings: "SOFT" 100, "WONK" 1;
  letter-spacing: -0.015em;
}
h2 { max-width: 22ch; }
.btn { border-radius: 999px; }
.photo, .card, .panel { border-radius: var(--radius); }

/* ---- Header */
.wordmark { display: inline-flex; align-items: baseline; gap: 8px; white-space: nowrap; min-height: 24px; padding-block: 4px; }
.wordmark-got { font-size: 1.75rem; font-weight: 900; line-height: 1; color: var(--accent); }
.wordmark-town { font-family: var(--font-text); font-size: var(--step--1); font-weight: 700; letter-spacing: 0; font-variation-settings: normal; }
@media (max-width: 520px) { .wordmark-got { font-size: 1.55rem; } .wordmark-town { display: none; } }

/* ---- Hero: the one loud thing on the page */
.hero { position: relative; padding-block: clamp(20px, 3vw, 44px) calc(var(--band) + var(--blade-h)); overflow: hidden; }
.shout {
  margin: 0 0 .2em -0.045em;
  font-family: var(--font-display); font-weight: 900; font-size: var(--step-shout);
  line-height: .8; letter-spacing: -0.045em; white-space: nowrap;
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144;
}
.shout span { display: inline-block; }
.hero-row { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px clamp(28px, 5vw, 72px); align-items: end; }
.hero h1 { font-size: var(--step-4); max-width: 18ch; }
.hero-line { font-size: var(--step-1); line-height: 1.45; max-width: 34ch; }
.hero-side { display: grid; gap: 20px; }
@media (max-width: 860px) { .hero-row { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .shout { font-size: 29.5vw; line-height: .8; margin-bottom: .36em; }
  .shout span { display: block; }
  .hero { padding-bottom: calc(28px + var(--blade-h)); }
  .hero + .band { padding-top: 20px; }
}
/* A mown edge: the next section's colour grows up into this one as blades. Still, never animated. */
.blades { position: relative; }
.blades::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: var(--blade-h);
  background: url("/images/blades.svg") repeat-x left bottom / clamp(150px, 20vw, 240px) 100%;
  pointer-events: none;
}

/* ---- The answer and the first pair */
.answer-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
@media (max-width: 860px) { .answer-grid { grid-template-columns: 1fr; } .answer-grid .pair { order: -1; } }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pair figure { position: relative; }
.pair img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
.pair-wide img { aspect-ratio: 4 / 3; }
.pair-tag {
  position: absolute; left: 10px; bottom: 10px; padding: 4px 14px 6px; border-radius: 999px;
  font-family: var(--font-display); font-weight: 800; font-size: var(--step-1); line-height: 1.2;
  font-variation-settings: "SOFT" 100, "WONK" 1;
}
.pair-caption { grid-column: 1 / -1; color: var(--muted); font-size: var(--step--1); }
@media (max-width: 420px) { .pair-tag { font-size: var(--step-0); left: 6px; bottom: 6px; padding-inline: 10px; } }

/* ---- Services: three "got ___?" rows */
.got { font-family: var(--font-display); font-weight: 900; font-size: var(--step-got); line-height: .95; color: var(--accent); letter-spacing: -0.035em; }
.svc-list { display: grid; gap: clamp(36px, 6vw, 72px); list-style: none; margin-top: clamp(12px, 2vw, 28px); }
.svc { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(20px, 4vw, 56px); align-items: center; }
.svc:nth-child(even) .svc-photo { order: 2; }
.svc-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.svc-body { display: grid; gap: 14px; align-content: start; }
/* The whole row is the link to the service page: the title link stretches over the photo,
   the "got weeds?" line and the list. "See weed eating" is the visible cue (the link text is the title). */
.svc { position: relative; }
.svc h3 a::after { content: ""; position: absolute; inset: 0; }
.svc-more { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--accent); }
.svc-more svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.svc:hover .svc-more { text-decoration: underline; }
.svc h3 { font-size: var(--step-2); }
main .svc h3 a:not(.btn) { color: inherit; }
@media (max-width: 760px) { .svc { grid-template-columns: 1fr; } .svc:nth-child(even) .svc-photo { order: 0; } }

/* ---- The yardstick: pick a height, read the rule */
.ruler { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: stretch; margin-top: 8px; }
.ruler-gauge {
  position: relative; min-height: 340px; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--rule);
  background: repeating-linear-gradient(to top, transparent 0 41px, var(--rule) 41px 42px);
}
.ruler-grass {
  position: absolute; left: 0; right: 0; bottom: 0; height: 12%;
  background: url("/images/blades-lime.svg") repeat-x left bottom / 170px 100%;
  transition: height .45s cubic-bezier(.2, .7, .2, 1);
}
.ruler-gauge[data-level="2"] .ruler-grass { height: 30%; }
.ruler-gauge[data-level="3"] .ruler-grass { height: 58%; }
.ruler-gauge[data-level="4"] .ruler-grass { height: 96%; }
.ruler-line { position: absolute; left: 0; right: 0; bottom: 12%; border-top: 2px dashed var(--paper); }
.ruler-line span { position: absolute; right: 10px; bottom: 6px; font-size: var(--step--1); font-weight: 700; }
.ruler [role="tablist"] { border-bottom: 0; gap: 8px; }
.ruler [role="tab"] { border: 2px solid var(--rule); border-radius: 999px; padding: 8px 18px; font-size: var(--step-0); }
.ruler [role="tab"][aria-selected="true"] { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.ruler [role="tabpanel"] { display: grid; gap: 12px; padding-top: 28px; max-width: 56ch; }
.ruler [role="tabpanel"][hidden] { display: none; }
.ruler-range { font-weight: 700; color: var(--link); }
.ruler-joke { font-family: var(--font-display); font-weight: 900; font-size: var(--step-got); line-height: 1; letter-spacing: -0.03em; font-variation-settings: "SOFT" 100, "WONK" 1; }
.ruler-do { font-weight: 700; }
.ruler-sources { margin-top: 20px; color: var(--muted); font-size: var(--step--1); }
@media (max-width: 760px) {
  .ruler { grid-template-columns: 1fr; }
  .ruler-gauge { min-height: 170px; order: 2; }
  .ruler-joke { font-size: var(--step-3); }
}

/* ---- Work */
.work-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.work-grid img { aspect-ratio: 4 / 5; }
.work-grid figcaption { color: inherit; font-weight: 700; font-size: var(--step-0); }
@media (max-width: 900px) { .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } }
.pair-block { display: grid; gap: 16px; margin-top: clamp(24px, 4vw, 48px); }
.pair-block h3 { font-size: var(--step-2); }

/* ---- Crew */
.crew-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.crew-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; list-style: none; }
.crew-photos figure { display: grid; gap: 8px; }
.crew-photos img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
.crew-photos li:nth-child(2) { margin-top: clamp(16px, 3vw, 40px); }
.crew-photos figcaption { font-size: var(--step--1); line-height: 1.4; }
@media (max-width: 860px) { .crew-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) {
  .crew-photos { grid-template-columns: 1fr 1fr; }
  .crew-photos li:nth-child(2) { margin-top: 0; }
  .crew-photos li:nth-child(3) { grid-column: 1 / -1; }
  .crew-photos li:nth-child(3) img { aspect-ratio: 1 / 1; }
}

/* ---- Areas */
.town-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 32px; list-style: none; border-top: 1px solid var(--rule); }
.town-list li { display: grid; gap: 2px; align-content: start; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.town-name { font-family: var(--font-display); font-weight: 800; font-size: var(--step-1); font-variation-settings: "SOFT" 100, "WONK" 1; }
.town-note { color: var(--muted); font-size: var(--step--1); line-height: 1.45; }

/* ---- Estimate and footer */
.footer-shout { font-family: var(--font-display); font-weight: 900; font-size: var(--step-got); line-height: .9; letter-spacing: -0.035em; color: var(--accent-soft); font-variation-settings: "SOFT" 100, "WONK" 1; }

@media (prefers-reduced-motion: reduce) { .ruler-grass { transition: none; } }

/* The smallest phones (320 to 360 wide): the wordmark, the number and the menu button share one row. */
@media (max-width: 360px) {
  .wordmark-got { font-size: 1.2rem; }
  .header-row { gap: 6px; }
  .header-call { padding-inline: 8px; font-size: 0.82rem; }
  .mobile-bar .btn { white-space: nowrap; padding-inline: 8px; font-size: 0.95rem; }
}
