:root {
  --ink: #25211e;
  --muted: #756d66;
  --paper: #f7f1e7;
  --card: #fffdf8;
  --accent: #bc6044;
  --accent-dark: #8a3f2a;
  --accent-soft: #f2d8ca;
  --line: #dfd5c7;
  --shadow: 0 18px 50px rgb(66 45 30 / 10%);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 25%, rgb(188 96 68 / 8%), transparent 25rem),
    var(--paper);
  font-family: "DM Sans", system-ui, sans-serif;
  line-height: 1.55;
}

.hero {
  position: relative;
  display: grid;
  min-height: 340px;
  padding: 72px 24px 78px;
  overflow: hidden;
  color: #fffaf1;
  background:
    linear-gradient(115deg, rgb(24 19 17 / 96%), rgb(50 30 24 / 89%)),
    #211916;
  isolation: isolate;
}

.hero::before,
.hero::after {
  position: absolute;
  z-index: -1;
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 50%;
  content: "";
}

.hero::before {
  top: -190px;
  right: -80px;
  width: 430px;
  height: 430px;
}

.hero::after {
  right: 150px;
  bottom: -250px;
  width: 380px;
  height: 380px;
  border-color: rgb(188 96 68 / 55%);
}

.hero__content,
.collection {
  width: min(1160px, 100%);
  margin: auto;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #e6a48e;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: "Playfair Display", Georgia, serif;
}

h1 {
  max-width: 720px;
  margin-bottom: 14px;
  font-size: clamp(3rem, 8vw, 6.4rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.hero__intro {
  max-width: 590px;
  margin-bottom: 0;
  color: rgb(255 250 241 / 72%);
  font-size: clamp(1rem, 2vw, 1.18rem);
}

main {
  padding: 64px 24px 88px;
}

.collection__heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.025em;
}

.cocktail-count {
  flex: none;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.cocktail-card {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  min-width: 0;
  padding: 28px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid rgb(223 213 199 / 88%);
  border-radius: 22px;
  box-shadow: var(--shadow);
  animation: card-in 500ms both;
  animation-delay: calc(var(--card-index) * 55ms);
}

.cocktail-card__top {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 22px;
}

.cocktail-card__image-frame {
  position: relative;
  display: grid;
  flex: 0 0 128px;
  width: 128px;
  height: 128px;
  place-items: center;
  overflow: hidden;
  color: var(--accent-dark);
  background:
    radial-gradient(circle at 70% 20%, rgb(255 255 255 / 80%), transparent 38%),
    var(--accent-soft);
  border: 1px solid rgb(188 96 68 / 16%);
  border-radius: 18px;
}

.cocktail-card__image-frame::after {
  position: absolute;
  right: -18px;
  bottom: -18px;
  width: 66px;
  height: 66px;
  border: 1px solid rgb(138 63 42 / 18%);
  border-radius: 50%;
  content: "";
}

.cocktail-card__image-fallback {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.cocktail-card__image {
  position: absolute;
  inset: 0;
  width: 128px;
  height: 128px;
  object-fit: cover;
}

.has-image .cocktail-card__image-fallback {
  display: none;
}

.cocktail-card__heading {
  min-width: 0;
}

.method-pill {
  display: inline-block;
  margin-bottom: 10px;
  padding: 5px 9px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cocktail-card__name {
  margin-bottom: 0;
  font-size: clamp(1.65rem, 3vw, 2.1rem);
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.cocktail-card__description {
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 0.94rem;
}

.ingredients {
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.ingredients__title {
  margin-bottom: 12px;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.73rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ingredients__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ingredients__list li {
  position: relative;
  padding-left: 14px;
  font-size: 0.88rem;
}

.ingredients__list li::before {
  position: absolute;
  top: 0.66em;
  left: 0;
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
  content: "";
}

.cocktail-card__details {
  display: grid;
  grid-template-columns: minmax(90px, 0.65fr) minmax(0, 1.35fr);
  gap: 18px;
  margin: 24px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.detail {
  min-width: 0;
}

.detail__label {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.detail__value {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 600;
  text-transform: capitalize;
}

.status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 180px;
  color: var(--muted);
}

.status[hidden] {
  display: none;
}

.status--error {
  flex-direction: column;
  padding: 36px;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.status--error strong {
  color: var(--ink);
}

.loader {
  width: 22px;
  height: 22px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

footer {
  padding: 26px 24px;
  color: rgb(255 250 241 / 58%);
  text-align: center;
  background: #211916;
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

footer p {
  margin: 0;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

@media (max-width: 820px) {
  .cocktail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .hero {
    min-height: 300px;
    padding-block: 56px 60px;
  }

  main {
    padding: 48px 16px 64px;
  }

  .collection__heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .cocktail-card {
    padding: 20px;
    border-radius: 18px;
  }

  .cocktail-card__top {
    align-items: flex-start;
    gap: 16px;
  }

  .cocktail-card__image-frame,
  .cocktail-card__image {
    flex-basis: 104px;
    width: 104px;
    height: 104px;
  }

  .ingredients__list {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
