/* ==========================================================================
   North Fork Lawn & Hedge: demo site
   Hand-written CSS. No framework, no build step.
   ========================================================================== */

:root {
  /* --- palette --- */
  --oyster: #E4E1D3;       /* page background: oyster-shell driveway */
  --paper: #F4F1E7;        /* card / ticket surface */
  --ink: #23201B;          /* primary text, warm near-black */
  --ink-soft: #514c40;     /* secondary text */
  --hedge: #253B2C;        /* deep clipped-hedge green: primary accent / CTA */
  --hedge-light: #3E5C43;  /* lighter hedge green */
  --rust: #93432A;         /* barn-rust: secondary accent, used sparingly */
  --chambray: #4B6478;     /* faded work-shirt blue: tertiary accent / links */
  --cedar: #8A6A46;        /* cedar-wood brown: borders, dividers */
  --overgrown: #6B6144;    /* dull olive: reserved */
  --line: rgba(35,32,27,0.14);

  /* derived, for legible text/UI set over photography */
  --rust-on-photo: color-mix(in srgb, var(--rust) 55%, white 45%);
  --scrim: 35,32,27; /* --ink as r,g,b triplet, for gradient overlays on hero/quote photos */

  --font-display: "Zilla Slab", Georgia, "Times New Roman", serif;
  --font-body: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.75rem;
  --space-4: 2.75rem;
  --space-5: 4.5rem;
  --space-6: 7rem;

  --wrap: 1180px;
  --radius: 6px;
}

/* --- reset --- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

body {
  background: var(--oyster);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.12;
}

h2 { font-size: clamp(1.9rem, 1.35rem + 2.4vw, 3.1rem); margin-bottom: var(--space-3); max-width: 20ch; letter-spacing: -0.005em; }
h3 { font-size: 1.2rem; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: var(--space-1);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--hedge);
  color: var(--paper);
  padding: 0.75rem 1.25rem;
  z-index: 200;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

:focus-visible {
  outline: 3px solid var(--chambray);
  outline-offset: 3px;
}

/* --- buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.8rem 1.4rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn-lg { padding: 1rem 1.75rem; font-size: 1.02rem; }
.btn-primary {
  background: var(--hedge);
  color: var(--paper);
}
.btn-primary:hover { background: var(--hedge-light); transform: translateY(-1px); }
.btn-ghost {
  border-color: var(--ink);
  color: var(--ink);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--hedge); color: var(--hedge); transform: translateY(-1px); }
.btn-invert {
  background: var(--paper);
  color: var(--hedge);
}
.btn-invert:hover { background: #fff; transform: translateY(-1px); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--oyster);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
}
.brand-mark {
  width: 34px;
  height: 34px;
  color: var(--hedge);
  flex-shrink: 0;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.15;
  display: flex;
  flex-direction: column;
}
.brand-name em {
  font-style: normal;
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
}
.site-nav {
  display: none;
  gap: var(--space-3);
  font-weight: 600;
  font-size: 0.95rem;
}
.site-nav a:hover { color: var(--hedge); }
.header-cta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.phone-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.92rem;
}
.phone-link svg { width: 17px; height: 17px; color: var(--rust); flex-shrink: 0; }
.phone-link:hover { color: var(--hedge); }

@media (min-width: 860px) {
  .site-nav { display: flex; }
}
@media (max-width: 640px) {
  .phone-link span { display: none; }
}
@media (max-width: 480px) {
  .header-inner { gap: 0.6rem; }
  .brand-name { white-space: nowrap; font-size: 0.92rem; }
  .brand-name em { font-size: 0.68rem; }
  .header-cta { gap: 0.5rem; }
  .btn.btn-primary:not(.btn-lg) { padding: 0.65rem 0.9rem; font-size: 0.85rem; }
}

/* ==========================================================================
   Hero: photo-led, dark scrim behind copy for contrast
   ========================================================================== */
.hero {
  position: relative;
  padding: var(--space-5) 0 var(--space-5);
  overflow: hidden;
  color: var(--paper);
}
@media (min-width: 900px) {
  .hero { padding: var(--space-6) 0 var(--space-5); }
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: clip;
  background: var(--ink);
}
.hero-media-img {
  width: 100%;
  height: 134%;
  margin-top: -17%;
  object-fit: cover;
  object-position: center 62%;
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  /* Ink-dark scrim, strongest under the copy column, sheer over the photo
     on the right so the mowed lawn and hedge line stay the dominant image. */
  background: linear-gradient(
    100deg,
    rgba(var(--scrim), 0.94) 0%,
    rgba(var(--scrim), 0.86) 34%,
    rgba(var(--scrim), 0.5) 56%,
    rgba(var(--scrim), 0.14) 74%,
    rgba(var(--scrim), 0) 92%
  );
}
.hero-inner {
  position: relative;
}
.hero-copy { max-width: 40rem; }
.hero-copy .eyebrow { color: var(--rust-on-photo); }
.hero-copy h1 {
  color: var(--paper);
  font-size: clamp(2.3rem, 1.1rem + 5.2vw, 4.6rem);
  letter-spacing: -0.01em;
  max-width: 14ch;
  margin-bottom: var(--space-2);
}
.hero-sub {
  font-size: 1.1rem;
  color: rgba(244,241,231,0.86);
  max-width: 46ch;
  margin-bottom: var(--space-3);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: var(--space-3);
}
.hero .btn-ghost {
  border-color: var(--paper);
  color: var(--paper);
}
.hero .btn-ghost:hover {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--hedge);
}
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: rgba(244,241,231,0.78);
}
.hero-trust li { position: relative; padding-left: 1.1rem; }
.hero-trust li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--paper);
}

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

/* Zigzag transition: a trimmed-hedge edge cut into the base of the hero
   photo, in the section's own paper tone. Deliberate section break, not a
   default. Sits inside .hero (overflow: hidden on the section) so it never
   creates a horizontal scrollbar. */
.hero-zigzag {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 24px;
  background-image:
    linear-gradient(135deg, var(--paper) 25%, transparent 25.5%),
    linear-gradient(225deg, var(--paper) 25%, transparent 25.5%);
  background-position: left bottom;
  background-repeat: repeat-x;
  background-size: 24px 24px;
}

/* ==========================================================================
   Services
   ========================================================================== */
.services {
  padding: var(--space-5) 0;
  background: var(--paper);
}
/* Pinned scroll moment: the four services activate one at a time as the
   section holds in view. Base state (no pin support / reduced motion /
   narrow viewport) is a perfectly ordinary static grid — nothing here is
   ever required to understand the section. */
.services-track { --m-pin-length: 240vh; }
.services-pin {
  --m-pin-height: 100vh;
}
.services-rail {
  position: relative;
  height: 2px;
  background: var(--line);
  margin: var(--space-3) 0 var(--space-4);
  max-width: 22rem;
}
.services-rail .m-rail-fill { background: var(--hedge); }

.service-grid {
  display: grid;
  gap: var(--space-2);
  grid-template-columns: 1fr;
}
.service-card {
  background: var(--oyster);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-3);
  transition: border-color var(--m-dur-base, 300ms) var(--m-ease-out, ease), box-shadow var(--m-dur-base, 300ms) var(--m-ease-out, ease);
}
.service-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--hedge);
  background: transparent;
  margin-bottom: var(--space-2);
}
.service-icon {
  width: 26px;
  height: 26px;
  color: var(--hedge);
}
.service-card h3 { margin-bottom: 0.5rem; }
.service-card p { color: var(--ink-soft); font-size: 0.96rem; }

@media (min-width: 640px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .service-grid { grid-template-columns: repeat(4, 1fr); }
}

/* The pinned choreography itself. Each card is marked "active" not by
   dimming its neighbours (fails contrast at a paused scroll position) but
   by filling its own badge hedge-green and lifting the card a few px. Text
   stays fully legible at every point along the timeline. */
@keyframes service-rise {
  0%   { transform: translate3d(0, 16px, 0); }
  30%  { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(0, 0, 0); }
}
@keyframes service-badge-fill {
  0% { background: transparent; border-color: var(--hedge); }
  30%, 100% { background: var(--hedge); border-color: var(--hedge); }
}
@keyframes service-icon-flip {
  0% { color: var(--hedge); }
  30%, 100% { color: var(--paper); }
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .service-grid .service-card,
    .service-grid .service-badge,
    .service-grid .service-icon {
      animation-timing-function: linear;
      animation-fill-mode: both;
      animation-timeline: --m-pin;
    }
    .service-grid .service-card { animation-name: service-rise; }
    .service-grid .service-badge { animation-name: service-badge-fill; }
    .service-grid .service-icon { animation-name: service-icon-flip; }

    .service-grid .service-card:nth-child(1),
    .service-grid .service-card:nth-child(1) .service-badge,
    .service-grid .service-card:nth-child(1) .service-icon { animation-range: contain 2% contain 30%; }
    .service-grid .service-card:nth-child(2),
    .service-grid .service-card:nth-child(2) .service-badge,
    .service-grid .service-card:nth-child(2) .service-icon { animation-range: contain 26% contain 54%; }
    .service-grid .service-card:nth-child(3),
    .service-grid .service-card:nth-child(3) .service-badge,
    .service-grid .service-card:nth-child(3) .service-icon { animation-range: contain 50% contain 78%; }
    .service-grid .service-card:nth-child(4),
    .service-grid .service-card:nth-child(4) .service-badge,
    .service-grid .service-card:nth-child(4) .service-icon { animation-range: contain 74% contain 100%; }
  }
}

/* Below 900px the pin is dropped entirely: a stacked static grid reads
   better on a phone than a long pinned scroll (matches the main site). */
@media (max-width: 900px) {
  .services-track { min-height: 0 !important; }
  .services-pin {
    position: static !important;
    min-height: 0 !important;
    display: block !important;
  }
  .service-grid .service-card,
  .service-grid .service-badge,
  .service-grid .service-icon {
    animation: none !important;
    transform: none !important;
  }
  .service-badge { background: var(--hedge) !important; }
  .service-icon { color: var(--paper) !important; }
  .services-rail { display: none; }
}

/* ==========================================================================
   Seasonal / ticket cards
   ========================================================================== */
.seasonal {
  border-top: 1px solid var(--line);
  padding: var(--space-5) 0;
}
.ticket-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: 1fr;
}
.ticket-card {
  background: var(--paper);
  border: 1.5px dashed var(--cedar);
  border-radius: var(--radius);
  padding: var(--space-3);
  position: relative;
}
.ticket-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  border-bottom: 1.5px dashed var(--line);
  padding-bottom: var(--space-2);
  margin-bottom: var(--space-2);
}
.ticket-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
}
.ticket-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--rust);
}
.ticket-list li {
  position: relative;
  padding-left: 1.3rem;
  margin-bottom: 0.6rem;
  color: var(--ink-soft);
  font-size: 0.96rem;
}
.ticket-list li:last-child { margin-bottom: 0; }
.ticket-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 9px;
  height: 9px;
  border: 1.6px solid var(--hedge);
  border-radius: 2px;
}

@media (min-width: 780px) {
  .ticket-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================================================
   Service area
   ========================================================================== */
.area {
  padding: var(--space-5) 0;
}
.area-head {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  margin-bottom: var(--space-3);
}
.compass {
  width: 56px;
  height: 56px;
  color: var(--chambray);
  flex-shrink: 0;
  margin-top: 0.3rem;
}
.area-copy {
  color: var(--ink-soft);
  max-width: 60ch;
  font-size: 1.03rem;
}
.town-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: var(--space-2);
}
.town-list li {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--cedar);
  border-radius: 999px;
  color: var(--ink);
  background: var(--paper);
}
.area-note {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* ==========================================================================
   Quote band
   ========================================================================== */
.quote-band {
  background: var(--hedge);
  color: var(--paper);
  padding: var(--space-5) 0;
  position: relative;
  overflow: clip;
}
.quote-bg {
  position: absolute;
  inset: 0;
  /* Negative z-index keeps this within .quote-band's own stacking context,
     behind all in-flow content (.quote-inner) AND behind .quote-stub,
     without giving .quote-inner a position that would change its
     containing-block relationship to .quote-stub. */
  z-index: -1;
  overflow: clip;
  background: var(--hedge);
}
.quote-bg-img {
  width: 100%;
  height: 128%;
  margin-top: -14%;
  object-fit: cover;
  object-position: center;
}
.quote-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  /* Deep hedge-green tint over the trimmed-hedge photo, keeping the oyster
     CTA text and stub dot legible while matching the site's palette. */
  background: linear-gradient(160deg, rgba(37, 59, 44, 0.92) 0%, rgba(40, 53, 42, 0.88) 100%);
}
.quote-inner {
  max-width: 640px;
  text-align: center;
}
.quote-inner h2 {
  color: var(--paper);
  max-width: none;
  margin-left: auto;
  margin-right: auto;
}
.quote-inner p {
  color: #d8ddd6;
  margin-bottom: var(--space-3);
}
.quote-alt {
  margin-top: var(--space-2);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}
.quote-alt a { color: var(--paper); }
.quote-stub {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -50%);
  width: 18px;
  height: 18px;
  background: var(--oyster);
  border-radius: 50%;
  z-index: 1;
}

/* Zigzag transition into Contact: same hedge-trim device as the hero,
   cut from the quote band's hedge-green into the contact section's tone. */
.quote-zigzag {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 24px;
  background-image:
    linear-gradient(135deg, var(--paper) 25%, transparent 25.5%),
    linear-gradient(225deg, var(--paper) 25%, transparent 25.5%);
  background-position: left bottom;
  background-repeat: repeat-x;
  background-size: 24px 24px;
}

/* ==========================================================================
   Contact
   ========================================================================== */
.contact {
  padding: var(--space-5) 0;
  background: var(--paper);
}
.contact-grid {
  display: grid;
  gap: var(--space-4);
}
.phone-big {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.4rem);
  color: var(--hedge);
  margin: var(--space-1) 0 var(--space-2);
}
.phone-big:hover { color: var(--rust); }
.contact-line { color: var(--ink-soft); margin-bottom: 0.3rem; }

.hours-card {
  background: var(--oyster);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-3);
}
.hours-card h3 { margin-bottom: var(--space-2); }
.hours-list div {
  display: flex;
  justify-content: space-between;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.92rem;
}
.hours-list div:last-child { border-bottom: none; }
.hours-list dt { color: var(--ink-soft); font-weight: 500; }
.hours-list dd { font-weight: 600; }
.hours-note {
  margin-top: var(--space-2);
  color: var(--ink-soft);
  font-size: 0.88rem;
}

@media (min-width: 780px) {
  .contact-grid { grid-template-columns: 1.2fr 1fr; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--ink);
  color: #cfcabb;
  padding-top: var(--space-4);
}
.site-footer .brand { color: var(--paper); }
.site-footer .brand-mark { color: #7fa085; }
.site-footer .brand-name em { color: #a9a48f; }
.footer-brand p {
  margin-top: var(--space-2);
  max-width: 34ch;
  font-size: 0.92rem;
  color: #a9a48f;
}
.footer-grid {
  display: grid;
  gap: var(--space-3);
  padding-bottom: var(--space-4);
}
.footer-nav h3, .footer-contact h3 {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a9a48f;
  margin-bottom: var(--space-2);
  font-weight: 600;
}
.footer-nav { display: flex; flex-direction: column; gap: 0.55rem; }
.footer-nav a, .footer-contact a { color: #e4e1d3; font-size: 0.95rem; }
.footer-nav a:hover, .footer-contact a:hover { color: #fff; }
.footer-contact p { font-size: 0.92rem; margin-top: 0.4rem; color: #a9a48f; }
.footer-contact .phone-link { color: #e4e1d3; }
.footer-contact .phone-link svg { color: #7fa085; }

.footer-bottom {
  border-top: 1px solid rgba(228,225,211,0.14);
  padding: var(--space-2) 0 var(--space-3);
}
.footer-bottom p {
  font-size: 0.8rem;
  color: #837e6c;
}

@media (min-width: 780px) {
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; }
}

/* Tap-target minimums (mobile a11y): interactive elements >= 40px tall */
.brand,
.site-nav a,
nav a,
.phone-link,
address a,
footer a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
}
.site-nav a, footer a { padding-inline: 8px; justify-content: center; min-width: 40px; }
.header-cta .phone-link { padding-inline: 10px; min-width: 40px; justify-content: center; }
