:root {
  color-scheme: light;
  --ink: #201a1d;
  --muted: #6f6367;
  --paper: #fbf7f1;
  --panel: #ffffff;
  --wine: #7b1938;
  --coral: #d96d4f;
  --mint: #d8eadf;
  --olive: #67764a;
  --gold: #d8aa4a;
  --border: rgba(32, 26, 29, 0.12);
  --shadow: 0 24px 70px rgba(32, 26, 29, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

button,
input {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
}

.hero {
  position: relative;
  min-height: min(78vh, 760px);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-image,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(22, 15, 18, 0.88) 0%, rgba(22, 15, 18, 0.62) 38%, rgba(22, 15, 18, 0.1) 100%),
    linear-gradient(0deg, rgba(251, 247, 241, 0.98) 0%, rgba(251, 247, 241, 0) 30%);
}

.hero-content {
  position: relative;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 80px 0 120px;
  color: #fff9f2;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.44);
  background: rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  font-size: 13px;
}

h1,
h2,
p {
  margin: 0;
}

.hero h1 {
  max-width: 650px;
  margin-top: 56px;
  font-size: clamp(46px, 7vw, 96px);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero p {
  max-width: 520px;
  margin-top: 24px;
  color: rgba(255, 249, 242, 0.84);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.55;
}

.workspace {
  width: min(1120px, calc(100% - 32px));
  margin: -76px auto 0;
  position: relative;
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  gap: 22px;
  align-items: start;
}

.pairing-panel,
.result-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.pairing-panel {
  padding: 24px;
  display: grid;
  gap: 22px;
}

.panel-heading {
  display: grid;
  gap: 8px;
}

.eyebrow {
  color: var(--olive);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.panel-heading h2,
.quick-picks h2 {
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: 0;
}

.field,
.range-field,
.control-group {
  display: grid;
  gap: 10px;
}

.field span,
.range-field span,
.control-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.field input {
  width: 100%;
  min-height: 52px;
  padding: 0 15px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

.field input:focus {
  border-color: var(--wine);
  box-shadow: 0 0 0 4px rgba(123, 25, 56, 0.12);
}

.segmented,
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.segmented label,
.chips label {
  flex: 1 1 auto;
}

.segmented input,
.chips input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented span,
.chips span {
  display: grid;
  place-items: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.segmented input:checked + span,
.chips input:checked + span {
  border-color: rgba(123, 25, 56, 0.38);
  background: #fff0f3;
  color: var(--wine);
}

.range-field {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.range-field input {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: var(--wine);
}

.range-field output {
  padding: 5px 9px;
  background: var(--mint);
  color: #274736;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.primary-action {
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  background: var(--wine);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.primary-action:hover {
  background: #66142e;
}

.results {
  display: grid;
  gap: 16px;
}

.result-card {
  padding: 22px;
}

.result-card.featured {
  min-height: 334px;
  display: grid;
  align-content: space-between;
  background:
    linear-gradient(135deg, rgba(123, 25, 56, 0.94), rgba(32, 26, 29, 0.93)),
    #421022;
  color: #fff9f2;
}

.card-topline,
.tag-row,
.score-line,
.quick-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-topline {
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.drink-type,
.match-score,
.tag {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.drink-type {
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.14);
}

.match-score {
  color: #2d2116;
  background: var(--gold);
  padding: 7px 10px;
}

.result-card h3 {
  margin: 0;
  font-size: clamp(27px, 4vw, 44px);
  line-height: 1.02;
  letter-spacing: 0;
}

.result-card .reason {
  margin-top: 16px;
  color: rgba(255, 249, 242, 0.78);
  font-size: 16px;
  line-height: 1.65;
}

.tag-row {
  margin-top: 22px;
}

.tag {
  padding: 7px 10px;
  color: #fff9f2;
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.pairing-note {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 249, 242, 0.84);
  line-height: 1.55;
}

.secondary-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.secondary-results .result-card {
  min-height: 220px;
  box-shadow: none;
}

.secondary-results h3 {
  font-size: 24px;
  line-height: 1.12;
  margin-top: 18px;
}

.secondary-results .reason {
  color: var(--muted);
  font-size: 14px;
}

.secondary-results .drink-type {
  color: var(--wine);
  background: #fff0f3;
}

.secondary-results .match-score {
  background: var(--mint);
}

.secondary-results .tag {
  color: var(--muted);
  border-color: var(--border);
}

.secondary-results .pairing-note {
  color: var(--muted);
  border-top-color: var(--border);
}

.quick-picks {
  width: min(1120px, calc(100% - 32px));
  margin: 42px auto 72px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: start;
}

.quick-grid button {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.quick-grid button:hover {
  border-color: var(--coral);
  color: var(--wine);
}

@media (max-width: 860px) {
  .hero {
    min-height: 640px;
    align-items: flex-start;
  }

  .hero-content {
    padding-top: 74px;
  }

  .workspace,
  .quick-picks,
  .secondary-results {
    grid-template-columns: 1fr;
  }

  .workspace {
    margin-top: -96px;
  }

  .quick-picks {
    margin-top: 32px;
  }
}

@media (max-width: 520px) {
  .hero-content,
  .workspace,
  .quick-picks {
    width: calc(100% - 24px);
  }

  .hero h1 {
    font-size: 44px;
  }

  .pairing-panel,
  .result-card {
    padding: 18px;
  }

  .segmented label,
  .chips label {
    flex-basis: calc(50% - 6px);
  }
}
