/* ---------- Interactive layer (appended after style.css) ---------- */
.progress { position: fixed; z-index: 60; left: 0; right: 0; top: 0; height: 3px; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(var(--p, 0)); }
.spot { --mx: 70%; --my: 40%; }
.spot::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(420px circle at var(--mx) var(--my), color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%); }
.approach { position: relative; isolation: isolate; overflow: hidden; }

button.phone { display: block; padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; text-align: center; }
.rotator { display: inline-block; color: var(--accent); }
.rot-word { display: inline-block; transition: opacity 350ms var(--ease), transform 350ms var(--ease); }
.rot-word.out { opacity: 0; transform: translateY(-0.3em); }
.rot-word.in { opacity: 0; transform: translateY(0.3em); transition: none; }

.fan { transition: transform 400ms var(--ease); transform: perspective(1200px) rotateY(var(--ry, 0deg)) rotateX(var(--rx, 0deg)); }
.fan-phone img { transition: transform 300ms var(--ease); }
.fan-phone:hover img { transform: translateY(-10px) scale(1.03); }
.tap-hint { position: absolute; z-index: 4; left: 50%; bottom: 0; translate: -50% 0; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); font-size: 14px; font-weight: 600; color: rgba(255, 255, 255, .9); white-space: nowrap; }
.tap-hint svg { width: 16px; height: 16px; color: var(--accent); }
.toast { position: absolute; z-index: 4; left: -4%; bottom: 14%; display: flex; align-items: center; gap: 12px; padding: 10px 16px 10px 10px; border-radius: 18px; background: rgba(20, 20, 20, .82); box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255, 255, 255, .1); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: #fff; width: 250px; }
.toast > * { transition: opacity 300ms var(--ease), transform 300ms var(--ease); }
.toast.swap > * { opacity: 0; transform: translateY(6px); }
.toast img { width: 44px; height: 56px; border-radius: 10px; object-fit: cover; }
.toast-top { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--lime); font-weight: 600; }
.toast-top .live-dot { width: 7px; height: 7px; }
.toast-title { font-weight: 700; font-size: 15px; line-height: 1.25; }
.toast-text { font-size: 13px; color: rgba(255, 255, 255, .75); line-height: 1.3; }

.reel-btn { position: relative; }
.reel-btn img { transition: transform 300ms var(--ease); }
.reel-btn:hover img { transform: scale(1.03); }
.reel-play { position: absolute; left: 50%; top: 42%; translate: -50% -50%; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .92); color: var(--ink); opacity: 0; transform: scale(.8); transition: opacity 250ms var(--ease), transform 250ms var(--ease); box-shadow: var(--shadow-md); }
.reel-play svg { width: 24px; height: 24px; }
.reel-btn:hover .reel-play, .reel-btn:focus-visible .reel-play { opacity: 1; transform: none; }
@media (hover: none) { .reel-play { opacity: 1; transform: scale(.85); } }
.reel-cap { display: block; margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--muted); }
.case:first-child .reel-cap { color: rgba(255, 255, 255, .66); }
.cv-btn { margin-top: 28px; }
.pill-white { background: #fff; color: var(--ink); }

/* Results: chart + planner */
.results { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 12px; align-items: stretch; }
.chart-card { padding: clamp(22px, 3vw, 36px); border-radius: var(--r-xl); background: var(--card); box-shadow: var(--shadow-md); display: flex; flex-direction: column; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 5px; border-radius: 999px; background: var(--bg); align-self: flex-start; }
.tabs button { font: inherit; font-size: 15px; font-weight: 600; border: 0; background: none; color: var(--body); padding: 9px 16px; border-radius: 999px; cursor: pointer; transition: background-color 200ms var(--ease), color 200ms var(--ease); }
.tabs button[aria-selected="true"] { background: var(--ink); color: #fff; }
.bars { display: grid; gap: 22px; margin: 36px 0 24px; flex: 1; align-content: center; }
.bars li { display: grid; grid-template-columns: 170px minmax(0, 1fr) 84px; align-items: center; gap: 16px; }
.bar-name { font-weight: 700; font-size: 16px; line-height: 1.25; }
.bar-track { height: 44px; border-radius: 12px; background: var(--bg); overflow: hidden; }
.bar-fill { display: block; height: 100%; width: var(--w, 0%); border-radius: 12px; background: var(--ink); transition: width 900ms var(--ease), background-color 300ms var(--ease); }
.bars li.top .bar-fill { background: var(--accent); }
.bar-val { font-weight: 800; font-size: 22px; letter-spacing: -0.03em; text-align: right; font-variant-numeric: tabular-nums; }
.chart-note { font-size: 15px; color: var(--muted); }
.planner { padding: clamp(22px, 3vw, 36px); border-radius: var(--r-xl); background: var(--deep); color: #fff; display: grid; gap: 18px; align-content: start; }
.planner h3 { font-size: 26px; font-weight: 800; }
.planner-sub { color: rgba(255, 255, 255, .75); margin-top: -10px; }
.seg { border: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; border-radius: 16px; background: var(--deep-2); min-width: 0; }
.seg legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: block; text-align: center; padding: 11px 8px; border-radius: 12px; font-weight: 600; font-size: 15px; color: rgba(255, 255, 255, .78); transition: background-color 200ms var(--ease), color 200ms var(--ease); }
.seg input:checked + span { background: var(--accent); color: var(--ink); }
.seg input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.range { display: grid; gap: 10px; font-weight: 600; font-size: 15px; }
.range > span { display: flex; justify-content: space-between; align-items: baseline; }
.range output { color: var(--accent); font-weight: 800; font-size: 20px; }
.range input { width: 100%; accent-color: var(--accent); height: 28px; cursor: pointer; margin: 0; }
.p-out { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.p-out div { padding: 14px 16px; border-radius: 16px; background: var(--deep-2); display: grid; }
.p-out span { font-size: 13px; color: rgba(255, 255, 255, .7); font-weight: 500; }
.p-out strong { font-size: clamp(28px, 1.3rem + 1vw, 38px); font-weight: 800; letter-spacing: -0.04em; color: var(--accent); line-height: 1.15; font-variant-numeric: tabular-nums; }
.p-note { font-size: 13px; color: rgba(255, 255, 255, .66); }

/* Logo wall */
.logo-wall { margin-top: 16px; display: grid; gap: 12px; padding: 20px 0; border-radius: var(--r-xl); background: var(--card); box-shadow: var(--shadow-md); overflow: hidden; }
.logo-row { display: flex; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.logo-track { display: flex; flex: none; gap: 12px; padding-right: 12px; animation: marquee 50s linear infinite; }
.logo-row.rev .logo-track { animation-direction: reverse; animation-duration: 58s; }
.logo-row:hover .logo-track, .logo-wall.paused .logo-track { animation-play-state: paused; }
.logo-tile { width: 168px; height: 84px; flex: none; border-radius: 18px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); display: grid; place-items: center; padding: 10px 14px; overflow: hidden; transition: transform 250ms var(--ease), box-shadow 250ms var(--ease); }
.logo-tile.dark { background: #0b0b0b; box-shadow: none; }
.logo-tile img { max-width: 100%; max-height: 60px; object-fit: contain; filter: grayscale(1); opacity: .8; transition: filter 300ms var(--ease), opacity 300ms var(--ease); }
.logo-tile.dark { padding: 4px; }
.logo-tile.dark img { opacity: .92; max-height: 100%; }
.logo-tile:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 2px var(--accent); }
.logo-tile:hover img { filter: none; opacity: 1; }

/* Reel viewer */
.viewer { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: rgba(8, 8, 8, .92); padding: 16px; }
.viewer[hidden] { display: none; }
.v-frame { position: relative; width: min(420px, 100%, calc((100svh - 32px) * 9 / 16)); aspect-ratio: 9 / 16; border-radius: 24px; overflow: hidden; background: #111; box-shadow: var(--shadow-lg); animation: pop 300ms var(--ease); }
@keyframes pop { from { transform: scale(.94); opacity: 0; } }
.v-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.v-frame::before, .v-frame::after { content: ""; position: absolute; left: 0; right: 0; z-index: 1; pointer-events: none; }
.v-frame::before { top: 0; height: 120px; background: linear-gradient(rgba(0, 0, 0, .6), transparent); }
.v-frame::after { bottom: 0; height: 110px; background: linear-gradient(transparent, rgba(0, 0, 0, .6)); }
.v-bars { position: absolute; z-index: 3; top: 10px; left: 10px; right: 10px; display: flex; gap: 4px; }
.v-bars span { flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .35); overflow: hidden; }
.v-bars span i { display: block; height: 100%; background: #fff; transform-origin: left; transform: scaleX(0); }
.v-bars span.done i { transform: scaleX(1); }
.v-head { position: absolute; z-index: 3; top: 22px; left: 12px; right: 8px; display: flex; align-items: center; gap: 10px; color: #fff; }
.v-head img { width: 36px; height: 36px; border-radius: 50%; box-shadow: 0 0 0 2px var(--accent); }
.v-head > div { flex: 1; min-width: 0; }
.v-title { font-weight: 700; font-size: 15px; line-height: 1.2; }
.v-sub { font-size: 13px; color: rgba(255, 255, 255, .85); line-height: 1.3; }
.v-close { width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; display: grid; place-items: center; cursor: pointer; }
.v-close svg { width: 22px; height: 22px; }
.v-nav { position: absolute; z-index: 2; top: 80px; bottom: 70px; width: 40%; border: 0; background: none; cursor: pointer; }
.v-prev { left: 0; } .v-next { right: 0; }
.v-foot { position: absolute; z-index: 3; left: 16px; right: 12px; bottom: 14px; display: flex; align-items: center; justify-content: space-between; color: #fff; font-weight: 700; font-size: 15px; }
.v-like { width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; display: grid; place-items: center; cursor: pointer; transition: transform 200ms var(--ease); }
.v-like svg { width: 24px; height: 24px; }
.v-like[aria-pressed="true"] { color: #ff3b5c; background: #fff; }
.v-like:active { transform: scale(.85); }
.v-heart { position: absolute; z-index: 2; left: 50%; top: 50%; width: 110px; height: 110px; translate: -50% -50%; color: #fff; opacity: 0; pointer-events: none; filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .4)); }
.v-heart svg { width: 100%; height: 100%; }
.v-heart.burst { animation: burst 800ms var(--ease); }
.v-heart.still { opacity: 1; }
@keyframes burst { 0% { opacity: 0; transform: scale(.3); } 20% { opacity: 1; transform: scale(1.15); } 40% { transform: scale(.95); } 70% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.1) translateY(-20px); } }

/* Responsive */
@media (max-width: 1080px) {
  .results { grid-template-columns: 1fr; }
  .toast { left: 0; bottom: 18%; }
}
@media (max-width: 760px) {
  .toast, .tap-hint { display: none; }
  .bars li { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
  .bar-name { grid-column: 1 / -1; font-size: 15px; }
  .bar-track { height: 32px; }
  .bar-val { font-size: 19px; }
  .tabs { border-radius: 18px; }
  .tabs button { padding: 8px 12px; font-size: 14px; }
  .logo-tile { width: 132px; height: 70px; }
  .logo-tile img { max-height: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  .logo-wall { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding: 20px; }
  .logo-row, .logo-track { display: contents; }
  .logo-track[aria-hidden] { display: none; }
  .logo-tile img { filter: none; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) and (max-width: 760px) {
  .logo-wall { gap: 8px; padding: 14px; }
  .logo-tile { width: calc((100% - 16px) / 3); height: 64px; padding: 8px; border-radius: 14px; }
  .logo-tile img { max-height: 44px; }
}

/* ---------- Reel links (verify on Instagram / YouTube) ---------- */
.reel-item { display: grid; gap: 10px; align-content: start; min-width: 0; }
.reel-link { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 6px 10px; border-radius: 999px; background: var(--bg); color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 700; white-space: nowrap; transition: background-color 200ms var(--ease), color 200ms var(--ease), transform 200ms var(--ease); }
.reel-link svg { width: 16px; height: 16px; }
.reel-link svg:last-child { width: 13px; height: 13px; opacity: .6; }
.reel-link:hover { background: var(--accent); transform: translateY(-2px); }
.reel-link span { overflow: hidden; text-overflow: ellipsis; }
.reel-link.is-off { flex-direction: column; gap: 0; background: transparent; box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); font-weight: 600; line-height: 1.2; }
.reel-link.is-off small { font-size: 12px; font-weight: 500; }
.case:first-child .reel-link { background: var(--deep-2); color: #fff; }
.case:first-child .reel-link:hover { background: var(--accent); color: var(--ink); }

/* Viewer: open-on-platform button */
.v-foot { bottom: 76px; }
.v-nav { bottom: 130px; }
.v-frame::after { height: 190px; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); }
.v-open { position: absolute; z-index: 3; left: 12px; right: 12px; bottom: 12px; min-height: 52px; display: flex; align-items: center; justify-content: center; gap: 10px; border-radius: 999px; background: #fff; color: var(--ink); font-weight: 800; font-size: 16px; text-decoration: none; transition: transform 200ms var(--ease), background-color 200ms var(--ease); }
.v-open:hover { background: var(--accent); transform: translateY(-2px); }
.v-open svg { width: 20px; height: 20px; }
.v-open > svg:last-child { width: 16px; height: 16px; opacity: .6; }
.v-open-ico { display: grid; }
.v-open[hidden] { display: none; }
.v-nolink { position: absolute; z-index: 3; left: 12px; right: 12px; bottom: 12px; min-height: 52px; display: grid; place-items: center; border-radius: 999px; background: rgba(255, 255, 255, .14); color: #fff; font-size: 14px; font-weight: 600; }
.v-nolink[hidden] { display: none; }

/* ---------- Phone polish ---------- */
@media (max-width: 760px) {
  .viewer { padding: 0; background: #000; }
  .v-frame { width: 100vw; height: 100svh; aspect-ratio: auto; border-radius: 0; }
  .v-img { object-fit: contain; background: #000; }
  .v-head { top: calc(22px + env(safe-area-inset-top)); }
  .v-open, .v-nolink { bottom: calc(14px + env(safe-area-inset-bottom)); left: 16px; right: 16px; }
  .v-foot { bottom: calc(78px + env(safe-area-inset-bottom)); }
  .tabs { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .tabs button { text-align: center; }
  .reel-link { min-height: 44px; font-size: 13px; }
  .case-reels { padding-bottom: 12px; }
  .hero-stage { height: 330px; }
  .hero-actions { margin-top: 26px; gap: 10px; }
  .case h3 { font-size: 30px; }
  .case-note { margin-top: 12px; }
  .case-stats { margin-top: 20px; }
  .case-stats dd { font-size: 24px; }
  .float-wa { width: 52px; height: 52px; }
  .float-wa svg { width: 26px; height: 26px; }
  .results .planner .pill { width: 100%; }
}
