/* Home page only: animations and interactive pieces. Shared basics live in style.css. */

.grad {
  background: linear-gradient(90deg, #ff6a3d, #ffb36b 50%, #ff6a3d);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shine 6s linear infinite;
}
@keyframes shine { to { background-position: -200% 0; } }

/* Top progress bar */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 20; pointer-events: none; }
.progress span { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: var(--accent); }

/* Live meter pill in the nav */
nav .wrap { gap: 16px; }
.meter-pill {
  display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel); font-size: 13px; color: var(--muted);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.meter-pill #meter-value { color: var(--text); font-weight: 600; }
.meter-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(255,106,61,.6); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 7px rgba(255,106,61,0); } 100% { box-shadow: 0 0 0 0 rgba(255,106,61,0); } }
.meter-pill.bump #meter-value { animation: bump .3s ease; }
@keyframes bump { 50% { color: var(--accent); } }
.nav-cta { background: var(--accent); color: #1a0a04 !important; padding: 7px 14px; border-radius: 10px; font-weight: 600; }

/* Hero */
.hero-wrap { position: relative; overflow: hidden; }
.glow {
  position: absolute; width: 720px; height: 720px; right: -160px; top: -120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,106,61,.20), rgba(255,106,61,0) 65%);
  filter: blur(10px); pointer-events: none; will-change: transform;
}
.hero { position: relative; padding-left: 24px; padding-right: 24px; }
html, body { overflow-x: clip; }
.hero > *, .chart-split > *, .calc > * { min-width: 0; }
.btn { display: inline-flex; align-items: center; gap: 8px; transition: transform .2s ease, box-shadow .2s ease, opacity .2s; }
.btn-primary { box-shadow: 0 10px 30px -10px rgba(255,106,61,.6); }
.btn-primary:hover { box-shadow: 0 16px 40px -10px rgba(255,106,61,.8); opacity: 1; }
.btn-ghost:hover { border-color: #3a3a40; }

.phone-stage { perspective: 1200px; justify-self: center; position: relative; }
.phone-tilt { position: relative; transform-style: preserve-3d; transition: transform .25s ease-out; animation: float 7s ease-in-out infinite; }
@keyframes float { 50% { translate: 0 -12px; } }
.phone-tilt .phone { display: block; max-width: 320px; }
.float-card {
  position: absolute; background: rgba(19,19,21,.82); backdrop-filter: blur(12px); border: 1px solid var(--line);
  border-radius: 14px; padding: 10px 14px; display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(0,0,0,.5);
  transform: translateZ(60px); font-size: 13px; color: var(--muted);
}
.fc-num { color: var(--text); font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; }
.fc-1 { left: -70px; top: 22%; animation: float 6s ease-in-out infinite reverse; }
.fc-2 { right: -60px; top: 52%; animation: float 8s ease-in-out infinite; }
.fc-3 { left: -40px; bottom: 8%; flex-direction: row; align-items: center; gap: 8px; color: var(--text); animation: float 9s ease-in-out infinite reverse; }
.badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

.scroll-hint { display: block; width: 26px; height: 42px; border: 2px solid var(--line); border-radius: 14px; margin: -40px auto 40px; position: relative; }
.scroll-hint span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--accent); animation: wheel 1.6s infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* Reveal on scroll */
/* Only hidden once the script is running, so content is never lost if JS fails. */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s cubic-bezier(.2,.7,.2,1) var(--d, 0s), transform .7s cubic-bezier(.2,.7,.2,1) var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }
html:not(.js) .bar::before { transform: none; }

/* Feature cards with cursor spotlight */
.spot { position: relative; overflow: hidden; transition: transform .25s ease, border-color .25s ease; }
.spot::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .3s;
  background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%), rgba(255,106,61,.14), transparent 60%);
}
.spot:hover { transform: translateY(-4px); border-color: #34343a; }
.spot:hover::before { opacity: 1; }
.spot > * { position: relative; }
.ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 14px; background: rgba(255,106,61,.12); color: var(--accent); font-size: 18px; }

/* Marquee */
.marquee { margin-top: 28px; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 10px; width: max-content; animation: marquee 28s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Interactive chart */
section.tight { padding: 56px 0; }
.chart-split { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: center; }
.chart-readout { display: flex; flex-direction: column; }
.chart-readout span { color: var(--muted); font-size: 15px; }
.chart-readout strong { font-size: 54px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; align-items: end; height: 240px; padding-bottom: 26px; }
.bar {
  position: relative; height: 100%; border: 0; background: none; cursor: pointer; padding: 0;
  display: flex; align-items: flex-end;
}
.bar::before {
  content: ""; display: block; width: 100%; height: var(--h); border-radius: 8px; background: #2c2c31;
  transform-origin: bottom; transform: scaleY(0); transition: transform .9s cubic-bezier(.2,.8,.2,1), background .2s;
}
.bars.in .bar::before { transform: scaleY(1); }
.bars.in .bar:nth-child(2)::before { transition-delay: .06s; } .bars.in .bar:nth-child(3)::before { transition-delay: .12s; }
.bars.in .bar:nth-child(4)::before { transition-delay: .18s; } .bars.in .bar:nth-child(5)::before { transition-delay: .24s; }
.bars.in .bar:nth-child(6)::before { transition-delay: .30s; } .bars.in .bar:nth-child(7)::before { transition-delay: .36s; }
.bar:hover::before { background: #3a3a40; }
.bar.active::before { background: var(--accent); }
.bar span { position: absolute; bottom: -24px; left: 0; right: 0; text-align: center; font-size: 12px; color: var(--muted); }
.bar:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 8px; }
.tiny { color: #66666e; font-size: 12px; margin: 10px 0 0; }

/* Horizontal screenshot rail, moved by page scroll */
.rail-section { overflow: hidden; }
.rail { display: flex; gap: 22px; padding: 0 24px; will-change: transform; }
.rail figure { margin: 0; flex: 0 0 auto; width: 240px; }
.rail img { width: 100%; border-radius: 26px; border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(0,0,0,.5); transition: transform .3s ease; }
.rail figure:hover img { transform: translateY(-8px) scale(1.02); }
.rail figcaption { color: var(--muted); font-size: 14px; text-align: center; margin-top: 12px; }

/* Calculator */
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: 24px; overflow: hidden; background: var(--panel); }
.calc-inputs { padding: 32px; display: flex; flex-direction: column; gap: 28px; }
.calc-out { padding: 32px; background: linear-gradient(160deg, rgba(255,106,61,.10), rgba(255,106,61,0) 60%), #0f0f11; border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.field { display: flex; flex-direction: column; gap: 12px; }
.field-top { display: flex; justify-content: space-between; color: var(--muted); font-size: 15px; }
.field-top output { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--accent) var(--fill, 20%), #2c2c31 var(--fill, 20%)); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 4px solid var(--accent); cursor: grab; box-shadow: 0 4px 14px rgba(0,0,0,.4); }
input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 4px solid var(--accent); cursor: grab; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); background: #1a1a1d; border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { border: 0; background: none; color: var(--muted); padding: 10px 6px; border-radius: 9px; font: inherit; font-size: 14px; cursor: pointer; transition: background .2s, color .2s; }
.seg button.on { background: #2a2a2f; color: var(--text); }
.out-big { font-size: clamp(56px, 8vw, 84px); font-weight: 680; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.out-big small { font-size: .4em; color: var(--muted); margin-left: 6px; letter-spacing: 0; }
.out-lbl { color: var(--muted); margin: 6px 0 24px; }
.out-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.out-row div { border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; }
.out-row strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.out-row span { color: var(--muted); font-size: 13px; }
.equiv { color: var(--text); margin-bottom: 24px; min-height: 24px; }
.calc-out .btn { align-self: flex-start; margin-top: auto; }

/* Privacy lists */
.list.check li::before, .list.cross li::before { margin-right: 10px; font-weight: 700; }
.list.check li::before { content: "✓"; color: #4cc38a; }
.list.cross li::before { content: "✕"; color: var(--accent); }

/* Install timeline */
.timeline li { transition-delay: 0s; }
.timeline li::after { content: ""; position: absolute; left: 7px; top: 44px; bottom: -12px; width: 2px; background: linear-gradient(var(--accent), transparent); opacity: .35; }
.timeline li:last-child::after { display: none; }

/* FAQ */
.faq > * { max-width: 780px; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; font-size: 18px; font-weight: 600; display: flex; justify-content: space-between; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 24px; line-height: 1; transition: transform .25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); margin: 0 0 18px; animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(-6px); } }

.final { position: relative; overflow: hidden; }
.final::before { content: ""; position: absolute; inset: -40%; background: conic-gradient(from 0deg, transparent, rgba(255,106,61,.12), transparent 30%); animation: spin 12s linear infinite; }
.final > * { position: relative; }
@keyframes spin { to { transform: rotate(1turn); } }

@media (max-width: 860px) {
  .meter-pill .meter-lbl { display: none; }
  .chart-split, .calc { grid-template-columns: 1fr; }
  .calc-out { border-left: 0; border-top: 1px solid var(--line); }
  .fc-1 { left: -10px; } .fc-2 { right: -10px; } .fc-3 { left: 0; }
  .phone-tilt .phone { max-width: 260px; }
  .rail figure { width: 190px; }
  .glow { width: 480px; height: 480px; right: -200px; }
}
@media (max-width: 480px) {
  .meter-pill { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .bar::before { transform: none; }
}
