:root {
  --ink: #241512;
  --muted: #6b5a52;
  --paper: #fbf5ec;
  --line: #eadac5;
  --wine: #b03a48;
  --wine-dark: #812937;
  --gold: #d8af63;
  --panel: #fffaf3;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, sans-serif;
  line-height: 1.5;
}
a { color: inherit; }
input, select, textarea, button { font: inherit; }

.site-header, .member-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 56px);
  background: rgba(36, 21, 18, .92);
  color: white;
  backdrop-filter: blur(16px);
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
  font-weight: 800;
  overflow: hidden;
}
.brand-mark img { width: 72%; height: 72%; object-fit: contain; display: block; }
.brand small { display: block; color: rgba(255,255,255,.58); letter-spacing: .2em; text-transform: uppercase; font-size: 11px; }
.site-nav, .member-header nav { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.site-nav a, .member-header a { text-decoration: none; color: rgba(255,255,255,.82); }
.nav-toggle { display: none; border: 0; background: transparent; color: white; font-size: 28px; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr);
  gap: clamp(32px, 6vw, 80px);
  min-height: 760px;
  padding: clamp(54px, 8vw, 110px) clamp(20px, 6vw, 76px);
  background:
    radial-gradient(circle at 15% 10%, rgba(122, 31, 48, .7), transparent 30%),
    radial-gradient(circle at 90% 80%, rgba(216, 175, 99, .65), transparent 30%),
    #241512;
  color: white;
  align-items: center;
}
.hero h1, .section h2, .experience h2, .member-hero h1 {
  margin: 0;
  max-width: 920px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(40px, 7vw, 92px);
  line-height: .96;
  letter-spacing: 0;
}
.lead { max-width: 720px; color: rgba(255,255,255,.74); font-size: 20px; line-height: 1.75; }
.eyebrow { margin: 0 0 18px; color: rgba(255,255,255,.74); text-transform: uppercase; letter-spacing: .18em; font-size: 12px; font-weight: 800; }
.eyebrow.red { color: var(--wine); }
.eyebrow.gold { color: var(--gold); }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  padding: 12px 22px;
  background: var(--wine);
  color: white;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--wine-dark); }
.button.ghost { border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); }
.button.small { min-height: 38px; padding: 8px 16px; }
.button.full { width: 100%; }

.hero-panel {
  min-height: 500px;
  padding: 36px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 30px;
  background: linear-gradient(140deg, #6c1e2d, #351616 48%, #ba8b4e);
  box-shadow: 0 28px 70px rgba(0,0,0,.35);
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.hero-logo-panel {
  align-items: center;
  justify-content: center;
  padding: clamp(32px, 5vw, 72px);
}
.hero-logo-panel img {
  display: block;
  width: min(100%, 520px);
  max-height: 380px;
  object-fit: contain;
}
.hero-panel h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(34px, 5vw, 56px); }
.bottle { width: 98px; height: 170px; margin-bottom: 28px; border-radius: 46px 46px 18px 18px; background: #1c0d0d; box-shadow: inset 0 0 0 10px rgba(255,255,255,.08); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.chips span { padding: 9px 13px; border-radius: 999px; background: rgba(255,255,255,.14); }

.section { max-width: 1180px; margin: 0 auto; padding: 84px 20px; }
.two-col { display: grid; grid-template-columns: .85fr 1.15fr; gap: 54px; align-items: start; }
.section h2, .experience h2 { font-size: clamp(32px, 4vw, 58px); }
.section p { color: var(--muted); font-size: 18px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding-top: 0; }
.cards article, .login-card, .tool-section, .wine-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 28px;
  box-shadow: 0 12px 32px rgba(70, 33, 28, .07);
}
.cards span { color: var(--wine); font-weight: 900; }
.cards h3, .login-card h3 { font-family: Georgia, "Times New Roman", serif; font-size: 26px; }

.experience {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  margin: 0 auto;
  padding: 80px clamp(20px, 6vw, 76px);
  background: #2b1715;
  color: white;
}
.experience p { color: rgba(255,255,255,.72); font-size: 18px; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.stats span { padding: 24px; border-radius: 8px; background: rgba(255,255,255,.08); }
.stats strong { display: block; color: var(--gold); font-family: Georgia, "Times New Roman", serif; font-size: 44px; }
.tag-grid, .project-list { display: flex; flex-wrap: wrap; gap: 12px; }
.tag-grid span, .project-list a, .project-list span { padding: 14px 18px; border-radius: 999px; background: white; border: 1px solid var(--line); text-decoration: none; font-weight: 700; }
.process { padding-top: 30px; }
.footer { display: flex; justify-content: space-between; gap: 28px; padding: 42px clamp(20px, 6vw, 76px); background: var(--ink); color: white; }
.footer p { color: rgba(255,255,255,.58); }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.footer-links a { padding: 10px 14px; border-radius: 999px; background: rgba(255,255,255,.08); text-decoration: none; }

.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--ink); }
.auth-card { width: min(440px, 100%); padding: 32px; border-radius: 8px; background: var(--panel); }
.auth-card h1 { margin-bottom: 8px; font-family: Georgia, "Times New Roman", serif; font-size: 42px; }
.back-link { color: var(--wine); font-weight: 800; text-decoration: none; }
.alert, .success { padding: 12px 14px; border-radius: 8px; margin: 16px 0; background: #fee2e2; color: #7f1d1d; }
.success { background: #dcfce7; color: #14532d; }
label { display: grid; gap: 7px; font-weight: 750; color: var(--ink); }
input, select, textarea { width: 100%; min-height: 43px; border: 1px solid #d9c8b2; border-radius: 8px; padding: 10px 12px; background: white; }
textarea { min-height: 100px; resize: vertical; }
.event-picker {
  min-width: min(100%, 360px);
}

.member-header { background: #241512; }
.member-nav a.active {
  color: white;
  background: rgba(255,255,255,.12);
  border-radius: 999px;
  padding: 8px 12px;
}
.member-shell { max-width: 1380px; margin: 0 auto; padding: 30px 18px 80px; }
.member-hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  padding: 42px;
  border-radius: 8px;
  background: linear-gradient(135deg, #311717, #7a1f30);
  color: white;
}
.member-hero h1 { font-size: clamp(32px, 5vw, 64px); }
.member-hero.compact-hero h1 { font-size: clamp(30px, 4vw, 52px); }
.tool-section { margin-top: 22px; }
.tool-section h2 { margin-top: 0; font-family: Georgia, "Times New Roman", serif; font-size: 34px; }
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.section-title-row h2 { margin-bottom: 0; }
.button.light {
  border-color: var(--line);
  background: white;
  color: var(--wine);
}
.cockpit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}
.cockpit-card {
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 28px;
  box-shadow: 0 12px 32px rgba(70, 33, 28, .07);
}
.cockpit-card h2 {
  margin: 10px 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.05;
}
.cockpit-card p { color: var(--muted); margin: 6px 0; }
.cockpit-card a { display: inline-flex; margin-top: 16px; color: var(--wine); font-weight: 800; }
.cockpit-label {
  color: var(--wine);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.wine-memory dl { display: grid; gap: 10px; margin: 18px 0 0; }
.wine-memory dl div { display: grid; grid-template-columns: 90px 1fr; gap: 12px; }
.wine-memory dt { color: var(--muted); font-weight: 800; }
.wine-memory dd { margin: 0; }
.photo-memory img {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 8px;
  margin: 14px 0 12px;
}
.member-list { display: grid; gap: 10px; }
.member-row {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}
.member-main-line, .member-contact-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: baseline;
}
.member-main-line strong { min-width: 190px; font-size: 18px; }
.member-main-line span, .member-contact-line span { color: var(--muted); }
.member-contact-line a { color: var(--wine); font-weight: 750; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: end; }
.form-grid.compact { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.wide { grid-column: span 2; }
.inline-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin: 16px 0; }
.inline-form input, .inline-form select { width: auto; min-width: 210px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 880px; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--wine); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.right { text-align: right; }
.row-actions { white-space: nowrap; }
.row-actions a, .row-actions button { margin-left: 8px; border: 0; background: transparent; color: var(--wine); font-weight: 800; cursor: pointer; }
.row-actions form { display: inline; }
.icon-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line) !important;
  border-radius: 999px;
  background: white !important;
  color: var(--wine) !important;
  vertical-align: middle;
  text-decoration: none;
}
.icon-button::before {
  content: attr(data-icon);
  font-size: 21px;
  line-height: 1;
}
.icon-button.danger {
  color: #991b1b !important;
}
.text-action {
  color: var(--wine);
}
.item-list { display: grid; gap: 8px; }
.item-row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 14px; padding: 13px; border-radius: 8px; background: var(--paper); text-decoration: none; }
.wine-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 18px; }
.rating { display: flex; gap: 8px; margin-top: 12px; }
.rating button { border: 0; border-radius: 8px; background: var(--ink); color: white; padding: 8px 12px; cursor: pointer; }
.hint { color: var(--muted); }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 18px; }
figure { margin: 0; border-radius: 8px; overflow: hidden; background: white; border: 1px solid var(--line); }
figure img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
figcaption { padding: 12px; }
figcaption span { color: var(--muted); font-size: 14px; }

@media (max-width: 880px) {
  .site-header { flex-wrap: wrap; }
  .nav-toggle { display: block; }
  .site-nav { display: none; width: 100%; flex-direction: column; align-items: stretch; }
  .site-nav.open { display: flex; }
  .hero, .two-col, .experience { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .cards, .form-grid, .form-grid.compact, .stats { grid-template-columns: 1fr; }
  .cockpit-grid { grid-template-columns: 1fr; }
  .wide { grid-column: auto; }
  .footer, .member-hero, .member-header { flex-direction: column; align-items: flex-start; }
  .member-header nav { flex-wrap: wrap; }
  .item-row { grid-template-columns: 1fr; }
}
