:root {
  color-scheme: dark;
  --bg: #05070c;
  --panel: rgba(10, 14, 22, 0.82);
  --panel-strong: rgba(14, 18, 29, 0.94);
  --line: rgba(230, 183, 98, 0.22);
  --gold: #e6b762;
  --amber: #f59a2e;
  --blue: #0f8fd6;
  --ice: #e8f5ff;
  --muted: #9da8b8;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.44);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 8% 8%, rgba(15, 143, 214, 0.22), transparent 28rem),
    radial-gradient(circle at 90% 26%, rgba(245, 154, 46, 0.16), transparent 32rem),
    linear-gradient(180deg, #05070c 0%, #07111b 46%, #05070c 100%);
  color: var(--ice);
  font-family: "Segoe UI", Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

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

button,
input,
select {
  font: inherit;
}

.shell {
  overflow: hidden;
}

.hero {
  position: relative;
  min-height: 92svh;
  display: grid;
  align-items: end;
  isolation: isolate;
  border-bottom: 1px solid var(--line);
}

.hero__image,
.hero__shade {
  position: absolute;
  inset: 0;
  z-index: -2;
}

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

.hero__shade {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(5, 7, 12, 0.94) 0%, rgba(5, 7, 12, 0.62) 42%, rgba(5, 7, 12, 0.28) 72%),
    linear-gradient(0deg, rgba(5, 7, 12, 0.96), transparent 44%);
}

.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(1rem, 2vw, 2rem) clamp(1rem, 4vw, 4rem);
}

.brand,
.navlinks,
.button,
.filter,
.ingredient-card,
.chip,
.recipe-card,
.selector-panel,
.mix-button {
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 800;
}

.brand__mark {
  width: 2.5rem;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(230, 183, 98, 0.58);
  color: var(--gold);
  background: rgba(230, 183, 98, 0.1);
  box-shadow: 0 0 28px rgba(230, 183, 98, 0.22);
}

.navlinks {
  display: flex;
  gap: 0.4rem;
  padding: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(5, 7, 12, 0.48);
}

.navlinks a {
  padding: 0.62rem 0.85rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.navlinks a:hover {
  color: var(--ice);
}

.hero__content {
  width: min(780px, calc(100% - 2rem));
  padding: 9rem clamp(1rem, 4vw, 4rem) 7rem;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1;
}

h1 {
  max-width: 11ch;
  font-size: clamp(3rem, 8vw, 6.9rem);
}

h2 {
  font-size: clamp(2rem, 4.6vw, 4.2rem);
}

h3 {
  font-size: clamp(1.55rem, 3vw, 2.3rem);
}

.hero__copy,
.section__intro p,
.recipe-command p,
.empty-state p,
.recipe-card p,
.recipe-card li {
  color: var(--muted);
  line-height: 1.65;
}

.hero__copy {
  max-width: 58ch;
  margin: 1.25rem 0 0;
  font-size: 1.05rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.button,
.mix-button {
  border: 0;
  cursor: pointer;
  color: var(--ice);
  min-height: 3.2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 1.2rem;
  font-weight: 800;
}

.button--primary,
.mix-button {
  background: linear-gradient(135deg, var(--gold), var(--amber) 46%, #b85f16);
  color: #120a03;
  box-shadow: 0 18px 48px rgba(245, 154, 46, 0.24);
}

.button--ghost {
  border: 1px solid rgba(232, 245, 255, 0.18);
  background: rgba(5, 7, 12, 0.46);
}

.section {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(4.5rem, 8vw, 7rem) 0;
}

.section__intro {
  max-width: 760px;
  margin-bottom: 2rem;
}

.section__intro p {
  max-width: 66ch;
}

.inventory-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1.2rem;
}

.filter,
.chip {
  border: 1px solid rgba(232, 245, 255, 0.12);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
}

.filter {
  min-height: 2.55rem;
  padding: 0 0.9rem;
}

.filter.is-active,
.chip.is-active {
  border-color: rgba(230, 183, 98, 0.65);
  color: var(--ice);
  background: rgba(230, 183, 98, 0.14);
  box-shadow: 0 0 24px rgba(230, 183, 98, 0.13);
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.8rem;
}

.ingredient-card {
  position: relative;
  display: grid;
  min-height: 138px;
  align-content: space-between;
  padding: 1rem;
  overflow: hidden;
  text-align: left;
  border: 1px solid rgba(232, 245, 255, 0.11);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025));
  color: var(--ice);
  cursor: pointer;
  box-shadow: var(--shadow);
}

.ingredient-card::before {
  content: "";
  position: absolute;
  width: 4.8rem;
  aspect-ratio: 1;
  right: -1rem;
  top: -1rem;
  border: 1px solid rgba(230, 183, 98, 0.18);
  background: radial-gradient(circle, rgba(15, 143, 214, 0.38), transparent 68%);
  border-radius: 50%;
}

.ingredient-card.is-selected {
  border-color: rgba(245, 154, 46, 0.78);
  background: linear-gradient(145deg, rgba(230, 183, 98, 0.2), rgba(15, 143, 214, 0.08));
}

.ingredient-card__icon {
  font-size: 1.65rem;
}

.ingredient-card__name {
  margin-top: 1.25rem;
  font-weight: 800;
}

.ingredient-card__type {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.selector-panel,
.recipe-stage {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
}

.selector-panel {
  padding: clamp(1rem, 2vw, 1.35rem);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.control-label {
  display: block;
  margin-bottom: 0.65rem;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.text-input,
.select-input {
  width: 100%;
  min-height: 3rem;
  padding: 0 0.95rem;
  border: 1px solid rgba(232, 245, 255, 0.14);
  background: rgba(5, 7, 12, 0.58);
  color: var(--ice);
  outline: none;
}

.text-input:focus,
.select-input:focus {
  border-color: rgba(15, 143, 214, 0.72);
  box-shadow: 0 0 0 3px rgba(15, 143, 214, 0.18);
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  min-height: 2.7rem;
  padding: 0 0.85rem;
}

.recipe-stage {
  align-items: start;
}

.recipe-command {
  position: sticky;
  top: 1rem;
}

.recipe-command p {
  max-width: 54ch;
}

.mix-button {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  width: min(100%, 18rem);
  justify-content: center;
  margin-top: 1rem;
  padding: 0 1.1rem;
  font-weight: 900;
}

.shaker {
  width: 1.45rem;
  height: 1.45rem;
  display: inline-block;
  background:
    linear-gradient(90deg, transparent 18%, currentColor 18% 82%, transparent 82%) 50% 0 / 100% 22% no-repeat,
    linear-gradient(135deg, transparent 18%, currentColor 18% 82%, transparent 82%) 50% 100% / 78% 78% no-repeat;
  color: #120a03;
}

.mix-button.is-loading .shaker {
  animation: shake 0.5s infinite;
}

@keyframes shake {
  0%,
  100% {
    transform: rotate(-10deg) translateX(-1px);
  }
  50% {
    transform: rotate(12deg) translateX(2px);
  }
}

.recipe-card {
  min-height: 420px;
  padding: clamp(1rem, 2.5vw, 1.7rem);
  border: 1px solid rgba(230, 183, 98, 0.28);
  background:
    linear-gradient(180deg, rgba(14, 18, 29, 0.96), rgba(6, 9, 16, 0.94)),
    radial-gradient(circle at 90% 0%, rgba(15, 143, 214, 0.18), transparent 20rem);
  box-shadow: var(--shadow);
}

.recipe-card.loading {
  display: grid;
  place-items: center;
}

.loading-lockup {
  text-align: center;
}

.loading-lockup .shaker {
  width: 4rem;
  height: 4rem;
  color: var(--gold);
  animation: shake 0.42s infinite;
  filter: drop-shadow(0 0 20px rgba(230, 183, 98, 0.42));
}

.empty-state {
  min-height: 360px;
  display: grid;
  align-content: center;
  justify-items: start;
}

.empty-state__glow {
  width: 4rem;
  aspect-ratio: 1;
  margin-bottom: 1.4rem;
  border: 1px solid rgba(230, 183, 98, 0.56);
  background: radial-gradient(circle, rgba(245, 154, 46, 0.8), rgba(15, 143, 214, 0.26) 54%, transparent 70%);
  box-shadow: 0 0 42px rgba(245, 154, 46, 0.28);
  border-radius: 50%;
}

.recipe-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 1.3rem;
}

.recipe-pill {
  padding: 0.45rem 0.65rem;
  color: var(--gold);
  border: 1px solid rgba(230, 183, 98, 0.25);
  background: rgba(230, 183, 98, 0.08);
  font-size: 0.82rem;
  font-weight: 800;
}

.recipe-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 1rem;
}

.recipe-card h4 {
  margin: 0.2rem 0 0.6rem;
  color: var(--gold);
  font-size: 0.86rem;
  text-transform: uppercase;
}

.recipe-card ul,
.recipe-card ol {
  margin: 0;
  padding-left: 1.1rem;
}

.recipe-card li {
  margin: 0.42rem 0;
}

.substitutions {
  margin-top: 1.2rem;
}

.substitutions select {
  margin-top: 0.45rem;
}

@media (max-width: 860px) {
  .selector-panel,
  .recipe-stage,
  .recipe-layout {
    grid-template-columns: 1fr;
  }

  .recipe-command {
    position: static;
  }

  .hero {
    min-height: 90svh;
  }

  .hero__shade {
    background:
      linear-gradient(0deg, rgba(5, 7, 12, 0.98), rgba(5, 7, 12, 0.46)),
      linear-gradient(90deg, rgba(5, 7, 12, 0.78), rgba(5, 7, 12, 0.26));
  }
}

@media (max-width: 620px) {
  .topbar {
    align-items: flex-start;
  }

  .navlinks {
    display: none;
  }

  .hero__content {
    padding-bottom: 4.5rem;
  }

  h1 {
    max-width: 9ch;
  }

  .inventory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ingredient-card {
    min-height: 128px;
  }
}
