:root {
  --cream: #f5f0e8;
  --warm-black: #0d0905;
  --warm-black-2: #1a1008;
  --gold: #c9a84c;
  --gold-light: #e8c97a;
  --text-muted: #9a8a75;
  --border: rgba(201, 168, 76, 0.18);
  --border-subtle: rgba(245, 240, 232, 0.07);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--warm-black);
  color: var(--cream);
  font-family: "Jost", system-ui, -apple-system, sans-serif;
  font-weight: 300;
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

::selection { background: var(--gold); color: var(--warm-black); }

/* ── Shared atoms ─────────────────────────── */
.label {
  font-size: 0.6rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold);
}

.btn-gold {
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  background: var(--gold);
  color: var(--warm-black);
  padding: 1.1rem 2.5rem;
  font-weight: 500;
  display: inline-block;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.btn-gold:hover, .btn-gold:active { background: var(--gold-light); transform: translateY(-1px); }

.btn-ghost {
  font-size: 0.65rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cream);
  background: transparent;
  border: 1px solid rgba(245, 240, 232, 0.25);
  padding: 0.85rem 1.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.btn-ghost:hover, .btn-ghost:active { border-color: var(--gold); color: var(--gold); }

.serif { font-family: "Cormorant Garamond", "Georgia", serif; font-weight: 300; }
.italic { font-style: italic; }

/* ── Landing / hero ───────────────────────── */
#hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(13, 9, 5, 0) 0%,
    rgba(13, 9, 5, 0) 55%,
    rgba(13, 9, 5, 0.55) 80%,
    rgba(13, 9, 5, 0.92) 100%
  );
}

.hero-cta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(2rem, env(safe-area-inset-bottom) + 1.25rem);
  z-index: 2;
  text-align: center;
  padding: 0 1.5rem;
  animation: fadeUp 0.9s 0.6s ease both;
}

.hero-eyebrow {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: rgba(245, 240, 232, 0.85);
  margin-bottom: 1.25rem;
  text-transform: none;
}

/* ── App header (library + recipe pages) ──── */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 9, 5, 0.92);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 0.95rem 1.25rem;
  padding-top: max(0.95rem, env(safe-area-inset-top));
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.app-back {
  background: none;
  border: none;
  color: var(--cream);
  font-size: 1.4rem;
  line-height: 1;
  padding: 0.4rem 0.5rem;
  cursor: pointer;
  transition: color 0.2s;
}
.app-back:hover, .app-back:active { color: var(--gold); }

.app-title {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.25rem;
  color: var(--cream);
  letter-spacing: 0.01em;
}

.app-title small {
  display: block;
  font-family: "Jost", sans-serif;
  font-style: normal;
  font-size: 0.5rem;
  letter-spacing: 0.4em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 0.15rem;
}

/* ── Library / search ─────────────────────── */
.library {
  padding: 1.5rem 1.25rem 6rem;
  padding-bottom: max(6rem, env(safe-area-inset-bottom) + 2rem);
  max-width: 720px;
  margin: 0 auto;
}

.search-wrap {
  position: relative;
  margin-bottom: 1.5rem;
}

.search-input {
  width: 100%;
  background: rgba(245, 240, 232, 0.04);
  border: 1px solid var(--border);
  color: var(--cream);
  font-family: "Jost", sans-serif;
  font-size: 1rem;
  font-weight: 300;
  padding: 1rem 1rem 1rem 3rem;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  -webkit-appearance: none;
  border-radius: 0;
}
.search-input::placeholder { color: rgba(245, 240, 232, 0.35); }
.search-input:focus { border-color: var(--gold); background: rgba(245, 240, 232, 0.06); }

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
  opacity: 0.7;
  pointer-events: none;
  display: flex;
}

.filter-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.chip {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: "Jost", sans-serif;
  font-size: 0.6rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  padding: 0.55rem 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
}
.chip.active {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(201, 168, 76, 0.06);
}

.recipe-list {
  display: flex;
  flex-direction: column;
}

.recipe-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1.4rem 0.25rem;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
}
.recipe-item:active { background: rgba(201, 168, 76, 0.04); }
.recipe-item:hover .recipe-name { color: var(--gold); }

.recipe-glass-icon {
  width: 32px;
  height: 32px;
  color: var(--gold);
  opacity: 0.85;
  display: flex;
  align-items: center;
  justify-content: center;
}

.recipe-meta { min-width: 0; }
.recipe-name {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.1;
  color: var(--cream);
  transition: color 0.15s;
}
.recipe-glass-name {
  font-size: 0.55rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

.recipe-arrow { color: var(--gold); opacity: 0.6; }

.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-muted);
}
.empty-state .serif {
  font-size: 1.4rem;
  font-style: italic;
  color: var(--cream);
  margin-bottom: 0.5rem;
}

/* ── Recipe detail ────────────────────────── */
.recipe-page {
  padding: 2rem 1.5rem 5rem;
  padding-bottom: max(5rem, env(safe-area-inset-bottom) + 2rem);
  max-width: 560px;
  margin: 0 auto;
}

.recipe-hero { text-align: center; margin-bottom: 2.5rem; }

.recipe-glass-display {
  width: 64px;
  height: 64px;
  color: var(--gold);
  margin: 0 auto 1.25rem;
}

.recipe-glass-display svg { width: 100%; height: 100%; }

.recipe-glass-label {
  font-size: 0.6rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.85rem;
}

.recipe-title {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: clamp(2.4rem, 9vw, 3.4rem);
  font-weight: 300;
  line-height: 1.05;
  color: var(--cream);
}

.section-block { margin-top: 2.25rem; }

.section-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.1rem;
}
.section-head .label { color: var(--gold); }
.section-head::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.build-list { list-style: none; }

.build-row {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 1rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 1.15rem;
  line-height: 1.3;
  align-items: baseline;
}
.build-row:last-child { border-bottom: none; }
.build-amount {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  color: var(--gold);
  font-size: 1.2rem;
  text-align: right;
}
.build-ingredient { color: var(--cream); }

.method-card {
  background: rgba(201, 168, 76, 0.04);
  border: 1px solid var(--border);
  padding: 1.5rem 1.4rem;
  position: relative;
}
.method-card::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(201, 168, 76, 0.08);
  pointer-events: none;
}
.method-text {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--cream);
}

/* ── Animations ───────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes growDown {
  from { transform: scaleY(0); opacity: 0; }
  to   { transform: scaleY(1); opacity: 1; }
}

/* ── Tablet / desktop tweaks ──────────────── */
@media (min-width: 720px) {
  .recipe-name { font-size: 1.7rem; }
  .build-row { font-size: 1.25rem; }
  .method-text { font-size: 1.35rem; }
}

/* ── Reduced motion ───────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
