/* Kombucha Brew Tracker — styles.css */
:root {
  --c-bg: #FFF8EE;
  --c-surface: #FFFFFF;
  --c-surface-alt: #F5E6C8;
  --c-border: #D4C4A0;
  --c-text: #3B2A14;
  --c-text-light: #6B5540;
  --c-primary: #8B6914;
  --c-primary-hover: #6E5210;
  --c-primary-light: #F0DFA0;
  --c-accent: #D4A054;
  --c-danger: #B94A48;
  --c-success: #4A8B4A;
  --radius: 10px;
  --shadow: 0 2px 8px rgba(59, 42, 20, 0.08);
  --font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --max-width: 960px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--c-primary); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; color: var(--c-primary-hover); }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.25rem; }

.skip-link {
  position: absolute; top: -100%; left: 1rem;
  background: var(--c-primary); color: #fff;
  padding: 0.5rem 1rem; border-radius: 0 0 var(--radius) var(--radius);
  z-index: 100; font-weight: 600;
}
.skip-link:focus { top: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Header */
.site-header {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  position: sticky; top: 0; z-index: 50;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 0.75rem; padding-bottom: 0.75rem;
}
.logo {
  display: flex; align-items: center; gap: 0.5rem;
  font-weight: 700; font-size: 1.15rem; color: var(--c-text);
}
.logo:hover, .logo:focus-visible { text-decoration: none; }
.logo-accent { color: var(--c-primary); }
.main-nav { display: flex; gap: 1.25rem; }
.main-nav a { font-size: 0.9rem; font-weight: 500; color: var(--c-text-light); }
.main-nav a:hover { color: var(--c-primary); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.6rem 1.25rem; border-radius: var(--radius);
  font-size: 0.9rem; font-weight: 600; cursor: pointer;
  border: 2px solid transparent; transition: all 0.15s;
  font-family: var(--font);
}
.btn-primary { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.btn-primary:hover { background: var(--c-primary-hover); border-color: var(--c-primary-hover); text-decoration: none; color: #fff; }
.btn-ghost { background: transparent; color: var(--c-primary); border-color: var(--c-primary); }
.btn-ghost:hover { background: var(--c-primary-light); text-decoration: none; }
.btn-danger-text { background: none; border: none; color: var(--c-danger); font-size: 0.85rem; cursor: pointer; padding: 0.5rem; }
.btn-danger-text:hover { text-decoration: underline; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Hero */
.hero {
  padding: 3.5rem 0 2.5rem;
  background: linear-gradient(170deg, var(--c-surface-alt) 0%, var(--c-bg) 100%);
}
.hero .container { display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center; }
.hero-tag {
  display: inline-block; background: var(--c-primary-light);
  color: var(--c-primary); font-size: 0.8rem; font-weight: 700;
  padding: 0.25rem 0.75rem; border-radius: 999px; margin-bottom: 0.75rem;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.hero h1 { font-size: 2.25rem; line-height: 1.2; margin-bottom: 0.75rem; }
.hero-sub { font-size: 1.05rem; color: var(--c-text-light); max-width: 480px; margin-bottom: 1.5rem; }
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 1rem; }
.stat-card {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 1rem 1.25rem;
  text-align: center; min-width: 100px; box-shadow: var(--shadow);
}
.stat-number { display: block; font-size: 1.5rem; font-weight: 700; color: var(--c-primary); }
.stat-label { font-size: 0.75rem; color: var(--c-text-light); }

/* Sections */
section { padding: 2.5rem 0; }
.section-title { font-size: 1.5rem; margin-bottom: 1.25rem; color: var(--c-text); }
.section-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.25rem; }

/* Form */
.batch-form-section { background: var(--c-surface); border-top: 1px solid var(--c-border); border-bottom: 1px solid var(--c-border); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.form-group { display: flex; flex-direction: column; gap: 0.3rem; }
.form-group-full { grid-column: 1 / -1; }
.form-group label { font-size: 0.85rem; font-weight: 600; color: var(--c-text-light); }
.form-group input, .form-group select, .form-group textarea {
  padding: 0.55rem 0.75rem; border: 1px solid var(--c-border);
  border-radius: var(--radius); font-size: 0.9rem; font-family: var(--font);
  background: var(--c-bg); color: var(--c-text);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: 2px solid var(--c-primary); outline-offset: 1px; border-color: var(--c-primary);
}

.flavor-fieldset { border: 1px solid var(--c-border); border-radius: var(--radius); padding: 1rem; margin-bottom: 1.25rem; }
.flavor-fieldset legend { font-weight: 600; font-size: 0.9rem; padding: 0 0.5rem; }
.flavor-presets { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.75rem; }
.preset-btn {
  padding: 0.35rem 0.85rem; border-radius: 999px; font-size: 0.8rem;
  border: 1px solid var(--c-border); background: var(--c-bg);
  cursor: pointer; font-family: var(--font); color: var(--c-text);
  transition: all 0.15s;
}
.preset-btn:hover, .preset-btn.active {
  background: var(--c-primary-light); border-color: var(--c-primary); color: var(--c-primary-hover);
}
.form-actions { display: flex; gap: 0.75rem; align-items: center; }

/* Batch list */
.filter-bar { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.filter-bar select, .filter-bar input[type="search"] {
  padding: 0.45rem 0.65rem; border: 1px solid var(--c-border);
  border-radius: var(--radius); font-size: 0.85rem; font-family: var(--font);
  background: var(--c-surface); color: var(--c-text);
}
.filter-bar input[type="search"] { min-width: 180px; }

.batch-list { display: grid; gap: 1rem; }
.empty-state {
  text-align: center; padding: 3rem 1rem; color: var(--c-text-light);
  background: var(--c-surface); border: 2px dashed var(--c-border);
  border-radius: var(--radius);
}
.empty-state svg { margin-bottom: 1rem; }

.batch-card {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; transition: box-shadow 0.15s;
}
.batch-card:hover { box-shadow: 0 4px 16px rgba(59, 42, 20, 0.12); }
.batch-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.85rem 1.1rem; cursor: pointer; gap: 1rem;
}
.batch-card-header:focus-visible { outline: 2px solid var(--c-primary); outline-offset: -2px; }
.batch-card-title { font-weight: 600; font-size: 1rem; }
.batch-card-meta { font-size: 0.8rem; color: var(--c-text-light); }
.batch-card-rating { font-size: 0.9rem; white-space: nowrap; }
.batch-card-body { padding: 0 1.1rem 1.1rem; border-top: 1px solid var(--c-border); display: none; }
.batch-card.expanded .batch-card-body { display: block; }
.batch-detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.75rem; margin-bottom: 0.75rem; }
.batch-detail-item { font-size: 0.85rem; }
.batch-detail-item strong { display: block; font-size: 0.75rem; color: var(--c-text-light); text-transform: uppercase; letter-spacing: 0.03em; }
.batch-notes { font-size: 0.9rem; color: var(--c-text-light); margin-top: 0.5rem; }
.batch-card-actions { display: flex; gap: 0.5rem; margin-top: 0.75rem; }
.batch-card-actions button {
  font-size: 0.8rem; padding: 0.35rem 0.75rem; border-radius: var(--radius);
  border: 1px solid var(--c-border); background: var(--c-bg); cursor: pointer;
  font-family: var(--font);
}
.batch-card-actions button:hover { background: var(--c-surface-alt); }

.list-actions { display: flex; gap: 0.75rem; align-items: center; margin-top: 1.25rem; flex-wrap: wrap; }

/* Guide */
.guide-section { background: var(--c-surface); border-top: 1px solid var(--c-border); }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.25rem; }
.guide-card {
  background: var(--c-bg); border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 1.25rem;
}
.guide-card h3 { font-size: 1rem; margin-bottom: 0.5rem; color: var(--c-primary); }
.guide-card p, .guide-card li { font-size: 0.9rem; color: var(--c-text-light); }
.guide-card ul { padding-left: 1.25rem; margin-top: 0.5rem; }
.guide-card li { margin-bottom: 0.3rem; }

/* Troubleshoot */
.troubleshoot-section { border-top: 1px solid var(--c-border); }
.trouble-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.trouble-card {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 1rem 1.25rem;
}
.trouble-card summary { font-weight: 600; cursor: pointer; font-size: 0.95rem; }
.trouble-card summary:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; border-radius: 4px; }
.trouble-card p { font-size: 0.9rem; color: var(--c-text-light); margin-top: 0.5rem; }

/* Why section */
.why-section { background: var(--c-surface-alt); border-top: 1px solid var(--c-border); }
.why-section p { font-size: 0.95rem; color: var(--c-text-light); margin-bottom: 0.75rem; max-width: 700px; }

/* Footer */
.site-footer {
  margin-top: auto; background: var(--c-surface);
  border-top: 1px solid var(--c-border); padding: 2rem 0;
}
.footer-inner { display: flex; flex-direction: column; gap: 1rem; }
.footer-brand .logo-text { font-size: 1rem; }
.footer-note { font-size: 0.8rem; color: var(--c-text-light); margin-top: 0.25rem; }
.footer-nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer-nav a { font-size: 0.85rem; color: var(--c-text-light); }
.footer-nav a:hover { color: var(--c-primary); }
.footer-copy { font-size: 0.8rem; color: var(--c-text-light); }

/* Print */
@media print {
  .site-header, .site-footer, .hero-actions, .form-actions, .list-actions, .filter-bar, .batch-card-actions { display: none !important; }
  body { background: #fff; color: #000; }
  .batch-card { break-inside: avoid; border: 1px solid #ccc; }
  .batch-card-body { display: block !important; }
}

/* Responsive */
@media (max-width: 768px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.75rem; }
  .hero-stats { justify-content: flex-start; }
  .stat-card { min-width: 80px; padding: 0.75rem 1rem; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .section-header { flex-direction: column; align-items: flex-start; }
  .main-nav { gap: 0.75rem; }
  .main-nav a { font-size: 0.8rem; }
}

@media (max-width: 480px) {
  .form-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .filter-bar { flex-direction: column; }
  .filter-bar select, .filter-bar input[type="search"] { width: 100%; }
  .header-inner { flex-direction: column; gap: 0.5rem; }
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
