:root {
  /* Dynamic Palette: Strictly No Blue. Emerald/Teal & Deep Charcoal */
  --bg-base: #1c1f24;
  --bg-surface: #282d32;
  --bg-surface-alt: #22262a;
  --text-primary: #e5e7eb;
  --text-muted: #9ca3af;
  --accent-primary: #14b8a6; /* Green-Teal */
  --accent-secondary: #0d9488;
  --border-subtle: rgba(255, 255, 255, 0.1);
  --border-focus: rgba(20, 184, 166, 0.5);
  
  --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
  
  /* Layout constraints */
  --content-max-width: 1100px;
  --nav-height: 60px;
}

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

html {
  lang: en;
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-wrap: anywhere;
  hyphens: auto;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

/* UI Monospace for Labels, Numbers, Small Headings */
.mono-label, .mono-heading, .date, .price, .number, th {
  font-family: ui-monospace, Consolas, "Courier New", monospace;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-primary);
}

p {
  margin-bottom: 1.5rem;
  max-width: 72ch;
}

a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.3s var(--ease-kinetic);
}

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

/* Layout: Full width bands with centered content */
.band {
  width: 100%;
  padding: 4rem 1.5rem;
}

.band-dark {
  background-color: var(--bg-base);
}

.band-surface {
  background-color: var(--bg-surface);
}

.band-alt {
  background-color: var(--bg-surface-alt);
}

.container {
  max-width: var(--content-max-width);
  margin: 0 auto;
}

/* Faint CSS Dot Grid */
.dot-grid {
  position: relative;
}
.dot-grid::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: radial-gradient(rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 0;
}
.dot-grid > * {
  position: relative;
  z-index: 1;
}

/* Header */
header {
  position: relative; /* Normal document flow */
  width: 100%;
  padding: 1.5rem;
  z-index: 50;
}

.header-capsule {
  max-width: var(--content-max-width);
  margin: 0 auto;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 999px; /* Capsule rounded */
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-primary);
  border-radius: 50%;
  display: inline-block;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-links a {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--text-muted);
}

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

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
}

/* Hero Section */
.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding: 2rem 0 4rem;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero-image {
  width: 100%;
  aspect-ratio: 1 / 1; /* Square edges */
  object-fit: cover;
  border: 1px solid var(--border-subtle);
}

/* Thin-Divided Rows (Instead of Cards) */
.thin-row-list {
  display: flex;
  flex-direction: column;
  margin-top: 2rem;
}

.thin-row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.2s ease;
}

.thin-row:first-child {
  border-top: 1px solid var(--border-subtle);
}

.thin-row:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

.row-icon {
  width: 48px;
  height: 48px;
  background-color: var(--bg-surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  border: 1px solid var(--border-subtle);
  color: var(--accent-primary);
}

.row-content h3 {
  margin-bottom: 0.25rem;
  font-size: 1.125rem;
}

.row-content p {
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.row-action {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.875rem;
  color: var(--accent-primary);
  text-transform: uppercase;
}

/* Buttons and Links */
.btn-primary {
  display: inline-block;
  background-color: var(--accent-primary);
  color: var(--bg-base);
  padding: 0.875rem 2rem;
  font-weight: 600;
  text-align: center;
  border: none;
  cursor: pointer;
  transition: transform 0.3s var(--ease-kinetic), background-color 0.2s;
  /* Square edges */
  border-radius: 0; 
}

.btn-primary:hover {
  background-color: var(--accent-secondary);
  transform: translateY(-2px);
  color: var(--bg-base);
}

.link-underline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  color: var(--accent-primary);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.875rem;
  text-transform: uppercase;
}

.link-underline::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0%;
  height: 1px;
  background-color: var(--accent-primary);
  transition: width 0.3s var(--ease-kinetic);
}

.link-underline:hover::after {
  width: 100%;
}

/* Imagery Constraints */
.img-square {
  width: 100%;
  height: auto;
  object-fit: cover;
  border: 1px solid var(--border-subtle);
}

.img-16-9 { aspect-ratio: 16 / 9; }
.img-4-3 { aspect-ratio: 4 / 3; }
.img-1-1 { aspect-ratio: 1 / 1; }

/* Guide Content Formatting */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 4rem;
}

.guide-article h2 {
  margin-top: 3rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.guide-article ul {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
}

.guide-article li {
  margin-bottom: 0.5rem;
}

/* Sidebars and Glossaries */
.sidebar-panel {
  background-color: var(--bg-surface);
  padding: 1.5rem;
  border: 1px solid var(--border-subtle);
}

.dietary-caveat {
  background-color: rgba(20, 184, 166, 0.05);
  border-left: 2px solid var(--accent-primary);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Table Design */
.table-wrapper {
  overflow-x: auto;
  margin-bottom: 2rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th, td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

th {
  background-color: var(--bg-surface);
  color: var(--accent-primary);
}

/* FAQ Display */
.faq-item {
  border-bottom: 1px solid var(--border-subtle);
  padding: 1.5rem 0;
}
.faq-question {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.faq-answer {
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Contact / Tasting Log Tool */
.log-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.8rem;
  color: var(--accent-primary);
}

input, textarea, select {
  background-color: var(--bg-base);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.875rem;
  font-family: inherit;
  border-radius: 0;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--border-focus);
}

.preview-box {
  background-color: #111;
  border: 1px solid var(--border-subtle);
  padding: 1.5rem;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: pre-wrap;
  min-height: 200px;
}

.tool-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

/* Footer (3 Bands) */
footer {
  margin-top: 4rem;
  border-top: 1px solid var(--border-subtle);
}

.footer-band-1 {
  background-color: var(--bg-surface);
  padding: 3rem 1.5rem;
}

.footer-band-2 {
  background-color: var(--bg-surface-alt);
  padding: 3rem 1.5rem;
}

.footer-band-3 {
  background-color: var(--bg-base);
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.footer-heading {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.875rem;
  color: var(--accent-primary);
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-legal-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

/* Mobile Nav Overlay */
.mobile-nav-overlay {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1.5rem;
  z-index: 40;
}

.mobile-nav-overlay.active {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .hero-split {
    gap: 2rem;
  }
  .content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero-split {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-content {
    align-items: center;
  }
  .nav-links {
    display: none; /* hide desktop nav */
  }
  .mobile-menu-btn {
    display: block; /* show 3-dot menu */
  }
  .thin-row {
    grid-template-columns: 48px 1fr;
  }
  .row-action {
    grid-column: 1 / -1;
    text-align: right;
  }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
}

@media (max-width: 480px) {
  .band {
    padding: 2.5rem 1rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
/* END CSS */

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