/* ============================================================
 * IMPULSE VAULT — enhance.css
 * Styles for the upgraded pieces: 3D hero stage, savings
 * calculator, animated stats, live "Try it" demo, pricing
 * billing toggle. Reuses the brand tokens from style.css.
 * ============================================================ */

/* ---- 3D hero stage (canvas + CSS poster fallback) ---- */
.hero-stage { position: relative; width: min(560px, 92%); height: clamp(300px, 44vw, 460px); margin: 0 auto 30px; display: grid; place-items: center; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .9s var(--ease); }
.hero-poster { position: absolute; margin: 0; transition: opacity .6s var(--ease); }
.hero-stage.has3d .hero-canvas { opacity: 1; }
.hero-stage.has3d .hero-poster { opacity: 0; pointer-events: none; }

/* ---- shared range slider (calculator) ---- */
.calc-controls input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: var(--r-pill); background: linear-gradient(90deg, var(--accent), #b0894a); outline: none; cursor: pointer; }
.calc-controls input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(180deg, #fff4e0, var(--accent)); box-shadow: 0 4px 14px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.6); border: none; }
.calc-controls input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(180deg, #fff4e0, var(--accent)); box-shadow: 0 4px 14px var(--accent-glow); border: none; }
.calc-controls input[type="range"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

/* ---- savings calculator ---- */
.calc { text-align: center; }
.calc-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 18px; text-align: left; margin-top: 8px; align-items: stretch; }
@media (max-width: 760px) { .calc-grid { grid-template-columns: 1fr; } }
.calc-controls { padding: 30px 28px; display: flex; flex-direction: column; gap: 26px; justify-content: center; }
.calc-field { display: block; }
.calc-label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14.5px; color: var(--dim); margin-bottom: 13px; }
.calc-label b { font-family: var(--fmono); font-weight: 500; color: var(--text); font-size: 16.5px; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.calc-fine { color: var(--faint); font-size: 12.5px; line-height: 1.6; margin-top: 2px; }
.calc-readout { padding: 32px 28px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; border-color: var(--accent-glow); position: relative; overflow: hidden; }
.calc-readout::after { content: ''; position: absolute; inset: 0; background: radial-gradient(70% 90% at 50% 0%, rgba(201, 168, 106,0.12), transparent 70%); pointer-events: none; }
.calc-coins { position: relative; width: 86px; height: 108px; }
.coin-glass { position: absolute; inset: 0; border: 1px solid var(--glass-bd); border-top: none; border-radius: 6px 6px 16px 16px; background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01)); box-shadow: inset 0 1px 0 0 var(--glass-hi); }
.coin-fill { position: absolute; left: 3px; right: 3px; bottom: 3px; height: 0; background: linear-gradient(180deg, #e7c892, var(--accent)); border-radius: 4px 4px 13px 13px; box-shadow: 0 0 24px var(--accent-glow), inset 0 2px 0 rgba(255,255,255,0.4); transition: height 1s var(--ease); }
.calc-amount { font-family: var(--fmono); font-weight: 600; font-size: clamp(34px, 7vw, 54px); letter-spacing: -0.02em; color: var(--gold-1); line-height: 1; position: relative; font-variant-numeric: tabular-nums; text-shadow: 0 0 30px var(--accent-glow); }
.calc-sub { color: var(--dim); font-size: 14.5px; max-width: 34ch; position: relative; }
.calc-sub b { color: var(--accent); }

/* ---- animated stat counters ---- */
.stat-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 30px; }
@media (max-width: 600px) { .stat-strip { grid-template-columns: 1fr; } }
.stat { padding: 24px 18px; border: 1px solid var(--glass-bd); border-radius: var(--r-md); background: var(--glass); text-align: center; }
.stat-num { display: block; font-family: var(--fdisp); font-weight: 700; font-size: clamp(26px, 5vw, 38px); color: var(--accent); letter-spacing: -0.02em; line-height: 1; }
.stat-cap { display: block; color: var(--dim); font-size: 13px; margin-top: 8px; }

/* ---- live "Try it" demo ---- */
.tryit { text-align: center; }
.tryit-sub { color: var(--dim); max-width: 54ch; margin: 0 auto 36px; font-size: 16px; }
.tryit-stage { position: relative; display: flex; justify-content: center; perspective: 1200px; min-height: 440px; }
.try-product { width: min(360px, 94%); padding: 22px; text-align: left; transition: transform .5s var(--ease), opacity .5s var(--ease), filter .5s; }
.tp-photo { margin-bottom: 16px; padding: 10px; border-radius: var(--r-md); background: radial-gradient(120% 100% at 50% 0%, rgba(201, 168, 106,0.16), rgba(255,255,255,0.015)); border: 1px solid var(--glass-bd); }
.tp-photo svg { width: 100%; height: 140px; display: block; }
.tp-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.tp-row b { font-family: var(--fdisp); font-size: 16px; }
.tp-price { font-family: var(--fdisp); color: var(--accent); font-weight: 700; font-size: 18px; }
.tp-meta { margin: 6px 0 16px; color: var(--faint); font-size: 13px; }
.demo-open .try-product { opacity: 0.22; transform: scale(0.97) translateY(8px); filter: blur(1px); }

.try-overlay { position: absolute; top: 0; left: 50%; width: min(420px, 94%); padding: 22px; text-align: left; border-radius: var(--r-lg); background: linear-gradient(180deg, rgba(26,20,13,0.95), rgba(10,14,20,0.98)); border: 1px solid var(--glass-bd); box-shadow: 0 30px 80px rgba(0,0,0,0.6), inset 0 1px 0 0 var(--glass-hi), 0 0 70px rgba(201, 168, 106,0.14); opacity: 0; pointer-events: none; transform: translate(-50%, 14px) scale(0.95); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.demo-open .try-overlay { opacity: 1; pointer-events: auto; transform: translate(-50%, -6px) scale(1); }
.to-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.to-score { position: relative; width: 60px; height: 60px; flex: 0 0 auto; }
.to-score svg { width: 60px; height: 60px; transform: rotate(-90deg); }
.to-ring-bg { fill: none; stroke: var(--glass-bd); stroke-width: 6; }
.to-ring { fill: none; stroke: var(--warn); stroke-width: 6; stroke-linecap: round; }
.to-score-num { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.to-score-num b { font-family: var(--fdisp); font-size: 18px; color: var(--text); }
.to-score-num i { font-style: normal; font-size: 8px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 2px; }
.to-title { font-family: var(--fdisp); font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 14px; }
.to-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.try-reset { margin-top: 22px; background: var(--glass); border: 1px solid var(--glass-bd); color: var(--dim); font-family: var(--fbody); font-weight: 600; font-size: 14px; padding: 10px 20px; border-radius: var(--r-pill); cursor: pointer; transition: color .3s, background .3s, transform .3s var(--ease); }
.try-reset:hover { color: var(--text); background: var(--glass-hi); transform: scale(1.04); }
@media (max-width: 460px) { .to-cols { grid-template-columns: 1fr; } }

/* ---- pricing billing toggle ---- */
.bill-toggle { display: inline-flex; gap: 3px; padding: 4px; border-radius: var(--r-pill); background: var(--glass); border: 1px solid var(--glass-bd); margin: 0 auto 30px; }
.bill-toggle button { border: 0; cursor: pointer; font-family: var(--fbody); font-weight: 600; font-size: 13.5px; color: var(--dim); padding: 9px 18px; border-radius: var(--r-pill); background: transparent; transition: color .25s, background .25s; }
.bill-toggle button:hover { color: var(--text); }
.bill-toggle button.on { color: #1a1206; background: linear-gradient(180deg, #e7c892, var(--accent)); box-shadow: 0 4px 14px var(--accent-glow); }

/* ---- dimensional (3D-illustration) product gallery ----
   The card itself tilts in 3D (app.js). Here we give it real depth: the art is
   lifted on translateZ so it parallaxes / pops out of the card as it tilts, and a
   glossy sheen sweeps across on hover. The artwork is volumetric on its own, so it
   still reads as 3D with no tilt (touch devices, reduced-motion). */
.gallery .g-item { overflow: visible; transform-style: preserve-3d; }
.gallery .g-art { position: relative; transform-style: preserve-3d; }
.g-art .g-svg {
  width: 100%; height: 168px; display: block;
  transform: translateZ(34px);
  filter: drop-shadow(0 12px 18px rgba(0,0,0,0.5));
  transition: filter .35s var(--ease);
}
.g-item:hover .g-svg { filter: drop-shadow(0 20px 26px rgba(0,0,0,0.6)); }
.g-glint {
  position: absolute; inset: 0; border-radius: 16px; pointer-events: none;
  transform: translateZ(48px);
  /* matte clay: a soft warm top light, not a glossy sweep */
  background: radial-gradient(62% 48% at 50% 16%, rgba(255,244,222,0.12), transparent 70%);
  opacity: 0; transition: opacity .45s var(--ease);
}
.g-item:hover .g-glint { opacity: 1; }

/* ---- real WebGL product showcase (3d/gallery.js) ----
   One shared canvas overlays the viewport and draws each product into its
   card via scissor. It never blocks interaction (pointer-events:none) and
   only paints inside card rects; everywhere else it's transparent. */
.iv-gallery-canvas {
  position: fixed; left: 0; top: 0; width: 100vw; height: 100vh;
  pointer-events: none; z-index: 4;
}
/* When a card's 3D model is live, fade its clay-SVG poster out (the poster
   stays in the DOM as the graceful fallback). */
.g-art.iv-has3d .g-svg { opacity: 0; transition: opacity .6s var(--ease); }
.g-art.iv-has3d .g-glint { display: none; }

/* No hover (touch) or reduced motion: kill lift/parallax/sheen; flat-on art still
   reads as 3D thanks to its form shading. */
@media (hover: none) {
  .gallery .g-item { transform-style: flat; }
  .g-art .g-svg { transform: none; }
  .g-glint { display: none; }
}

/* ============================================================
 * THE VAULT — accumulation payoff section
 * ============================================================ */
.vaultsec { text-align: center; }
.vault-stage { display: grid; grid-template-columns: 200px 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; padding: clamp(32px, 5vw, 52px); text-align: left; }
/* the vault — a fine-metal safe that fills with gold as you arrive */
.vault-jar { position: relative; width: 168px; height: 210px; margin: 0 auto; justify-self: center; }
.vj-glass { position: absolute; inset: 0; border: 1.5px solid var(--glass-bd); border-radius: 14px 14px 20px 20px; background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.012) 60%, rgba(255,255,255,0.03)); box-shadow: inset 0 1px 0 0 var(--glass-hi), 0 22px 50px rgba(0,0,0,0.45); }
.vj-fill { position: absolute; left: 4px; right: 4px; bottom: 4px; height: 0; border-radius: 6px 6px 16px 16px; overflow: hidden; background: linear-gradient(180deg, var(--gold-1), var(--gold-3) 60%, var(--gold-4)); box-shadow: 0 0 34px var(--accent-glow), inset 0 2px 0 rgba(255,255,255,0.45); transition: height 1.7s var(--ease); }
.vaultsec.in .vj-fill { height: 74%; }
.vj-shimmer { position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,0.5) 50%, transparent 65%); transform: translateX(-120%); }
.vaultsec.in .vj-shimmer { animation: vjShine 2.6s var(--ease) 0.9s 2; }
@keyframes vjShine { to { transform: translateX(120%); } }
.vj-dial { position: absolute; top: 50%; left: 50%; width: 46px; height: 46px; transform: translate(-50%, -50%); border-radius: 50%; border: 2px solid rgba(26,18,6,0.35); background: radial-gradient(circle at 38% 34%, var(--gold-1), var(--gold-4)); box-shadow: inset 0 1px 2px rgba(255,255,255,0.5), 0 2px 6px rgba(0,0,0,0.3); opacity: 0; transition: opacity .6s var(--ease) 1.1s; z-index: 2; }
.vj-dial::after { content: ''; position: absolute; top: 50%; left: 50%; width: 3px; height: 16px; background: rgba(26,18,6,0.55); border-radius: 2px; transform: translate(-50%, -50%) rotate(38deg); }
.vaultsec.in .vj-dial { opacity: 1; }
.vj-slot { position: absolute; top: 16px; left: 50%; width: 40px; height: 5px; transform: translateX(-50%); border-radius: 3px; background: rgba(0,0,0,0.45); box-shadow: inset 0 1px 2px rgba(0,0,0,0.6); }
/* readout */
.vault-eyebrow { display: block; font-size: 12.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 10px; }
.vault-total .stat-num { font-family: var(--fmono); font-weight: 600; font-size: clamp(46px, 9vw, 76px); line-height: 1; letter-spacing: -0.055em; color: var(--gold-1); text-shadow: 0 0 40px var(--accent-glow); font-variant-numeric: tabular-nums; }
.vault-note { color: var(--dim); font-size: 15px; line-height: 1.6; max-width: 42ch; margin-top: 16px; }
.vault-note + .vault-months { margin-top: 26px; }
.vault-months { display: flex; align-items: flex-end; gap: 5px; height: 76px; }
.vmonth { flex: 1; height: calc(20% + var(--i) * 6.8%); border-radius: 3px 3px 1px 1px; background: linear-gradient(180deg, var(--gold-2), var(--gold-4)); transform: scaleY(0); transform-origin: bottom; opacity: 0.85; transition: transform .6s var(--ease); transition-delay: calc(var(--i) * 55ms); }
.vaultsec.in .vmonth { transform: scaleY(1); }
.vmonth:last-child { background: linear-gradient(180deg, var(--gold-1), var(--gold-3)); opacity: 1; box-shadow: 0 0 12px var(--accent-glow); }
.vault-months-cap { display: block; margin-top: 12px; font-size: 12px; color: var(--faint); letter-spacing: 0.02em; }
@media (max-width: 720px) { .vault-stage { grid-template-columns: 1fr; text-align: center; } .vault-jar { width: 140px; height: 178px; } .vault-note { margin-left: auto; margin-right: auto; } }

/* ============================================================
 * VOICES / TRUST — quiet testimonials + verifiable badge row
 * ============================================================ */
.voices-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.voice { padding: 30px 28px 26px; display: flex; flex-direction: column; gap: 18px; position: relative; }
.voice::before { content: '\201C'; position: absolute; top: 6px; left: 20px; font-family: var(--fdisp); font-size: 76px; line-height: 1; color: var(--gold-4); opacity: 0.45; font-variation-settings: 'opsz' 144, 'SOFT' 0, 'wght' 600; }
.voice blockquote { font-size: 16.5px; line-height: 1.62; color: var(--text); position: relative; z-index: 1; }
.voice figcaption { display: flex; flex-direction: column; gap: 2px; margin-top: auto; padding-top: 6px; border-top: 1px solid var(--hairline); }
.voice figcaption b { font-family: var(--fdisp); font-size: 15px; color: var(--gold-2); font-weight: 600; }
.voice figcaption span { font-size: 13px; color: var(--faint); }
/* verifiable badges — the factual backbone under the quotes */
.trust-badges { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 34px auto 0; padding: 0; }
.trust-badge { display: inline-flex; align-items: center; gap: 9px; padding: 10px 16px; border-radius: var(--r-pill); background: var(--glass); border: 1px solid var(--glass-bd); font-size: 13.5px; color: var(--dim); }
.trust-badge .tb-ico { font-size: 14px; color: var(--accent); font-family: var(--fmono); }
@media (max-width: 760px) { .voices-grid { grid-template-columns: 1fr; } }

/* ---- reduced motion: no count-up flashes, no transitions ---- */
@media (prefers-reduced-motion: reduce) {
  .hero-canvas, .coin-fill, .try-overlay, .try-product, .to-ring { transition: none !important; }
  .gallery .g-item { transform-style: flat; }
  .g-art .g-svg { transform: none; transition: none; }
  .g-glint { display: none; }
  .vj-fill, .vmonth, .vj-dial { transition: none !important; }
  .vj-shimmer { animation: none !important; }
}
