/* ==========================================================================
   Daddy's, Little Honey — Rustic Farmhouse Storefront
   ========================================================================== */

/* ---- Design Tokens ---- */
:root,
[data-theme='light'] {
  /* Surfaces — warm cream */
  --color-bg: #F8F3E9;
  --color-surface: #FDF9F0;
  --color-surface-2: #FFFDF8;
  --color-surface-offset: #F0E8D6;
  --color-surface-dynamic: #E8DDC6;
  --color-divider: #E5DAC4;
  --color-border: #D9CBB2;

  /* Text — deep brown */
  --color-text: #2D2418;
  --color-text-muted: #7A6B55;
  --color-text-faint: #B0A48C;
  --color-text-inverse: #FDF9F0;

  /* Primary — honey gold */
  --color-primary: #B8741A;
  --color-primary-hover: #9A5F10;
  --color-primary-active: #7E4D0A;
  --color-primary-highlight: #F0DCAE;

  /* Secondary — sage green */
  --color-secondary: #4A6741;
  --color-secondary-hover: #3A5232;
  --color-secondary-highlight: #D4DEC8;

  /* Badge — earthy terracotta */
  --color-badge: #A04A1E;
  --color-badge-bg: #F2E0D0;

  /* Typography */
  --font-display: 'Boska', 'Georgia', serif;
  --font-body: 'Work Sans', 'Helvetica Neue', sans-serif;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(45, 36, 24, 0.08);
  --shadow-md: 0 4px 16px rgba(45, 36, 24, 0.10);
  --shadow-lg: 0 12px 40px rgba(45, 36, 24, 0.16);

  /* Texture overlay */
  --grain-opacity: 0.035;
}

[data-theme='dark'] {
  /* Surfaces — dark earthy brown */
  --color-bg: #1A1610;
  --color-surface: #221E16;
  --color-surface-2: #2A251C;
  --color-surface-offset: #1F1B14;
  --color-surface-dynamic: #322B20;
  --color-divider: #2E2820;
  --color-border: #3D3528;

  /* Text — warm cream */
  --color-text: #E8DFD0;
  --color-text-muted: #A89B85;
  --color-text-faint: #6B6253;
  --color-text-inverse: #1A1610;

  /* Primary — lighter honey gold */
  --color-primary: #E8A933;
  --color-primary-hover: #F5BC4A;
  --color-primary-active: #D49220;
  --color-primary-highlight: #4D3D1A;

  /* Secondary — muted sage */
  --color-secondary: #7A9968;
  --color-secondary-hover: #8FAA7D;
  --color-secondary-highlight: #2D3A26;

  /* Badge */
  --color-badge: #C87A4A;
  --color-badge-bg: #3A2A1E;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);

  --grain-opacity: 0.06;
}

/* ---- Type Scale ---- */
:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);
  --text-hero: clamp(2.75rem, 0.5rem + 7vw, 7rem);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 200ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 1080px;
  --content-wide: 1280px;
}

/* ---- Reset ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: var(--space-20);
}

body {
  min-height: 100dvh;
  line-height: 1.6;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  /* Subtle paper grain texture */
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: var(--color-bg);
  opacity: 1;
}

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

ul[role='list'] {
  list-style: none;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
  line-height: 1.15;
  font-family: var(--font-display);
}

p, li, figcaption {
  text-wrap: pretty;
  max-width: 72ch;
}

::selection {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

a, button {
  transition: color var(--transition-interactive),
              background var(--transition-interactive),
              border-color var(--transition-interactive),
              box-shadow var(--transition-interactive);
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

/* ---- Header ---- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--transition-interactive);
}

.header--scrolled {
  box-shadow: var(--shadow-sm);
}

.header__inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  padding: var(--space-3) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

/* ---- Logo ---- */
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-text);
  flex-shrink: 0;
}

.logo__mark {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  color: var(--color-primary);
}

.logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo__main {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.logo__sub {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
}

/* ---- Nav ---- */
.nav__list {
  display: flex;
  gap: var(--space-6);
  list-style: none;
}

.nav__link {
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  color: var(--color-text-muted);
  position: relative;
  padding: var(--space-1) 0;
  white-space: nowrap;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width var(--transition-interactive);
}

.nav__link:hover {
  color: var(--color-text);
}

.nav__link:hover::after {
  width: 100%;
}

/* ---- Theme Toggle ---- */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  flex-shrink: 0;
}

.theme-toggle:hover {
  color: var(--color-text);
  border-color: var(--color-primary);
  background: var(--color-surface-offset);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-full);
  border: 2px solid transparent;
  transition: all var(--transition-interactive);
  white-space: nowrap;
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-color: var(--color-primary);
}

.btn--primary:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  box-shadow: var(--shadow-md);
}

.hero__actions .btn--ghost {
  background: transparent;
  color: #FDF9F0;
  border-color: rgba(253, 249, 240, 0.5);
}

.hero__actions .btn--ghost:hover {
  border-color: #FDF9F0;
  background: rgba(253, 249, 240, 0.12);
}

.btn--ghost {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn--ghost:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__image-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    color-mix(in oklab, #3A2818 72%, transparent) 0%,
    color-mix(in oklab, #4A3020 50%, transparent) 45%,
    color-mix(in oklab, #5A3825 20%, transparent) 100%
  );
}

[data-theme='dark'] .hero__overlay {
  background: linear-gradient(
    105deg,
    color-mix(in oklab, #1A1008 85%, transparent) 0%,
    color-mix(in oklab, #221608 60%, transparent) 50%,
    color-mix(in oklab, #2A1C0E 30%, transparent) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: var(--content-wide);
  margin: 0 auto;
  padding: var(--space-20) var(--space-6);
  width: 100%;
}

.hero__eyebrow {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}

.hero__title {
  font-size: var(--text-hero);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-6);
  color: #FDF9F0;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.4);
}

.hero__tagline {
  font-size: var(--text-lg);
  color: rgba(253, 249, 240, 0.88);
  max-width: 52ch;
  margin-bottom: var(--space-8);
  line-height: 1.5;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.3);
}

.hero__actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* ---- Section Heads ---- */
.section-head {
  max-width: var(--content-default);
  margin: 0 auto var(--space-12);
  padding: 0 var(--space-6);
}

.section-head--center {
  text-align: center;
}

.section-eyebrow {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-secondary);
  margin-bottom: var(--space-3);
}

.section-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
  color: var(--color-text);
}

.section-intro {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 60ch;
}

/* ---- Farm Stand Showcase ---- */
.showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  max-width: var(--content-wide);
  margin: 0 auto;
  padding: clamp(var(--space-16), 8vw, var(--space-24)) var(--space-6);
  gap: var(--space-12);
  position: relative;
  z-index: 1;
}

.showcase__image-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  aspect-ratio: 3 / 2;
}

.showcase__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.showcase__content {
  padding: var(--space-4);
}

.showcase__content .section-title {
  margin-bottom: var(--space-4);
}

.showcase__text {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-6);
}

/* ---- Shop / Product Grid ---- */
.shop {
  padding: clamp(var(--space-16), 8vw, var(--space-24)) 0;
  position: relative;
  z-index: 1;
}

.product-grid {
  max-width: var(--content-wide);
  margin: 0 auto;
  padding: 0 var(--space-6);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.product-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition-interactive),
              border-color var(--transition-interactive),
              transform var(--transition-interactive);
}

.product-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary);
  transform: translateY(-4px);
}

.product-card__image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--color-surface-offset);
}

.product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover .product-card__image img {
  transform: scale(1.06);
}

.product-card__body {
  padding: var(--space-5) var(--space-5) var(--space-6);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-card__badge {
  display: inline-block;
  align-self: flex-start;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-badge);
  background: var(--color-badge-bg);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-3);
}

.product-card__title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-2);
  color: var(--color-text);
}

.product-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  line-height: 1.55;
}

.product-card__items {
  list-style: none;
  margin-top: auto;
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-divider);
}

.product-card__items li {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  padding: var(--space-1) 0;
  position: relative;
  padding-left: var(--space-5);
}

.product-card__items li strong {
  font-weight: 600;
  color: var(--color-text);
}

.product-card__items li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
  opacity: 0.6;
}

/* ---- How to Order ---- */
.order {
  background: var(--color-surface-offset);
  padding: clamp(var(--space-16), 8vw, var(--space-24)) 0;
  position: relative;
  z-index: 1;
}

.order__inner {
  max-width: var(--content-default);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
  margin-top: var(--space-10);
}

.step {
  text-align: center;
  padding: var(--space-6);
}

.step__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-4);
  box-shadow: var(--shadow-md);
}

.step__title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-2);
  color: var(--color-text);
}

.step__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* ---- Visit ---- */
.visit {
  padding: clamp(var(--space-16), 8vw, var(--space-24)) 0;
  position: relative;
  z-index: 1;
}

.visit__inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  padding: 0 var(--space-6);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
}

.visit__text {
  max-width: 52ch;
}

.visit__desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin: var(--space-4) 0 var(--space-6);
  line-height: 1.6;
}

.visit__details {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  margin-bottom: var(--space-8);
}

.visit__detail {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  color: var(--color-secondary);
}

.visit__detail svg {
  flex-shrink: 0;
  margin-top: var(--space-1);
}

.visit__label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin-bottom: var(--space-1);
}

.visit__value {
  font-size: var(--text-base);
  color: var(--color-text);
  line-height: 1.4;
}

.visit__map {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 3;
}

.visit__map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  filter: var(--map-filter, none);
}

[data-theme='dark'] .visit__map iframe {
  filter: invert(0.9) hue-rotate(180deg) brightness(0.9) contrast(0.9);
}

/* ---- Footer ---- */
.footer {
  background: var(--color-surface-offset);
  border-top: 1px solid var(--color-border);
  padding: var(--space-12) 0;
  position: relative;
  z-index: 1;
}

.footer__inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  padding: 0 var(--space-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.footer__brand .logo__mark {
  width: 32px;
  height: 32px;
}

.footer__name {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text);
}

.footer__tagline {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.footer__meta {
  text-align: right;
}

.footer__meta p {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .showcase {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .showcase__image-wrap {
    aspect-ratio: 3 / 2;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .visit__inner {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .visit__map {
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 640px) {
  .header__inner {
    padding: var(--space-2) var(--space-4);
  }

  .logo__sub {
    display: none;
  }

  .nav__list {
    gap: var(--space-4);
  }

  .hero {
    min-height: 80vh;
  }

  .hero__content {
    padding: var(--space-12) var(--space-4);
  }

  .hero__actions {
    flex-direction: column;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    padding: 0 var(--space-4);
  }

  .product-grid {
    padding: 0 var(--space-4);
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }

  .footer__meta {
    text-align: center;
  }
}

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