@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/InstrumentSerif-Regular-93698d45.ttf") format("truetype");
}

:root {
  --paper: #f7f5f0;
  --surround: #e9e6e0;
  --ink: #1a1815;
  --muted-ink: #625e58;
  --quiet-ink: #6f6a64;
  --hairline: rgb(26 24 21 / 12%);
  --display: "Instrument Serif", Georgia, serif;
  --body: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --label: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* { box-sizing: border-box; }

html {
  background: var(--surround);
  color: var(--ink);
  font-family: var(--body);
}

body { margin: 0; }

main {
  width: min(100%, 48rem);
  min-height: 100vh;
  margin-inline: auto;
  background: var(--paper);
}

a { color: inherit; }

a:focus-visible {
  border-radius: 0.2rem;
  outline: 0.15rem solid currentColor;
  outline-offset: 0.25rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cocktail-index { padding: 4.75rem 1.625rem 4rem; }
.cocktail-index__header { margin-bottom: 1.625rem; }

.cocktail-index__header h1,
.cocktail-card h2,
.recipe h1 {
  font-family: var(--display);
  font-weight: 400;
}

.cocktail-index__header h1 {
  margin: 0;
  font-size: clamp(2.625rem, 8vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.02em;
}

.cocktail-index__header p {
  margin: 1rem 0 0;
  color: var(--quiet-ink);
  font-family: var(--label);
  font-size: 0.75rem;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cocktail-list {
  display: flex;
  flex-direction: column;
  gap: 2.125rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cocktail-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
}

.cocktail-card__photograph {
  flex: 0 0 3.75rem;
  width: 3.75rem;
  height: 4.75rem;
  border-radius: 0.3rem;
  object-fit: cover;
}

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

.cocktail-card h2 {
  margin: 0;
  font-size: 1.3125rem;
  line-height: 1.15;
}

.cocktail-card__description {
  display: block;
  margin-top: 0.3125rem;
  color: var(--muted-ink);
  font-size: 0.71875rem;
  line-height: 1.35;
  text-wrap: pretty;
}

.cocktail-card:hover h2,
.cocktail-card:focus-visible h2 {
  text-decoration: underline;
  text-decoration-thickness: 0.04em;
  text-underline-offset: 0.17em;
}

.recipe { position: relative; }

.recipe__photograph {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: #e8e0d3;
}

.recipe__photograph img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recipe__navigation {
  position: absolute;
  top: 2.875rem;
  left: 1.0625rem;
}

.recipe__navigation a {
  display: grid;
  width: 2.375rem;
  height: 2.375rem;
  place-items: center;
  border: 1px solid rgb(26 24 21 / 8%);
  border-radius: 50%;
  background: rgb(247 245 240 / 88%);
  backdrop-filter: blur(0.375rem);
  color: var(--ink);
  font-size: 1.125rem;
  line-height: 1;
  text-decoration: none;
}

.recipe__body { padding: 2.375rem 1.625rem 3.5rem; }

.recipe__header h1 {
  margin: 0;
  font-size: clamp(2.625rem, 8vw, 3.75rem);
  line-height: 1;
  letter-spacing: -0.02em;
}

.recipe__header p {
  max-width: 34rem;
  margin: 1rem 0 0;
  color: var(--muted-ink);
  font-size: 0.90625rem;
  line-height: 1.55;
  text-wrap: pretty;
}

.recipe__ingredients { margin-top: 1.875rem; }
.recipe__method { margin-top: 1.875rem; }

.recipe__measurements {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  margin: 0 0 0.375rem;
  padding: 0;
  border: 0;
}

.recipe__measurements[hidden] { display: none; }

.recipe__measurements input {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
  opacity: 0;
  white-space: nowrap;
}

.recipe__measurements-heading {
  color: var(--quiet-ink);
  font-family: var(--label);
  font-size: 0.625rem;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.recipe__measurement-options {
  display: flex;
  white-space: nowrap;
}

.recipe__measurements label {
  display: grid;
  min-width: 2.75rem;
  min-height: 2.75rem;
  place-items: center;
  color: var(--quiet-ink);
  cursor: pointer;
  font-family: var(--label);
  font-size: 0.6875rem;
  font-weight: 400;
  line-height: 1;
}

.recipe__measurements label:last-of-type {
  justify-items: end;
}

.recipe__measurements label:hover { color: var(--muted-ink); }

.recipe__measurements input:checked + label {
  color: var(--ink);
  font-weight: 600;
}

.recipe__measurements input:focus-visible + label {
  outline: 0.1rem solid currentColor;
  outline-offset: -0.25rem;
}

.recipe__ingredients h2,
.recipe__method h2 {
  margin: 0 0 0.75rem;
  color: var(--quiet-ink);
  font-family: var(--label);
  font-size: 0.625rem;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.recipe__ingredients ul,
.recipe__details ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.recipe__ingredients ul {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.recipe__ingredients li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 1rem;
  align-items: baseline;
  font-size: 1.0625rem;
  line-height: 1.35;
}

.ingredient__measure {
  color: var(--muted-ink);
  font-family: var(--label);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ingredient__name a {
  text-decoration-color: transparent;
  text-underline-offset: 0.15em;
}

.ingredient__name a:hover,
.ingredient__name a:focus-visible {
  text-decoration-color: currentColor;
}

.recipe__ingredients small,
.recipe__details small {
  display: block;
  grid-column: 1 / -1;
  margin-top: 0.25rem;
  color: var(--quiet-ink);
  font-size: 0.78rem;
  line-height: 1.4;
}

.recipe__details {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 2rem 0 0;
  padding-top: 1.75rem;
  border-top: 1px solid var(--hairline);
}

.recipe__details div {
  display: block;
}

.recipe__details dt,
.recipe__details dd {
  margin: 0;
}

.recipe__details dt {
  color: var(--quiet-ink);
  font-family: var(--label);
  font-size: 0.625rem;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.recipe__details dd {
  margin-top: 0.5625rem;
  font-size: 1.0625rem;
  line-height: 1.4;
}

.recipe__details dd ul {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.recipe__method ol {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.recipe__method li {
  font-size: 1.0625rem;
  line-height: 1.55;
  text-wrap: pretty;
}

.recipe__print-footer { display: none; }

.ingredient { position: relative; }

.ingredient__photograph {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: #e8e0d3;
}

.ingredient__photograph img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ingredient__navigation {
  position: absolute;
  top: 2.875rem;
  left: 1.0625rem;
}

.ingredient__navigation a {
  display: grid;
  width: 2.375rem;
  height: 2.375rem;
  place-items: center;
  border: 1px solid rgb(26 24 21 / 8%);
  border-radius: 50%;
  background: rgb(247 245 240 / 88%);
  backdrop-filter: blur(0.375rem);
  color: var(--ink);
  font-size: 1.125rem;
  line-height: 1;
  text-decoration: none;
}

.ingredient__body { padding: 2.375rem 1.625rem 4rem; }

.ingredient__parent {
  margin: 0 0 0.75rem;
  color: var(--quiet-ink);
  font-family: var(--label);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ingredient__parent a { text-underline-offset: 0.16em; }

.ingredient__header h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.625rem, 8vw, 3.75rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
}

.ingredient__header h1 + p {
  max-width: 34rem;
  margin: 1rem 0 0;
  color: var(--muted-ink);
  font-size: 0.90625rem;
  line-height: 1.55;
  text-wrap: pretty;
}

.ingredient__facts {
  margin: 2.375rem 0 0;
  padding-top: 2rem;
  border-top: 1px solid var(--hairline);
}

.ingredient__facts div { display: block; }

.ingredient__facts dt,
.ingredient__relations h2,
.ingredient__cocktails h2 {
  margin: 0;
  color: var(--quiet-ink);
  font-family: var(--label);
  font-size: 0.625rem;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.ingredient__facts dd {
  margin: 0.5625rem 0 0;
  font-size: 1.0625rem;
  line-height: 1.4;
}

.ingredient__relations,
.ingredient__cocktails {
  margin-top: 2.5rem;
}

.ingredient__relations ul,
.ingredient__cocktails ul {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.ingredient__relations a,
.ingredient__cocktails a {
  font-size: 1.0625rem;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.16em;
}

@media (min-width: 40rem) {
  .cocktail-index { padding: 6rem 4.5rem 5rem; }
  .cocktail-index__header { margin-bottom: 2.375rem; }
  .cocktail-list { gap: 2.125rem; }

  .cocktail-card__photograph {
    flex-basis: 4.5rem;
    width: 4.5rem;
    height: 5.75rem;
  }

  .cocktail-card h2 { font-size: 1.5rem; }
  .cocktail-card__description { font-size: 0.8125rem; }
  .recipe__photograph { aspect-ratio: 4 / 3; }

  .recipe__navigation {
    top: 2rem;
    left: 1.625rem;
  }

  .recipe__body { padding: 3.25rem 4.5rem 5rem; }

  .recipe__ingredients { margin-top: 2.375rem; }
  .recipe__method { margin-top: 2.125rem; }

  .ingredient__photograph { aspect-ratio: 4 / 3; }

  .ingredient__navigation {
    top: 2rem;
    left: 1.625rem;
  }

  .ingredient__body { padding: 3.25rem 4.5rem 5rem; }
}

@media (forced-colors: active) {
  .cocktail-card__photograph,
  .recipe__photograph img,
  .ingredient__photograph img { border: 1px solid CanvasText; }

  .recipe__measurements input:checked + label {
    color: HighlightText;
    background: Highlight;
  }
}

@media print {
  @page { margin: 0; }

  html,
  body,
  main {
    width: 100%;
    min-height: 100%;
    background: white;
  }

  .recipe {
    display: flex;
    width: 100%;
    min-height: 100vh;
    flex-direction: column;
    padding: 17mm;
  }

  .recipe__navigation,
  .recipe__measurements { display: none; }

  .recipe__photograph {
    width: min(100%, 155mm);
    height: 70mm;
    margin-inline: auto;
    aspect-ratio: auto;
    background: transparent;
    break-inside: avoid;
  }

  .recipe__photograph img {
    object-position: center 60%;
  }

  .recipe--ramos-fizz .recipe__photograph img {
    object-position: center 15%;
  }

  .recipe__body {
    display: flex;
    width: min(100%, 155mm);
    flex: 1;
    flex-direction: column;
    margin-inline: auto;
    padding: 10mm 0 0;
  }

  .recipe__header h1 {
    font-size: 30pt;
  }

  .recipe__header p {
    max-width: 135mm;
    margin-top: 3mm;
    font-size: 11pt;
    line-height: 1.4;
  }

  .recipe__ingredients { margin-top: 8mm; }

  .recipe__ingredients ul { gap: 3mm; }

  .recipe__ingredients li,
  .recipe__details dd,
  .recipe__method li {
    font-size: 11pt;
    line-height: 1.35;
  }

  .recipe__ingredients li,
  .recipe__details div,
  .recipe__method li {
    break-inside: avoid;
  }

  .ingredient__name a {
    text-decoration: none;
  }

  .ingredient__measure { font-size: 10pt; }

  .recipe__ingredients small,
  .recipe__details small {
    font-size: 7.5pt;
  }

  .recipe__details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12mm;
    margin-top: 6mm;
    padding-top: 5mm;
  }

  .recipe__details dd { margin-top: 2mm; }

  .recipe__method { margin-top: 7mm; }

  .recipe__ingredients h2,
  .recipe__method h2,
  .recipe__details dt {
    break-after: avoid;
    font-size: 7pt;
  }

  .recipe__method ol { gap: 3mm; }

  .recipe__print-footer {
    display: block;
    margin-top: auto;
    padding-top: 8mm;
    color: var(--quiet-ink);
    font-family: var(--label);
    font-size: 8pt;
    letter-spacing: 0.04em;
  }
}
