/* ════════════════════════════════════════════════════════════════════════
   Cocktail Library — shared component skin
   (sidebar/recipe card, bottle grid, tier badges, layout, ratio-style)
   ════════════════════════════════════════════════════════════════════════ */

.layout {
  display: grid; grid-template-columns: 1fr 360px;
  gap: 4rem;
  max-width: 1180px; margin: 4rem auto;
  padding: 0 4rem;
}

/* ── BOTTLE GRID (spirits pages) ─────────────────────── */
.bottle-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 1.5rem; margin: 2rem 0;
}
.bottle-card {
  background: var(--paper-deep);
  padding: 1.5rem 1.5rem 1.25rem;
  display: flex; flex-direction: column;
  border: 1.5px solid var(--rule);
  position: relative;
}
.bottle-card .tier-badge { align-self: flex-start; margin-bottom: .8rem; }
.b-name {
  font-family: 'Abril Fatface', serif;
  font-size: 1.35rem; line-height: 1.1;
  color: var(--ink); margin-bottom: .2rem;
}
.b-meta {
  font-family: 'DM Mono', monospace;
  font-size: .58rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-mute); margin-bottom: .75rem;
}
.b-desc {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic; font-size: 1rem; line-height: 1.4;
  color: var(--ink-soft); flex: 1; margin-bottom: 0;
}
.b-notes {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: .9rem; color: var(--ink-soft);
  margin-top: .85rem; padding-top: .75rem;
  border-top: 1.5px solid var(--rule-soft);
  line-height: 1.4;
}
.b-notes-label {
  font-family: 'DM Mono', monospace; font-style: normal;
  font-size: .56rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin-right: .4rem;
}
.b-use {
  font-family: 'DM Mono', monospace;
  font-size: .58rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: .65rem; padding-top: .65rem;
  border-top: 1.5px solid var(--rule-soft);
}
.b-use-label { color: var(--accent); margin-right: .4rem; }

/* ── TIER BADGES — flat menu chips ───────────────────── */
.tier-badge {
  display: inline-block; font-family: 'DM Mono', monospace;
  font-size: .56rem; letter-spacing: .14em; text-transform: uppercase;
  padding: .25rem .6rem;
  border: 1.5px solid;
  background: var(--paper);
}
.tier-splurge    { color: var(--olive);   border-color: var(--olive); }
.tier-budget     { color: var(--cobalt);  border-color: var(--cobalt); }
.tier-versatile  { color: var(--orange);  border-color: var(--orange); }
.tier-underrated { color: var(--mustard); border-color: var(--mustard); }
.tier-unique     { color: var(--crimson); border-color: var(--crimson); }
.tier-overrated  { color: var(--ink-mute); border-color: var(--ink-mute); }

/* ── SIDEBAR / RECIPE CARD ───────────────────────────── */
.sidebar { position: relative; }
.recipe-card {
  position: sticky; top: 84px;
  background: var(--paper);
  border: 1px solid var(--rule);
  box-shadow: 0 1px 2px rgba(32,32,30,.04);
}
.recipe-card-header {
  padding: 1.5rem 1.75rem 1.25rem;
  border-bottom: 1.5px solid var(--rule);
  text-align: center;
  position: relative;
}
.recipe-card-header .eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: .58rem; letter-spacing: .24em; text-transform: uppercase;
  color: var(--ink-mute); margin-bottom: .35rem;
}
.recipe-card-header h4 {
  font-family: 'Abril Fatface', serif; font-weight: 400;
  font-size: 1.85rem; color: var(--ink); line-height: 1.05;
}
.recipe-stats {
  display: grid; grid-template-columns: 1fr 1fr;
  border-bottom: 1.5px solid var(--rule);
}
.stat { padding: 1rem 1.5rem; border-right: 1.5px solid var(--rule); }
.stat:nth-child(2) { border-right: none; }
.stat:nth-child(3) { border-top: 1.5px solid var(--rule); }
.stat:nth-child(4) { border-top: 1.5px solid var(--rule); border-right: none; }
.stat-label {
  font-family: 'DM Mono', monospace;
  font-size: .56rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-mute); margin-bottom: .3rem;
}
.stat-value {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic; font-size: 1.05rem;
  color: var(--ink);
}
.ingredients-section {
  padding: 1.5rem 1.75rem;
  border-bottom: 1.5px solid var(--rule);
}
.section-title {
  font-family: 'DM Mono', monospace;
  font-size: .6rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1rem;
  display: flex; align-items: center; gap: .55rem;
}
.ingredient-list { list-style: none; }
.ingredient-list li {
  display: flex; align-items: baseline; gap: .75rem;
  padding: .55rem 0;
  border-bottom: 1px dotted var(--rule-soft);
  font-size: .92rem; color: var(--ink);
}
.ingredient-list li:last-child { border-bottom: none; }
.ing-amount {
  font-family: 'DM Mono', monospace; font-size: .72rem;
  color: var(--accent); min-width: 56px; font-weight: 500;
}
.ing-name { flex: 1; }
.ing-note {
  font-family: 'Cormorant Garamond', serif; font-style: italic;
  font-size: .82rem; color: var(--ink-mute);
}
.instructions-section { padding: 1.5rem 1.75rem 1.75rem; }
.step-list { list-style: none; counter-reset: steps; }
.step-list li {
  counter-increment: steps;
  display: flex; gap: 1rem;
  padding: .65rem 0;
  font-size: .9rem; color: var(--ink-soft);
  line-height: 1.5;
}
.step-list li::before {
  content: counter(steps);
  font-family: 'Abril Fatface', serif;
  font-size: 1rem;
  color: var(--paper); background: var(--accent);
  min-width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: .05rem;
  border-radius: 50%;
}

/* ── RATIO BAR (recipe pages) ────────────────────────── */
.ratio-wrap {
  margin: 2.5rem 0;
  padding: 1.5rem;
  background: var(--paper-deep);
  border: 1.5px solid var(--rule);
}
.ratio-title {
  font-family: 'DM Mono', monospace;
  font-size: .62rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-mute); margin-bottom: .85rem;
  display: flex; align-items: center; gap: .6rem;
}
.ratio-title::before {
  content: ''; width: 20px; height: 1.5px; background: var(--ink-mute);
}
.ratio-label-row { display: flex; gap: 4px; margin-bottom: .55rem; }
.ratio-label-row span {
  font-family: 'DM Mono', monospace;
  font-size: .62rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink); text-align: center; font-weight: 500;
}
.ratio-bar {
  display: flex; height: 56px; gap: 4px;
  border: 1.5px solid var(--rule);
  padding: 4px;
}
.ratio-seg {
  display: flex; align-items: center; justify-content: center;
  font-family: 'Abril Fatface', serif;
  font-size: 1.05rem; letter-spacing: .02em;
  position: relative; overflow: hidden;
  color: var(--paper);
  container: ratio-seg / inline-size;
}
.ratio-seg span { position: relative; z-index: 1; white-space: nowrap; }
/* A narrow segment (small pour) can't fit its label and would clip it
   mid-word (e.g. "Lemon" → "emo"). Drop the in-bar label there — the
   ingredient is still named in the label row above and amount row below. */
@container ratio-seg (max-width: 60px) {
  .ratio-seg span { display: none; }
}
.ratio-amount-row { display: flex; gap: 4px; margin-top: .5rem; }
.ratio-amount-row span {
  font-family: 'DM Mono', monospace;
  font-size: .68rem; color: var(--ink-mute); text-align: center;
}

/* ── VARIATION CARDS (recipe pages) ──────────────────── */
.variation-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1.5rem; margin: 2rem 0;
}
.variation-cell {
  background: var(--paper-deep);
  padding: 1.5rem 1.5rem 1.25rem;
  display: flex; flex-direction: column;
  border: 1.5px solid var(--rule);
  position: relative;
}
.v-name {
  font-family: 'Abril Fatface', serif;
  font-size: 1.35rem; line-height: 1.1;
  color: var(--ink); margin-bottom: .35rem;
}
.v-desc {
  font-family: 'Cormorant Garamond', serif; font-style: italic;
  font-size: 1rem; line-height: 1.4;
  color: var(--ink-soft); margin-bottom: .75rem; flex: 1;
}
.v-source {
  font-family: 'DM Mono', monospace;
  font-size: .55rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-mute); margin-bottom: .85rem;
}
.v-ing-list {
  list-style: none; margin: 0 0 .65rem;
  padding-top: .85rem; border-top: 1.5px solid var(--rule-soft);
}
.v-ing-list li {
  display: flex; gap: .65rem;
  font-size: .8rem; padding: .25rem 0;
  color: var(--ink); align-items: baseline;
}
.v-amt {
  font-family: 'DM Mono', monospace;
  font-size: .68rem; color: var(--accent);
  min-width: 56px; font-weight: 500;
}
.v-method {
  font-family: 'DM Mono', monospace;
  font-size: .58rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-mute);
  padding-top: .65rem; border-top: 1.5px solid var(--rule-soft);
}

/* linked variation cards — the whole cell is an <a> to the variation's recipe page */
a.variation-cell { text-decoration: none; transition: border-color .15s; }
a.variation-cell:hover { border-color: var(--accent); }
a.variation-cell .v-name { transition: color .15s; }
a.variation-cell:hover .v-name { color: var(--accent); }
.v-go {
  font-family: 'DM Mono', monospace;
  font-size: .58rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); margin-top: auto;
  padding-top: .65rem; border-top: 1.5px solid var(--rule-soft);
}

/* ── HUB CARDS (index/hub pages) ─────────────────────── */
.hub-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem; margin: 2rem 0;
}
.hub-card {
  background: var(--paper-deep);
  padding: 1.75rem 1.75rem 1.5rem;
  border: 1.5px solid var(--rule);
  text-decoration: none; color: inherit;
  display: flex; flex-direction: column;
  position: relative;
  transition: background .2s, transform .2s;
}
.hub-card:hover { background: var(--paper); border-color: var(--ink-mute); }
.hub-card-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: .58rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-mute); margin-bottom: .55rem;
}
.hub-card-name {
  font-family: 'Abril Fatface', serif;
  font-size: 1.85rem; line-height: 1.05;
  color: var(--ink); margin-bottom: .4rem;
}
.hub-card-desc {
  font-family: 'Cormorant Garamond', serif; font-style: italic;
  font-size: 1rem; line-height: 1.45;
  color: var(--ink-soft); flex: 1;
}
.hub-card-arrow {
  font-family: 'DM Mono', monospace;
  font-size: .65rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent); margin-top: 1rem;
}

/* ── PAGE-LEVEL RESPONSIVE ──────────────────────────── */
@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; padding: 0 1.5rem; gap: 2.5rem; }
  .recipe-card { position: static; }
  .sidebar { order: -1; }
  .bottle-grid { grid-template-columns: 1fr 1fr; }
  .variation-grid { grid-template-columns: 1fr; }
  .ornament-side { display: none; }
}
@media (max-width: 600px) {
  .bottle-grid { grid-template-columns: 1fr; }
}

/* ── SKIP LINK (accessibility) ──────────────────────── */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  z-index: 300;
  background: var(--ink); color: var(--paper);
  padding: .7rem 1.1rem;
  font-family: 'DM Mono', monospace;
  font-size: .68rem; letter-spacing: .14em; text-transform: uppercase;
  text-decoration: none;
}
.skip-link:focus { left: .5rem; top: .5rem; }
#main:focus { outline: none; }

/* ── BREADCRUMB ─────────────────────────────────────── */
/* override the global <nav> rule (flex / sticky / fixed height). */
.breadcrumb {
  display: block; position: static; height: auto; background: none;
  z-index: auto;
  max-width: 1140px; margin: 0 auto;
  padding: .8rem 2.5rem;
  font-family: 'DM Mono', monospace;
  font-size: .62rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-mute);
  border-bottom: 1px solid var(--rule-soft);
}
.breadcrumb a { color: var(--ink-mute); text-decoration: none; transition: color .15s; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { margin: 0 .55rem; color: var(--rule); }
.breadcrumb .current { color: var(--ink-soft); }

/* ── FOOTER REVISION LINE ───────────────────────────── */
.footer-rev {
  flex-basis: 100%;
  font-family: 'DM Mono', monospace;
  font-size: .56rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-mute);
}

/* ── STICKY TIP FLOAT (Venmo) ────────────────────────── *
   Persistent bottom-right pill on every page. Idle: white pill,
   accent-tinted coupe-glass icon. Hover/focus (or mobile tap):
   pill fills with the section's accent, icon flips to paper,
   label slides out. Uses var(--accent) so the colour follows
   the per-section spine (recipes/spirits/technique). */
.tip-float {
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  z-index: 90;
  display: inline-flex; align-items: center;
  height: 42px; padding: 0 14px;
  border: 1px solid var(--rule);
  border-radius: 21px;
  background: var(--paper);
  color: var(--accent);
  text-decoration: none;
  box-shadow: 0 2px 12px rgba(32, 32, 30, 0.08);
  cursor: pointer;
  overflow: hidden;
  transition: background .25s ease, border-color .25s ease,
              color .25s ease, box-shadow .25s ease,
              padding .3s cubic-bezier(0.22, 1, 0.36, 1);
}
.tip-float:hover,
.tip-float:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
  padding: 0 18px 0 14px;
  box-shadow: 0 4px 18px rgba(160, 81, 44, 0.22);
  outline: none;
}
.tip-float__icon {
  flex-shrink: 0;
  width: 20px; height: 20px;
  transition: transform .3s ease;
}
.tip-float__icon svg { width: 100%; height: 100%; display: block; }
.tip-float__icon svg path { fill: currentColor; transition: fill .25s ease; }
.tip-float:hover .tip-float__icon,
.tip-float:focus-visible .tip-float__icon { transform: rotate(-12deg); }

.tip-float__label {
  font-family: 'DM Mono', monospace;
  font-size: .62rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
  white-space: nowrap;
  max-width: 0; opacity: 0; margin-left: 0;
  overflow: hidden;
  transition: max-width .35s cubic-bezier(0.22, 1, 0.36, 1),
              opacity .2s ease .05s,
              margin-left .35s cubic-bezier(0.22, 1, 0.36, 1);
}
.tip-float:hover .tip-float__label,
.tip-float:focus-visible .tip-float__label {
  max-width: 160px; opacity: 1; margin-left: 10px;
}

/* Mobile / no-hover: tap toggles .is-expanded (set by JS). */
@media (hover: none) {
  .tip-float.is-expanded {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--paper);
    padding: 0 18px 0 14px;
    box-shadow: 0 4px 18px rgba(160, 81, 44, 0.22);
  }
  .tip-float.is-expanded .tip-float__icon { transform: rotate(-12deg); }
  .tip-float.is-expanded .tip-float__label {
    max-width: 160px; opacity: 1; margin-left: 10px;
  }
}

/* Entry pulse: an expanding accent-coloured ring + slight scale + warm
   shadow flash so the eye actually catches it. Three cycles, starting 2s
   after page load — long enough that the user has settled, short enough
   that they're still looking at the screen. Mobile gets a slightly larger
   ring (see below) since there's no hover fallback to discover the icon. */
@keyframes tip-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 2px 12px rgba(32, 32, 30, 0.08),
                0 0 0 0   rgba(160, 81, 44, 0.55);
  }
  40% {
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(160, 81, 44, 0.30),
                0 0 0 14px rgba(160, 81, 44, 0);
  }
  70%, 100% {
    transform: scale(1);
    box-shadow: 0 2px 12px rgba(32, 32, 30, 0.08),
                0 0 0 0    rgba(160, 81, 44, 0);
  }
}
.tip-float--intro {
  animation: tip-pulse 2s ease-out 3;
  animation-delay: 2s;
}

/* Mobile / no-hover: bump the ring radius and the rest-state shadow so
   the pill is more visible in a busy mobile viewport. */
@media (hover: none) {
  @keyframes tip-pulse {
    0% {
      transform: scale(1);
      box-shadow: 0 3px 14px rgba(32, 32, 30, 0.14),
                  0 0 0 0    rgba(160, 81, 44, 0.65);
    }
    40% {
      transform: scale(1.10);
      box-shadow: 0 6px 26px rgba(160, 81, 44, 0.38),
                  0 0 0 18px rgba(160, 81, 44, 0);
    }
    70%, 100% {
      transform: scale(1);
      box-shadow: 0 3px 14px rgba(32, 32, 30, 0.14),
                  0 0 0 0    rgba(160, 81, 44, 0);
    }
  }
  .tip-float {
    box-shadow: 0 3px 14px rgba(32, 32, 30, 0.14);
  }
  .tip-float--intro {
    animation: tip-pulse 2s ease-out 3;
    animation-delay: 1.6s;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tip-float, .tip-float__icon, .tip-float__label { transition: none; }
  .tip-float--intro { animation: none; }
}

@media print {
  .tip-float { display: none; }
}

/* ── INGREDIENTS PAGES ──────────────────────────────── *
   "Used in" cross-link list on the sidebar component-card, and
   the single-column hero variant used when an ingredient page
   has no hero photo. */
.used-in-section {
  margin-top: 1.25rem; padding-top: 1rem;
  border-top: 1px solid var(--rule-soft);
}
.used-in-list {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: .2rem .8rem;
}
.used-in-list li {
  padding: .25rem 0;
  font-family: 'Work Sans', sans-serif; font-size: .82rem;
}
.used-in-list a {
  color: var(--ink-soft); text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .15s, color .15s;
}
.used-in-list a:hover {
  color: var(--accent); border-bottom-color: var(--accent);
}
.used-in-list .used-in-pending {
  grid-column: 1 / -1;
  color: var(--ink-soft); opacity: .7;
  font-style: italic;
  font-size: .78rem;
}
/* Small italic note inside .ingredients-section — used on the
   Super Juice pages to clarify the sidebar amounts are per-gram-of-peel
   ratios, not a fixed recipe. */
.ing-card-note {
  margin: .9rem 0 0;
  padding-top: .8rem;
  border-top: 1px solid var(--rule-soft);
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: .85rem; line-height: 1.5;
  color: var(--ink-mute);
}
body.sec-ingredient .hero-grid { grid-template-columns: 1fr; }

@media (max-width: 980px) {
  .breadcrumb { padding: .7rem 1.25rem; }
}
