@import url('https://fonts.googleapis.com/css2?family=Anton&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #0b0a09;
  --bg-raised: #151311;
  --text: #ede8e0;
  --text-dim: #9a938a;
  --accent: #c9974a;
  --accent-dim: #8a6a37;
  --danger: #7a1f1f;
  --border: #2a2723;
  --radius: 2px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.display {
  font-family: 'Anton', sans-serif;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 0.92;
}

a { color: inherit; }

button {
  font-family: inherit;
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------- Site nav ---------- */

.site-nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
}

.site-nav.static {
  position: static;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.site-nav-wordmark {
  font-family: 'Anton', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
}

.site-nav-wordmark span { color: var(--accent); }

.site-nav-links {
  display: flex;
  gap: 1.5rem;
}

.site-nav-links a {
  text-decoration: none;
  color: var(--text-dim);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: color 0.15s ease;
}

.site-nav-links a:hover,
.site-nav-links a.current {
  color: var(--accent);
}

/* ---------- Site footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.5rem;
  text-align: center;
}

.site-footer p {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin: 0 0 0.6rem;
}

.site-footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

/* ---------- Password gate ---------- */

.gate {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.gate video,
.gate .gate-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(35%) brightness(0.55);
}

.gate video {
  z-index: 1;
}

.gate .gate-fallback {
  z-index: 0;
  background: radial-gradient(circle at 50% 30%, #262019 0%, #0b0a09 70%);
}

.gate::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11,10,9,0.35) 0%, rgba(11,10,9,0.85) 100%);
}

.gate-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  padding: 1.5rem;
  text-align: center;
}

.gate-title {
  font-size: clamp(3rem, 12vw, 6.5rem);
  color: var(--text);
  text-transform: uppercase;
}

.gate-title span {
  color: var(--accent);
}

.gate-sub {
  margin-top: -1.5rem;
  color: var(--text-dim);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}

.gate-form {
  display: flex;
  gap: 0.5rem;
  width: min(90vw, 360px);
}

.gate-form input {
  flex: 1;
  background: rgba(21,19,17,0.8);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.9rem 1rem;
  font-size: 1rem;
  border-radius: var(--radius);
  outline: none;
}

.gate-form input:focus {
  border-color: var(--accent);
}

.gate-form button {
  background: var(--accent);
  border: none;
  color: #0b0a09;
  font-weight: 700;
  padding: 0.9rem 1.4rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  transition: background 0.15s ease;
}

.gate-form button:hover { background: #ddad63; }

.gate-error {
  color: #d97b7b;
  font-size: 0.85rem;
  min-height: 1.2em;
}

/* ---------- Home page ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero video,
.hero .hero-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero video {
  z-index: 1;
}

.hero .hero-fallback {
  z-index: 0;
  background: radial-gradient(circle at 50% 20%, #241c14 0%, #0b0a09 75%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11,10,9,0.05) 40%, rgba(11,10,9,0.95) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 3rem 1.5rem 4rem;
  width: 100%;
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 5rem);
  text-transform: uppercase;
  max-width: 14ch;
}

.hero-title .accent { color: var(--accent); }

.hero-tag {
  color: var(--text-dim);
  max-width: 46ch;
  margin-top: 1rem;
  font-size: 1.05rem;
}

.scroll-cue {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--text-dim);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

/* ---------- Guide section ---------- */

.guide {
  max-width: 1080px;
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
}

.guide-header {
  margin-bottom: 2.5rem;
}

.guide-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  text-transform: uppercase;
  margin: 0 0 0.5rem;
}

.guide-header p {
  color: var(--text-dim);
  max-width: 60ch;
  margin: 0;
}

.guide-note {
  margin-top: 0.9rem !important;
  color: var(--accent) !important;
  font-size: 0.88rem;
  font-weight: 600;
  border-left: 2px solid var(--accent-dim);
  padding-left: 0.9rem;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.5rem;
}

.guide-controls {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

#search-input {
  flex: 1;
  min-width: 220px;
  background: rgba(21,19,17,0.8);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.7rem 1rem;
  font-size: 0.92rem;
  border-radius: var(--radius);
  outline: none;
  font-family: inherit;
}

#search-input:focus {
  border-color: var(--accent);
}

#search-input::placeholder {
  color: var(--text-dim);
}

.fav-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.fav-toggle:hover {
  border-color: var(--accent-dim);
  color: var(--text);
}

.fav-toggle.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #0b0a09;
}

.tab {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

.tab:hover {
  border-color: var(--accent-dim);
  color: var(--text);
}

.tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #0b0a09;
}

.tab:focus-visible,
.fav-toggle:focus-visible,
.fav-star:focus-visible,
#search-input:focus-visible,
.gate-form button:focus-visible,
.gate-form input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.results-count {
  color: var(--text-dim);
  font-size: 0.82rem;
  margin: -1.5rem 0 1.5rem;
}

.food-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

@media (max-width: 480px) {
  .guide-controls {
    flex-direction: column;
  }
  #search-input {
    min-width: 0;
  }
  .fav-toggle {
    width: 100%;
  }
  .hero-content {
    padding: 2rem 1.25rem 3rem;
  }
  .guide {
    padding: 3rem 1.25rem 4rem;
  }
}

.food-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.fav-star {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  z-index: 2;
  background: rgba(11,10,9,0.75);
  border: 1px solid var(--border);
  color: var(--text-dim);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.fav-star:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.fav-star.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #0b0a09;
}

.food-photo {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #211c17, #0f0d0b);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 1rem;
  overflow: hidden;
}

.food-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.food-body {
  padding: 1.1rem 1.2rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}

.food-name {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
}

.food-nutrient {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
}

.food-why {
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.5;
  flex: 1;
}

.food-study {
  font-size: 0.8rem;
  margin-top: 0.3rem;
}

.food-study a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-dim);
}

.food-study a:hover { border-color: var(--accent); }

.food-study.none {
  color: var(--text-dim);
  font-style: italic;
}

.empty-tab {
  color: var(--text-dim);
  padding: 2rem 0;
  font-size: 0.95rem;
}

/* ---------- Farms page ---------- */

.map-embed-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-raised);
}

.map-embed-wrap iframe {
  display: block;
}

.map-embed-wrap .empty-tab {
  padding: 3rem 1.5rem;
  text-align: center;
}

/* ---------- About page ---------- */

.about-page {
  max-width: 720px;
}

.about-photo-slot {
  width: 220px;
  height: 220px;
  border-radius: var(--radius);
  border: 2px solid var(--accent-dim);
  overflow: hidden;
  margin: 0 auto 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #211c17, #0f0d0b);
  color: var(--text-dim);
  font-size: 0.8rem;
  text-align: center;
}

.about-photo-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-page .guide-header {
  text-align: center;
}

.mission-body {
  color: var(--text);
  font-size: 1.02rem;
  line-height: 1.75;
}

.mission-body p {
  margin: 0 0 1.4rem;
}

.mission-lead {
  font-size: 1.15rem;
  color: var(--text);
}

.mission-close {
  font-family: 'Anton', sans-serif;
  text-transform: uppercase;
  font-size: 1.5rem;
  color: var(--accent);
  letter-spacing: 0.01em;
  margin-top: 2rem !important;
}

/* ---------- Deluxe preview: budget list ---------- */

#store-select,
#budget-input {
  background: rgba(21,19,17,0.8);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.7rem 1rem;
  font-size: 0.92rem;
  border-radius: var(--radius);
  outline: none;
  font-family: inherit;
}

#budget-input {
  width: 140px;
}

.budget-summary {
  display: flex;
  justify-content: space-between;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.9rem 1.1rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.budget-list {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.budget-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}

.budget-row:last-child {
  border-bottom: none;
}

.budget-row-name {
  font-weight: 600;
}

.budget-row-unit {
  color: var(--text-dim);
}

.budget-row-price {
  color: var(--accent);
  font-weight: 700;
}

/* ---------- Ingredients page ---------- */

.ingredient-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.ingredient-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.ingredient-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.ingredient-name {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
}

.verdict-badge {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  white-space: nowrap;
}

.verdict-yay {
  background: rgba(201,151,74,0.15);
  border: 1px solid var(--accent);
  color: var(--accent);
}

.verdict-nay {
  background: rgba(180,60,60,0.15);
  border: 1px solid #b44040;
  color: #d97b7b;
}

.verdict-moderation {
  background: rgba(196,153,54,0.12);
  border: 1px solid #9c8339;
  color: #d4bb6a;
}

.ingredient-aliases {
  color: var(--text-dim);
  font-size: 0.8rem;
  font-style: italic;
  margin-bottom: 0.9rem;
}

.ingredient-definition {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0 0 0.75rem;
}

.ingredient-why {
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
}

/* ---------- Recipes page ---------- */

.recipe-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.recipe-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.recipe-header {
  margin-bottom: 1rem;
}

.recipe-title {
  font-size: 1.4rem;
  margin: 0 0 0.3rem;
}

.recipe-meta {
  color: var(--text-dim);
  font-size: 0.85rem;
}

.recipe-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.food-tag {
  background: rgba(201,151,74,0.12);
  border: 1px solid var(--accent-dim);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
}

.recipe-columns {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 640px) {
  .recipe-columns {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

.recipe-columns h4,
.recipe-why h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  margin: 0 0 0.6rem;
}

.ingredient-list,
.step-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.6;
}

.ingredient-list li,
.step-list li {
  margin-bottom: 0.4rem;
}

.recipe-why {
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
}

.recipe-why p {
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0;
}
