/* ------------------------------------------------------------------
   Dealer locator: results, dealer cards, map pins, the Find A Dealer
   page and the state pages. Linked from the homepage head, so every
   page made from it has it. Uses the homepage's own tokens.
   Nothing here changes how the locator looks with no dealer data.
   ------------------------------------------------------------------ */

/* ---------- the homepage locator gets one more row for results ---------- */
.locator { grid-template-areas: "head panel" "form panel" "help panel" "proof panel" "results results"; }
.loc-results { grid-area: results; margin-top: clamp(32px, 4vw, 56px); scroll-margin-top: -4px; } /* html scroll-padding-top already clears the header */
.loc-head { font-size: clamp(40px, 4.6vw, 68px); line-height: .9; }
.loc-head:focus { outline: none; }
.loc-sub, .dcard-name {
  margin: 0; font-family: var(--font-display); font-weight: 900; text-transform: uppercase;
  line-height: .9; letter-spacing: -.005em; text-wrap: balance; overflow-wrap: break-word; min-width: 0;
}
.loc-sub { margin-top: clamp(28px, 3vw, 40px); font-size: clamp(28px, 2.6vw, 38px); }
.loc-line { margin-top: 12px; font-size: 18px; line-height: 1.45; max-width: 40em; color: var(--on-field-soft); }
.loc-big { margin-top: 14px; font-size: clamp(21px, 2vw, 25px); line-height: 1.35; max-width: 30em; }
.loc-actions { margin-top: 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.loc-call { font-weight: 700; font-size: 19px; white-space: nowrap; text-decoration-color: var(--leaf); text-underline-offset: 5px; }
.loc-help { margin-top: clamp(28px, 3vw, 40px); padding-top: 18px; border-top: 2px solid var(--rule); }
.loc-help p { font-size: 18px; line-height: 1.45; max-width: 34em; }
.sample-note { margin-top: 10px; font-size: 15px; line-height: 1.4; color: var(--on-field-soft); }
.on-paper .sample-note, .on-dim .sample-note, .modal .sample-note { color: color-mix(in srgb, var(--ink) 70%, var(--paper)); }
.sample-tag { display: inline-block; padding: 4px 10px 3px; background: var(--strike); color: var(--paper); font-weight: 700; font-size: 14px; line-height: 1.2; }

/* ---------- dealer cards: paper panels with the same cut corner ---------- */
.dcards { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 18px; }
.dcard {
  display: flex; flex-direction: column; gap: 8px; padding: 20px 22px 22px; background: var(--paper); color: var(--ink);
  border-top: 5px solid var(--leaf);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--nick)), calc(100% - var(--nick) * .7) 100%, 0 100%);
}
.dcard.is-focus { border-top-color: var(--strike); }
.dcard-id { display: flex; align-items: center; gap: 16px; }
.dcard-idtext { min-width: 0; display: grid; gap: 8px; }

/* ---------- headshots: square, the site's cut corner; no photo = the dealer's initials ---------- */
.headshot {
  --hs: 104px;
  position: relative; flex: none; width: var(--hs); height: var(--hs); margin: 0; overflow: hidden; background: var(--field-raised);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--hs) * .16), calc(100% - var(--hs) * .11) 100%, 0 100%);
}
.headshot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.headshot.is-empty { display: grid; place-items: center; background: var(--field); border-bottom: calc(var(--hs) * .05) solid var(--leaf); }
.headshot-initials { font-family: var(--font-display); font-weight: 900; font-size: calc(var(--hs) * .44); line-height: 1; letter-spacing: .02em; color: var(--paper); }
.headshot-tag { position: absolute; left: 0; bottom: 0; padding: 3px 7px 2px; font-size: 12px; white-space: nowrap; }
/* On small card headshots the tag sits in the bottom corner in small type, so it never covers the face. */
.headshot:not(.headshot--hero) .headshot-tag { padding: 1px 4px 0; font-size: 9px; line-height: 1.3; font-weight: 700; }
.headshot--small { --hs: 72px; }
.headshot--hero { --hs: clamp(160px, 17vw, 236px); }
.dcard-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.dcard-type { font-weight: 700; font-size: 15px; color: var(--pine); }
.dcard-name { font-size: clamp(30px, 2.6vw, 38px); line-height: .92; color: var(--pine); }
.dcard-name a { color: inherit; text-decoration: none; }
.dcard-name a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.dcard-town { font-weight: 700; font-size: 18px; }
.dcard-farm { font-size: 17px; line-height: 1.35; }
.dcard-note { font-size: 16px; line-height: 1.4; padding-left: 10px; border-left: 3px solid var(--leaf); }
.dcard-note.is-far { border-left-color: color-mix(in srgb, var(--ink) 40%, var(--paper)); }
.dcard .crop-badges { margin-top: 4px; }
.dcard-actions { margin-top: auto; padding-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
.dcard-call { font-weight: 700; font-size: 17px; white-space: nowrap; color: var(--ink); text-decoration-color: var(--leaf); text-underline-offset: 4px; }
.dcard-profile { font-size: 16px; }
.dcard a:focus-visible, .dcard button:focus-visible { outline-color: var(--pine); }
.btn--small { min-height: 46px; }

/* ---------- pins on the map ---------- */
.usmap .pin { cursor: pointer; }
.pin-mark { fill: var(--paper); stroke: var(--field); stroke-width: 2; }
.pin-dot { fill: var(--strike); }
.pin:hover .pin-mark, .pin:focus-visible .pin-mark { fill: var(--leaf-bright); }
.pin:focus-visible { outline: 3px solid var(--paper); outline-offset: 2px; }
.pin-key { display: inline-flex; align-items: center; gap: 8px; margin-left: 14px; }
.pin-key::before { content: ""; width: 12px; height: 14px; background: var(--paper); clip-path: polygon(50% 100%, 0 30%, 15% 0, 85% 0, 100% 30%); }

/* ---------- the on-page form (Find A Dealer and state pages) ---------- */
.dealer-inline { padding: clamp(22px, 3vw, 36px); background: var(--paper); color: var(--ink);
  clip-path: polygon(calc(var(--nick) * .7) 0, 100% 0, 100% calc(100% - var(--nick)), calc(100% - var(--nick) * .7) 100%, 0 100%, 0 var(--nick)); }
.dealer-inline h2 { font-size: clamp(40px, 4.4vw, 64px); line-height: .9; color: var(--ink); }
.dealer-inline h2:focus { outline: none; }
.dealer-inline p { margin-top: 12px; font-size: 18px; line-height: 1.45; max-width: 34em; }
.dealer-inline .big { font-size: clamp(21px, 2.2vw, 25px); font-weight: 500; line-height: 1.32; }
.dealer-inline a:focus-visible, .dealer-inline button:focus-visible, .dealer-inline input:focus-visible, .dealer-inline textarea:focus-visible { outline-color: var(--pine); }
.df-dealer b { font-family: var(--font-display); font-weight: 900; font-size: 26px; text-transform: uppercase; color: var(--pine); margin-right: 8px; }

/* ---------- Find A Dealer page ---------- */
.fad-main { padding-top: var(--header-h); }
.fad-band { padding-block: clamp(28px, 4vw, 56px) calc(var(--seam-h) + clamp(40px, 5vw, 72px)); }
.locator--page { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-areas: "head panel" "form panel" "help panel" "results panel"; }
.locator--page .locator-head h1 { font-size: clamp(60px, 8vw, 120px); }
.locator--page .loc-results { margin-top: clamp(26px, 3vw, 40px); }
.locator--page .loc-results .dcards { grid-template-columns: minmax(0, 1fr); }
.locator--page .map-panel { position: sticky; top: calc(var(--header-h) + 16px); }
.loc-start { padding-top: 16px; border-top: 2px solid var(--rule); font-size: 18px; line-height: 1.45; color: var(--on-field-soft); }
.state-list { list-style: none; margin: clamp(22px, 3vw, 36px) 0 0; padding: 0; columns: 4 14em; column-gap: clamp(24px, 3vw, 48px); }
.state-list li { break-inside: avoid; border-bottom: 1px solid color-mix(in srgb, var(--ink) 22%, var(--paper)); }
.state-list a { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 8px 0; font-weight: 700; font-size: 18px; text-decoration: none; }
.state-list a:hover { color: var(--pine); }
.state-list .served { display: none; font-weight: 700; font-size: 14px; color: var(--pine); white-space: nowrap; }
.state-list .is-covered .served { display: inline-flex; align-items: center; gap: 6px; }
.state-list .is-covered .served::before { content: ""; width: 16px; height: 10px; background: var(--leaf); clip-path: polygon(4px 0, 100% 0, calc(100% - 4px) 100%, 0 100%); }
.states-note { margin-top: 14px; font-size: 17px; line-height: 1.45; max-width: 40em; }
.fad-connect { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px clamp(32px, 5vw, 80px); align-items: center; }
.fad-connect .close-proof { margin-top: 26px; }
.fad-connect .close-photo { aspect-ratio: 4 / 5; max-height: 640px; }

/* ---------- state pages ---------- */
.st-head .lede { margin-top: 18px; }
.st-rep { margin-top: 14px; font-size: 18px; color: var(--on-field-soft); }
.st-rep b { color: var(--on-field); }
.st-list .dcards { margin-top: 22px; }
.st-list .dcard { background: var(--paper-dim); }
.st-list h2 { font-size: clamp(44px, 5.3vw, 80px); }
.st-list .sample-note, .st-list .loc-line { color: color-mix(in srgb, var(--ink) 70%, var(--paper)); }
.st-more { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 10px 28px; }
.st-more .quiet { display: inline-block; padding-block: 8px; }

@media (max-width: 900px) {
  .locator { grid-template-areas: "head" "form" "results" "panel" "help" "proof"; }
  .loc-results { margin-top: 26px; }
  .locator--page { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "form" "help" "results" "panel"; }
  .locator--page .map-panel { position: relative; top: auto; margin-top: 26px; }
  .locator--page .locator-head h1 { font-size: clamp(50px, 15vw, 96px); }
  .dcard { padding: 18px 16px 20px; }
  .headshot { --hs: 88px; }
  .headshot--small { --hs: 64px; }
  .headshot--hero { --hs: 116px; }
  .dcard-id { gap: 14px; }
  .fad-connect { grid-template-columns: minmax(0, 1fr); }
  .fad-connect .close-photo { display: none; }
  .state-list { columns: 2 8em; column-gap: 18px; }
  .state-list a { font-size: 17px; }
  .state-list .is-covered .served { font-size: 0; gap: 0; } /* phones keep the green mark; the words stay for screen readers */
  .pin-key { margin-left: 0; }
}
