/* A Tree 4 Me — shared site styles */

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

@font-face {
  font-family: "Source Sans 3";
  src: url("fonts/source-sans-3.woff2") format("woff2"),
       url("fonts/source-sans-3.woff") format("woff");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --green-deep: #1b3a2a;
  --green: #2f5d3a;
  --green-soft: #e8f0e6;
  --cream: #f7f3eb;
  --sand: #ede4d5;
  --earth: #a67c52;
  --ink: #242720;
  --muted: #5a6156;
  --line: #d9d0c2;
  --gold: #f0c96a;
  --max: 1120px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 118px;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Source Sans 3", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-underline-offset: 4px; }
a:hover { color: var(--green); }
a:focus-visible { outline: 3px solid #98701c; outline-offset: 5px; }

h1, h2, h3, p, figure, dl, dd { margin: 0; }

h1, h2, h3 {
  font-family: Fraunces, Georgia, serif;
  color: var(--green-deep);
  font-weight: 500;
  line-height: 1.15;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.9rem, 3.3vw, 2.7rem); letter-spacing: -0.025em; }
h3 { font-size: 1.25rem; }

.wrap { max-width: var(--max); margin: auto; width: calc(100% - 48px); }
small { font-size: 0.83rem; color: var(--muted); }

.skip {
  position: absolute;
  top: -90px;
  left: 10px;
  z-index: 100;
  background: white;
  padding: 10px 14px;
  border-radius: 6px;
}
.skip:focus { top: 10px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--max);
  padding: 14px 0;
  width: calc(100% - 48px);
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  white-space: nowrap;
}
.brand img {
  border-radius: 9px;
  width: 54px;
  height: 54px;
  background: #000;
  object-fit: cover;
}
.brand strong {
  display: block;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.35rem;
  color: var(--green-deep);
  line-height: 1.25;
  font-weight: 500;
}
.brand small { display: block; font-size: 0.76rem; }

.site-header nav { display: flex; gap: 26px; align-items: center; }
.site-header nav a {
  text-decoration: none;
  color: var(--green-deep);
  font-size: 0.92rem;
  padding: 8px 0;
  font-weight: 600;
  border-bottom: 2px solid transparent;
}
.site-header nav a:hover,
.site-header nav a[aria-current="page"] { border-bottom-color: var(--green); }

/* Home hero */
.hero {
  height: 620px;
  max-height: 78vh;
  min-height: 510px;
  position: relative;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: white;
}
.hero picture,
.hero picture img,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero picture img {
  object-fit: cover;
  object-position: center 40%;
  transform: scale(1.02);
  max-width: none;
}
.hero-shade {
  background: linear-gradient(
    180deg,
    rgba(18, 36, 26, 0.02),
    rgba(18, 36, 26, 0.07) 25%,
    rgba(18, 36, 26, 0.5) 62%,
    rgba(18, 36, 26, 0.86)
  );
}
.hero-content { position: relative; z-index: 1; padding: 48px 0; }

.eyebrow {
  display: block;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #f0dfbd;
  margin-bottom: 15px;
}
.eyebrow.green { color: var(--green); }

.hero h1 {
  font-size: clamp(2.6rem, 5vw, 4rem);
  color: white;
  line-height: 1.08;
  max-width: 18ch;
}
.hero p {
  font-size: 1.05rem;
  margin: 22px 0;
  color: #f6f5e9;
  line-height: 1.65;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 30px;
  border-radius: 99px;
  padding: 13px 23px;
  background: var(--gold);
  color: var(--green-deep);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
}
.button:hover { background: #f6d98a; color: var(--green-deep); }

.welcome {
  padding: 64px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.welcome .statement {
  font-family: Fraunces, Georgia, serif;
  font-size: 1.3rem;
  color: var(--green-deep);
  margin-bottom: 12px;
  max-width: 32ch;
}
.welcome p { color: var(--muted); }

.text-link {
  display: inline-block;
  font-weight: 600;
  color: var(--green);
  font-size: 0.92rem;
  margin-top: 20px;
}

.visit {
  padding: 54px 0 65px;
  background: white;
  border-top: 1px solid var(--line);
}
.section-heading { margin-bottom: 35px; }
.visit-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr 1fr;
  gap: 38px;
}
.visit-grid > div + div {
  border-left: 1px solid var(--line);
  padding-left: 30px;
}
.visit h3 { margin-bottom: 16px; }
.visit address { font-style: normal; color: var(--muted); }
.visit p { line-height: 2; }

.phone {
  font-family: Fraunces, Georgia, serif;
  font-size: 1.35rem;
  text-decoration: none;
  color: var(--green-deep);
}

.hours { margin: 0 0 8px; font-size: 0.9rem; }
.hours > div {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 5px;
}
.hours dd { margin: 0; white-space: nowrap; }

/* Interior pages */
.page-main { padding: 53px 0 80px; }
.page-intro { max-width: 760px; margin-bottom: 36px; }
.page-intro h1 { margin-bottom: 18px; }
.page-intro > p { color: var(--muted); font-size: 1.1rem; margin-bottom: 14px; }
.page-intro small { display: block; line-height: 1.7; }

/* Photo category grid */
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 25px 22px;
}
.cat-card {
  display: block;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.cat-card .thumb {
  display: block;
  border-radius: 9px;
  overflow: hidden;
  background: var(--sand);
}
.cat-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: transform 0.2s;
}
.cat-card:hover img { transform: scale(1.025); }
.cat-card h2 {
  font-size: 1.35rem;
  padding-top: 12px;
  margin: 0;
}
.cat-card .count {
  display: block;
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 2px;
}

.photo-gallery { display: none; padding-top: 4px; }
.photo-gallery:target { display: block; }
body:has(.photo-gallery:target) .photo-categories,
body.gallery-open .photo-categories { display: none; }

.gallery-back {
  display: inline-block;
  font-weight: 600;
  color: var(--green);
  text-decoration: none;
  font-size: 0.92rem;
  margin-bottom: 18px;
}
.gallery-back:hover { text-decoration: underline; }
.photo-gallery h1 { margin-bottom: 10px; }
.photo-gallery .gallery-lead {
  color: var(--muted);
  margin-bottom: 28px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 25px 22px;
}
.gallery figure { min-width: 0; }
.gallery figure a {
  display: block;
  border-radius: 9px;
  overflow: hidden;
  background: var(--sand);
}
.gallery img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  transition: transform 0.2s;
}
.gallery a:hover img { transform: scale(1.025); }
.gallery figcaption {
  font-size: 0.9rem;
  color: var(--green-deep);
  padding-top: 10px;
}

/* Availability */
.category-jump {
  border-block: 1px solid var(--line);
  padding: 20px 0 22px;
  margin-bottom: 18px;
}
.category-jump > span {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--green);
  margin-bottom: 13px;
}
.category-jump > div { display: flex; gap: 7px 9px; flex-wrap: wrap; }
.category-jump a {
  font-size: 0.82rem;
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid #d2d8c9;
  border-radius: 40px;
  background: #fffdf8;
  color: var(--green-deep);
}
.category-jump a:hover { background: var(--green-soft); }

.list-note {
  font-size: 0.8rem;
  color: var(--muted);
  max-width: 850px;
  margin-bottom: 44px;
}

.category { margin-bottom: 45px; scroll-margin-top: 115px; }
.category-heading {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: baseline;
  border-bottom: 2px solid var(--green);
  padding-bottom: 14px;
  margin-bottom: 24px;
}
.category-heading h2 { font-size: 2rem; }
.category-heading > a {
  font-size: 0.75rem;
  white-space: nowrap;
  color: var(--muted);
  text-decoration: none;
}
.category-heading > a:hover { color: var(--green); }

.size-group { margin: 0 0 25px; }
.size-group h3 {
  font-family: inherit;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  background: var(--green-soft);
  padding: 9px 15px;
  border-radius: 5px 5px 0 0;
  color: var(--green-deep);
}

.plant-list { list-style: none; padding: 0; margin: 0; }
.plant-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px 100px;
  align-items: center;
  gap: 25px;
  padding: 12px 15px;
  border-bottom: 1px solid var(--line);
  background: #fffdf9;
}
.plant-name { font-size: 0.96rem; font-weight: 500; overflow-wrap: anywhere; }
.plant-name small {
  display: block;
  font-size: 0.74rem;
  font-weight: 400;
  margin-top: 1px;
}
.stock {
  font-size: 0.88rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.price {
  font-size: 0.96rem;
  font-weight: 650;
  text-align: right;
  white-space: normal;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
  color: var(--green-deep);
}

/* Footer */
footer {
  padding: 38px 0 25px;
  background: var(--green-deep);
  color: #f0f1e7;
  font-size: 0.85rem;
}
footer strong {
  font: 1.3rem Fraunces, Georgia, serif;
  font-weight: 500;
}
footer p { margin: 8px 0 3px; color: #cfd9cc; }
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
}
footer nav { display: flex; align-items: flex-start; gap: 22px; }
footer nav a { text-decoration: none; color: #f0dfbd; font-size: 0.83rem; }
footer a:hover { color: white; }
footer small {
  grid-column: 1 / -1;
  border-top: 1px solid #45604d;
  padding-top: 18px;
  color: #bdcdbd;
  font-size: 0.72rem;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(18, 36, 26, 0.94);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 56px 28px;
  color: #f0f1e7;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 100%;
  max-height: calc(100vh - 140px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
}
.lightbox-caption {
  margin-top: 14px;
  font-size: 0.95rem;
  text-align: center;
  color: #f0dfbd;
}
.lightbox-close,
.lightbox-nav {
  position: absolute;
  background: transparent;
  border: 0;
  color: #f0f1e7;
  cursor: pointer;
  font: inherit;
  padding: 10px 14px;
  border-radius: 6px;
}
.lightbox-close { top: 12px; right: 12px; font-size: 1.1rem; font-weight: 600; }
.lightbox-nav { top: 50%; transform: translateY(-50%); font-size: 2rem; line-height: 1; }
.lightbox-prev { left: 8px; }
.lightbox-next { right: 8px; }
.lightbox-close:hover,
.lightbox-nav:hover { background: rgba(255, 255, 255, 0.1); }
.lightbox-close:focus-visible,
.lightbox-nav:focus-visible { outline: 3px solid #f0c96a; outline-offset: 2px; }

/* Simple not-found page */
.not-found { text-align: left; }
.not-found .button { margin-top: 28px; }

@media (min-width: 1450px) {
  .hero { height: 680px; }
}

@media (max-width: 900px) {
  .visit-grid { grid-template-columns: 1fr 1.3fr; }
  .visit-grid > div:last-child { border: 0; padding: 0; }
  .gallery,
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery img { height: 300px; }
  .cat-card img { height: 220px; }
  .welcome { gap: 35px; }
  .site-header nav { gap: 18px; }
}

@media (max-width: 600px) {
  html { scroll-padding-top: 144px; }
  .wrap,
  .header-inner { width: calc(100% - 36px); }
  .header-inner {
    padding: 12px 0 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .brand img { width: 42px; height: 42px; }
  .brand strong { font-size: 1.2rem; }
  .brand small { font-size: 0.7rem; }
  .brand { gap: 10px; }
  .site-header nav {
    width: 100%;
    gap: 0;
    justify-content: space-between;
  }
  .site-header nav a { font-size: 0.83rem; padding: 8px 0 12px; }

  .hero { height: 610px; min-height: 530px; max-height: none; }
  .hero picture img { object-position: center 40%; }
  .hero-content { padding-bottom: 32px; }
  .hero .eyebrow { font-size: 0.65rem; letter-spacing: 0.1em; }
  .hero h1 { font-size: 2.8rem; }
  .hero p { font-size: 0.94rem; margin: 18px 0 22px; }
  .button { font-size: 0.86rem; padding: 13px 19px; gap: 20px; }

  .welcome { padding: 38px 0; grid-template-columns: 1fr; gap: 24px; }
  .welcome .statement { font-size: 1.15rem; }
  .welcome p { font-size: 0.93rem; }

  .visit { padding: 37px 0 42px; }
  .visit-grid { grid-template-columns: 1fr; gap: 28px; }
  .visit-grid > div + div {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 25px 0 0;
  }
  .visit-grid > div:last-child {
    border-top: 1px solid var(--line);
    padding-top: 25px;
  }
  .section-heading { margin-bottom: 27px; }

  .page-main { padding-top: 34px; padding-bottom: 45px; }
  .page-intro { margin-bottom: 28px; }
  .page-intro > p { font-size: 1rem; }
  .page-intro small { font-size: 0.78rem; }

  .gallery,
  .category-grid { gap: 25px; grid-template-columns: 1fr; }
  .gallery img,
  .cat-card img { height: 320px; }
  .gallery figcaption { font-size: 0.87rem; }

  .category-jump { padding: 17px 0; }
  .category-jump a { font-size: 0.75rem; padding: 5px 10px; }
  .category-jump > div { gap: 6px; }
  .list-note { margin-bottom: 30px; font-size: 0.76rem; }
  .category { scroll-margin-top: 145px; margin-bottom: 34px; }
  .category-heading h2 { font-size: 1.65rem; }
  .category-heading { padding-bottom: 11px; margin-bottom: 18px; }
  .category-heading > a { font-size: 0.68rem; }

  .plant-list li {
    grid-template-columns: minmax(0, 1fr) 55px 66px;
    gap: 9px;
    padding: 12px 10px;
  }
  .plant-name { font-size: 0.86rem; line-height: 1.4; }
  .plant-name small { font-size: 0.67rem; margin-top: 4px; }
  .stock { font-size: 0.78rem; text-align: center; line-height: 1.5; }
  .stock span { display: block; font-size: 0.62rem; }
  .price { font-size: 0.85rem; }
  .size-group h3 { font-size: 0.74rem; padding: 8px 10px; }

  .footer-inner { grid-template-columns: 1fr; gap: 23px; }
  footer nav { flex-wrap: wrap; gap: 20px; }
  footer { font-size: 0.8rem; }
  .eyebrow { margin-bottom: 12px; }

  .lightbox { padding: 56px 16px 24px; }
  .lightbox-nav { font-size: 1.6rem; }
  .lightbox-prev { left: 0; }
  .lightbox-next { right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .gallery img,
  .cat-card img { transition: none; }
}
