/* New Hampshire apple picking — orchard harvest guide */
:root {
  --apple-red: #9f302d;
  --apple-red-dark: #74201f;
  --apple-leaf: #315a3d;
  --apple-leaf-dark: #23432e;
  --apple-cider: #c57c2e;
  --apple-gold: #e0ad55;
  --apple-ink: #2f302b;
  --apple-muted: #64645b;
  --apple-cream: #f6f0e3;
  --apple-paper: #fffdf7;
  --apple-line: #d8d0c2;
  --apple-pale-green: #e8eee6;
}

body.nh-apple-page {
  background: var(--apple-cream);
  color: var(--apple-ink);
}

.nh-apple-page .site-header {
  background: rgba(255, 253, 247, .96);
  border-bottom: 3px solid var(--apple-red);
}

.nh-apple-page main {
  padding: 0 0 5rem;
}

.apple-kicker {
  margin: 0 0 .4rem;
  color: var(--apple-red);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* Hero */
.apple-hero {
  position: relative;
  min-height: clamp(34rem, 55vw, 43rem);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
  background: var(--apple-leaf-dark);
}

.apple-hero-photo,
.apple-hero-photo::after {
  position: absolute;
  inset: 0;
}

.apple-hero-photo {
  z-index: -2;
}

.apple-hero-photo::after {
  content: "";
  pointer-events: none;
  background:
    linear-gradient(0deg, rgba(35, 24, 16, .72) 0%, rgba(35, 24, 16, .12) 48%, transparent 72%),
    linear-gradient(90deg, rgba(35, 24, 16, .28), transparent 55%);
}

.apple-hero-photo picture,
.apple-hero-photo img {
  display: block;
  width: 100%;
  height: 100%;
}

.apple-hero-photo img {
  object-fit: cover;
  object-position: center;
}

.apple-hero-inner {
  width: 100%;
  padding-bottom: clamp(2rem, 5vw, 4rem);
}

.apple-title-panel {
  max-width: 50rem;
  padding: clamp(1.45rem, 3.5vw, 2.6rem);
  background: rgba(255, 253, 247, .95);
  border-top: 8px solid var(--apple-red);
  box-shadow: 12px 12px 0 rgba(49, 90, 61, .9);
}

.apple-crumb {
  margin: 0 0 1rem;
  color: var(--apple-muted);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.apple-crumb a {
  color: var(--apple-leaf);
}

.apple-title-panel h1 {
  max-width: 47rem;
  margin: 0 0 1rem;
  color: var(--apple-red-dark);
  font-size: clamp(2.7rem, 6.5vw, 5.3rem);
  line-height: .96;
  letter-spacing: -.04em;
}

.apple-title-panel > p:last-child {
  max-width: 42rem;
  margin: 0;
  color: #484b43;
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  line-height: 1.65;
}

/* Apple-specific season information */
.apple-season-bar {
  background: var(--apple-leaf-dark);
  color: #fff;
  border-bottom: 5px solid var(--apple-cider);
}

.apple-season-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 80rem;
  padding-block: 1.2rem;
}

.apple-season-grid div {
  padding: .2rem 1.5rem;
  border-right: 1px solid rgba(255, 255, 255, .22);
}

.apple-season-grid div:first-child {
  padding-left: 0;
}

.apple-season-grid div:last-child {
  border-right: 0;
}

.apple-season-grid strong,
.apple-season-grid span {
  display: block;
}

.apple-season-grid strong {
  margin-bottom: .16rem;
  color: #fff;
  font-size: .92rem;
}

.apple-season-grid span {
  color: #dce7dc;
  font-size: .75rem;
  line-height: 1.35;
}

/* Directory and visibly separate sidebar */
.apple-directory-layout {
  display: grid;
  grid-template-columns: minmax(17rem, 20rem) minmax(0, 1fr);
  grid-template-areas: "sidebar main";
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
  max-width: 80rem;
  padding-top: clamp(3.5rem, 7vw, 6rem);
}

.apple-directory-main {
  grid-area: main;
  min-width: 0;
}

.apple-directory-head {
  margin-bottom: 1.5rem;
  padding-bottom: 1.4rem;
  border-bottom: 5px solid var(--apple-red);
}

.apple-directory-head h2 {
  margin: .15rem 0 .65rem;
  color: var(--apple-red-dark);
  font-size: clamp(2rem, 4vw, 3.15rem);
  line-height: 1.06;
}

.apple-directory-head p:last-child {
  max-width: 48rem;
  margin: 0;
  color: var(--apple-muted);
  line-height: 1.65;
}

.nh-apple-page .apple-directory {
  max-width: none;
}

.nh-apple-page .farm {
  margin-bottom: .7rem;
  overflow: hidden;
  background: var(--apple-paper);
  border: 1px solid var(--apple-line);
  border-radius: 10px;
  box-shadow: 0 2px 0 rgba(70, 49, 27, .04);
}

.nh-apple-page .farm::before {
  display: none;
}

.nh-apple-page .farm:hover {
  box-shadow: 0 7px 20px rgba(70, 49, 27, .09);
}

.nh-apple-page .farm.is-open {
  transform: none;
  border-color: #b8a88f;
  box-shadow: 0 10px 28px rgba(70, 49, 27, .1);
}

.nh-apple-page .farm-trigger {
  min-height: 5rem;
  padding: 1rem 1.1rem 1rem 1.25rem;
  border-left: 6px solid var(--apple-leaf);
  transition: background .18s ease, border-color .18s ease;
}

.nh-apple-page .farm-trigger:hover {
  background: #faf5ea;
  border-left-color: var(--apple-red);
}

.nh-apple-page .farm.is-open .farm-trigger {
  background: #f3e8d8;
  border-left-color: var(--apple-red);
}

.nh-apple-page .farm-name {
  color: var(--apple-red-dark);
  font-family: var(--font-display);
  font-size: 1.18rem;
  line-height: 1.25;
}

.nh-apple-page .farm-town {
  padding: .28rem .62rem;
  background: var(--apple-pale-green);
  border-radius: 999px;
  color: var(--apple-leaf-dark);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.nh-apple-page .chev {
  width: .68rem;
  height: .68rem;
  border-color: var(--apple-red);
  border-width: 0 2px 2px 0;
}

.nh-apple-page .farm-panel {
  visibility: hidden;
  transition: grid-template-rows .3s var(--ease), visibility .3s;
}

.nh-apple-page .farm.is-open .farm-panel {
  visibility: visible;
}

.nh-apple-page .farm-body {
  padding: 1.25rem 1.35rem 1.5rem;
  border-top: 1px solid var(--apple-line);
}

.nh-apple-page .farm-body > p {
  max-width: 52rem;
  color: #56574f;
  line-height: 1.7;
}

.nh-apple-page .farm-meta {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.5rem;
  margin-top: 1.25rem;
  padding: 1.1rem;
  background: #f8f1e5;
  border-top: 0;
}

.nh-apple-page .farm-meta dt {
  color: var(--apple-red);
  font-weight: 800;
}

.nh-apple-page .farm-meta dd {
  color: var(--apple-ink);
}

.nh-apple-page .farm-meta a {
  color: var(--apple-leaf);
  font-weight: 700;
}

.apple-sidebar {
  grid-area: sidebar;
  position: sticky;
  top: 5.5rem;
}

.apple-sidebar-card {
  overflow: hidden;
  background: var(--apple-paper);
  border: 1px solid var(--apple-line);
  border-top: 7px solid var(--apple-leaf);
  box-shadow: 8px 8px 0 #dfd4c3;
}

.apple-sidebar-card > .apple-kicker,
.apple-sidebar-card > h2,
.apple-sidebar-card > p {
  margin-inline: 1.1rem;
}

.apple-sidebar-card > .apple-kicker {
  margin-top: 1.15rem;
}

.apple-sidebar-card h2 {
  margin-top: .2rem;
  margin-bottom: .55rem;
  color: var(--apple-leaf-dark);
  font-size: 1.6rem;
  line-height: 1.08;
}

.apple-sidebar-card > p:last-of-type {
  margin-bottom: 1.1rem;
  color: var(--apple-muted);
  font-size: .83rem;
  line-height: 1.5;
}

.apple-sidebar-links {
  display: grid;
  border-top: 1px solid var(--apple-line);
}

.apple-sidebar-links a {
  padding: .85rem 1rem;
  color: var(--apple-ink);
  text-decoration: none;
  border-bottom: 1px solid var(--apple-line);
  border-left: 4px solid transparent;
  transition: background .18s ease, border-color .18s ease;
}

.apple-sidebar-links a:last-child {
  border-bottom: 0;
}

.apple-sidebar-links a:hover,
.apple-sidebar-links a:focus-visible {
  background: var(--apple-pale-green);
  border-left-color: var(--apple-red);
}

.apple-sidebar-links b,
.apple-sidebar-links span {
  display: block;
}

.apple-sidebar-links b {
  margin-bottom: .17rem;
  color: var(--apple-leaf-dark);
  font-size: .9rem;
}

.apple-sidebar-links span {
  color: var(--apple-muted);
  font-size: .72rem;
  line-height: 1.35;
}

.apple-plan-card {
  margin-top: 1.5rem;
  padding: 1.1rem;
  background: var(--apple-red-dark);
  color: #fff;
}

.apple-plan-card .apple-kicker {
  color: #f0bb68;
}

.apple-plan-card h3 {
  margin: .2rem 0 .65rem;
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.apple-plan-card ul {
  margin: 0;
  padding-left: 1.1rem;
  color: #f7e9df;
  font-size: .8rem;
  line-height: 1.75;
}

/* Orchard planning content */
.apple-guide {
  display: grid;
  grid-template-columns: minmax(16rem, .7fr) minmax(0, 1.3fr);
  gap: 1.5rem 4rem;
  max-width: 80rem;
  margin-top: clamp(4.5rem, 9vw, 7rem);
  padding: clamp(1.75rem, 5vw, 3.5rem);
  background: var(--apple-paper);
  border: 1px solid var(--apple-line);
  border-top: 9px solid var(--apple-red);
}

.apple-guide-heading h2 {
  margin: .2rem 0 0;
  color: var(--apple-red-dark);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.06;
}

.apple-guide-copy p {
  color: #56574f;
  line-height: 1.75;
}

.apple-guide-notes {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.apple-guide-notes article {
  padding: 1.2rem;
  background: #f3eadb;
  border-left: 5px solid var(--apple-cider);
}

.apple-guide-notes article + article {
  border-left-color: var(--apple-leaf);
}

.apple-guide-notes span {
  color: var(--apple-red);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.apple-guide-notes h3 {
  margin: .3rem 0 .45rem;
  color: var(--apple-leaf-dark);
  font-size: 1.15rem;
}

.apple-guide-notes p {
  margin: 0;
  color: #5b5b53;
  font-size: .88rem;
  line-height: 1.65;
}

.apple-guide-notes a {
  color: var(--apple-red-dark);
  font-weight: 700;
}

.apple-internal-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 80rem;
  margin-top: 1.5rem;
  padding-inline: 0;
  border: 1px solid var(--apple-line);
}

.apple-internal-links a {
  min-height: 6.5rem;
  padding: 1.15rem;
  background: var(--apple-leaf-dark);
  color: #fff;
  text-decoration: none;
  border-right: 1px solid rgba(255, 255, 255, .18);
}

.apple-internal-links a:last-child {
  border-right: 0;
}

.apple-internal-links a:hover,
.apple-internal-links a:focus-visible {
  background: var(--apple-leaf);
  color: #fff;
}

.apple-internal-links span {
  display: block;
  margin-bottom: .4rem;
  color: #edbd72;
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.nh-apple-page .apple-finder {
  max-width: 80rem;
  margin-top: clamp(4rem, 8vw, 6rem);
}

.apple-finder h2 {
  margin: 0 0 1.25rem;
}

@media (max-width: 900px) {
  .apple-directory-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "main"
      "sidebar";
  }

  .apple-sidebar {
    position: static;
    margin-top: 1rem;
  }

  .apple-sidebar-card {
    box-shadow: 6px 6px 0 #dfd4c3;
  }

  .apple-sidebar-links {
    grid-template-columns: 1fr 1fr;
  }

  .apple-sidebar-links a:nth-child(odd) {
    border-right: 1px solid var(--apple-line);
  }

  .apple-sidebar-links a:last-child {
    grid-column: 1 / -1;
    border-top: 0;
  }
}

@media (max-width: 700px) {
  .apple-hero {
    min-height: 43rem;
  }

  .apple-hero-photo::after {
    background: linear-gradient(0deg, rgba(35, 24, 16, .78) 0%, rgba(35, 24, 16, .15) 63%, transparent 82%);
  }

  .apple-hero-photo img {
    object-position: center 30%;
  }

  .apple-hero-inner {
    padding: 7rem 1rem 2rem;
  }

  .apple-title-panel {
    padding: 1.3rem;
    box-shadow: 7px 7px 0 rgba(49, 90, 61, .92);
  }

  .apple-title-panel h1 {
    font-size: clamp(2.45rem, 12vw, 3.7rem);
  }

  .apple-season-grid {
    grid-template-columns: 1fr;
    padding-block: .6rem;
  }

  .apple-season-grid div,
  .apple-season-grid div:first-child {
    padding: .7rem 0;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .2);
  }

  .apple-season-grid div:last-child {
    border-bottom: 0;
  }

  .nh-apple-page .farm-meta,
  .apple-guide,
  .apple-guide-notes,
  .apple-internal-links {
    grid-template-columns: 1fr;
  }

  .apple-guide-notes {
    grid-column: auto;
  }

  .apple-guide,
  .apple-internal-links {
    width: auto;
    margin-inline: 1rem;
  }

  .apple-internal-links a {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .18);
  }

  .apple-internal-links a:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 520px) {
  .apple-crumb span,
  .apple-crumb a {
    display: none;
  }

  .nh-apple-page .farm-trigger {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .45rem .75rem;
  }

  .nh-apple-page .farm-name {
    grid-column: 1;
  }

  .nh-apple-page .farm-town {
    grid-column: 1;
    justify-self: start;
  }

  .nh-apple-page .chev {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
  }

  .apple-sidebar-links {
    grid-template-columns: 1fr;
  }

  .apple-sidebar-links a:nth-child(odd) {
    border-right: 0;
  }

  .apple-sidebar-links a:last-child {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nh-apple-page .farm,
  .nh-apple-page .farm-trigger,
  .nh-apple-page .farm-panel,
  .apple-sidebar-links a {
    transition: none;
  }
}
