/* =========================================================================
   Fred's Flowers — styles.css
   Theme: earthy farm / slow flower movement
   Design tokens → reset → layout → components → pages → responsive
   ========================================================================= */

/* Meursault VF — custom variable font (display / hero headings).
   Export the font file from Figma or obtain from the type foundry,
   then place it at assets/fonts/MeursaultVF.woff2 and uncomment: */
/*
@font-face {
  font-family: 'Meursault VF';
  src: url('../assets/fonts/MeursaultVF.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
*/

/* 1) DESIGN TOKENS -------------------------------------------------------- */
:root {
  /* Color palette (exact values from client handoff doc) */
  --cream:       #eddac8;   /* page background + hero text color */
  --cream-light: #f5ead8;   /* lighter tint */
  --dark:        #141a10;   /* near-black dark sections (Seasonal Selection) */
  --green:       #2f5036;   /* primary: footer, buttons, form borders, active nav */
  --green-mid:   #3d6b4a;   /* hover */
  --blue:        #224971;   /* accent blue */
  --red:         #a63c3d;   /* accent red */
  --text:        #2a2822;   /* body text on cream */
  --text-muted:  #6b6252;   /* secondary text */
  --text-light:  #eddac8;   /* body text on dark sections */
  --text-cream:  #eddac8;   /* headings on dark */
  --card-yellow: #dbb169;   /* Athens Farmer's Market card */
  --card-pink:   #bb5a7e;   /* Kindred Market card */
  --white:       #ffffff;
  --border:      #2f5036;   /* form input borders */

  /* Typography (confirmed from Figma)
     Meursault VF: display/hero headings — needs font file (see @font-face above)
     Gill Sans: body text — ships on macOS/Windows, no CDN needed */
  --font-display: 'Meursault VF', 'Gill Sans', 'Gill Sans MT', Georgia, serif;
  --font-body:    'Gill Sans', 'Century Gothic', Calibri, sans-serif;

  /* Type scale */
  --fs-hero:   clamp(2.4rem, 5vw, 4rem);
  --fs-h1:     clamp(2rem, 4vw, 3rem);
  --fs-h2:     clamp(1.5rem, 3vw, 2.2rem);
  --fs-h3:     1.25rem;
  --fs-body:   1rem;
  --fs-small:  0.875rem;
  --fs-nav:    0.8rem;

  /* Spacing */
  --sp-1: 0.5rem;
  --sp-2: 1rem;
  --sp-3: 1.5rem;
  --sp-4: 2.5rem;
  --sp-5: 4rem;
  --sp-6: 6rem;
  --sp-7: 8rem;

  /* Layout */
  --maxw:       1100px;
  --radius:     4px;
  --transition: 200ms ease;
}

/* 2) RESET / BASE --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--text);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;   /* Cormorant reads beautifully at regular weight */
  line-height: 1.15;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-family: var(--font-display); }

em { font-style: italic; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; padding: 0; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

/* 3) LAYOUT --------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--sp-3);
}
.section { padding-block: var(--sp-6); }
.section--sm { padding-block: var(--sp-4); }
.section--dark { background: var(--dark); color: var(--text-light); }
.section--green { background: var(--green); color: var(--cream); }

.center { text-align: center; }
.stack > * + * { margin-top: var(--sp-2); }
.stack--lg > * + * { margin-top: var(--sp-3); }

/* 4) COMPONENTS ----------------------------------------------------------- */

/* --- Nav (centered logo as centerpiece) --- */
.site-header {
  position: relative;
  z-index: 50;
  background: var(--cream);
  border-bottom: 1px solid rgba(45,74,45,0.15);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--sp-2);
  padding-block: var(--sp-2);
  position: relative;
}

/* On desktop: links left | logo center | links right */
.nav__left, .nav__right {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}
.nav__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  margin-inline: var(--sp-4);
}
.nav__logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
}
.nav__wordmark {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--text);
  letter-spacing: 0.03em;
  margin-top: 2px;
}
.nav__links-wrap {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}
.nav__links-wrap a {
  font-size: var(--fs-nav);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  font-weight: 400;
}
.nav__links-wrap a:hover, .nav__links-wrap a.is-active {
  color: var(--green);
  text-decoration: none;
}

/* Mobile toggle */
.nav__toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  font-size: 1.4rem;
  color: var(--text);
  padding: var(--sp-1);
  position: absolute;
  right: var(--sp-2);
  top: 50%;
  transform: translateY(-50%);
}

/* Nav on dark hero backgrounds */
.site-header--overlay {
  position: absolute;
  top: 0; left: 0; right: 0;
  background: transparent;
  border-bottom-color: rgba(255,255,255,0.15);
}
.site-header--overlay .nav__wordmark,
.site-header--overlay .nav__links-wrap a {
  color: var(--cream);
}
.site-header--overlay .nav__links-wrap a:hover,
.site-header--overlay .nav__links-wrap a.is-active {
  color: var(--cream-light);
}

/* --- Hero (full-bleed photo with dark overlay) --- */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: flex-end;
  padding-bottom: var(--sp-6);
  overflow: hidden;
  background: var(--dark);
}
.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  opacity: 0.65;
}
.hero__content {
  position: relative;
  z-index: 1;
  max-width: 520px;
  padding-inline: var(--sp-3);
  margin-inline: auto;
  /* shift toward left-center */
  margin-left: clamp(var(--sp-3), 8vw, 100px);
}
.hero__tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--fs-hero);
  font-weight: 400;
  color: var(--cream);
  margin-bottom: var(--sp-2);
  text-shadow: 0 0 4px #000000;
}
.hero__body {
  font-size: var(--fs-small);
  color: var(--text-light);
  line-height: 1.7;
  max-width: 340px;
}

/* --- Seasonal Selection section --- */
.seasonal {
  background: var(--dark);
  padding-block: var(--sp-6);
  text-align: center;
}
.seasonal__title {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  color: var(--text-cream);
  margin-bottom: 0.3em;
}
.seasonal__subtitle {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: var(--sp-2);
}
.seasonal__body {
  font-size: var(--fs-small);
  color: var(--text-light);
  max-width: 500px;
  margin-inline: auto;
  margin-bottom: var(--sp-5);
  line-height: 1.7;
}
.seasonal__flowers {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(1rem, 3vw, 2.5rem);
  flex-wrap: wrap;
  margin-top: var(--sp-4);
}
.seasonal__flower {
  background: var(--cream);
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  padding: var(--sp-2) var(--sp-1);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform var(--transition);
}
.seasonal__flower:hover { transform: translateY(-6px); }
.seasonal__flower img, .seasonal__flower svg {
  width: clamp(40px, 6vw, 72px);
  height: auto;
  mix-blend-mode: multiply;
}

/* --- Market cards --- */
.markets { padding-block: var(--sp-5); }
.markets__title { text-align: center; font-family: var(--font-display); font-size: var(--fs-h2); margin-bottom: 0.4em; }
.markets__subtitle { text-align: center; color: var(--text-muted); font-size: var(--fs-small); margin-bottom: var(--sp-4); }
.markets__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
  max-width: 800px;
  margin-inline: auto;
}
.market-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 180px;
  display: flex;
  align-items: flex-end;
  padding: var(--sp-2) var(--sp-3);
}
.market-card--yellow { background: var(--card-yellow); }
.market-card--pink   { background: var(--card-pink); }
.market-card__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
}
.market-card__label {
  position: relative;
  z-index: 1;
  background: var(--white);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1rem;
  padding: 0.3em 0.9em;
  border-radius: 2px;
}

/* --- About sub-nav tabs --- */
.sub-nav {
  border-bottom: 1px solid rgba(45,74,45,0.2);
  background: var(--cream);
}
.sub-nav__list {
  display: flex;
  justify-content: center;
  gap: var(--sp-5);
  padding-block: var(--sp-2);
}
.sub-nav__list a {
  font-size: var(--fs-small);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 400;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}
.sub-nav__list a:hover { color: var(--green); text-decoration: none; }
.sub-nav__list a.is-active { color: var(--green); border-bottom-color: var(--green); }

/* --- Team section --- */
.team-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-5);
  align-items: start;
}
.team-member { display: grid; grid-template-columns: 160px 1fr; gap: var(--sp-3); align-items: start; }
.team-member__img { border-radius: var(--radius); width: 160px; height: 200px; object-fit: cover; }
.team-member__name { font-family: var(--font-display); font-size: 1.6rem; margin-bottom: 0.3em; }

/* --- Mission section --- */
.mission { padding-block: var(--sp-5); }
.mission__inner { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); align-items: start; }
.mission__map { border-radius: var(--radius); mix-blend-mode: multiply; }

/* --- Sustainability section --- */
.sustainability { background: var(--green); color: var(--cream); padding-block: var(--sp-6); }
.sustainability h2 { color: var(--cream); }
.sustainability__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3) var(--sp-4); margin-top: var(--sp-4); }
.sustainability__item p { font-size: var(--fs-small); color: rgba(232,217,190,0.85); line-height: 1.6; padding-left: var(--sp-2); border-left: 2px solid rgba(232,217,190,0.3); }

/* --- CSA section --- */
.csa { padding-block: var(--sp-5); }
.csa__inner { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); align-items: start; }
.csa__img { border-radius: var(--radius); width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.csa__box { border: 2px solid var(--green); border-radius: var(--radius); padding: var(--sp-3); }
.csa__box h3 { font-family: var(--font-display); font-size: 1.3rem; margin-bottom: var(--sp-1); }

/* --- FAQ accordion --- */
.faq { padding-block: var(--sp-5); }
.faq h2 { text-align: center; margin-bottom: var(--sp-4); }
.faq__item { border-bottom: 1px solid rgba(45,74,45,0.25); }
.faq__question {
  width: 100%;
  background: none;
  border: 0;
  text-align: left;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--text);
  padding: var(--sp-2) 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq__question::after { content: '∨'; font-size: 0.85rem; transition: transform var(--transition); }
.faq__item.is-open .faq__question::after { transform: rotate(180deg); }
.faq__answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq__item.is-open .faq__answer { max-height: 300px; }
.faq__answer p { padding-bottom: var(--sp-2); font-size: var(--fs-small); color: var(--text-muted); }

/* --- Lightbox overlay --- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: none; align-items: center; justify-content: center;
  background: rgba(20,26,16,0.92);
  padding: var(--sp-3);
}
.lightbox.is-open { display: flex; }
.lightbox__img {
  max-width: 90vw; max-height: 85vh;
  border-radius: var(--radius);
  display: block;
}
.lightbox__close,
.lightbox__prev,
.lightbox__next {
  position: absolute;
  background: rgba(232,217,190,0.15);
  color: var(--cream);
  border: 0; cursor: pointer;
  font-size: 1.8rem; line-height: 1;
  width: 2.8rem; height: 2.8rem;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover { background: rgba(232,217,190,0.3); }
.lightbox__close { top: var(--sp-3); right: var(--sp-3); }
.lightbox__prev  { left: var(--sp-3); top: 50%; transform: translateY(-50%); }
.lightbox__next  { right: var(--sp-3); top: 50%; transform: translateY(-50%); }

/* --- Gallery (masonry-style mosaic) --- */
.gallery-mosaic {
  columns: 3;
  column-gap: var(--sp-1);
  line-height: 0;
}
.gallery-mosaic__item {
  display: inline-block;
  width: 100%;
  margin-bottom: var(--sp-1);
  break-inside: avoid;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
}
.gallery-mosaic__item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform var(--transition);
}
.gallery-mosaic__item:hover img { transform: scale(1.03); }

/* --- Contact layout --- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-5);
  align-items: start;
}
.contact-photo { border-radius: var(--radius); width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.contact-bio { margin-top: var(--sp-3); padding-top: var(--sp-3); border-top: 1px solid rgba(47,80,54,0.15); }
.contact-bio__name { font-family: var(--font-display); font-size: 1.15rem; font-weight: 400; font-style: italic; color: var(--green); margin-bottom: 0.5em; }
.contact-bio p { font-size: var(--fs-small); line-height: 1.7; color: var(--text-muted); }
.contact-title { font-family: var(--font-display); font-size: var(--fs-h1); font-weight: 400; margin-bottom: 0.2em; }
.contact-subtitle { font-family: var(--font-display); font-style: italic; font-size: 1.3rem; color: var(--text-muted); margin-bottom: var(--sp-3); }

/* --- Form --- */
.form .form__row { margin-bottom: var(--sp-2); }
.form label { display: block; font-size: var(--fs-small); letter-spacing: 0.04em; margin-bottom: 4px; color: var(--text); }
.form input, .form textarea, .form select {
  width: 100%;
  font: inherit;
  font-size: var(--fs-small);
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
}
.form input:focus, .form textarea:focus { outline: 2px solid var(--green); outline-offset: 1px; }
.form__checkbox { display: flex; align-items: center; gap: 0.5rem; font-size: var(--fs-small); }
.form__checkbox input[type=checkbox] { width: auto; }
.form .hp { position: absolute; left: -5000px; }
.btn-submit {
  display: block;
  width: 100%;
  background: var(--green);
  color: var(--cream);
  border: 0;
  padding: 0.7rem;
  font-family: var(--font-body);
  font-size: var(--fs-small);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: var(--radius);
  transition: background var(--transition);
  margin-top: var(--sp-2);
}
.btn-submit:hover { background: var(--green-mid); }

/* --- Confirmation / Thanks page --- */
.thanks-frame {
  padding: var(--sp-6) var(--sp-4);
  text-align: center;
  max-width: 680px;
  margin-inline: auto;
  border: 2px solid var(--green);
  /* decorative corner pattern */
  box-shadow: 0 0 0 6px var(--cream), 0 0 0 8px var(--green);
  margin-block: var(--sp-6);
  border-radius: 2px;
}
.thanks-frame h1 { font-family: var(--font-display); font-size: var(--fs-h1); font-weight: 400; margin-bottom: 0.4em; }
.thanks-frame p { font-family: var(--font-display); font-style: italic; font-size: 1.2rem; color: var(--text-muted); }
.thanks-frame__img { width: 160px; margin: var(--sp-4) auto 0; }

/* --- Decorative tree (bottom-right, multiple pages) --- */
.page-tree-wrap {
  position: relative;
  height: 0;
  overflow: visible;
}
.page-tree {
  pointer-events: none;
  position: absolute;
  bottom: 0;
  right: 0;
  width: clamp(180px, 26vw, 320px);
  mix-blend-mode: darken;
}

/* --- Back to Top --- */
.back-to-top {
  position: fixed;
  bottom: var(--sp-4);
  right: var(--sp-3);
  z-index: 50;
  background: var(--green);
  color: var(--cream);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.back-to-top[hidden] { display: none; }

/* --- Footer --- */
.site-footer {
  background: var(--green);
  color: var(--cream);
  padding-block: var(--sp-4);
  position: relative;
  z-index: 10;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
}
.footer__nav { display: flex; gap: var(--sp-3); }
.footer__nav a {
  font-size: var(--fs-small);
  letter-spacing: 0.06em;
  color: var(--cream);
  text-transform: none;
}
.footer__nav a:hover { text-decoration: underline; }
.footer__contact { font-size: var(--fs-small); display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.footer__contact a { color: var(--cream); }
.footer__contact a:hover { text-decoration: underline; }
.footer__contact-row { display: flex; align-items: center; gap: 0.4em; }

/* 5) RESPONSIVE ----------------------------------------------------------- */
@media (max-width: 768px) {
  .nav__left, .nav__right { display: none; }
  .nav__left.is-open, .nav__right.is-open { display: flex; flex-direction: column; width: 100%; align-items: center; padding-bottom: var(--sp-2); }
  .nav__toggle { display: block; }
  /* Hamburger must be legible on both cream and dark/transparent headers */
  .site-header--overlay .nav__toggle { color: var(--cream); }
  .nav { flex-direction: column; gap: var(--sp-1); }
  .nav__brand { margin-inline: 0; }
  .nav__logo { width: 52px; height: 52px; }
  /* Give overlay header a solid background when the mobile menu is open */
  .site-header--overlay.is-open {
    background: var(--green);
  }
  .site-header--overlay.is-open .nav__wordmark,
  .site-header--overlay.is-open .nav__links-wrap a {
    color: var(--cream);
  }
  /* Sub-nav: scroll horizontally instead of overflowing */
  .sub-nav__list {
    justify-content: flex-start;
    gap: var(--sp-3);
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-inline: var(--sp-3);
  }

  /* Drop overlay on mobile — header sits above the hero with a solid background */
  .site-header--overlay {
    position: relative;
    background: var(--green);
  }
  .site-header--overlay .nav__toggle { color: var(--cream); }
  .site-header--overlay.is-open { background: var(--green); }

  .hero { min-height: 55vh; padding-bottom: var(--sp-5); align-items: flex-end; }
  .hero__content { margin-left: 0; text-align: center; }
  .hero__body { max-width: 100%; }

  .markets__grid, .contact-layout, .mission__inner, .team-grid, .csa__inner { grid-template-columns: 1fr; }
  .team-member { grid-template-columns: 1fr; }
  .sustainability__grid { grid-template-columns: 1fr; }
  .gallery-mosaic { columns: 2; }
  .footer__inner { flex-direction: column; align-items: flex-start; gap: var(--sp-2); }
  .footer__contact { align-items: flex-start; }
  .thanks-frame { box-shadow: none; margin-inline: var(--sp-2); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
