/* Global tokens — budget pantry / organicfuture rhythm */
:root {
  --color-primary: #4f5d2f;
  --color-secondary: #f5f5dc;
  --color-accent: #c06c4d;
  --color-ink: #2a2a28;
  --color-mist: rgba(245, 245, 220, 0.72);
  --color-glass: rgba(232, 228, 217, 0.55);
  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Nunito Sans", system-ui, sans-serif;
  --space-xs: 0.35rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.75rem;
  --space-xl: 2.75rem;
  --radius-md: 0.65rem;
  --radius-rough: 1.2rem 0.6rem 1rem 0.3rem;
  --shadow-soft: 0 0.45rem 1.6rem rgba(42, 42, 40, 0.12);
  --shadow-lift: 0 0.9rem 2.4rem rgba(79, 93, 47, 0.18);
  --transition-fast: 0.28s ease;
  --max-readable: 72rem;
  --header-break: 64rem;
}

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

html {
  font-size: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-body);
  color: var(--color-ink);
  background: linear-gradient(
      165deg,
      var(--color-secondary) 0%,
      #e8e4d9 42%,
      #dfd8ca 100%
    )
    fixed;
  line-height: 1.55;
  overflow-x: hidden;
}

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

a {
  color: var(--color-primary);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
  transition: color var(--transition-fast), opacity var(--transition-fast);
}

a:hover {
  color: var(--color-accent);
}

.visually-hidden-a11y {
  position: absolute;
  width: 0.0625rem;
  height: 0.0625rem;
  padding: 0;
  margin: -0.0625rem;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page-shell-outer {
  overflow-x: hidden;
}

/* Hero full-bleed — image layer sits beneath text */
.hero-full-bleed {
  position: relative;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  min-height: clamp(16rem, 22rem, 28rem);
  display: grid;
  grid-template-rows: 1fr;
  align-items: stretch;
  border-radius: 0 0 var(--radius-rough) var(--radius-rough);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
}

.hero-layer-back {
  grid-row: 1;
  grid-column: 1;
  position: relative;
  z-index: 0;
}

.hero-layer-back picture,
.hero-layer-back img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-back-tint {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(245, 245, 220, 0.92) 0%,
    rgba(232, 228, 217, 0.65) 45%,
    rgba(79, 93, 47, 0.38) 100%
  );
  z-index: 1;
}

.hero-layer-front {
  grid-row: 1;
  grid-column: 1;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-xl) var(--space-md);
  max-width: var(--max-readable);
  margin: 0 auto;
  width: 100%;
}

.hero-layer-front h1 {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 2.2rem, 2.85rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--color-ink);
  text-shadow: 0 0.08em 0.35rem rgba(245, 245, 220, 0.9);
}

.hero-layer-front .hero-lead-text {
  margin: 0;
  max-width: 38rem;
  font-size: clamp(0.95rem, 1.05rem, 1.08rem);
  background: var(--color-glass);
  backdrop-filter: blur(0.55rem);
  -webkit-backdrop-filter: blur(0.55rem);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-rough);
  border: 0.08rem dashed rgba(79, 93, 47, 0.35);
  box-shadow: var(--shadow-soft);
}

.rough-underline-heading {
  display: inline-block;
  border-bottom: 0.18rem solid var(--color-accent);
  border-radius: 0 0 40% 12% / 0 0 18% 40%;
  padding-bottom: 0.12rem;
}

/* Header — non-sticky, soft glass bar */
.page-header-main {
  position: relative;
  z-index: 20;
  background: linear-gradient(
    90deg,
    rgba(245, 245, 220, 0.94),
    rgba(232, 228, 217, 0.88)
  );
  backdrop-filter: blur(0.4rem);
  border-bottom: 0.07rem solid rgba(79, 93, 47, 0.2);
  box-shadow: 0 0.25rem 0.9rem rgba(42, 42, 40, 0.07);
}

.header-flex-row {
  max-width: var(--max-readable);
  margin: 0 auto;
  padding: var(--space-md) var(--space-md);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.header-brand-label {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1rem, 1.1rem, 1.2rem);
}

.header-brand-label a {
  color: var(--color-ink);
  text-decoration: none;
}

.header-brand-label a:hover {
  color: var(--color-primary);
}

.nav-desktop-links {
  display: none;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
  align-items: center;
}

.nav-desktop-links a {
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.35);
  border: 0.06rem solid rgba(79, 93, 47, 0.15);
}

.nav-desktop-links a:hover {
  background: rgba(192, 108, 77, 0.15);
}

@media (min-width: 64rem) {
  .nav-desktop-links {
    display: flex;
    flex: 1;
    justify-content: center;
  }
}

/* Burger — last in header, visible up to 1023px */
.nav-burger-control {
  order: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0.1rem solid rgba(79, 93, 47, 0.35);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.nav-burger-control:hover {
  background: rgba(192, 108, 77, 0.18);
}

.nav-burger-control[aria-expanded="true"] .burger-visual-lines {
  transform: rotate(45deg);
}

.nav-burger-control[aria-expanded="true"] .burger-visual-lines::before {
  top: 0;
  transform: rotate(-90deg);
}

.nav-burger-control[aria-expanded="true"] .burger-visual-lines::after {
  opacity: 0;
}

.burger-visual-lines,
.burger-visual-lines::before,
.burger-visual-lines::after {
  display: block;
  width: 1.15rem;
  height: 0.12rem;
  background: var(--color-ink);
  border-radius: 0.06rem;
  position: relative;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.burger-visual-lines::before,
.burger-visual-lines::after {
  content: "";
  position: absolute;
  left: 0;
}

.burger-visual-lines::before {
  top: -0.35rem;
}

.burger-visual-lines::after {
  top: 0.35rem;
}

@media (min-width: 64rem) {
  .nav-burger-control {
    display: none;
  }
}

.mobile-drawer-panel {
  position: fixed;
  inset: 0 0 auto 0;
  top: 0;
  padding: 5.5rem var(--space-lg) var(--space-xl);
  background: rgba(42, 42, 40, 0.94);
  backdrop-filter: blur(0.6rem);
  transform: translateY(-100%);
  transition: transform var(--transition-fast);
  z-index: 15;
  max-height: 100%;
  overflow-y: auto;
}

.mobile-drawer-panel.is-open-drawer {
  transform: translateY(0);
}

.mobile-drawer-inner {
  max-width: 22rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.mobile-drawer-inner a {
  color: var(--color-secondary);
  font-weight: 700;
  font-size: 1.02rem;
  text-decoration: none;
  padding: var(--space-sm) 0;
  border-bottom: 0.07rem solid rgba(245, 245, 220, 0.25);
}

.mobile-drawer-inner a:hover {
  color: #e8a878;
}

main {
  padding-bottom: var(--space-xl);
}

.content-section-block {
  max-width: var(--max-readable);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-md);
}

.section-heading-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.content-section-block h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 1.75rem, 2rem);
  color: var(--color-primary);
}

.split-asymmetric-grid {
  display: grid;
  gap: var(--space-lg);
  align-items: center;
}

@media (min-width: 48rem) {
  .split-asymmetric-grid {
    grid-template-columns: 1.05fr 0.95fr;
  }

  .split-asymmetric-grid.is-flipped-order {
    direction: rtl;
  }

  .split-asymmetric-grid.is-flipped-order > * {
    direction: ltr;
  }
}

.media-card-ragged {
  border-radius: var(--radius-rough);
  overflow: hidden;
  border: 0.12rem dashed rgba(79, 93, 47, 0.28);
  box-shadow: var(--shadow-soft);
  background: rgba(255, 255, 255, 0.45);
}

.media-card-ragged img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center;
}

.media-caption-min {
  padding: var(--space-sm) var(--space-md);
  font-size: 0.82rem;
  color: rgba(42, 42, 40, 0.75);
}

.cta-inline-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  margin-top: var(--space-md);
  padding: var(--space-sm) var(--space-lg);
  background: var(--color-primary);
  color: var(--color-secondary);
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  border: none;
  cursor: pointer;
}

.cta-inline-link:hover {
  background: var(--color-accent);
  color: var(--color-ink);
}

/* Card grid index */
.feature-zigzag-list {
  display: grid;
  gap: var(--space-xl);
}

.feature-pair-block {
  display: grid;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: rgba(255, 255, 255, 0.42);
  border-radius: var(--radius-rough);
  border: 0.07rem solid rgba(79, 93, 47, 0.14);
  box-shadow: var(--shadow-soft);
}

@media (min-width: 40rem) {
  .feature-pair-block {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
  }
}

/* Footer */
.page-footer-min {
  margin-top: var(--space-xl);
  padding: var(--space-lg) var(--space-md);
  background: var(--color-primary);
  color: var(--color-secondary);
}

.footer-inner-wrap {
  max-width: var(--max-readable);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.footer-nav-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
}

.footer-nav-row a {
  color: var(--color-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}

.footer-nav-row a:hover {
  text-decoration: underline;
}

.footer-meta-line {
  margin: 0;
  font-size: 0.8rem;
  opacity: 0.9;
}

/* Products */
.product-grid-three {
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 48rem) {
  .product-grid-three {
    grid-template-columns: repeat(3, 1fr);
  }
}

.product-card-unit {
  background: rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-rough);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 0.08rem solid rgba(79, 93, 47, 0.16);
  box-shadow: var(--shadow-soft);
}

.product-card-unit img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.product-card-body {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: var(--space-sm);
}

.product-price-tag {
  font-weight: 800;
  color: var(--color-accent);
  font-size: 1.05rem;
}

/* Contact */
.contact-layout-split {
  display: grid;
  gap: var(--space-xl);
}

@media (min-width: 52rem) {
  .contact-layout-split {
    grid-template-columns: 1fr 1.05fr;
  }
}

.contact-form-surface {
  background: rgba(255, 255, 255, 0.55);
  padding: var(--space-lg);
  border-radius: var(--radius-rough);
  border: 0.08rem dashed rgba(79, 93, 47, 0.22);
  box-shadow: var(--shadow-soft);
}

.form-field-group label {
  display: block;
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: var(--space-xs);
}

.form-field-group input,
.form-field-group textarea {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  border: 0.08rem solid rgba(79, 93, 47, 0.25);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1rem;
  background: rgba(245, 245, 220, 0.6);
}

.form-field-group textarea {
  min-height: 9rem;
  resize: vertical;
}

.form-consent-row {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
  margin: var(--space-md) 0;
  font-size: 0.88rem;
}

.map-embed-wrap {
  border-radius: var(--radius-rough);
  overflow: hidden;
  border: 0.1rem solid rgba(79, 93, 47, 0.2);
  min-height: 16rem;
  box-shadow: var(--shadow-soft);
}

.map-embed-wrap iframe {
  width: 100%;
  height: 100%;
  min-height: 16rem;
  border: 0;
}

/* Pantry checklist */
.checklist-panel {
  background: rgba(255, 255, 255, 0.48);
  border-radius: var(--radius-rough);
  padding: var(--space-lg);
  border: 0.07rem solid rgba(79, 93, 47, 0.14);
}

.checklist-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-sm);
}

.checklist-panel li label {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
  cursor: pointer;
  padding: var(--space-sm);
  border-radius: var(--radius-md);
}

.checklist-panel li label:hover {
  background: rgba(79, 93, 47, 0.06);
}

.budget-tally-bar {
  margin-top: var(--space-lg);
  padding: var(--space-md);
  background: rgba(192, 108, 77, 0.12);
  border-radius: var(--radius-md);
  font-size: 0.92rem;
}

/* Swap board */
.swap-compare-grid {
  display: grid;
  gap: var(--space-md);
}

@media (min-width: 45rem) {
  .swap-compare-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.swap-pair-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: rgba(255, 255, 255, 0.45);
  border-radius: var(--radius-rough);
  border: 0.08rem solid rgba(79, 93, 47, 0.12);
}

.swap-pair-card img {
  width: 100%;
  aspect-ratio: 5 / 3;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.swap-arrow-label {
  text-align: center;
  font-weight: 800;
  color: var(--color-accent);
}

/* Community mosaic */
.mosaic-board-grid {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
}

.mosaic-tile {
  background: rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 0.07rem solid rgba(79, 93, 47, 0.15);
  box-shadow: var(--shadow-soft);
}

.mosaic-tile img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.mosaic-tile figcaption {
  padding: var(--space-sm);
  font-size: 0.8rem;
}

/* Calculator widget */
.calc-layout-page {
  display: grid;
  gap: var(--space-xl);
}

@media (min-width: 60rem) {
  .calc-layout-page {
    grid-template-columns: minmax(0, 1fr) minmax(16rem, 22rem);
    align-items: start;
  }
}

.calc-sidebar-widget {
  position: relative;
  background: rgba(255, 255, 255, 0.52);
  border-radius: var(--radius-rough);
  padding: var(--space-lg);
  border: 0.1rem dashed rgba(192, 108, 77, 0.35);
  box-shadow: var(--shadow-soft);
}

.calc-sidebar-widget h2 {
  margin-top: 0;
}

.calc-control-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.calc-control-row select {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  border: 0.08rem solid rgba(79, 93, 47, 0.25);
  font-family: inherit;
  font-size: 1rem;
  background: rgba(245, 245, 220, 0.85);
}

.calc-output-panel {
  min-height: 8rem;
  padding: var(--space-md);
  background: rgba(245, 245, 220, 0.85);
  border-radius: var(--radius-md);
  font-size: 0.92rem;
}

.calc-output-panel strong {
  color: var(--color-primary);
}

/* Legal prose */
.legal-prose-wrap {
  max-width: 48rem;
}

.legal-prose-wrap h2 {
  margin-top: var(--space-xl);
  font-family: var(--font-display);
  color: var(--color-primary);
}

.legal-prose-wrap code {
  font-size: 0.9em;
  background: rgba(79, 93, 47, 0.1);
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
}

.legal-updated-stamp {
  font-size: 0.88rem;
  color: rgba(42, 42, 40, 0.75);
  margin-bottom: var(--space-lg);
}

/* Thank you / 404 */
.notice-hero-panel {
  text-align: center;
  max-width: 38rem;
  margin: 0 auto;
}

.notice-hero-panel h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 1.95rem, 2.2rem);
}

/* Cookie + consent overlay */
.cookie-banner-root {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-md);
  pointer-events: none;
}

.cookie-banner-inner {
  max-width: var(--max-readable);
  margin: 0 auto;
  background: rgba(42, 42, 40, 0.94);
  color: var(--color-secondary);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-rough);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  align-items: center;
  justify-content: space-between;
  pointer-events: auto;
  box-shadow: var(--shadow-lift);
}

.cookie-banner-inner p {
  margin: 0;
  flex: 1 1 16rem;
  font-size: 0.88rem;
}

.cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.privacy-modal-launch-btn {
  padding: var(--space-sm) var(--space-md);
  background: transparent;
  color: var(--color-secondary);
  border: 0.08rem solid rgba(245, 245, 220, 0.5);
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.privacy-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(42, 42, 40, 0.55);
  z-index: 110;
  display: grid;
  place-items: center;
  padding: var(--space-md);
}

.privacy-modal-overlay[hidden] {
  display: none;
}

.privacy-modal-surface {
  max-width: 32rem;
  width: 100%;
  background: var(--color-secondary);
  color: var(--color-ink);
  padding: var(--space-xl);
  border-radius: var(--radius-rough);
  border: 0.1rem solid rgba(79, 93, 47, 0.2);
  box-shadow: var(--shadow-lift);
}

.privacy-modal-title-text {
  margin-top: 0;
  font-family: var(--font-display);
  color: var(--color-primary);
}

.privacy-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
  align-items: center;
}

.privacy-modal-dismiss-btn {
  padding: var(--space-sm) var(--space-md);
  background: rgba(79, 93, 47, 0.12);
  border: 0.08rem solid rgba(79, 93, 47, 0.3);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
}

.btn-cookie-accept {
  padding: var(--space-sm) var(--space-md);
  background: var(--color-accent);
  color: var(--color-ink);
  border: none;
  border-radius: var(--radius-md);
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.btn-cookie-decline {
  padding: var(--space-sm) var(--space-md);
  background: transparent;
  color: var(--color-secondary);
  border: 0.08rem solid rgba(245, 245, 220, 0.5);
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

/* Privacy preferences link in banner */
.cookie-banner-inner a {
  color: #e8a878;
}

/* 404 stretch */
.error-code-big {
  font-size: clamp(3rem, 4.5rem, 5rem);
  font-weight: 800;
  color: var(--color-accent);
  margin: 0;
}

body.drawer-open-scroll-lock {
  overflow: hidden;
}
