/* =====================================================================
   The Bloomin' Nanny — Berryfields Farm House & Creamery
   Editorial farmshop layout. Plain CSS, no build step.
   Sections: tokens, base, header, bands, blocks, cards, forms,
   footer, motion. Small screens are handled inline with clamp()/svh
   rather than in a trailing override layer.
   ===================================================================== */

:root {
  /* Colour */
  --cream: #f6f2e9;
  --card: #fffdf8;
  --sage: #5a6b4e;
  --sage-deep: #3f4d3c;
  --ink: #2c332a;
  --text: #454b41;
  --muted: #5f665a;
  --faint: #8a8f83;
  --tan: #a67c4a;
  --on-dark: #f6f2e9;
  --line: rgba(90, 107, 78, 0.22);
  --line-soft: rgba(90, 107, 78, 0.16);

  /* Type */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  /* Layout */
  --wrap: 1180px;
  --gutter: clamp(22px, 5vw, 56px);
  --block: clamp(56px, 8vw, 96px);
  --header-h: 73px;

  /* Depth */
  --shadow: 0 18px 40px -26px rgba(44, 51, 42, 0.5);
  --shadow-lift: 0 18px 40px -22px rgba(44, 51, 42, 0.55);
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

img { max-width: 100%; display: block; }
a { color: var(--sage); }
a:hover { color: var(--sage-deep); }

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

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--on-dark);
  padding: 12px 18px;
  font: 600 14px/1 var(--font-body);
  text-decoration: none;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ===== Type helpers ===== */
.eyebrow {
  display: block;
  font: 500 11px/1.6 var(--font-body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tan);
  margin: 0 0 14px;
}
.eyebrow--on-dark { color: rgba(238, 232, 219, 0.72); letter-spacing: 0.16em; }
.eyebrow--quiet { color: var(--faint); letter-spacing: 0.13em; font-size: 10.5px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  margin: 0;
  font-weight: 600;
}
h1 { font-size: clamp(31px, 4.4vw, 44px); line-height: 1.1; }
h2 { font-size: clamp(26px, 3.4vw, 34px); line-height: 1.15; }
h3 { font-size: clamp(20px, 2.2vw, 25px); line-height: 1.22; }

p { margin: 0 0 16px; }
p:last-child { margin-bottom: 0; }
.lede { font-size: clamp(15px, 1.5vw, 18px); line-height: 1.7; }
.dropcap::first-letter {
  float: left;
  font: 600 54px/0.82 var(--font-display);
  color: var(--sage);
  margin: 4px 12px 0 0;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 600 14px/1 var(--font-body);
  text-decoration: none;
  padding: 16px 24px;
  min-height: 48px;
  border: 0;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.btn-solid { background: var(--sage); color: var(--on-dark); }
.btn-solid:hover { background: var(--sage-deep); color: var(--on-dark); }
.btn-light { background: var(--cream); color: var(--ink); }
.btn-light:hover { background: #fff; color: var(--ink); }
.btn-outline {
  background: transparent;
  color: var(--on-dark);
  border: 1px solid rgba(246, 242, 233, 0.5);
  padding: 15px 24px;
}
.btn-outline:hover { background: rgba(246, 242, 233, 0.12); color: var(--on-dark); }

.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

.link-quiet {
  font: 600 13.5px/1 var(--font-body);
  color: var(--sage);
  text-decoration: none;
  border-bottom: 1px solid rgba(90, 107, 78, 0.45);
  padding-bottom: 3px;
}
.link-quiet:hover { border-bottom-color: var(--sage-deep); }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(246, 242, 233, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(90, 107, 78, 0.18);
  padding-top: env(safe-area-inset-top);
}

.header-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  gap: 16px 24px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  margin-right: auto;
  min-width: 0;
}
.brand-badge { width: 42px; height: 42px; flex: none; }
.brand-name {
  font: 600 clamp(17px, 4.4vw, 19px)/1.1 var(--font-display);
  color: var(--ink);
  white-space: nowrap;
}

.site-nav { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.site-nav a {
  font: 500 14px/1 var(--font-body);
  text-decoration: none;
  padding: 12px 14px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current='page'] { color: var(--ink); border-bottom-color: var(--tan); }

/* ===== Full-bleed image bands (hero + section breaks) ===== */
.band {
  position: relative;
  display: flex;
  align-items: flex-end;
  background: var(--sage-deep);
  overflow: hidden;
}
.band--hero { min-height: min(78svh, 620px); }
.band--mid { min-height: min(60svh, 520px); margin-bottom: var(--block); }

.band--hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(22, 28, 21, 0.08) 0%,
    rgba(22, 28, 21, 0.3) 42%,
    rgba(22, 28, 21, 0.82) 100%
  );
}

.band-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.band-body {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: clamp(32px, 6vw, 72px) 0;
  background: linear-gradient(
    to top,
    rgba(30, 36, 28, 0.9) 0%,
    rgba(30, 36, 28, 0.32) 60%,
    rgba(30, 36, 28, 0) 100%
  );
}
.band-body h1,
.band-body h2 { color: var(--on-dark); margin-bottom: 14px; }
.band--hero h1 { font-size: clamp(34px, 5.5vw, 58px); line-height: 1.08; max-width: 18ch; }
.band-body p { color: rgba(246, 242, 233, 0.9); max-width: 58ch; }
.band-body .btn-row { margin-top: 28px; }
.band--hero h1,
.band--hero .lede,
.band--hero .eyebrow { text-shadow: 0 2px 16px rgba(13, 17, 12, 0.38); }
.band--hero .eyebrow--on-dark { color: rgba(246, 242, 233, 0.94); font-weight: 600; }

/* Visit page opens as an editorial split rather than a generic image overlay. */
.visit-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(380px, 0.85fr);
  min-height: min(68svh, 620px);
  background: var(--ink);
}
.visit-hero-image { min-height: 440px; }
.visit-hero-image img { width: 100%; height: 100%; object-fit: cover; object-position: 45% center; }
.visit-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(40px, 6vw, 86px) clamp(32px, 6vw, 84px);
}
.visit-hero-copy h1 {
  color: var(--on-dark);
  font-size: clamp(34px, 4.5vw, 56px);
  line-height: 1.08;
  margin-bottom: 22px;
}
.visit-hero-copy p { color: rgba(246, 242, 233, 0.82); max-width: 46ch; }

/* ===== Content blocks ===== */
.section { padding-top: clamp(44px, 7vw, 88px); }
.section-end { padding-bottom: clamp(48px, 7vw, 88px); }
.block { margin-bottom: var(--block); }

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 28px 44px;
}
.split--start { align-items: start; }
.split--center { align-items: center; }
.split--narrow { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 20px 44px; }

/* Figures */
.figure { margin: 0; box-shadow: var(--shadow-lift); }
.figure img { width: 100%; height: 100%; object-fit: cover; }
.ratio-54 { aspect-ratio: 5 / 4; }
.ratio-45 { aspect-ratio: 4 / 5; }
.ratio-43 { aspect-ratio: 4 / 3; }
.ratio-169 { aspect-ratio: 16 / 9; }
.ratio-219 { aspect-ratio: 21 / 9; }

.caption {
  font: italic 400 13px/1.4 var(--font-body);
  color: var(--faint);
  margin: 12px 0 0;
  text-align: center;
}

.portrait-round { max-width: 280px; justify-self: center; }
.portrait-round .figure {
  border-radius: 50%;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

.note {
  border-left: 2px solid var(--tan);
  padding-left: 18px;
  margin: 0 0 18px;
  font: 500 clamp(16px, 1.8vw, 18px)/1.55 var(--font-display);
  color: var(--ink);
}
.note--flush { margin-bottom: 0; }
.note span {
  display: block;
  font: 500 11px/1.6 var(--font-body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tan);
  margin-bottom: 4px;
}

.pull-quote {
  font: 500 clamp(19px, 2.1vw, 22px)/1.55 var(--font-display);
  color: var(--ink);
  margin: 0 0 18px;
  border-left: 2px solid var(--tan);
  padding-left: 20px;
}

.creamery-heading { max-width: 18ch; margin-bottom: 20px; }
.creamery-image { margin-top: 30px; }
.counter-heading { margin-bottom: 22px; }
.counter-copy { margin-bottom: 22px; }

/* Ruled list of product names */
.rule-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 0 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}
.rule-list li { font: 400 16px/1 var(--font-body); color: var(--text); padding: 18px 0; }

/* Sage call-out panel */
.panel {
  background: var(--sage);
  padding: clamp(28px, 4vw, 44px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 36px;
  align-items: center;
}
.panel h2 { color: var(--on-dark); font-size: clamp(24px, 3vw, 30px); line-height: 1.2; margin-bottom: 14px; }
.panel p { color: rgba(246, 242, 233, 0.88); }
.panel .eyebrow { color: rgba(246, 242, 233, 0.65); }
.panel .btn-row { margin-top: 24px; }

/* ===== Cards ===== */
.product-intro {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(340px, 1.15fr);
  gap: clamp(36px, 6vw, 84px);
  align-items: center;
  margin-bottom: clamp(36px, 5vw, 62px);
}
.product-intro h1 { max-width: 15ch; margin-bottom: 22px; }
.product-intro p { max-width: 52ch; }
.product-intro--lean { margin-bottom: clamp(42px, 6vw, 72px); }
.product-intro--lean .figure { align-self: stretch; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 28px;
}
.card-grid--tight { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 24px; }
.product-list {
  border-top: 1px solid var(--line);
  margin-bottom: clamp(54px, 8vw, 92px);
}
.product-row {
  display: grid;
  grid-template-columns: minmax(230px, 0.8fr) minmax(280px, 1.3fr) auto;
  gap: 24px 46px;
  align-items: center;
  padding: clamp(28px, 4vw, 42px) 0;
  border-bottom: 1px solid var(--line);
}
.product-row .eyebrow { margin-bottom: 7px; }
.product-row h2 { font-size: clamp(24px, 3vw, 32px); }
.product-row > p { max-width: 46ch; margin: 0; font-size: 15.5px; line-height: 1.7; }
.product-row .btn { white-space: nowrap; }

.farm-extras {
  display: grid;
  grid-template-columns: 0.8fr 1fr 1fr;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.farm-extras > div { padding: 30px 30px 32px 0; }
.farm-extras > div + div { padding-left: 30px; border-left: 1px solid var(--line); }
.farm-extras-heading h2 { font-size: clamp(25px, 3vw, 32px); }
.farm-extra h3 { font-size: 20px; margin-bottom: 8px; }
.farm-extra p { font-size: 14.5px; line-height: 1.65; color: var(--muted); margin-bottom: 14px; }
.availability-note {
  margin: 24px 0 0;
  font-size: 14px;
  color: var(--muted);
}
.availability-note a { font-weight: 600; }
.visit-card h3 { font-size: 20px; margin: 16px 0 8px; }
.visit-card p { font-size: 15px; line-height: 1.7; color: var(--muted); }
.visit-section-label { margin-bottom: 20px; }
.visit-card-grid { margin-bottom: clamp(48px, 7vw, 80px); }
.visit-plan-heading { margin-bottom: 20px; }

/* ===== Detail list (hours / address / contact) ===== */
.details { border-top: 1px solid var(--line); }
.details > div { padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.details p { font-size: 15.5px; line-height: 1.6; margin: 0; }
.details .eyebrow { margin-bottom: 8px; }

/* ===== Form ===== */
.form-card {
  background: var(--card);
  padding: clamp(24px, 3vw, 30px);
  box-shadow: var(--shadow);
}
.form-card h3 { font-size: 24px; margin-bottom: 6px; }
.form-intro { font-size: 15px; line-height: 1.6; color: var(--faint); margin-bottom: 22px; }

.form { display: flex; flex-direction: column; gap: 16px; }
.form label { display: block; }
.form .label-text {
  display: block;
  font: 500 12px/1 var(--font-body);
  color: var(--muted);
  margin-bottom: 7px;
}
.form input,
.form select,
.form textarea {
  width: 100%;
  border: 1px solid rgba(90, 107, 78, 0.3);
  background: var(--cream);
  padding: 14px;
  /* 16px keeps iOS from zooming the page on focus */
  font: 400 16px/1.3 var(--font-body);
  color: var(--ink);
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
}
.form textarea { line-height: 1.5; resize: vertical; min-height: 132px; }
.form select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235a6b4e' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}
.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(90, 107, 78, 0.14);
}
.form button { padding: 17px; }
.form button:disabled { cursor: wait; opacity: 0.72; }
.form-note { margin: -5px 0 0; font-size: 12px; line-height: 1.5; color: var(--faint); }
.form-honey {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}
.form-status {
  padding: 14px 16px;
  border-left: 3px solid var(--sage);
  background: var(--cream);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
}
.form-status[hidden] { display: none; }
.form-status p { margin: 5px 0 0; }
.form-status--success { margin: 22px 0 0; }
.form-status--error { margin: 0; border-left-color: #9a4c3e; }
.form-status--error a { font-weight: 600; }

/* ===== Visit note ===== */
.visit-note { background: var(--sage); padding: clamp(40px, 6vw, 68px) 0; }
.visit-note-grid {
  display: grid;
  grid-template-columns: 0.45fr 1.05fr 1fr;
  gap: 26px 46px;
  align-items: start;
}
.visit-note-grid .eyebrow { margin-top: 7px; }
.visit-note-lede {
  font: 500 clamp(23px, 3vw, 32px)/1.35 var(--font-display);
  color: var(--on-dark);
  margin: 0;
}
.visit-note-grid > p:last-child {
  color: rgba(246, 242, 233, 0.82);
  margin: 3px 0 0;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--ink);
  padding: clamp(36px, 5vw, 52px) 0 28px;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 32px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(246, 242, 233, 0.16);
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.footer-brand img { width: 38px; height: 38px; }
.footer-brand span { font: 600 18px/1.1 var(--font-display); color: var(--on-dark); }
.site-footer h2 {
  font: 500 11px/1 var(--font-body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(246, 242, 233, 0.55);
  margin: 0 0 12px;
}
.site-footer p { font-size: 14.5px; line-height: 1.7; color: rgba(246, 242, 233, 0.8); margin: 0; }
.site-footer .footer-tagline { color: rgba(246, 242, 233, 0.62); }
.site-footer a { color: rgba(246, 242, 233, 0.8); text-decoration: none; }
.site-footer a:hover { color: var(--on-dark); text-decoration: underline; }
.footer-links { display: flex; flex-direction: column; gap: 8px; font-size: 14.5px; }
.footer-legal { font-size: 13px; color: rgba(246, 242, 233, 0.45); margin: 20px 0 0; }

/* ===== Page shell ===== */
.page { min-height: 100svh; display: flex; flex-direction: column; }
main { flex: 1; }

/* ===== Small screens ===== */
@media (max-width: 620px) {
  :root { --header-h: 126px; }
  body { font-size: 16px; }
  .dropcap::first-letter { font-size: 44px; margin-right: 10px; }
  .band--hero { min-height: min(72svh, 540px); }
  .band--hero::before {
    background: linear-gradient(
      to bottom,
      rgba(18, 23, 17, 0.12) 0%,
      rgba(18, 23, 17, 0.58) 42%,
      rgba(18, 23, 17, 0.94) 100%
    );
  }
  .band--hero .band-body {
    background: linear-gradient(to top, rgba(18, 23, 17, 0.68), rgba(18, 23, 17, 0));
  }
  .band--hero .lede { color: rgba(255, 253, 248, 0.97); }
  .btn { width: 100%; }
  .btn-row { flex-direction: column; align-items: stretch; }
  .product-intro { grid-template-columns: 1fr; }
  .product-intro .figure { order: -1; }
  .visit-note-grid { grid-template-columns: 1fr; gap: 18px; }
  .visit-hero { grid-template-columns: 1fr; }
  .visit-hero-image { min-height: 54svh; }
  .visit-hero-copy { padding: 34px var(--gutter) 42px; }
  .product-row { grid-template-columns: 1fr; gap: 14px; }
  .product-row .btn { width: 100%; }
  .farm-extras { grid-template-columns: 1fr; }
  .farm-extras > div { padding: 24px 0; }
  .farm-extras > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 380px) {
  .brand-badge { width: 36px; height: 36px; }
  .site-nav a { padding: 12px 10px; }
}

/* ===== Motion =====
   Scoped to .js so a failed/blocked script can never leave content
   stuck at opacity 0. */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
