:root {
  --burgundy: #722F37;
  --burgundy-dark: #4E1F26;
  --cream: #F7F2E9;
  --gold: #C9A227;
  --charcoal: #2B2320;
  --gray: #6B6259;
  --border: #E4DACB;
  --radius: 10px;
  --shadow: 0 4px 16px rgba(43, 35, 32, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Georgia", "Iowan Old Style", "Times New Roman", serif;
  background: var(--cream);
  color: var(--charcoal);
  line-height: 1.55;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

a { color: inherit; }

h1, h2, h3 {
  font-family: "Georgia", serif;
  font-weight: 700;
  margin: 0 0 12px;
}

/* Header */
.site-header {
  background: var(--burgundy);
  color: var(--cream);
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--cream);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.logo-mark { font-size: 1.5rem; }

.site-nav {
  display: flex;
  gap: 28px;
}

.site-nav a {
  text-decoration: none;
  color: var(--cream);
  font-size: 0.95rem;
  opacity: 0.9;
  transition: opacity 0.15s;
}

.site-nav a:hover { opacity: 1; text-decoration: underline; }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--burgundy) 0%, var(--burgundy-dark) 100%);
  color: var(--cream);
  padding: 72px 0 88px;
  text-align: center;
}

.hero h1 {
  font-size: 2.6rem;
  margin-bottom: 14px;
}

.hero p {
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto;
  opacity: 0.92;
}

/* Directory */
.directory {
  padding: 40px 0 64px;
  margin-top: -48px;
}

.controls {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 12px;
}

.controls input,
.controls select {
  font-family: inherit;
  font-size: 0.98rem;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--cream);
  color: var(--charcoal);
}

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

.results-bar {
  margin: 20px 2px 8px;
  color: var(--gray);
  font-size: 0.9rem;
}

/* Grid */
.winery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--gray);
  padding: 48px 0;
  font-style: italic;
}

.card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(43, 35, 32, 0.14);
}

.card-banner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 16px;
}

.card-type {
  color: #fff;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  background: rgba(0,0,0,0.18);
  padding: 4px 10px;
  border-radius: 20px;
}

.card-body { padding: 18px 20px 22px; }

.card-body h3 {
  font-size: 1.15rem;
  margin-bottom: 4px;
}

.card-location {
  font-size: 0.86rem;
  color: var(--gold);
  font-weight: 600;
  margin: 0 0 10px;
}

.card-desc {
  font-size: 0.92rem;
  color: var(--gray);
  margin: 0 0 12px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 0.76rem;
  background: var(--cream);
  border: 1px solid var(--border);
  color: var(--charcoal);
  padding: 3px 9px;
  border-radius: 20px;
}

/* About / Submit */
.about, .submit {
  padding: 56px 0;
  text-align: center;
}

.about { background: #fff; }

.about p, .submit p {
  max-width: 640px;
  margin: 0 auto;
  color: var(--gray);
}

.submit {
  background: var(--burgundy);
  color: var(--cream);
}

.submit h2 { color: var(--cream); }
.submit p { color: rgba(247,242,233,0.9); }

.btn {
  display: inline-block;
  margin-top: 18px;
  background: var(--gold);
  color: var(--burgundy-dark);
  text-decoration: none;
  font-weight: 700;
  padding: 12px 26px;
  border-radius: 30px;
  transition: transform 0.15s ease;
}

.btn:hover { transform: translateY(-2px); }

/* Footer */
.site-footer {
  background: var(--burgundy-dark);
  color: rgba(247,242,233,0.75);
  text-align: center;
  padding: 24px 0;
  font-size: 0.85rem;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(43, 35, 32, 0.55);
  z-index: 50;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.open { display: flex; }

.modal-content {
  background: #fff;
  border-radius: var(--radius);
  max-width: 480px;
  width: 100%;
  padding: 0 0 28px;
  position: relative;
  max-height: 88vh;
  overflow-y: auto;
}

.modal-banner {
  height: 90px;
  border-radius: var(--radius) var(--radius) 0 0;
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0 24px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-size: 0.85rem;
}

.modal-content h2 {
  margin: 20px 24px 0;
}

.modal-content > .card-location {
  margin: 4px 24px 0;
}

.modal-content > p {
  margin: 12px 24px;
  color: var(--gray);
}

.modal-content .card-tags {
  margin: 0 24px 8px;
}

.modal-link {
  display: inline-block;
  margin: 8px 24px 0;
  color: var(--burgundy);
  font-weight: 700;
  text-decoration: none;
}

.modal-link:hover { text-decoration: underline; }

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: rgba(255,255,255,0.85);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  color: var(--charcoal);
  z-index: 2;
}

/* Password gate */
.gate {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, var(--burgundy) 0%, var(--burgundy-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.gate-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
  padding: 40px 32px;
  max-width: 360px;
  width: 100%;
  text-align: center;
}

.gate-mark {
  font-size: 2rem;
  display: block;
  margin-bottom: 8px;
}

.gate-card h2 {
  margin-bottom: 8px;
}

.gate-card p {
  color: var(--gray);
  font-size: 0.92rem;
  margin: 0 0 18px;
}

.gate-card input {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--cream);
  color: var(--charcoal);
  margin-bottom: 14px;
}

.gate-card input:focus {
  outline: none;
  border-color: var(--gold);
}

.gate-btn {
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  width: 100%;
}

.gate-error {
  color: #b3261e;
  font-size: 0.85rem;
  margin: 12px 0 0;
}

/* Responsive */
@media (max-width: 720px) {
  .site-nav { display: none; }
  .hero h1 { font-size: 2rem; }
  .controls { grid-template-columns: 1fr; }
}
