/* ============================================================
   Funnyeye — Beers subpage styles
   ============================================================
   Aesthetic direction: "Bento-editorial apothecary."
   Each beer is a prescription card with a massive mono
   numeral, bilingual spec pills, and editorial-magazine
   typography.  The landing page is an asymmetric grid (one
   large hero card + four smaller in a 2-col stagger); the
   detail pages are full editorial spreads.

   Reuses:
     - Navy-700 card on navy-900 site bg (= legal page card).
     - Brand tokens: --colors--brand-navy-700/900,
       --colors--brand-gold-500/400, --colors--brand-blue-gray-500.
     - Font tokens: --font-display (Courier New) for numerals
       + spec labels; --font-body-en / --font-zh for prose.

   Page-specific CSS, loaded AFTER chrome.css on each of:
     subpage/brews/index.html
     subpage/brews/<slug>/index.html

   Mobile layout (≤720px) collapses to single-column.
   ============================================================ */

/* ============================================================
   1. CARD + SECTION PRIMITIVES
   ============================================================ */

/* Reusable card frame — same as the legal page card so the
   brews pages feel like part of the same system.  Set to a
   class rather than the page root so the detail page can
   contain a hero card PLUS inner spec cards. */

.brew-card {
  position: relative;
  background: var(--colors--brand-navy-700);
  border: 1px solid rgba(204, 156, 48, 0.42);
  border-top: 3px solid var(--colors--brand-gold-500);
  border-radius: 6px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
  padding: 40px 40px 48px;
  color: var(--colors--white);
  overflow: hidden;
}

@media (max-width: 720px) {
  .brew-card { padding: 32px 24px 36px; }
}

/* Gold grain — a fixed pseudo-element on every card adds a
   subtle noise/grain in the same gold that frames the card.
   Creates atmosphere without leaning on photo backgrounds
   that might fight the bottle photo. */
.brew-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at 100% 0%,
      rgba(204, 156, 48, 0.12) 0%,
      transparent 38%
    ),
    radial-gradient(
      circle at 0% 100%,
      rgba(190, 208, 220, 0.05) 0%,
      transparent 42%
    );
  pointer-events: none;
}

/* ============================================================
   2. LANDING PAGE  (subpage/brews/index.html)
   ============================================================ */

.brews {
  max-width: var(--containers--medium);
  margin: 96px auto 128px;
  padding: 0 var(--spacing--section-left-and-right);
}

@media (max-width: 720px) {
  .brews {
    margin: 64px auto 96px;
    padding: 0 20px;
  }
}

/* ---- Landing hero ---- */

.brews-hero {
  position: relative;
  margin-bottom: 96px;
  padding: 56px 0 40px;
  border-bottom: 1px solid rgba(204, 156, 48, 0.18);
}

.brews-hero-eyebrow {
  font-family: var(--font-display);
  color: var(--colors--brand-gold-500);
  font-size: 13px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  margin: 0 0 22px;
}

:lang(zh) .brews-hero-eyebrow {
  font-family: var(--font-zh);
  letter-spacing: 0.1em;
  text-transform: none;
}

.brews-hero-title {
  font-size: clamp(2.4rem, 5.5vw, 4.4rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  font-weight: 400;
  margin: 0 0 24px;
  max-width: 22ch;
  color: var(--colors--white);
}

.brews-hero-title em {
  font-style: normal;
  color: var(--colors--brand-gold-500);
  font-style: italic;
}

:lang(en) .brews-hero-title { font-family: var(--font-display); }
:lang(zh) .brews-hero-title { font-family: var(--font-zh); }

.brews-hero-lead {
  font-family: var(--font-body-en);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.65;
  max-width: 56ch;
  opacity: 0.78;
  margin: 0;
}

:lang(zh) .brews-hero-lead {
  font-family: var(--font-zh);
  font-size: 1.1rem;
  letter-spacing: 0.04em;
}

/* Hero counter — small "05 / PRODUCTS" line on the right side.
   Mono-numerals + label, decorative. */
.brews-hero-counter {
  font-family: var(--font-display);
  position: absolute;
  top: 56px;
  right: 0;
  text-align: right;
  color: var(--colors--brand-blue-gray-500);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1.5;
}

.brews-hero-counter-num {
  display: block;
  font-size: 28px;
  color: var(--colors--brand-gold-500);
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

@media (max-width: 720px) {
  .brews-hero-counter { display: none; }
}

/* ---- Landing grid (asymmetric, editorial) ---- */

.brews-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 28px;
}

/* Card 01 — full-width "feature" card, large, has bottle photo */
.brews-card-feature {
  grid-column: span 12;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: stretch;
  min-height: 360px;
}

@media (max-width: 900px) {
  .brews-card-feature {
    grid-template-columns: 1fr;
    min-height: 0;
  }
}

/* Cards 02..05 — 4 cards in 2-col grid, staggered top spacing */
.brews-card-half {
  grid-column: span 6;
  display: flex;
  flex-direction: column;
}

@media (max-width: 720px) {
  .brews-card-half {
    grid-column: span 12;
  }
}

/* Stagger cards 03 + 05 slightly to break the grid rhythm.
   On mobile the stagger is reduced to keep line lengths sane. */
.brews-card-offset {
  margin-top: 64px;
}

@media (max-width: 720px) {
  .brews-card-offset { margin-top: 0; }
}

/* ---- Individual landing-card internal layout ---- */

.brew-card-num {
  font-family: var(--font-display);
  font-size: clamp(80px, 12vw, 160px);
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: var(--colors--brand-gold-500);
  opacity: 0.85;
  margin: 0;
  /* Counter on top-left so the numerals feel like a prescription
     label rather than a decoration. */
}

.brew-card-num sup {
  font-size: 0.32em;
  vertical-align: super;
  letter-spacing: 0.1em;
  opacity: 0.65;
  margin-left: 0.4em;
}

.brew-card-media {
  position: relative;
  display: block;
  border-radius: 4px;
  overflow: hidden;
  background: #1f2d3f;
  /* Soft inner margin around the bottle photo. */
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  border: 1px solid rgba(204, 156, 48, 0.22);
}

.brew-card-media img {
  display: block;
  width: auto;
  height: 100%;
  max-height: 320px;
  object-fit: contain;
  /* Subtle drop shadow under each bottle photo so the bottle
     "sits" on the navy backdrop rather than floating. */
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.6));
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.brew-card:hover .brew-card-media img {
  transform: translateY(-6px) scale(1.02);
}

.brew-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.brew-card-en {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--colors--brand-blue-gray-500);
  margin: 0 0 8px;
}

.brew-card-zh {
  font-family: var(--font-zh);
  font-size: clamp(1.6rem, 2.6vw, 2rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.2;
  color: var(--colors--white);
  margin: 0 0 16px;
}

:lang(en) .brew-card-zh { display: none; }
:lang(zh) .brew-card-en { display: none; }

/* English card body — show English name when language=en */
:lang(en) .brew-card-en.is-name {
  display: block;
  color: var(--colors--brand-white, var(--colors--white));
  font-size: clamp(1.5rem, 2.4vw, 1.8rem);
  letter-spacing: 0.01em;
  text-transform: none;
  font-family: var(--font-display);
  margin: 0 0 16px;
}
:lang(zh) .brew-card-en.is-name { display: none; }

/* The English-display rules above depend on the renderer writing
   both: a meta eyebrow (.brew-card-en) and a name (.brew-card-en.is-name)
   element.  We hide the meta on en and show only the name. */

.brew-card-tagline {
  font-family: var(--font-body-en);
  font-size: 14px;
  line-height: 1.7;
  letter-spacing: 0.01em;
  opacity: 0.78;
  margin: 0 0 24px;
  max-width: 38ch;
}

:lang(zh) .brew-card-tagline {
  font-family: var(--font-zh);
  font-size: 15px;
  letter-spacing: 0.04em;
}

.brew-card-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 0 0 24px;
  padding: 0;
}

.brew-card-spec {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  border: 1px solid rgba(204, 156, 48, 0.45);
  border-radius: 999px;
  padding: 4px 12px;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--colors--brand-gold-400);
}

.brew-card-spec strong {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--colors--brand-gold-500);
  letter-spacing: 0.04em;
  font-size: 12px;
}

.brew-card-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--colors--brand-gold-400);
  text-decoration: none;
  align-self: flex-start;
  border-bottom: 1px solid transparent;
  padding-bottom: 4px;
  transition: border-color 0.2s, color 0.2s, transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.brew-card-link::after {
  content: "→";
  font-size: 14px;
  transition: transform 0.2s ease;
}

:lang(zh) .brew-card-link {
  font-family: var(--font-zh);
  letter-spacing: 0.08em;
  text-transform: none;
}

.brew-card-link:hover {
  color: var(--colors--brand-gold-500);
  border-color: var(--colors--brand-gold-500);
}

.brew-card-link:hover::after { transform: translateX(4px); }

/* ============================================================
   3. FEATURE-CARD (card 01) INTERNAL LAYOUT
   ============================================================ */

.brews-card-feature .brew-card-num {
  font-size: clamp(100px, 14vw, 200px);
}

/* Feature card lays out horizontally on desktop, vertically on mobile.
   The media column shows the bottle photo, the body column shows copy. */
.brews-card-feature .brew-card-media {
  border-right: 1px solid rgba(204, 156, 48, 0.22);
  border-radius: 6px 0 0 6px;
  border-bottom: 0;
  min-height: 400px;
}

.brews-card-feature .brew-card-body {
  padding: 56px 56px 56px 48px;
}

@media (max-width: 900px) {
  .brews-card-feature .brew-card-media {
    border-right: 0;
    border-bottom: 1px solid rgba(204, 156, 48, 0.22);
    border-radius: 6px 6px 0 0;
  }
  .brews-card-feature .brew-card-body {
    padding: 40px 32px 32px;
  }
}

.brews-card-feature .brew-card-zh {
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  margin: 0 0 20px;
}

.brews-card-feature .brew-card-tagline {
  font-size: 15px;
  max-width: 44ch;
}

.brews-card-feature .brew-card-media img {
  max-height: 420px;
}

/* ============================================================
   4. DETAIL PAGE LAYOUT  (subpage/brews/<slug>/index.html)
   ============================================================ */

.brew-detail {
  max-width: 960px;
  margin: 88px auto 128px;
  padding: 0 var(--spacing--section-left-and-right);
}

@media (max-width: 720px) {
  .brew-detail {
    margin: 56px auto 96px;
    padding: 0 20px;
  }
}

/* ---- Detail hero card ---- */

.brew-hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 0;
  margin-bottom: 56px;
}

@media (max-width: 900px) {
  .brew-hero {
    grid-template-columns: 1fr;
  }
}

.brew-hero-num {
  font-family: var(--font-display);
  font-size: clamp(120px, 18vw, 240px);
  line-height: 0.82;
  letter-spacing: -0.04em;
  color: var(--colors--brand-gold-500);
  opacity: 0.9;
  margin: 0;
}

.brew-hero-counter {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--colors--brand-blue-gray-500);
  margin: 16px 0 0;
}

.brew-hero-en {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--colors--brand-gold-400);
  margin: 0 0 12px;
}

:lang(en) .brew-hero-en-name {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--colors--white);
  margin: 0 0 18px;
}
:lang(zh) .brew-hero-en-name { display: none; }

.brew-hero-title {
  font-family: var(--font-zh);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.15;
  color: var(--colors--white);
  margin: 0 0 16px;
}

.brew-hero-tagline {
  font-family: var(--font-zh);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.7;
  letter-spacing: 0.04em;
  opacity: 0.78;
  margin: 0 0 32px;
  max-width: 36ch;
  padding: 0 0 0 16px;
  border-left: 2px solid var(--colors--brand-gold-500);
}

:lang(en) .brew-hero-tagline {
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  text-transform: none;
  font-size: 1.05rem;
  font-style: italic;
}

/* Hero media: full card, big bottle photo, no overlay chrome */
.brew-hero-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #143150 0%, #0e2138 100%);
  border-left: 1px solid rgba(204, 156, 48, 0.22);
  min-height: 480px;
}

.brew-hero-media img {
  width: auto;
  height: 100%;
  max-height: 520px;
  object-fit: contain;
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.65));
}

@media (max-width: 900px) {
  .brew-hero-media {
    border-left: 0;
    border-top: 1px solid rgba(204, 156, 48, 0.22);
    min-height: 360px;
  }
}

/* ---- Specs strip (3-column data display) ---- */

.brew-specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 0 0 64px;
  background: var(--colors--brand-navy-700);
  border: 1px solid rgba(204, 156, 48, 0.32);
  border-top: 3px solid var(--colors--brand-gold-500);
  border-radius: 6px;
  overflow: hidden;
}

@media (max-width: 720px) {
  .brew-specs { grid-template-columns: 1fr; }
}

.brew-spec-cell {
  padding: 32px 36px;
  border-right: 1px solid rgba(190, 208, 220, 0.12);
}

.brew-spec-cell:last-child { border-right: 0; }

@media (max-width: 720px) {
  .brew-spec-cell {
    border-right: 0;
    border-bottom: 1px solid rgba(190, 208, 220, 0.12);
    padding: 24px 24px;
  }
  .brew-spec-cell:last-child { border-bottom: 0; }
}

.brew-spec-label {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--colors--brand-blue-gray-500);
  margin: 0 0 12px;
}

:lang(zh) .brew-spec-label {
  font-family: var(--font-zh);
  letter-spacing: 0.08em;
  text-transform: none;
}

.brew-spec-value {
  font-family: var(--font-zh);
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.1;
  color: var(--colors--white);
  margin: 0 0 4px;
}

:lang(en) .brew-spec-value { font-family: var(--font-display); }

.brew-spec-unit {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--colors--brand-gold-500);
  margin: 0;
}

/* ---- Section block (description / ingredients) ---- */

.brew-section {
  margin: 0 0 56px;
}

.brew-section-rule {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 28px;
}

.brew-section-rule::before,
.brew-section-rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(204, 156, 48, 0.2);
}

.brew-section-title {
  font-family: var(--font-zh);
  font-size: 13px;
  letter-spacing: 0.28em;
  color: var(--colors--brand-gold-500);
  text-transform: uppercase;
  margin: 0;
  padding: 0 16px;
  white-space: nowrap;
}

:lang(en) .brew-section-title {
  font-family: var(--font-display);
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.brew-section-body {
  max-width: 64ch;
  margin: 0 auto;
}

.brew-section-body p {
  font-family: var(--font-zh);
  font-size: 15.5px;
  line-height: 1.95;
  letter-spacing: 0.04em;
  color: var(--colors--white);
  opacity: 0.92;
  margin: 0 0 18px;
  text-align: justify;
}

:lang(en) .brew-section-body p {
  font-family: var(--font-body-en);
  font-size: 15px;
  letter-spacing: 0.01em;
}

/* ---- Flavor chips ---- */

.brew-flavors {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  max-width: 64ch;
  margin: 0 auto;
}

.brew-flavor {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  border: 1px solid rgba(204, 156, 48, 0.45);
  border-radius: 999px;
  padding: 8px 18px;
  font-family: var(--font-zh);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--colors--brand-gold-400);
}

:lang(en) .brew-flavor {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brew-flavor strong {
  font-weight: 600;
  color: var(--colors--brand-gold-500);
}

/* ============================================================
   5. INGREDIENTS TABLE  (only Plum Cocktail + Magnolia Tea)
   ============================================================ */

.brew-ingredients {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: center;
  max-width: 64ch;
  margin: 0 auto;
}

.brew-ingredient {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--colors--brand-blue-gray-500);
  padding: 4px 0;
  position: relative;
}

.brew-ingredient:not(:last-child)::after {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--colors--brand-gold-500);
  opacity: 0.7;
  margin-left: 18px;
  vertical-align: middle;
}

:lang(zh) .brew-ingredient {
  font-family: var(--font-zh);
  letter-spacing: 0.06em;
}

/* ============================================================
   6. ENTRANCE ANIMATION (used by chrome-extras IO)
   ============================================================ */

[data-fe-anim-fade] .brew-card,
.brew-card[data-fe-anim-fade] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

[data-fe-anim-fade].is-visible .brew-card,
.brew-card[data-fe-anim-fade].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   7. PRINT
   ============================================================ */

@media print {
  .brews-grid { display: block; }
  .brew-card,
  .brew-specs,
  .brew-hero {
    page-break-inside: avoid;
    background: #fff;
    color: #000;
    border-color: #999;
  }
  .brew-card-media,
  .brew-hero-media {
    display: none;
  }
  .brew-card-link { display: none; }
  .brew-spec-value,
  .brew-hero-title,
  .brew-card-zh,
  .brew-section-body p { color: #000; }
  [data-fe-nav-slot],
  [data-fe-footer-slot] {
    display: none !important;
  }
}

/* ============================================================
   8. UX / A11Y POLISH
   ============================================================ */

/* ---- Back-to-list nav (top of each detail page) ---- */

.brew-back-nav {
  margin: 0 0 28px;
}

.brew-back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid rgba(204, 156, 48, 0.32);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--colors--brand-gold-400);
  text-decoration: none;
  background: transparent;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

:lang(zh) .brew-back-link {
  font-family: var(--font-zh);
  letter-spacing: 0.08em;
  text-transform: none;
  font-size: 13px;
}

.brew-back-link:hover {
  color: var(--colors--brand-gold-500);
  border-color: var(--colors--brand-gold-500);
  background: rgba(204, 156, 48, 0.08);
}

.brew-back-link:focus-visible {
  outline: 2px solid var(--colors--brand-gold-400);
  outline-offset: 3px;
}

.brew-back-link:active {
  transform: translateY(1px);
}

/* ---- Card link tap target + cursor + focus ---- */

.brew-card-link {
  cursor: pointer;
  /* Bring the link up to the 44px iOS-recommended tap target
     without changing the visual rhythm — extra space goes to
     padding-top/bottom, the underline stays at the bottom. */
  min-height: 44px;
  padding: 12px 0 4px;
}

.brew-card-link:focus-visible,
.brew-card-link:focus {
  outline: 2px solid var(--colors--brand-gold-400);
  outline-offset: 4px;
  color: var(--colors--brand-gold-500);
}

/* ---- Bilingual copy safety ---- */

/* Static <span lang="en"> elements that should not render at all
   when lang=zh (chrome.css line 1188 already hides them via attribute
   selector).  This is a redundant safety net for any <span> that
   slips in without the lang attr — purely defensive. */
[lang]:empty { display: none; }

/* ============================================================
   9. REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  /* Entrance reveals land fully visible — no fade, no translate. */
  [data-fe-anim-fade] .brew-card,
  [data-fe-anim-fade].brew-card,
  .brew-card[data-fe-anim-fade] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  /* Hover micro-interactions still allowed (the user opted into
     reduce-motion for *involuntary* movement — hover is voluntary). */
  .brew-card-media img,
  .brew-back-link,
  .brew-card-link {
    transition-duration: 0s !important;
  }
}

/* ============================================================
   10. MOBILE TYPOGRAPHY BUMP
   ============================================================ */

@media (max-width: 720px) {
  /* Bump Chinese body text a touch above the 16px floor on
     small screens so the editorial typography still reads
     comfortably without the desktop's generous line-height. */
  .brew-section-body p {
    font-size: 16px;
    line-height: 1.85;
    text-align: left;
  }
  .brew-flavor {
    font-size: 13.5px;
    padding: 7px 16px;
  }
  .brew-ingredient {
    font-size: 14px;
  }
  .brew-hero-tagline {
    font-size: 1rem;
  }
}
