/*
 * Ironleaf Cigar Company -- design layer.
 * Built from design-contract.json. Every color/space/shape value below is a
 * token reference (var(--wp--preset--*)) or a literal drawn directly from the
 * approved contract's metallic/shape/motion blocks -- nothing invented here.
 */

*, *::before, *::after { box-sizing: border-box; }
img, svg, video { max-width: 100%; height: auto; display: block; }

:root {
  --container: var(--wp--style--global--wide-size, 1400px);
  --reveal-y: 16px;
  --reveal-dur: 0.6s;
  /* Official brand system, from the designer's cigar-band colour specs. */
  --gold: #D4AF37;              /* Metallic Gold, PANTONE 871 C */
  --antique: #F2D68A;           /* Antique Gold, PANTONE 7403 C */
  --ivory: #F7F3E6;             /* Ivory, PANTONE 7527 C */
  --matte: #1A1A1A;             /* Matte Black, PANTONE Black C */
  --gold-gradient: linear-gradient(120deg, #8A6A28 0%, #F2D68A 32%, #D4AF37 52%, #F7E9BF 70%, #8A6A28 100%);
  --antique-gradient: linear-gradient(120deg, #A9853C 0%, #F7E9BF 32%, #F2D68A 52%, #FFF6DC 70%, #A9853C 100%);
  /* Per-blend band colours, matching each cigar's physical band. */
  --blend-envoy: #0D1B33;
  --blend-sovereign: #8B4A1C;
  --blend-tyrant: #3D0F14;
  --blend-monarch: #6B2E17;
  --blend-regent: #7B0F1A;
  --hairline: 1px solid rgba(212, 175, 55, 0.35);
  --radius: 2px;
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background: var(--wp--preset--color--background);
}

/* Readable measure for running text inside a constrained column. */
.entry-content p, .wp-block-post-content p { max-width: 68ch; }

a { color: var(--wp--preset--color--accent-secondary); text-decoration: none; }
a:hover { color: var(--antique); }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--wp--preset--color--accent);
  outline-offset: 2px;
}

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--wp--preset--color--text); color: var(--wp--preset--color--background);
  padding: .6rem 1rem;
}
.skip-link:focus { left: 0; }

/* ---------------------------------------------------------------------
   Block-gap zero-out. A plain wp:group with the default is-layout-flow
   class injects margin-block-start on non-first children; this shows up
   as a hairline of base background color between header/main and between
   hand-authored sections. Zero it at the three known injection points.
   --------------------------------------------------------------------- */
.wp-site-blocks > header { margin-block-start: 0; }
.wp-site-blocks > main { margin-block-start: 0; }
.entry-content > * { margin-block-start: 0; margin-block-end: 0; }

/* ---------------------------------------------------------------------
   Motion floor: class-based reveal/stagger. Native, no CDN dependency.
   --------------------------------------------------------------------- */
.reveal { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(var(--reveal-y)); transition: opacity var(--reveal-dur) ease-out, transform var(--reveal-dur) ease-out; }
  .js .reveal.is-in { opacity: 1; transform: none; }
  .js .reveal-stagger > * { opacity: 0; transform: translateY(var(--reveal-y)); transition: opacity var(--reveal-dur) ease-out, transform var(--reveal-dur) ease-out; }
  .js .reveal-stagger.is-in > * { opacity: 1; transform: none; }
  .js .reveal-stagger.is-in > *:nth-child(2) { transition-delay: .08s; }
  .js .reveal-stagger.is-in > *:nth-child(3) { transition-delay: .16s; }
  .js .reveal-stagger.is-in > *:nth-child(4) { transition-delay: .24s; }
  .js .reveal-stagger.is-in > *:nth-child(5) { transition-delay: .32s; }
  .js .reveal-stagger.is-in > *:nth-child(6) { transition-delay: .4s; }

  /* Gold color-wash reveal for hero/section headlines: starts on the gold
     accent, transitions to the element's own resting text color. No GSAP,
     no CDN -- the "end color" is just the element's real CSS color, so a
     script failure never leaves it in a broken state (see .js gate above:
     without JS, it's just the resting color from paint one). */
  .js .gold-wash { color: var(--gold); transition: color 1.1s ease-out; }
  .js .gold-wash.is-in { color: var(--wp--preset--color--text); }
}

/* ---------------------------------------------------------------------
   Metallic system -- gold (primary/CTA) + antique gold (links/nav/secondary).
   --------------------------------------------------------------------- */
.wp-block-button__link,
.btn-gold {
  display: inline-block;
  background: var(--gold-gradient) !important;
  background-size: 220% 100% !important;
  background-position: 0% 50%;
  color: var(--wp--preset--color--accent-contrast) !important;
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: var(--radius) !important;
  border: none !important;
  padding: 0.9rem 1.8rem;
  transition: background-position .6s ease, transform .18s ease, box-shadow .3s ease;
  cursor: pointer;
}
.wp-block-button__link:hover, .btn-gold:hover {
  background-position: 100% 50%;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -12px rgba(196,154,78,.45);
  color: var(--wp--preset--color--accent-contrast) !important;
}
.wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent !important;
  color: var(--wp--preset--color--text) !important;
  border: var(--hairline) !important;
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
  border-color: var(--gold) !important;
  color: var(--gold) !important;
  box-shadow: none;
}

/* Antique-gold underline sweep for inline/nav links */
.site-header a, .site-footer a, .entry-content a, .metal-link {
  position: relative;
  color: var(--wp--preset--color--accent-secondary);
}
.metal-link {
  background-image: var(--antique-gradient);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.site-header .wp-block-navigation-item .wp-block-navigation-item__content {
  background-image: none;
  color: var(--wp--preset--color--text);
}
.site-header a:not(.wp-block-navigation-item__content),
.entry-content a {
  background-image: var(--antique-gradient);
  background-size: 220% 100%;
  background-position: 0 0;
  -webkit-background-clip: text; background-clip: text;
}
.site-header a:hover:not(.wp-block-navigation-item__content),
.entry-content a:hover {
  background-position: 100% 0;
}
.wp-block-navigation-item__content {
  position: relative;
  transition: color .25s ease;
}
.wp-block-navigation-item__content::after {
  content: "";
  position: absolute; left: 0; right: 100%; bottom: -4px; height: 1px;
  background: var(--antique-gradient);
  transition: right .3s ease;
}
.wp-block-navigation-item:hover .wp-block-navigation-item__content::after,
.current-menu-item .wp-block-navigation-item__content::after,
.current-menu-item .wp-block-navigation-item__content { right: 0; }
.current-menu-item .wp-block-navigation-item__content,
li.current-menu-item > .wp-block-navigation-item__content { color: var(--gold); }

/* ---------------------------------------------------------------------
   Header / Footer
   --------------------------------------------------------------------- */
.site-header { border-bottom: var(--hairline); }
.site-header .custom-logo, .site-header img { border-radius: 50%; }
.site-title a, .wp-block-site-title a { font-family: var(--wp--preset--font-family--display); font-weight: 700; letter-spacing: .01em; }
.wp-block-site-title a[aria-current="page"] { color: var(--gold); }

.site-footer { border-top: var(--hairline); }
.site-footer .footer-wordmark img { max-width: 220px; margin-inline: auto; }
.footer-credit {
  border-top: 1px solid rgba(156,145,134,.18);
  margin-top: var(--wp--preset--spacing--40);
  padding-top: var(--wp--preset--spacing--30);
  font-size: var(--wp--preset--font-size--small);
  color: var(--wp--preset--color--muted);
}
.footer-credit a { color: var(--wp--preset--color--muted); text-decoration: underline; background: none; -webkit-text-fill-color: unset; }
.footer-credit a:hover { color: var(--gold); }

/* ---------------------------------------------------------------------
   Section rhythm
   --------------------------------------------------------------------- */
.section { padding-top: var(--wp--preset--spacing--60); padding-bottom: var(--wp--preset--spacing--60); }
.section-tight { padding-top: var(--wp--preset--spacing--50); padding-bottom: var(--wp--preset--spacing--50); }
.section-wide { padding-top: var(--wp--preset--spacing--70); padding-bottom: var(--wp--preset--spacing--70); }
.eyebrow {
  display: inline-block; font-size: var(--wp--preset--font-size--small);
  letter-spacing: .14em; text-transform: uppercase; color: var(--gold);
  font-weight: 600; margin-bottom: var(--wp--preset--spacing--20);
}
.hr-fade { border: none; height: 1px; margin: var(--wp--preset--spacing--50) auto;
  background: linear-gradient(90deg, transparent, rgba(196,154,78,.5), transparent); max-width: 480px; }

/* Full-bleed band helper (contract's "distinct visual weight" bands) */
.band-full {
  width: 100vw; margin-inline: calc(50% - 50vw);
}
.band-accent { background: var(--wp--preset--color--surface); border-top: var(--hairline); border-bottom: var(--hairline); }

/* Two-column persona / value blocks */
.split-2 { display: grid; grid-template-columns: 1fr; gap: var(--wp--preset--spacing--40); }
@media (min-width: 782px) { .split-2 { grid-template-columns: 1fr 1fr; gap: var(--wp--preset--spacing--50); } }
.split-2.align-center { align-items: center; }

/* ---------------------------------------------------------------------
   Imagery treatment -- thin product photography, per imagery.treatment
   --------------------------------------------------------------------- */
.photo-frame {
  position: relative; background: var(--wp--preset--color--surface);
  border: var(--hairline); border-radius: var(--radius);
  padding: var(--wp--preset--spacing--30);
  overflow: hidden;
}
.photo-frame::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 40%, rgba(212,175,55,.16), transparent 65%);
  pointer-events: none;
}
.photo-frame img { position: relative; z-index: 1; margin-inline: auto; }

/* Fallback: no photo exists -- textured dark panel + watermark, per imagery.fallback */
.photo-fallback {
  position: relative; background: var(--wp--preset--color--surface);
  border: var(--hairline); border-radius: var(--radius);
  min-height: 320px; display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(196,154,78,.08), transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(156,160,163,.06), transparent 45%),
    repeating-linear-gradient(135deg, rgba(255,255,255,.02) 0 2px, transparent 2px 10px);
}
.photo-fallback img.watermark {
  width: 46%; max-width: 220px; opacity: .16; filter: grayscale(1) brightness(1.6);
}
.photo-fallback figcaption, .photo-fallback .fallback-label {
  position: absolute; bottom: var(--wp--preset--spacing--20); left: 0; right: 0; text-align: center;
  font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); letter-spacing: .06em;
}

/* ---------------------------------------------------------------------
   Cards -- blend grid / product grid / journal
   --------------------------------------------------------------------- */
.card-grid { display: grid; grid-template-columns: 1fr; gap: var(--wp--preset--spacing--40); }
@media (min-width: 600px) { .card-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } .card-grid.cols-5 { grid-template-columns: repeat(3, 1fr); } }

.blend-card, .product-card {
  background: var(--wp--preset--color--surface);
  border: var(--hairline); border-radius: var(--radius);
  padding: var(--wp--preset--spacing--40);
  transition: transform .3s cubic-bezier(.16,1,.3,1), box-shadow .3s ease, border-color .3s ease;
}
.blend-card:hover, .product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px -24px rgba(0,0,0,.55);
  border-color: rgba(196,154,78,.6);
}
.blend-card .photo-frame img, .product-card .photo-frame img { transition: transform .5s ease; }
.blend-card:hover .photo-frame img, .product-card:hover .photo-frame img { transform: scale(1.04); }
.blend-card h3, .product-card h3 { margin-top: var(--wp--preset--spacing--30); margin-bottom: .3rem; }
.blend-card .strength-tag, .product-card .price {
  display: inline-block; font-size: var(--wp--preset--font-size--small);
  letter-spacing: .08em; color: var(--gold); text-transform: uppercase; font-weight: 600;
}
.product-card .price { color: var(--wp--preset--color--text); text-transform: none; letter-spacing: 0; font-size: var(--wp--preset--font-size--medium); }
.product-card .price ins { text-decoration: none; color: var(--gold); }
.product-card .price del { color: var(--wp--preset--color--muted); margin-right: .4em; }

/* Coffee & mug sub-group -- visually distinct per contract */
.coffee-group {
  background: linear-gradient(180deg, rgba(196,154,78,.05), transparent 40%);
  border: var(--hairline); border-radius: var(--radius);
  padding: var(--wp--preset--spacing--50);
}
.coffee-group .card-grid { margin-top: var(--wp--preset--spacing--40); }

/* ---------------------------------------------------------------------
   FAQ accordion
   --------------------------------------------------------------------- */
.faq-item { border-bottom: 1px solid rgba(156,145,134,.2); }
.faq-item summary {
  cursor: pointer; list-style: none; padding: var(--wp--preset--spacing--30) 0;
  font-family: var(--wp--preset--font-family--display); font-weight: 700; font-size: 1.15rem;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--gold); font-size: 1.6rem; line-height: 1; flex-shrink: 0; transition: transform .3s ease; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-answer { padding-bottom: var(--wp--preset--spacing--30); color: var(--wp--preset--color--muted); max-width: 68ch; }

/* ---------------------------------------------------------------------
   Forms -- newsletter / wholesale application / contact
   --------------------------------------------------------------------- */
.site-form { max-width: 560px; }
.site-form .field { margin-bottom: var(--wp--preset--spacing--30); }
.site-form label { display: block; margin-bottom: .4rem; font-size: var(--wp--preset--font-size--small); letter-spacing: .04em; text-transform: uppercase; color: var(--wp--preset--color--muted); }
.site-form input[type=text], .site-form input[type=email], .site-form input[type=tel], .site-form select, .site-form textarea {
  width: 100%; background: var(--wp--preset--color--surface); border: var(--hairline); border-radius: var(--radius);
  color: var(--wp--preset--color--text); padding: .85rem 1rem; font-family: var(--wp--preset--font-family--body); font-size: 1rem;
}
.site-form input:focus, .site-form select:focus, .site-form textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold); }
.site-form .field-checkbox { display: flex; align-items: flex-start; gap: .6rem; }
.site-form .field-checkbox input { accent-color: var(--gold); margin-top: .25rem; }
.site-form .field-checkbox label { text-transform: none; letter-spacing: 0; font-size: .92rem; margin-bottom: 0; }
.site-form .hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.site-form button[type=submit] { border: none; }
.site-form .field-error { color: #E08A6B; font-size: .85rem; margin-top: .35rem; display: none; }
.site-form .field.has-error input, .site-form .field.has-error select { border-color: #E08A6B; }
.site-form .field.has-error .field-error { display: block; }
.form-status { margin-top: var(--wp--preset--spacing--30); padding: .9rem 1.1rem; border-radius: var(--radius); font-size: .95rem; display: none; }
.form-status.is-sending { display: block; background: rgba(156,145,134,.12); color: var(--wp--preset--color--muted); }
.form-status.is-success { display: block; background: rgba(196,154,78,.14); color: var(--gold); border: 1px solid rgba(196,154,78,.4); }
.form-status.is-error { display: block; background: rgba(224,138,107,.12); color: #E08A6B; border: 1px solid rgba(224,138,107,.4); }
.site-form button[disabled] { opacity: .6; cursor: not-allowed; transform: none !important; }

/* ---------------------------------------------------------------------
   WooCommerce base
   --------------------------------------------------------------------- */
.woocommerce ul.products, .woocommerce-page ul.products { display: grid; grid-template-columns: 1fr; gap: var(--wp--preset--spacing--40); }
@media (min-width: 600px) { .woocommerce ul.products, .woocommerce-page ul.products { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .woocommerce ul.products, .woocommerce-page ul.products { grid-template-columns: repeat(3, 1fr); } }
.woocommerce ul.products li.product {
  background: var(--wp--preset--color--surface); border: var(--hairline); border-radius: var(--radius);
  padding: var(--wp--preset--spacing--40); list-style: none; transition: transform .3s cubic-bezier(.16,1,.3,1), border-color .3s ease;
}
.woocommerce ul.products li.product:hover { transform: translateY(-6px); border-color: rgba(196,154,78,.6); }
.woocommerce ul.products li.product img { border-radius: var(--radius); }
.woocommerce span.price, .woocommerce ins { color: var(--gold) !important; text-decoration: none; }
.woocommerce del { color: var(--wp--preset--color--muted); opacity: .7; }
.woocommerce a.button, .woocommerce button.button, .woocommerce #respond input#submit,
.wc-block-components-product-button__button, .wc-block-components-checkout-place-order-button {
  background: var(--gold-gradient) !important; background-size: 220% 100% !important;
  color: var(--wp--preset--color--accent-contrast) !important; border-radius: var(--radius) !important; border: none !important;
  font-weight: 600; letter-spacing: .02em; padding: .8rem 1.4rem !important; transition: background-position .5s ease, transform .18s ease;
}
.woocommerce a.button:hover, .woocommerce button.button:hover { background-position: 100% 50% !important; transform: translateY(-1px); }
.woocommerce nav.woocommerce-pagination a, .woocommerce .woocommerce-Price-amount { color: var(--wp--preset--color--text); }
.single-product .product .summary .price { font-size: 1.4rem; }
.woocommerce-checkout #payment, .woocommerce-cart-form, .woocommerce-checkout-review-order {
  background: var(--wp--preset--color--surface); border: var(--hairline); border-radius: var(--radius); padding: var(--wp--preset--spacing--40);
}
.woocommerce table.shop_table { border-color: rgba(156,145,134,.2); }
.woocommerce-checkout .age-gate-notice {
  background: rgba(196,154,78,.1); border: 1px solid rgba(196,154,78,.4); border-radius: var(--radius);
  padding: 1rem 1.2rem; margin-bottom: var(--wp--preset--spacing--30); font-size: .95rem;
}
.woocommerce-checkout .age-gate-notice strong { color: var(--gold); }

/* ---------------------------------------------------------------------
   Blog / Journal -- agency-standard index + single templates
   --------------------------------------------------------------------- */
.journal-header { text-align: center; max-width: 640px; margin-inline: auto; padding: var(--wp--preset--spacing--60) var(--wp--preset--spacing--30) var(--wp--preset--spacing--50); }
.journal-header .eyebrow { display: block; }

.journal-index { display: block; max-width: 900px; margin-inline: auto; padding: 0 var(--wp--preset--spacing--30) var(--wp--preset--spacing--70); }
.journal-card { display: grid; grid-template-columns: 1fr; gap: var(--wp--preset--spacing--30); padding: var(--wp--preset--spacing--50) 0; border-bottom: 1px solid rgba(156,145,134,.2); }
.journal-card:first-child { padding-top: 0; }
@media (min-width: 700px) { .journal-card { grid-template-columns: 260px 1fr; align-items: center; } }
.journal-card .thumb { overflow: hidden; border-radius: var(--radius); border: var(--hairline); }
.journal-card .thumb img { transition: transform .5s ease; aspect-ratio: 4/3; object-fit: cover; }
.journal-card:hover .thumb img { transform: scale(1.06); }
.journal-card h2 { font-size: 1.6rem; margin-bottom: .5rem; }
.journal-card h2 a { color: var(--wp--preset--color--text); background: none; -webkit-text-fill-color: unset; }
.journal-card:hover h2 a { color: var(--gold); }
.journal-card .meta { font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); letter-spacing: .05em; text-transform: uppercase; margin-bottom: .6rem; }
.journal-card p { color: var(--wp--preset--color--muted); }

.post-header { text-align: center; max-width: 640px; margin-inline: auto; padding: var(--wp--preset--spacing--60) var(--wp--preset--spacing--30) var(--wp--preset--spacing--40); }
.post-header h1 { max-width: 22ch; margin-inline: auto; text-wrap: balance; }
.post-header .post-meta { font-size: var(--wp--preset--font-size--small); letter-spacing: .08em; text-transform: uppercase; color: var(--wp--preset--color--muted); margin-top: var(--wp--preset--spacing--20); }

.feature-band {
  width: 100vw; margin-inline: calc(50% - 50vw);
  height: clamp(280px, 52vh, 560px);
  border-top: var(--hairline); border-bottom: var(--hairline);
  overflow: hidden; position: relative; margin-bottom: var(--wp--preset--spacing--60);
  background: var(--wp--preset--color--surface);
}
.feature-band img { width: 100%; height: 100%; object-fit: cover; }
.feature-band.is-fallback { display: flex; align-items: center; justify-content: center;
  background-image: radial-gradient(circle at 50% 50%, rgba(196,154,78,.08), transparent 60%); }
.feature-band.is-fallback img.watermark { width: 140px; max-width: 20%; opacity: .18; filter: grayscale(1) brightness(1.6); }

.post-body { max-width: 44rem; margin-inline: auto; padding: 0 var(--wp--preset--spacing--30); font-size: 1.06rem; line-height: 1.75; }
.post-body > *:first-child::first-letter {
  font-family: var(--wp--preset--font-family--display); color: var(--gold); float: left;
  font-size: 4.2rem; line-height: .82; padding: .05em .1em 0 0; font-weight: 700;
}
.post-body h2 { position: relative; padding-top: var(--wp--preset--spacing--30); margin-top: var(--wp--preset--spacing--50); }
.post-body h2::before { content: ""; position: absolute; top: 0; left: 0; width: 64px; height: 2px; background: var(--gold-gradient); background-size: 220% 100%; }
.post-body blockquote { border: none; margin: var(--wp--preset--spacing--50) 0; text-align: center; font-family: var(--wp--preset--font-family--display); font-size: 1.4rem; font-style: italic; color: var(--wp--preset--color--text); position: relative; padding: 0 1rem; }
.post-body blockquote::before { content: "\201C"; display: block; font-size: 3.5rem; color: var(--gold); line-height: 1; font-family: Georgia, serif; }
.post-body figcaption { text-align: center; color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--small); margin-top: .5rem; }
.post-body hr { border: none; height: 1px; margin: var(--wp--preset--spacing--50) auto; background: linear-gradient(90deg, transparent, rgba(196,154,78,.5), transparent); }

.post-nav { max-width: 44rem; margin: var(--wp--preset--spacing--60) auto var(--wp--preset--spacing--30); padding: 0 var(--wp--preset--spacing--30);
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--wp--preset--spacing--30); border-top: var(--hairline); padding-top: var(--wp--preset--spacing--40); }
.post-nav .wp-block-post-navigation-link { font-size: 1.15rem; }
.post-nav .wp-block-post-navigation-link a,
.post-nav .wp-block-post-navigation-link a:visited {
  display: block; padding: var(--wp--preset--spacing--30); background: var(--wp--preset--color--surface); border: var(--hairline); border-radius: var(--radius);
  transition: transform .3s cubic-bezier(.16,1,.3,1), border-color .3s ease; color: var(--wp--preset--color--text) !important;
  background-image: none; -webkit-text-fill-color: unset; font-family: var(--wp--preset--font-family--display); font-weight: 700;
}
.post-nav .wp-block-post-navigation-link a:hover { transform: translateY(-4px); border-color: rgba(196,154,78,.6); color: var(--gold) !important; }
.post-nav .wp-block-post-navigation-link.has-next-post,
.post-nav [class*="next"] { text-align: right; }
.post-nav svg { fill: var(--gold); }

/* ---------------------------------------------------------------------
   Back to top
   --------------------------------------------------------------------- */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
#site-back-to-top {
  position: fixed; right: 26px; bottom: 26px; z-index: 140; width: 54px; height: 54px; border-radius: 50%;
  background: var(--gold-gradient); background-size: 220% 100%; color: var(--wp--preset--color--accent-contrast);
  border: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transform: translateY(14px);
  transition: opacity .5s ease, transform .5s cubic-bezier(.16,1,.3,1), background-position .5s ease;
  animation: site-toppulse 2.4s ease-in-out infinite;
}
#site-back-to-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
#site-back-to-top:hover { background-position: 100% 50%; }
#site-back-to-top img { width: 28px; height: 28px; filter: brightness(0) invert(1); display: block; pointer-events: none; }
@keyframes site-toppulse {
  0% { box-shadow: 0 0 0 0 rgba(196,154,78,.5); }
  70% { box-shadow: 0 0 0 18px rgba(196,154,78,0); }
  100% { box-shadow: 0 0 0 0 rgba(196,154,78,0); }
}
@media (prefers-reduced-motion: reduce) { #site-back-to-top { animation: none; } }

/* ---------------------------------------------------------------------
   Retailer locator (Where to Buy) -- honest empty state
   --------------------------------------------------------------------- */
.locator-empty {
  text-align: center; padding: var(--wp--preset--spacing--60) var(--wp--preset--spacing--40);
  background: var(--wp--preset--color--surface); border: var(--hairline); border-radius: var(--radius);
}

/* Utility */
.text-center { text-align: center; }
.text-muted { color: var(--wp--preset--color--muted); }
/* Two rules set margin-inline:auto on this element: our own .max-measure and
   WordPress's .is-layout-constrained > :where(...) rule. Both are one class of
   specificity, so beat them with a two-class selector rather than !important. */
.max-measure { max-width: 68ch; }
.is-layout-constrained > .max-measure,
.wp-block-post-content > .max-measure { margin-inline: 0; }
.text-center .max-measure,
.is-layout-constrained > .max-measure.mx-auto { margin-inline: auto; }
.mx-auto { margin-inline: auto; }


/* ---------------------------------------------------------------------
   Per-blend band colours. Each cigar's card carries the colour of its
   real printed band, so the site and the physical product match.
   --------------------------------------------------------------------- */
.blend-card { --blend: var(--wp--preset--color--surface); position: relative; }
.blend-card.is-envoy     { --blend: var(--blend-envoy); }
.blend-card.is-sovereign { --blend: var(--blend-sovereign); }
.blend-card.is-tyrant    { --blend: var(--blend-tyrant); }
.blend-card.is-monarch   { --blend: var(--blend-monarch); }
.blend-card.is-regent    { --blend: var(--blend-regent); }
.blend-card {
  background: linear-gradient(180deg, color-mix(in srgb, var(--blend) 55%, #1A1A1A) 0%, #1A1A1A 72%);
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: var(--radius);
  transition: border-color .3s ease, transform .3s ease, box-shadow .3s ease;
}
.blend-card:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}
.blend-card .blend-rule {
  height: 2px; width: 56px; background: var(--gold-gradient);
  background-size: 220% 100%; margin: 0 0 1rem;
}


/* A blend card's frame carries that blend's own band colour, so the artwork
   sits on the same ground as the physical band it came from. */
.blend-card .photo-frame {
  background: linear-gradient(180deg, color-mix(in srgb, var(--blend) 78%, #1A1A1A) 0%,
                                      color-mix(in srgb, var(--blend) 45%, #1A1A1A) 100%);
  border-color: rgba(212, 175, 55, 0.34);
}
.blend-card .photo-frame::before {
  background: radial-gradient(circle at 50% 38%, rgba(247, 243, 230, 0.10), transparent 68%);
}
.blend-card .photo-frame img { filter: drop-shadow(0 10px 22px rgba(0,0,0,.5)); }


/* WordPress constrained layout centres any child narrower than the container.
   That pushed body copy away from its own heading. Keep the readable measure,
   but keep the text left-aligned with the heading above it. Sections that are
   deliberately centred (.text-center) are left alone. */

/* Body copy keeps its readable measure but stays left-aligned with the heading
   it belongs to. Two separate rules (ours and WordPress core layout) both set
   margin-inline:auto here, so this narrow !important is the honest fix rather
   than a specificity arms race. Explicitly centred sections still centre. */
.max-measure:not(.mx-auto) { margin-inline: 0 !important; }
.text-center .max-measure, .max-measure.mx-auto { margin-inline: auto !important; }
