/* Brasa Mora — Contemporary Mexican atelier (polished)
   THESIS: D2C incense storefront as bright craft atelier, not mystical advertorial.
   OWN-WORLD: limestone ground, agave field color, Familjen Grotesk + Literata, brass accents.
   STORY: see Wild Berry product, price, buy via Tienda de Humo Shopify.
   FIRST VIEWPORT: ad bar + brand + product + CTA + full-bleed product photo.
   FORM: Contemporary Mexican atelier (#4; seed 293dc3d1). */

:root {
  --ink: #1a1f1c;
  --stone: #e4e7e2;
  --stone-deep: #c5cbc3;
  --agave: #1f4a3a;
  --agave-bright: #2d6b52;
  --berry: #6b2d45;
  --brass: #a67c52;
  --paper: #f3f4f1;
  --smoke: #8a918a;
  --white: #fafbf9;
  --focus: #2d6b52;
  --radius: 2px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-display: "Familjen Grotesk", system-ui, sans-serif;
  --font-body: Literata, Georgia, serif;
  --space: clamp(1rem, 2.5vw, 2rem);
  --max: 72rem;
  --header-h: 4.25rem;
  --sticky-h: 4.5rem;
}

/* Shared content width — header, sections, footer align to the same column */
.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--space);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--agave-bright);
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--berry);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--agave);
  color: var(--white);
  padding: 0.75rem 1rem;
  z-index: 1000;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* —— Ad disclosure —— */
.ad-disclosure {
  background: var(--ink);
  color: var(--stone);
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.55rem 1rem;
  margin: 0;
}

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding-block: 0.85rem;
  min-height: var(--header-h);
  background: color-mix(in srgb, var(--white) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--stone-deep) 55%, transparent);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--agave);
  text-decoration: none;
  flex-shrink: 0;
}

.brand:hover {
  color: var(--agave-bright);
}

.nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem 1.1rem;
  font-family: var(--font-display);
  font-size: 0.88rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  max-width: min(100%, 34rem);
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav a {
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  padding: 0.35rem 0;
}

.nav a:hover {
  color: var(--agave-bright);
}

@media (max-width: 640px) {
  .site-header__inner {
    flex-wrap: wrap;
  }
  .nav {
    width: 100%;
    max-width: none;
    order: 3;
    padding-bottom: 0.15rem;
    gap: 0.85rem;
    font-size: 0.82rem;
  }
}

/* —— Hero —— */
.hero {
  color: var(--white);
  background:
    linear-gradient(135deg, var(--agave) 0%, color-mix(in srgb, var(--agave) 88%, var(--ink)) 100%);
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.hero__grid {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3rem);
  align-items: center;
}

@media (min-width: 860px) {
  .hero__grid {
    grid-template-columns: 1fr min(38%, 22rem);
    gap: clamp(2rem, 5vw, 4rem);
  }
}

.hero__figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--white) 22%, transparent);
  background: color-mix(in srgb, var(--agave-bright) 40%, var(--ink));
  aspect-ratio: 407 / 679;
  max-width: 22rem;
  margin-inline: auto;
  width: 100%;
}

.hero__figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.hero__brand {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 8vw, 5.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.95;
  margin: 0 0 1rem;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.8vw, 1.75rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  max-width: 24ch;
  margin: 0 0 0.75rem;
  line-height: 1.25;
}

.hero__lead {
  margin: 0 0 1.75rem;
  max-width: 38ch;
  font-size: 1.05rem;
  color: var(--stone);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
}

.btn {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.6rem;
  border-radius: var(--radius);
  transition: transform 0.35s var(--ease), background 0.25s ease, color 0.25s ease, box-shadow 0.35s var(--ease);
  min-height: 2.85rem;
}

.btn--primary {
  background: var(--white);
  color: var(--agave);
}

.btn--primary:hover {
  transform: translateY(-2px);
  background: var(--stone);
  color: var(--agave);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.btn--agave {
  background: var(--agave);
  color: var(--white);
  width: 100%;
}

.btn--agave:hover {
  background: var(--agave-bright);
  transform: translateY(-2px);
}

.price-tag {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .btn {
    transition: none;
  }
}

/* —— Partner bar —— */
.partner-bar {
  padding-block: 1.1rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: color-mix(in srgb, var(--ink) 82%, var(--smoke));
  border-bottom: 1px solid var(--stone-deep);
  background: var(--white);
}

.partner-bar p {
  margin: 0;
}

.partner-bar strong {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
}

/* —— Sections —— */
.section {
  padding-block: clamp(3rem, 8vw, 5.5rem);
}

.section--stone {
  background: var(--stone);
}

.section--agave {
  background: var(--agave);
  color: var(--white);
}

.section__inner {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--space);
}

.section__label {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 0.5rem;
}

.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0 0 0.75rem;
  max-width: 22ch;
}

.section__lead {
  margin: 0 0 2rem;
  max-width: 48ch;
  color: color-mix(in srgb, var(--ink) 72%, var(--smoke));
}

.section--agave .section__lead {
  color: var(--stone-deep);
}

/* —— Buy —— */
.buy {
  display: grid;
  gap: 2.5rem;
  align-items: start;
}

@media (min-width: 900px) {
  .buy {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3.5rem;
  }
}

.buy__gallery {
  display: grid;
  gap: 0.75rem;
  position: sticky;
  top: calc(var(--header-h) + 0.75rem);
}

.buy__gallery-main {
  background: var(--white);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--stone-deep);
  position: relative;
}

.buy__gallery-main img,
.gallery__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* —— CSS-only gallery —— */
.gallery__radio {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.gallery__img {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.gallery__stage {
  position: relative;
}

#g1:checked ~ .gallery__stage .gallery__img--1,
#g2:checked ~ .gallery__stage .gallery__img--2,
#g3:checked ~ .gallery__stage .gallery__img--3,
#g4:checked ~ .gallery__stage .gallery__img--4 {
  opacity: 1;
}

.buy__thumbs,
.gallery__thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
}

@media (max-width: 520px) {
  .buy__thumbs,
  .gallery__thumbs {
    gap: 0.45rem;
  }
}

.buy__thumbs button,
.gallery__thumb {
  border: 2px solid transparent;
  padding: 0;
  background: var(--white);
  cursor: pointer;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  display: block;
}

.gallery__thumb:hover {
  border-color: var(--agave-bright);
}

#g1:checked ~ .gallery__thumbs label[for="g1"],
#g2:checked ~ .gallery__thumbs label[for="g2"],
#g3:checked ~ .gallery__thumbs label[for="g3"],
#g4:checked ~ .gallery__thumbs label[for="g4"] {
  border-color: var(--agave);
}

.buy__thumbs img,
.gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* —— CSS-only pack picker —— */
.pack {
  position: relative;
}

.pack__radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pack__price {
  display: none;
}

#pack10:checked ~ .price-block .pack__price--10,
#pack100:checked ~ .price-block .pack__price--100 {
  display: inline;
}

.pack__cta {
  display: none;
}

#pack10:checked ~ .pack__ctas .pack__cta--10,
#pack100:checked ~ .pack__ctas .pack__cta--100 {
  display: inline-flex;
}

#pack10:checked ~ .pack-picker label[for="pack10"],
#pack100:checked ~ .pack-picker label[for="pack100"] {
  border-color: var(--agave);
  background: color-mix(in srgb, var(--agave) 8%, var(--white));
}

.pack__ctas {
  display: grid;
  gap: 0.65rem;
}

.buy__panel-title {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
  line-height: 1.2;
  max-width: none;
}

.buy__meta {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--smoke);
  margin: 0 0 1.25rem;
}

.price-block {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  margin-bottom: 0.35rem;
}

.price-block__current {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--agave);
}

.price-block__note {
  font-size: 0.9rem;
  color: var(--smoke);
  margin: 0 0 1.5rem;
}

.pack-picker {
  margin: 0 0 1.25rem;
  border: 0;
  padding: 0;
  min-inline-size: 0;
}

.pack-picker legend {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.65rem;
  padding: 0;
}

.pack-options {
  display: grid;
  gap: 0.65rem;
}

@media (min-width: 520px) {
  .pack-options {
    grid-template-columns: 1fr 1fr;
  }
}

.pack-option {
  position: relative;
  border: 1.5px solid var(--stone-deep);
  background: var(--white);
  padding: 1rem 1.1rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.25s var(--ease);
  border-radius: var(--radius);
}

.pack-option:hover {
  border-color: var(--agave-bright);
}

.pack-option__name {
  font-family: var(--font-display);
  font-weight: 600;
  display: block;
}

.pack-option__price {
  font-family: var(--font-display);
  color: var(--agave);
  font-weight: 600;
}

.pack-option__desc {
  display: block;
  font-size: 0.85rem;
  color: var(--smoke);
  margin-top: 0.2rem;
}

.qty-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  font-family: var(--font-display);
}

.qty-row label {
  font-weight: 600;
  font-size: 0.95rem;
}

.qty-row input {
  width: 4.5rem;
  padding: 0.55rem 0.65rem;
  border: 1.5px solid var(--stone-deep);
  border-radius: var(--radius);
  font: inherit;
  background: var(--white);
}

.affiliate-note,
.legal-note {
  font-size: 0.82rem;
  color: var(--smoke);
  margin: 0.85rem 0 0;
  line-height: 1.45;
}

.trust-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  font-family: var(--font-display);
  font-size: 0.9rem;
  display: grid;
  gap: 0.45rem;
}

.trust-list li {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

.trust-list li::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  margin-top: 0.45rem;
  background: var(--brass);
  flex-shrink: 0;
}

/* —— Specs —— */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  max-width: 42rem;
}

.spec-table th,
.spec-table td {
  text-align: left;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--stone-deep);
  vertical-align: top;
}

.spec-table th {
  font-family: var(--font-display);
  font-weight: 600;
  width: 36%;
  color: var(--agave);
  padding-right: 1rem;
}

/* —— Split —— */
.split {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 860px) {
  .split {
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
  }
}

.split__img {
  overflow: hidden;
  aspect-ratio: 407 / 679;
  background: var(--agave);
  border: 1px solid var(--stone-deep);
}

.split__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1.25rem;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  padding-left: 3rem;
  position: relative;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--brass);
  line-height: 1.4;
}

.steps strong {
  font-family: var(--font-display);
  display: block;
  margin-bottom: 0.2rem;
}

/* —— FAQ —— */
.faq {
  max-width: 42rem;
}

.faq details {
  border-bottom: 1px solid var(--stone-deep);
  padding: 1rem 0;
}

.faq summary {
  font-family: var(--font-display);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  font-weight: 400;
  color: var(--brass);
  font-size: 1.25rem;
  flex-shrink: 0;
}

.faq details[open] summary::after {
  content: "–";
}

.faq details p {
  margin: 0.75rem 0 0.25rem;
  color: color-mix(in srgb, var(--ink) 75%, var(--smoke));
}

.faq-cta {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.faq-cta .btn {
  width: auto;
  min-width: 14rem;
}

/* —— Shipping —— */
.ship-grid {
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 720px) {
  .ship-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

.ship-grid h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 0.4rem;
}

.ship-grid p {
  margin: 0;
  color: var(--stone-deep);
  font-size: 0.98rem;
}

.ship-grid a {
  color: var(--white);
  text-decoration: underline;
}

.ship-grid a:hover {
  color: var(--stone);
}

/* —— Footer —— */
.site-footer {
  background: var(--ink);
  color: var(--stone);
  padding-block: 3rem 2.5rem;
  font-size: 0.92rem;
}

.site-footer a {
  color: var(--stone);
}

.site-footer a:hover {
  color: var(--white);
}

.footer__grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 800px) {
  .footer__grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.footer__brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--white);
  margin: 0 0 0.75rem;
}

.footer__legal {
  line-height: 1.55;
}

.footer__legal p {
  margin: 0 0 0.5rem;
}

.footer h3 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 0.75rem;
}

.footer__links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.4rem;
}

.footer__bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(197, 203, 195, 0.2);
  font-size: 0.82rem;
  color: var(--smoke);
}

/* —— Cookie CMP —— */
.cookie-banner {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 900;
  background: var(--white);
  border-top: 1px solid var(--stone-deep);
  box-shadow: 0 -8px 32px rgba(26, 31, 28, 0.12);
  padding-block: 1.15rem calc(1.15rem + env(safe-area-inset-bottom, 0px));
  transform: translateY(110%);
  transition: transform 0.45s var(--ease);
}

.cookie-banner.is-visible {
  transform: translateY(0);
}

.cookie-banner[hidden] {
  display: none !important;
}

.cookie-banner__inner {
  display: grid;
  gap: 1rem;
}

@media (min-width: 780px) {
  .cookie-banner__inner {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

.cookie-banner p {
  margin: 0;
  font-size: 0.92rem;
  color: color-mix(in srgb, var(--ink) 80%, var(--smoke));
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.cookie-actions .btn {
  min-width: 7.5rem;
}

.btn--outline {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}

.btn--outline:hover {
  background: var(--stone);
}

.btn--solid {
  background: var(--agave);
  color: var(--white);
}

.btn--solid:hover {
  background: var(--agave-bright);
}

/* —— Legal —— */
.legal-page {
  max-width: 42rem;
  margin: 0 auto;
  padding: 2.5rem var(--space) 4rem;
}

.legal-page h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

.legal-page .updated {
  color: var(--smoke);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.legal-page h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 2rem 0 0.65rem;
}

.legal-page p,
.legal-page li {
  color: color-mix(in srgb, var(--ink) 82%, var(--smoke));
}

.cookie-title {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.35rem;
}

/* CSS-only dismiss: checkbox inside button labels (no scroll jump) */
.consent-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  opacity: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.consent-toggle:focus {
  outline: none;
}

.cookie-actions label {
  position: relative;
  cursor: pointer;
}

body:has(.consent-toggle:checked) .cookie-banner {
  display: none !important;
}

/* —— Sticky mobile buy —— */
.sticky-buy {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: var(--white);
  border-top: 1px solid var(--stone-deep);
  padding-block: 0.75rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
  display: none;
  box-shadow: 0 -6px 24px rgba(26, 31, 28, 0.12);
}

.sticky-buy__inner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.sticky-buy__inner--split .btn {
  flex: 1;
  width: auto;
  padding: 0.75rem 0.5rem;
  font-size: 0.9rem;
  text-align: center;
}

@media (max-width: 899px) {
  body {
    padding-bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
  }

  .sticky-buy.is-on {
    display: block;
  }

  /* While cookie banner open, hide sticky to avoid overlap */
  body:not(:has(.consent-toggle:checked)) .sticky-buy.is-on {
    display: none;
  }

  body:not(:has(.consent-toggle:checked)) {
    padding-bottom: 0;
  }
}

@media (min-width: 900px) {
  .sticky-buy.is-on {
    display: none;
  }
}
