/* ============================================
   ORGANIC INDUSTRIALISM - ARTISAN BREAD BAKING
   ============================================ */

:root {
  /* Color Palette */
  --color-burnt-umber: #2E1A12;
  --color-yeast-beige: #F5E6CA;
  --color-oxygen-blue: #D0EFFF;
  --color-steel-grey: #4E5452;
  --color-white: #FFFFFF;
  --color-black: #000000;
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-xxl: 4rem;
  
  /* Typography */
  --font-primary: 'Publico Text', 'Georgia', serif;
  --font-mono: 'Roboto Mono', 'Courier New', monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  
  /* Borders & Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(46, 26, 18, 0.1);
  --shadow-md: 0 4px 12px rgba(46, 26, 18, 0.15);
  --shadow-lg: 0 8px 24px rgba(46, 26, 18, 0.2);
  --shadow-glass: 0 8px 32px rgba(46, 26, 18, 0.1);
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* Layout */
  --max-width: 1200px;
  --header-height: 80px;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-burnt-umber);
  background-color: var(--color-yeast-beige);
  overflow-x: hidden;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: var(--space-md);
  color: var(--color-burnt-umber);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
}

p {
  margin-bottom: var(--space-md);
}

a {
  color: var(--color-burnt-umber);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-steel-grey);
}

/* Technical/Mono Typography */
.technical-label,
.data-display,
.temperature-readout,
.time-stamp {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  color: var(--color-steel-grey);
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

.site-header {
  position: relative;
  width: 100%;
  padding: var(--space-md) var(--space-lg);
  background: rgba(245, 230, 202, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(46, 26, 18, 0.1);
  z-index: 1000;
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-lg);
  position: relative;
}

.brand-text {
  font-family: var(--font-primary);
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 700;
  color: var(--color-burnt-umber);
}

.nav-menu {
  display: flex;
  gap: 15px;
  list-style: none;
  align-items: center;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  padding: var(--space-sm) var(--space-md);
  transition: all var(--transition-fast);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--color-burnt-umber);
  transition: width var(--transition-base);
}

.nav-link:hover::after {
  width: 80%;
}

/* Burger Menu */
.burger-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
  z-index: 100002;
  position: relative;
  margin-left: auto;
}

.burger-icon {
  width: 28px;
  height: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.burger-icon span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--color-burnt-umber);
  transition: all var(--transition-base);
  border-radius: 2px;
}

.burger-toggle.active .burger-icon span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.burger-toggle.active .burger-icon span:nth-child(2) {
  opacity: 0;
}

.burger-toggle.active .burger-icon span:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -8px);
}

/* Mobile Navigation */
@media (max-width: 1023px) {
  .burger-toggle {
    display: block;
  }
  
  nav {
    position: relative;
  }
  
  .nav-menu {
    display: flex;
    position: fixed;
    top: 50px;
    right: -100%;
    width: 280px;
    height: calc(100vh - 80px);
    background: rgba(245, 230, 202, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: var(--space-xl) var(--space-lg);
    gap: var(--space-md);
    transition: right var(--transition-base);
    box-shadow: -4px 0 24px rgba(46, 26, 18, 0.15);
    z-index: 100001;
    overflow-y: auto;
  }
  
  .nav-menu.active {
    right: 0;
  }
  
  .nav-link {
    width: 100%;
    text-align: left;
    padding: var(--space-md);
    border-bottom: 1px solid rgba(46, 26, 18, 0.1);
  }
  
  .nav-link::after {
    display: none;
  }
}

/* ============================================
   HERO BANNERS (FULL-WIDTH)
   ============================================ */

.hero-banner {
  width: 100vw;
  position: relative;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  width: 100%;
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
}

.hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
}

.hero-title {
  color: var(--color-burnt-umber);
  margin-bottom: var(--space-lg);
  text-shadow: 0 2px 8px rgba(245, 230, 202, 0.8);
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--color-steel-grey);
  max-width: 700px;
  margin: 0 auto;
}

/* Banner with Image as Background */
.banner-section {
  width: 100vw;
  position: relative;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  padding: var(--space-xxl) var(--space-lg);
  background: linear-gradient(135deg, var(--color-yeast-beige) 0%, rgba(208, 239, 255, 0.3) 100%);
  overflow: hidden;
}

.banner-section.has-bg-image {
  min-height: 500px;
  display: flex;
  align-items: center;
}

.banner-bg-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.15;
  z-index: 0;
}

.banner-content {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.banner-text {
  margin-bottom: var(--space-xl);
}

.banner-image-container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.banner-image-container img {
  width: 100%;
  height: auto;
  display: block;
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */

main {
  min-height: calc(100vh - 200px);
  padding: var(--space-xl) var(--space-lg);
}

.content-section {
  max-width: var(--max-width);
  margin: 0 auto var(--space-xxl);
  padding: var(--space-xl) var(--space-lg);
}

.section-title {
  text-align: center;
  margin-bottom: var(--space-xl);
  position: relative;
  padding-bottom: var(--space-md);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--color-burnt-umber), transparent);
}

/* ============================================
   GRID LAYOUTS
   ============================================ */

.grid-two {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xl);
  margin-top: var(--space-lg);
  justify-items: center;
}

.grid-three {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-lg);
  justify-items: center;
}

.grid-four {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-lg);
  justify-items: center;
}

/* Grid with Images */
.grid-with-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-lg);
  justify-items: center;
}

.grid-with-images .card {
  max-width: 100%;
  width: 100%;
}

.grid-with-images .card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
}

/* ============================================
   CARDS & COMPONENTS
   ============================================ */

.card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  border: 1px solid rgba(46, 26, 18, 0.1);
}

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

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
}

.card-text {
  color: var(--color-steel-grey);
  font-size: 0.95rem;
  margin-bottom: var(--space-md);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-block;
  padding: var(--space-md) var(--space-xl);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  margin-top: 10px;
}

.btn-primary {
  background: var(--color-burnt-umber);
  color: var(--color-yeast-beige);
}

.btn-primary:hover {
  background: var(--color-steel-grey);
  color: black;
  transform: scale(1.02);
}

.btn-secondary {
  background: transparent;
  color: var(--color-burnt-umber);
  border: 2px solid var(--color-burnt-umber);
}

.btn-secondary:hover {
  background: var(--color-burnt-umber);
  color: var(--color-yeast-beige);
}

/* ============================================
   FORMS
   ============================================ */

.form-container {
  max-width: 600px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  margin-bottom: var(--space-sm);
  font-weight: 600;
  color: var(--color-burnt-umber);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: var(--space-md);
  border: 2px solid rgba(46, 26, 18, 0.2);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 1rem;
  background: var(--color-white);
  transition: border-color var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-burnt-umber);
}

.form-textarea {
  min-height: 150px;
  resize: vertical;
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.checkbox-input {
  margin-top: 4px;
  cursor: pointer;
}

.checkbox-label {
  font-size: 0.9rem;
  color: var(--color-steel-grey);
  cursor: pointer;
}

/* ============================================
   SPECIAL FEATURES
   ============================================ */

/* Acoustic Crust Scrubber */
.crust-scrubber {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: var(--space-xl) auto;
  padding: var(--space-xl);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(15px);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-glass);
}

.crust-image-container {
  position: relative;
  width: 100%;
  height: 400px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: crosshair;
  margin-bottom: var(--space-lg);
}

.crust-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.crust-image-container:hover img {
  transform: scale(1.05);
}

.oscilloscope {
  width: 100%;
  height: 120px;
  background: var(--color-burnt-umber);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  margin-top: var(--space-lg);
}

.waveform {
  width: 100%;
  height: 100%;
  stroke: var(--color-oxygen-blue);
  stroke-width: 2;
  fill: none;
}

/* Fermentation Log */
.fermentation-log {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  margin-top: var(--space-lg);
}

.batch-card {
  background: rgba(208, 239, 255, 0.3);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  border-left: 4px solid var(--color-oxygen-blue);
}

.data-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid rgba(46, 26, 18, 0.1);
}

.data-label {
  font-family: var(--font-mono);
  font-weight: 600;
}

.data-value {
  font-family: var(--font-mono);
  color: var(--color-steel-grey);
}

/* Crumb Analysis */
.crumb-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

.crumb-item {
  background: rgba(255, 255, 255, 0.8);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.crumb-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  filter: contrast(1.2) grayscale(0.3);
}

.porosity-map {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--color-steel-grey);
  margin-top: var(--space-sm);
}

/* Sourdough Genealogy */
.genealogy-tree {
  background: rgba(255, 255, 255, 0.7);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  margin-top: var(--space-lg);
}

.tree-node {
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  border-left: 3px solid var(--color-burnt-umber);
  background: rgba(245, 230, 202, 0.5);
  border-radius: var(--radius-sm);
}

.tree-date {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--color-steel-grey);
  margin-bottom: var(--space-sm);
}

/* ============================================
   PRODUCTS PAGE
   ============================================ */

.product-card {
  background: rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-base);
}

.product-card:hover {
  transform: translateY(-6px);
}

.product-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.product-info {
  padding: var(--space-lg);
}

.product-title {
  font-size: 1.5rem;
  margin-bottom: var(--space-sm);
}

.product-description {
  color: var(--color-steel-grey);
  margin-bottom: var(--space-md);
}

.product-price {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-burnt-umber);
}

/* ============================================
   GOOGLE MAPS
   ============================================ */

.map-container {
  width: 100%;
  height: 400px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-top: var(--space-lg);
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
  background: var(--color-burnt-umber);
  color: var(--color-yeast-beige);
  padding: var(--space-xl) var(--space-lg);
  margin-top: var(--space-xxl);
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-xl);
}

.footer-section h3 {
  color: var(--color-yeast-beige);
  margin-bottom: var(--space-md);
  font-size: 1.1rem;
}

.footer-menu {
  list-style: none;
}

.footer-menu li {
  margin-bottom: var(--space-sm);
}

.footer-link {
  color: rgba(245, 230, 202, 0.8);
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--color-yeast-beige);
}

.footer-contact {
  font-size: 0.9rem;
  line-height: 1.8;
}

.footer-bottom {
  text-align: center;
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(245, 230, 202, 0.2);
  font-size: 0.85rem;
  color: rgba(245, 230, 202, 0.7);
}

/* ============================================
   PRIVACY POPUP
   ============================================ */

.privacy-popup {
  position: fixed;
  bottom: var(--space-lg);
  left: var(--space-lg);
  right: var(--space-lg);
  max-width: 500px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  transform: translateY(150%);
  transition: transform var(--transition-base);
}

.privacy-popup.show {
  transform: translateY(0);
}

.popup-content {
  margin-bottom: var(--space-md);
}

.popup-buttons {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* ============================================
   ERROR PAGE (404)
   ============================================ */

.error-container {
  text-align: center;
  padding: var(--space-xxl) var(--space-lg);
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.error-code {
  font-family: var(--font-mono);
  font-size: clamp(4rem, 10vw, 8rem);
  color: var(--color-burnt-umber);
  margin-bottom: var(--space-md);
}

.error-message {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  margin-bottom: var(--space-lg);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

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

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.date {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--color-steel-grey);
  margin-top: var(--space-md);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
  :root {
    font-size: 14px;
  }
  
  .hero-banner {
    min-height: 50vh;
  }
  
  .content-section {
    padding: var(--space-lg) 0;
  }
  
  .grid-two,
  .grid-three,
  .grid-four {
    grid-template-columns: 1fr;
  }
  
  .footer-container {
    grid-template-columns: 1fr;
  }
  
  .privacy-popup {
    left: var(--space-md);
    right: var(--space-md);
  }
}

@media (max-width: 480px) {
  :root {
    font-size: 14px;
  }
  
  .site-header {
    padding: var(--space-sm) var(--space-md);
  }
  
  main {
    padding: var(--space-lg) var(--space-md);
  }
  
  .banner-section {
    padding: var(--space-lg) var(--space-md);
  }
  
  .form-container {
    padding: var(--space-lg);
  }
}

@media (max-width: 320px) {
  :root {
    font-size: 12px;
  }
  
  .hero-content {
    padding: var(--space-lg) var(--space-md);
  }
  
  .card {
    padding: var(--space-md);
  }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes bubble-rise {
  0% {
    transform: translateY(100%) scale(0);
    opacity: 0;
  }
  50% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(-100%) scale(1);
    opacity: 0;
  }
}

.cellular-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.05;
  pointer-events: none;
}

.cellular-background::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(46, 26, 18, 0.1) 2px, transparent 2px),
    radial-gradient(circle at 80% 80%, rgba(46, 26, 18, 0.1) 2px, transparent 2px),
    radial-gradient(circle at 40% 20%, rgba(46, 26, 18, 0.1) 2px, transparent 2px);
  background-size: 200px 200px, 150px 150px, 180px 180px;
  animation: bubble-rise 20s infinite linear;
}

/* Elastic Button Effect */
.btn {
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:active::before {
  width: 300px;
  height: 300px;
}

