:root {
  --color-bg-start: #f9f6ef;
  --color-bg-end: #ece4d3;
  --color-surface: #ffffff;
  --color-ink: #262220;
  --color-ink-muted: rgba(38, 34, 32, 0.62);
  --color-accent: #c8a24a;
  --color-accent-dark: #a5822f;
  --radius: 16px;
  --shadow: 0 8px 24px rgba(38, 34, 32, 0.12);
  --tap-min: 44px;

  /* Type scale — 4 deliberate tiers, audited 17 Jul 2026. Adjust a tier here
     and every element using it moves together; don't hardcode sizes elsewhere. */
  --font-micro: 0.625rem;   /* 10px — tagline, SHOP button label */
  --font-caption: 0.6875rem; /* 11px — crest, compliance footer, position indicator */
  --font-body: 0.8125rem;    /* 13px — subtitle, more-options fallback, retailer-name fallback */
  --font-heading: 1.1875rem; /* 19px — product name (down from 22px to stop mobile wrapping) */
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--color-bg-end);
  color: var(--color-ink);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }

.page { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; padding: 1.25rem 1rem 6rem; max-width: 480px; margin: 0 auto; width: 100%; }

/* Background layer (shared anatomy #1) — full-bleed, crossfades on product change.
   Default is an on-brand warm-neutral gradient (no photography supplied yet);
   once bg_desktop/bg_mobile land in Airtable the crossfade takes over automatically. */
.bg-layer {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background: linear-gradient(160deg, var(--color-bg-start) 0%, var(--color-bg-end) 100%);
}
.bg-layer__img {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: 0; transition: opacity 0.5s ease;
}
.bg-layer__img--active { opacity: 1; }
.bg-layer__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(236, 228, 211, 0.55) 100%);
}

/* Brand header (shared anatomy #2) */
.brand-header { text-align: center; margin-bottom: 0.85rem; position: relative; z-index: 1; }
.brand-header__crest { font-size: var(--font-caption); letter-spacing: 0.18em; font-weight: 700; color: var(--color-ink); }
.brand-header__tagline { font-size: var(--font-micro); letter-spacing: 0.14em; color: var(--color-ink-muted); margin-top: 0.15rem; }

/* Product identity (shared anatomy #4) */
.product-identity { text-align: center; margin-bottom: 0.85rem; }
.product-identity__image {
  height: clamp(260px, 46vh, 460px); width: auto; max-width: 88vw;
  object-fit: contain; margin: 0 auto 0.4rem;
}
.product-identity__name { font-size: var(--font-heading); font-weight: 700; margin: 0 0 0.25rem; }
.product-identity__subtitle { font-size: var(--font-body); color: var(--color-ink-muted); margin: 0; }

/* Retailer podium (shared anatomy #5) */
.podium { margin-bottom: 1rem; }
.podium-list { display: flex; flex-direction: column; gap: 0.6rem; }

.podium-row {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  background: var(--color-surface); color: var(--color-ink);
  border: 1px solid rgba(38, 34, 32, 0.07);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 0.55rem 0.65rem 0.55rem 0.9rem; min-height: 56px;
  text-decoration: none; transition: transform 0.15s ease;
}
.podium-row:hover, .podium-row:focus-visible { transform: translateY(-1px); }
.podium-row:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.podium-row--amazon { border: 2px solid var(--color-accent); padding: 0.7rem 0.6rem 0.7rem 0.9rem; }

.podium-row__logo {
  display: flex; align-items: center; justify-content: center;
  min-height: 28px; max-height: 32px; flex: 1; min-width: 0;
}
.podium-row__logo img { max-height: 28px; max-width: 116px; width: auto; object-fit: contain; }
.podium-row__logo--text { font-weight: 600; font-size: var(--font-body); }

/* Amazon is the primary CTA — bold/white treatment so it pops; every other
   retailer uses the quieter dark-text-on-light treatment. */
.podium-row__buy {
  flex-shrink: 0; min-width: 56px; min-height: var(--tap-min);
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  background: var(--color-accent); color: #1a1a1a; font-weight: 700; font-size: var(--font-micro); letter-spacing: 0.05em;
  border-radius: 14px; padding: 0.35rem 0.65rem;
}
.podium-row__buy svg { width: 15px; height: 15px; }
.podium-row--amazon .podium-row__buy { background: var(--color-accent-dark); color: #fff; }

.podium-more { margin-top: 0.6rem; display: flex; justify-content: center; }
.podium-more[open] { display: block; }
.podium-more summary {
  cursor: pointer; list-style: none; color: var(--color-ink-muted);
  width: var(--tap-min); height: var(--tap-min); border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(38, 34, 32, 0.06);
}
.podium-more summary::-webkit-details-marker { display: none; }
.podium-more summary svg { width: 18px; height: 18px; }
.podium-more .podium-list { margin-top: 0.6rem; }

/* Compliance footer (shared anatomy #6+#7) — sticky bar with the Giesen crest
   as a tap-to-home link on the left, compliance text + Privacy Policy on the right. */
.compliance-footer {
  position: sticky; bottom: 0; left: 0; right: 0; z-index: 2;
  background: rgba(249, 246, 239, 0.92); backdrop-filter: blur(6px);
  border-top: 1px solid rgba(38, 34, 32, 0.1);
  padding: 0.4rem 1rem; display: flex; align-items: center; gap: 0.65rem;
}
.site-footer__home {
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  width: var(--tap-min); height: var(--tap-min); margin: 0 -0.5rem 0 -0.75rem;
}
.site-footer__home-logo { height: 24px; width: auto; }
.site-footer__home:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; border-radius: 8px; }
.site-footer__compliance { flex: 1; min-width: 0; text-align: left; font-size: var(--font-caption); color: var(--color-ink-muted); }
.compliance-footer__privacy { text-decoration: underline; margin-left: 0.4rem; }

/* More options link fallback (used only when no Giesen Logo attachment is set) */
.more-options-link {
  flex: 1; min-width: 0; display: block; text-align: left; font-size: var(--font-body);
  padding: 0.3rem 0; text-decoration: underline; color: var(--color-ink);
}
.more-options-link:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .podium-row { transition: none; }
  .bg-layer__img { transition: none; }
}
