/* =========================
   Strain Match — Base Theme
   Nature palette: beige, deep green, warm brown, olives
   ========================= */

:root{
  /* Colors */
  --color-bg: #E0DACA;              /* page background (beige) */
  --color-surface: #E0DACA;         /* cards, navbar, footer */
  --color-text: #1e1e1e;            /* primary text */
  --color-muted: #4a4f48;           /* secondary text (neutral green-gray) */
  --color-border: #d6d0c2;          /* subtle border on beige */
  --shadow-lg: 0 10px 24px rgba(30, 30, 30, .08);
  --shadow-sm: 0 2px 8px rgba(30, 30, 30, .06);

  /* Accents (uses your provided colors) */
  --accent-green: #11503D;          /* primary brand green */
  --accent-green-700: #0d3f30;      /* darker hover tone */
  --accent-green-50: rgba(17, 80, 61, 0.08); /* subtle tint background */

  /* Keep the old var name for compatibility, map to warm brown */
  --accent-gold: #A67B4E;           /* warm brown accent */
  --accent-gold-700: #8b623a;       /* darker brown for hover */

  /* Optional olives for future use (not required) */
  --accent-olive-1: #6C9A37;
  --accent-olive-2: #869327;

  /* Feedback (unchanged as requested) */
  --ok: #22c55e;
  --info: #3b82f6;
  --warn: #f59e0b;
  --err: #ef4444;

  /* Radii & spacing */
  --radius: 14px;
  --radius-sm: 10px;
  --gap: 12px;
  --gap-lg: 20px;
}

/* Typography */
html { box-sizing: border-box; }
*, *:before, *:after { box-sizing: inherit; }

html, body {
  height: 100%;
  background: var(--color-bg);
  color: var(--color-text);
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  margin: 0 0 8px 0;
}
h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }

/* Layout */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}
main { padding: 24px 0 40px; }

/* =========================
   NAVIGATION / HEADER
   ========================= */
.header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  border-bottom: 0; /* remove underline */
}

/* Compact bar layout */
.nav.nav-compact {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
}

/* Left favicon */
.brand-mark-link {
  display: flex;
  align-items: center;
}
.brand-mark {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
}

/* Centered name (no underline) */
.brand-center {
  display: flex;
  justify-content: center;
}
.brand-name {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.25rem;
  color: var(--color-text);
  text-decoration: none;
  line-height: 1;
}

/* Right toggle */
.menu-toggle {
  appearance: none;
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--color-text);
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.2s ease;
}
.menu-toggle:hover {
  background: var(--accent-green-50);
}

/* Slide-down panel */
.menu-panel {
  display: none;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

/* Show panel when toggled */
.menu-panel { display: none; }
.menu-panel.is-open { display: block; }


/* Panel content layout */
.menu-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 2px 0;
}

/* Nav links inside panel */
.menu-panel .links {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
}
.menu-panel .links a {
  text-decoration: none;
  color: var(--color-text);
  padding: 6px 10px;
  border-radius: 8px;
}
.menu-panel .links a:hover {
  background: var(--accent-green-50);
}

/* Actions row (login/logout) */
.menu-panel .actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Stack layout on small screens */
@media (max-width: 640px) {
  .menu-grid {
    flex-direction: column;
    align-items: stretch;
  }
  .menu-panel .actions {
    justify-content: flex-start;
  }
}

/* =========================
   BUTTONS / FORMS / CONTENT
   ========================= */
.btn {
  appearance: none;
  cursor: pointer;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform .03s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border .2s ease;
}
.btn:hover { box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent-green);
  border-color: var(--accent-green);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-green-700);
  border-color: var(--accent-green-700);
}

.btn-gold {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  color: #111;
}
.btn-gold:hover {
  background: var(--accent-gold-700);
  border-color: var(--accent-gold-700);
}

.btn-outline {
  border-color: var(--accent-green);
  color: var(--accent-green);
  background: transparent;
}
.btn-outline:hover {
  background: var(--accent-green-50);
}

/* Cards / surfaces */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 18px;
}

/* Forms */
form { display: grid; gap: 12px; }
label { display: grid; gap: 6px; }

/* Inputs */
input[type="text"], input[type="email"], input[type="password"], input[type="number"], textarea, select {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 16px;
  color: var(--color-text);
  outline: none;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(17, 80, 61, .15);
}

/* Choice lists (survey) */
.choice-list { display: grid; gap: 10px; }
.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface);
  transition: border .2s ease, background .2s ease, box-shadow .2s ease;
}
.choice input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-green);
}
.choice:hover {
  border-color: var(--accent-green);
  background: var(--accent-green-50);
}

/* Progress bar */
.progress {
  height: 10px;
  background: #ece9e1;
  border-radius: 999px;
  overflow: hidden;
}
.progress .bar {
  height: 100%;
  width: 0%;
  background: var(--accent-green);
  transition: width .25s ease;
}

/* Flash messages (unchanged) */
.flash {
  padding: 10px 12px;
  border-radius: 10px;
  margin: 10px 0;
  border: 1px solid var(--color-border);
}
.flash.success { background: #e6ffed; border-color: #16a34a; }
.flash.info { background: #eef4ff; border-color: #3b82f6; }
.flash.warning { background: #fff7ed; border-color: #f59e0b; }
.flash.error { background: #fef2f2; border-color: #ef4444; }

/* Footer */
.footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 14px 0;
  color: var(--color-muted);
}

/* Utility */
.stack-sm { display: grid; gap: 8px; }
.stack { display: grid; gap: 12px; }
.stack-lg { display: grid; gap: 20px; }
.center { display: grid; place-items: center; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }

/* Accessibility */
:focus-visible { outline: 3px solid rgba(17, 80, 61, .35); outline-offset: 2px; }
a { color: var(--accent-green); }
a:hover { color: var(--accent-green-700); }
