/* ==========================================================================
   SCANMADIRA — product page additions (loads after site.css)
   ========================================================================== */

/* --- Hero ------------------------------------------------------------- */

.phero {
  background:
    radial-gradient(70rem 40rem at 78% 42%, rgba(201, 120, 42, .12), transparent 60%),
    var(--ink);
}
.phero__glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(34rem 34rem at 74% 48%, rgba(214, 176, 106, .16), rgba(214, 176, 106, 0) 70%);
  opacity: 0;
  pointer-events: none;
}
html:not(.motion) .phero__glow { opacity: 1; }

.phero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 6rem);
}
.phero__copy { display: flex; flex-direction: column; justify-content: center; }
.phero__title { max-width: 10ch; font-size: clamp(3.4rem, 8vw, 8rem); }

.phero__ctas {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.2rem 2.4rem;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .55rem .95rem;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  color: var(--gold-bright);
  font-size: .64rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  white-space: nowrap;
}
.status i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
  animation: pulse 2.4s ease-in-out infinite;
}

.phero__visual {
  position: relative;
  aspect-ratio: 1 / 1;
  width: min(100%, 560px);
  margin-inline: auto;
  perspective: 1200px;
}
html.motion .phero__visual { opacity: 0; }
.phero__visual .brk { width: 15%; height: 15%; }
.phero__visual .brk--tl { top: 4%; left: 6%; }
.phero__visual .brk--tr { top: 4%; right: 6%; }
.phero__visual .brk--bl { bottom: 4%; left: 6%; }
.phero__visual .brk--br { bottom: 4%; right: 6%; }
.phero__logo {
  position: absolute;
  inset: 4%;
  width: 92%;
  height: 92%;
  object-fit: contain;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, .6));
}
.phero__beam { left: 12%; right: 12%; top: 12%; }

/* --- How it works ------------------------------------------------------- */

.how {
  position: relative;
  padding: clamp(6rem, 14vh, 11rem) 0 clamp(5rem, 12vh, 9rem);
  background: var(--ink-2);
  border-top: 1px solid var(--line);
}
.how__head { margin-bottom: clamp(3rem, 8vh, 6rem); }
.how__head h2 {
  margin-top: 1.4rem;
  font-size: clamp(2.8rem, 6vw, 6.4rem);
  line-height: .96;
  max-width: 14ch;
}

.how__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 7rem);
  align-items: start;
}
.how__stage-wrap {
  position: sticky;
  top: calc(var(--nav-h) + 2vh);
}
.pstage {
  aspect-ratio: 1 / 1.05;
  max-height: calc(100svh - var(--nav-h) - 6vh);
}
html:not(.motion) .pstage { --glow: 1; }

/* State machine driven by scroll: 0 idle, 1 scanning, 2 discovered, 3 compared */
.ptag { transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
html.motion .pstage[data-state="2"] .tag--id,
html.motion .pstage[data-state="2"] .tag--age,
html.motion .pstage[data-state="2"] .tag--prof,
html.motion .pstage[data-state="3"] .tag--id,
html.motion .pstage[data-state="3"] .tag--age,
html.motion .pstage[data-state="3"] .tag--prof,
html.motion .pstage[data-state="3"] .tag--cmp { opacity: 1; transform: none; }
html.motion .pstage[data-state="3"] .tag--id,
html.motion .pstage[data-state="3"] .tag--age { opacity: .45; }
html.motion .pstage[data-state="2"] .tag--cmp { opacity: 0; }

.pstage .pradar { transition: stroke-dashoffset 1.4s var(--ease-io) .2s; }
html.motion .pstage[data-state="2"] .pradar,
html.motion .pstage[data-state="3"] .pradar { stroke-dashoffset: 0; }

html.motion .pbottle { opacity: 1; transform: translate(-50%, -50%); }

.pbeam { opacity: 0; transition: opacity .6s ease; }
html.motion .pstage[data-state="1"] .pbeam {
  opacity: 1;
  animation: pscan 2.6s var(--ease-io) infinite;
}
@keyframes pscan {
  0% { top: 12%; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 88%; opacity: 0; }
}

.pstage .cmp .best b, .pstage .cmp .best { transition: color .6s ease; }

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
}
.step {
  position: relative;
  min-height: 70svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 0 2rem 3.8rem;
  border-top: 1px solid var(--line);
}
.step:first-child { border-top: 0; min-height: 60svh; }
.step__num {
  position: absolute;
  left: 0;
  top: calc(50% - .5em);
  color: var(--gold);
}
.step h3 {
  font-size: clamp(2rem, 3.4vw, 3.4rem);
  line-height: 1;
  margin-bottom: 1.2rem;
}
.step p {
  margin: 0;
  max-width: 36rem;
  color: var(--ivory-2);
  font-size: clamp(.98rem, 1.05vw, 1.08rem);
}
html.motion .step h3, html.motion .step p { opacity: .28; transition: opacity .8s ease; }
html.motion .step.is-on h3, html.motion .step.is-on p { opacity: 1; }
html.motion .step .step__num { opacity: .4; transition: opacity .8s ease; }
html.motion .step.is-on .step__num { opacity: 1; }

/* --- What a scan reveals ------------------------------------------------ */

.detail {
  position: relative;
  padding: clamp(6rem, 14vh, 11rem) 0;
  background:
    radial-gradient(60rem 30rem at 10% 10%, rgba(201, 120, 42, .06), transparent 60%),
    var(--ink);
  border-top: 1px solid var(--line);
}
.detail__grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(2.5rem, 6vw, 7rem);
  align-items: start;
}
.detail h2 {
  margin-top: 1.4rem;
  font-size: clamp(2.8rem, 5.4vw, 5.6rem);
  line-height: .96;
}
.detail__lede {
  max-width: 34rem;
  margin: 1.8rem 0 0;
  color: var(--ivory-2);
}
.index--two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 2.5rem;
}
.index--two li { grid-template-columns: 2.4rem minmax(0, 1fr); padding: 1.3rem 0; }
.index--two li:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }
.index--two h3 { font-size: clamp(1.4rem, 1.9vw, 1.9rem); }
.index--two p { font-size: .9rem; }

/* --- Spirits band --------------------------------------------------------- */

.band {
  position: relative;
  padding: clamp(5rem, 12vh, 9rem) 0;
  border-top: 1px solid var(--line);
  background: var(--ink-2);
  overflow: hidden;
}
.band .eyebrow { margin-bottom: 2rem; }
.band__track {
  display: flex;
  width: max-content;
  will-change: transform;
}
html.motion .band__track { animation: band 46s linear infinite; }
@media (hover: hover) { html.motion .band__track:hover { animation-play-state: paused; } }
@keyframes band { to { transform: translateX(-50%); } }
.band__row {
  display: flex;
  align-items: center;
  gap: 2.6rem;
  padding-right: 2.6rem;
  font-family: var(--serif);
  font-size: clamp(3rem, 8vw, 8rem);
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--ivory);
  white-space: nowrap;
}
.band__row span:nth-child(4n+1) { color: var(--gold-bright); font-style: italic; }
.band__row i {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold);
  opacity: .7;
  flex: 0 0 auto;
}
html:not(.motion) .band__track { flex-wrap: wrap; width: 100%; }
html:not(.motion) .band__row { flex-wrap: wrap; white-space: normal; padding-inline: var(--gutter); }
html:not(.motion) .band__row:last-child { display: none; }
.band__note {
  margin: 2.4rem auto 0;
  max-width: 44rem;
  color: var(--muted);
}

/* --- The idea ------------------------------------------------------------- */

.idea {
  position: relative;
  padding: clamp(6rem, 14vh, 11rem) 0;
  background: var(--ink);
  border-top: 1px solid var(--line);
}
.idea h2 { font-size: clamp(2.8rem, 6vw, 6.4rem); line-height: .96; }
.idea p { max-width: 34rem; margin: 1.6rem 0 0; color: var(--ivory-2); }
.idea p + p { margin-top: 1rem; }

/* --- Status ---------------------------------------------------------------- */

.status-sec {
  position: relative;
  padding: clamp(5rem, 12vh, 9rem) 0;
  background: var(--ink-2);
  border-top: 1px solid var(--line);
}
.status-sec h2 { max-width: 16ch; }
.status-sec__board {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.6rem;
  color: var(--muted);
}
.status-sec__sep { width: 40px; height: 1px; background: var(--line-strong); }
.status-sec__val { color: var(--gold-bright); }
.status-sec h2 { font-size: clamp(2.6rem, 5.4vw, 5.4rem); line-height: .96; }
.status-sec p { max-width: 40rem; margin: 1.6rem 0 0; color: var(--ivory-2); }
.status-sec .cta { margin-top: 2rem; }

/* --- Legal links in contact ------------------------------------------------ */

.legal-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.2rem 2rem;
  margin-top: 3rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}
.legal-links a {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--ivory-2);
  transition: color .4s ease;
}
.legal-links a:hover { color: var(--gold-bright); }
.legal-links a span { font-size: .9rem; color: var(--gold); }

/* --- Responsive ------------------------------------------------------------ */

@media (max-width: 1100px) {
  .index--two { grid-template-columns: 1fr; }
  .index--two li:nth-last-child(-n+2) { border-bottom: 0; }
  .index--two li:last-child { border-bottom: 1px solid var(--line); }
}

@media (max-width: 860px) {
  .phero__grid { grid-template-columns: 1fr; gap: 1rem; }
  .phero__visual { order: -1; width: min(72vw, 360px); margin: 1rem auto 0; }
  .phero__title { font-size: clamp(3rem, 12.5vw, 5rem); }
  .hero__content.phero__grid { justify-content: flex-start; padding-top: calc(var(--nav-h) + 1vh); }
  .phero__glow { background: radial-gradient(22rem 22rem at 50% 28%, rgba(214, 176, 106, .16), rgba(214, 176, 106, 0) 70%); }

  .how__grid { grid-template-columns: 1fr; gap: 2rem; }
  .how__stage-wrap { position: relative; top: auto; }
  .pstage { max-width: 520px; margin-inline: auto; aspect-ratio: 1 / 1.25; max-height: none; }
  .step { min-height: 0; padding: 2.2rem 0 2.2rem 3rem; justify-content: flex-start; }
  .step:first-child { min-height: 0; border-top: 1px solid var(--line); }
  .step__num { top: 2.6rem; }
  .pstage .tag--cmp { top: 52%; }
  html.motion .step h3, html.motion .step p, html.motion .step .step__num { opacity: 1; }

  .detail__grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .band__row { gap: 1.6rem; padding-right: 1.6rem; }
}

@media (max-width: 480px) {
  .phero__title { font-size: clamp(2.7rem, 13vw, 3.6rem); }
  .phero__ctas { gap: 1rem 1.4rem; }
  .how__head h2 { font-size: clamp(2.5rem, 12vw, 3.6rem); }
  .step h3 { font-size: clamp(1.7rem, 8vw, 2.3rem); }
  .detail h2, .idea h2, .status-sec h2 { font-size: clamp(2.4rem, 11vw, 3.4rem); }
  .index--two li { grid-template-columns: 2.2rem minmax(0, 1fr); }
}

/* ==========================================================================
   LEGAL PAGES (privacy, terms)
   ========================================================================== */

.legal {
  position: relative;
  padding: calc(var(--nav-h) + clamp(3rem, 8vh, 6rem)) 0 clamp(5rem, 12vh, 9rem);
  background:
    radial-gradient(60rem 30rem at 85% 0%, rgba(201, 120, 42, .07), transparent 60%),
    var(--ink);
}
.legal .wrap { max-width: 52rem; }
.legal h1 {
  margin: 1.4rem 0 1rem;
  font-size: clamp(3rem, 7vw, 6.4rem);
  line-height: .96;
}
.legal .meta {
  margin: 0 0 2.4rem;
  color: var(--muted);
  font-size: .78rem;
  letter-spacing: .08em;
}
.legal .lede {
  margin: 0 0 3rem;
  padding-bottom: 2.4rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  line-height: 1.4;
  color: var(--ivory);
}
.legal h2 {
  margin: 3rem 0 1rem;
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  line-height: 1.05;
}
.legal h3 {
  margin: 2rem 0 .6rem;
  font-size: clamp(1.35rem, 2vw, 1.6rem);
  line-height: 1.15;
  color: var(--gold-bright);
}
.legal p, .legal li { color: var(--ivory-2); font-size: 1rem; line-height: 1.75; }
.legal p { margin: 0 0 1.1rem; }
.legal ul { margin: 0 0 1.4rem; padding-left: 1.3rem; }
.legal li { margin-bottom: .4rem; }
.legal a { color: var(--gold-bright); border-bottom: 1px solid var(--line-strong); }
.legal a:hover { border-color: var(--gold-bright); }
.legal code { font-family: ui-monospace, monospace; font-size: .9em; color: var(--gold); }
