﻿/* TrueFaceScore: calm, precise, honest. Mobile-first. */
:root {
  --ink: #0f1424;
  --ink-2: #4a5169;
  --ink-3: #636a80; /* 5:1 on --bg (was #7d849c, 3.5:1, below WCAG AA for small text) */
  --bg: #f5f6fb;
  --bg-2: #eceef7;
  --card: #ffffff;
  --line: #e2e5ef;
  --brand: #4f46e5;
  --brand-2: #6d5dfc;
  --brand-soft: #ecebff;
  --mint: #10b48a;
  --mint-soft: #dcf6ee;
  --sky: #2f80ed;
  --amber: #f5a524;
  --amber-soft: #fff1d6;
  --coral: #e5484d;
  --coral-soft: #ffe7e7;
  --grad: linear-gradient(120deg, #19c79b 0%, #2f80ed 52%, #7c5cff 100%);
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 1px 2px rgba(15, 20, 36, .05), 0 10px 28px rgba(15, 20, 36, .07);
  --shadow-lg: 0 2px 6px rgba(15, 20, 36, .06), 0 28px 64px rgba(47, 52, 140, .18);
  --font-head: 'Sora', 'Inter', system-ui, sans-serif;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --max: 1120px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.5; font-size: 16px; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: var(--brand); }
h1, h2, h3, h4 { text-wrap: balance; font-family: var(--font-head); line-height: 1.1; margin: 0 0 .4em; letter-spacing: -.025em; }
h1 { font-size: clamp(2.2rem, 9vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 6.4vw, 2.7rem); font-weight: 800; }
h3 { font-size: 1.18rem; font-weight: 700; letter-spacing: -.015em; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--ink-2); }
.small { font-size: .94rem; }
.tiny { font-size: .82rem; color: var(--ink-3); }
.center { text-align: center; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 8px; }

/* Buttons */
.btn { appearance: none; border: 0; cursor: pointer; font: 700 1.05rem/1 var(--font); display: inline-flex; align-items: center; justify-content: center; gap: .55em; min-height: 56px; padding: 0 26px; border-radius: 999px; text-decoration: none; transition: transform .15s ease, box-shadow .2s ease, background .2s, opacity .2s; -webkit-tap-highlight-color: transparent; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--ink); color: #fff; box-shadow: 0 10px 26px rgba(15, 20, 36, .28), inset 0 1px 0 rgba(255,255,255,.12); position: relative; isolation: isolate; }
.btn-primary::before { content: ''; position: absolute; inset: -2px; border-radius: inherit; background: var(--grad); z-index: -1; opacity: 0; transition: opacity .25s; filter: blur(10px); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-primary:hover::before { opacity: .55; }
.btn-grad { background: var(--grad); color: #fff; box-shadow: 0 12px 28px rgba(47, 128, 237, .35); text-shadow: 0 1px 1px rgba(0,0,0,.12); }
.btn-grad:hover { transform: translateY(-1px); box-shadow: 0 16px 34px rgba(47, 128, 237, .42); }
.btn-ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-soft { background: var(--brand-soft); color: var(--brand); }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: .92rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.btn .arrow { transition: transform .2s; }
.btn:hover .arrow { transform: translateX(3px); }
.shine { position: relative; overflow: hidden; }
.shine::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.3) 50%, transparent 70%); transform: translateX(-100%); animation: shine 3.4s ease-in-out infinite 1.2s; border-radius: inherit; }
@keyframes shine { 0%, 60% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

/* Nav */
.nav { position: sticky; top: 0; z-index: 30; background: rgba(245, 246, 251, .84); backdrop-filter: saturate(1.5) blur(14px); -webkit-backdrop-filter: saturate(1.5) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.nav.scrolled { border-bottom-color: var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.logo { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; font: 800 1.12rem var(--font-head); color: var(--ink); text-decoration: none; letter-spacing: -.03em; }
.logo svg { width: 32px; height: 32px; flex: none; }
.logo b { font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a.link { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .95rem; padding: 10px 12px; border-radius: 10px; min-height: 44px; display: inline-flex; align-items: center; }
.nav-links a.link:hover { color: var(--ink); background: var(--bg-2); }
.nav-links .hide-m { display: none !important; }
@media (min-width: 760px) { .nav-links .hide-m { display: inline-flex !important; } }

/* Cards & chips */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid rgba(15, 20, 36, .04); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--brand-soft); color: var(--brand); }
.chip.mint { background: var(--mint-soft); color: #0a6f55; }
.chip.amber { background: var(--amber-soft); color: #8a5800; }
.chip.coral { background: var(--coral-soft); color: #b42318; }
.chip.dark { background: var(--ink); color: #fff; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: .76rem; text-transform: uppercase; letter-spacing: .12em; color: var(--brand); margin-bottom: 12px; }

/* Score ring + bars (shared by demo, teaser, dashboard) */
.ring { position: relative; width: 168px; height: 168px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .track { stroke: var(--bg-2); }
.ring .val { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring .val b { font: 800 3rem/1 var(--font-head); letter-spacing: -.04em; }
.ring .val small { font-weight: 700; color: var(--ink-3); font-size: .82rem; margin-top: 4px; }
.ring.dark .track { stroke: rgba(255,255,255,.1); }
.ring.dark .val small { color: #a9b0cf; }
.bars { display: grid; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; }
.bar-row .lb { font-weight: 700; font-size: .92rem; }
.bar-row .sc { font: 800 .98rem var(--font-head); }
.bar-row .tr { grid-column: 1 / -1; height: 9px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.bar-row .tr i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--grad); transition: width 1.1s cubic-bezier(.2,.7,.2,1); }
.bar-row .nt { grid-column: 1 / -1; font-size: .86rem; color: var(--ink-2); margin-top: -2px; }

/* Locked / blurred content */
.locked { position: relative; }
.locked .blur { filter: blur(7px); user-select: none; pointer-events: none; }
.lock-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--ink); color: #fff; font-weight: 700; font-size: .78rem; padding: 6px 10px; border-radius: 999px; }
.lock-badge svg { width: 14px; height: 14px; }

/* Reveal */
[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
[data-reveal].in { opacity: 1; transform: none; }
[data-reveal][data-delay="1"] { transition-delay: .08s; }
[data-reveal][data-delay="2"] { transition-delay: .16s; }
[data-reveal][data-delay="3"] { transition-delay: .24s; }

/* Forms */
.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 6px; }
.input { width: 100%; min-height: 52px; padding: 0 16px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; font: 500 1rem var(--font); color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.input:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(79, 70, 229, .15); }
.err { color: var(--coral); font-weight: 600; font-size: .9rem; min-height: 1.2em; margin: 4px 0 10px; }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: .92rem; font-weight: 600; color: var(--ink-2); padding: 10px 0; min-height: 44px; }
.check input { appearance: none; width: 24px; height: 24px; border-radius: 7px; border: 2px solid #c8cddc; flex: none; margin: 0; display: grid; place-items: center; cursor: pointer; transition: all .15s; background: #fff; }
.check input:checked { background: var(--ink); border-color: var(--ink); }
.check input:checked::after { content: ''; width: 10px; height: 6px; border: 3px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.check input:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

/* Upload drop zone */
.drop { display: block; position: relative; border: 2px dashed #c4c9e0; background: #fbfbff; border-radius: 22px; padding: 22px 16px; text-align: center; cursor: pointer; transition: all .2s; }
.drop:hover, .drop.over { border-color: var(--brand); background: var(--brand-soft); }
.drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.drop .ic { width: 58px; height: 58px; border-radius: 18px; background: var(--ink); color: #fff; display: grid; place-items: center; margin: 0 auto 10px; box-shadow: 0 10px 24px rgba(15,20,36,.25); }
.drop .ic svg { width: 28px; height: 28px; }
.drop h3 { margin-bottom: 2px; }
.drop.has { padding: 12px; border-style: solid; border-color: var(--line); background: #fff; }
.drop .pv { display: flex; align-items: center; gap: 14px; text-align: left; }
.drop .pv img { width: 72px; height: 88px; object-fit: cover; border-radius: 14px; flex: none; }
.drop.disabled { opacity: .5; pointer-events: none; }
.privacy-line { display: flex; gap: 8px; align-items: center; justify-content: center; font-size: .82rem; color: var(--ink-2); margin-top: 12px; font-weight: 600; text-align: left; }
.privacy-line svg { width: 16px; height: 16px; color: var(--mint); flex: none; }

/* Scanning animation */
.scanning { position: relative; width: 210px; height: 260px; margin: 0 auto; border-radius: 28px; overflow: hidden; background: #0f1424; box-shadow: var(--shadow-lg); }
.scanning img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.scanning::after { content: ''; position: absolute; left: 0; right: 0; height: 70px; top: -70px; background: linear-gradient(180deg, transparent, rgba(25, 199, 155, .55), transparent); animation: sweep 1.8s ease-in-out infinite; }
.scanning .grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px); background-size: 26px 26px; }
@keyframes sweep { 0% { top: -70px; } 100% { top: 100%; } }
.steps-live { list-style: none; padding: 0; margin: 18px auto 0; max-width: 320px; display: grid; gap: 10px; text-align: left; }
.steps-live li { display: flex; gap: 10px; align-items: center; font-weight: 600; color: var(--ink-3); transition: color .3s; font-size: .95rem; }
.steps-live li .d { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #cfd3e2; flex: none; display: grid; place-items: center; transition: all .3s; }
.steps-live li.done { color: var(--ink); }
.steps-live li.done .d { background: var(--mint); border-color: var(--mint); }
.steps-live li.done .d::after { content: ''; width: 8px; height: 5px; border: 2.5px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px,-1px); }
.steps-live li.active .d { border-color: var(--brand); border-top-color: transparent; animation: spin .8s linear infinite; }

/* Footer */
.footer { padding: 40px 0 56px; border-top: 1px solid var(--line); margin-top: 40px; font-size: .9rem; color: var(--ink-2); }
.footer .wrap { display: grid; gap: 18px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 0 18px; }
.footer nav a { color: var(--ink-2); text-decoration: none; font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
.footer nav a:hover { color: var(--brand); }
.fgrid { display: grid; gap: 26px; grid-template-columns: 1fr 1fr; }
.fgrid .brand { grid-column: 1 / -1; }
.fgrid h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); margin-bottom: 4px; font-family: var(--font); }
.fgrid nav { flex-direction: column; }
.fgrid nav a { min-height: 44px; }
@media (min-width: 860px) { .fgrid { grid-template-columns: 2fr 1fr 1fr 1fr; } .fgrid .brand { grid-column: auto; } }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 90; background: rgba(10, 13, 26, .6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; animation: fadein .2s ease both; }
.modal .sheet { background: #fff; border-radius: 26px; width: 100%; max-width: 440px; max-height: calc(100dvh - 32px); overflow: auto; padding: 18px; box-shadow: var(--shadow-lg); animation: pop .3s cubic-bezier(.2,.8,.2,1.1) both; }
@keyframes fadein { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.x-btn { width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--bg); cursor: pointer; display: grid; place-items: center; color: var(--ink); flex: none; }

.card-prev { border-radius: 18px; overflow: hidden; background: #0a0f21; aspect-ratio: 9 / 16; max-height: 56dvh; margin: 0 auto; }
.card-prev canvas { width: 100%; height: 100%; object-fit: contain; display: block; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: var(--bg-2); border-radius: 14px; padding: 4px; margin-top: 12px; }
.seg button { min-height: 44px; border: 0; border-radius: 10px; background: transparent; font: 700 .86rem var(--font); color: var(--ink-2); cursor: pointer; }
.seg button[aria-checked="true"] { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.seg button[disabled] { opacity: .45; cursor: not-allowed; }
details.side { margin-top: 10px; }
details.side summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 700; font-size: .92rem; color: var(--ink); }
details.side summary::-webkit-details-marker { display: none; }
details.side summary svg { width: 22px; height: 22px; color: var(--brand); flex: none; }
details.side summary small { color: var(--ink-3); font-weight: 600; }
.up .check { margin-top: 6px; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 160%); background: var(--ink); color: #fff; padding: 14px 20px; border-radius: 14px; font-weight: 600; box-shadow: var(--shadow-lg); z-index: 100; transition: transform .35s cubic-bezier(.2,.8,.2,1.2); max-width: calc(100% - 32px); font-size: .95rem; }
.toast.show { transform: translate(-50%, 0); }

.spinner { width: 20px; height: 20px; border-radius: 50%; border: 3px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .8s linear infinite; display: inline-block; }
.spinner.dark { border-color: var(--brand-soft); border-top-color: var(--brand); }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1; transform: none; }
}


/* Two-option segment (share card layout) */
.seg.seg2 { grid-template-columns: 1fr 1fr; }

/* Record-ready reveal: full screen, content kept inside the zone TikTok and Reels never cover
   (top tabs, bottom caption, right-side buttons). Controls hide while it plays. */
.rv { position: fixed; inset: 0; z-index: 120; color: #fff; overflow: hidden; --P: min(20vw, 9.5dvh, 110px); --R: min(50vw, 22.5dvh, 250px);
  background: radial-gradient(60vmax 50vmax at 0% 10%, rgba(25,199,155,.22), transparent 60%), radial-gradient(70vmax 60vmax at 100% 85%, rgba(124,92,255,.32), transparent 60%), linear-gradient(170deg, #070b1a, #151a44); }
.rv-stage { height: 100%; max-width: 460px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; padding: max(8dvh, 52px) 22px 0; }
@media (max-width: 520px) { .rv-stage { padding-left: 6vw; padding-right: 15vw; } }
.rv-brand { display: flex; align-items: center; gap: 8px; font: 800 15px var(--font-head); color: #dfe4ff; letter-spacing: -.01em; }
.rv-brand svg { width: 26px; height: 26px; }
.rv-title { margin-top: 1.2dvh; font: 700 12px var(--font); letter-spacing: .24em; text-transform: uppercase; color: #8f98bd; text-align: center; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-hero { position: relative; margin-top: 2dvh; display: flex; flex-direction: column; align-items: center; gap: 1.6dvh; }
.rv-photo { width: var(--P); height: var(--P); border-radius: 50%; overflow: hidden; position: relative; z-index: 2; box-shadow: 0 0 0 3px #7c5cff, 0 0 34px rgba(124,92,255,.55); transition: transform .8s cubic-bezier(.2,.8,.2,1);
  transform: translateY(calc(var(--P) / 2 + 1.6dvh + var(--R) / 2)) scale(1.9); }
.rv.ring-on .rv-photo { transform: none; }
.rv-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rv-photo.blur img { filter: blur(5px); transform: scale(1.12); }
.rv-photo i { position: absolute; left: 0; right: 0; top: -30%; height: 26%; background: linear-gradient(180deg, transparent, rgba(25,199,155,.6), transparent); opacity: 0; }
.rv.rv-scan .rv-photo i { opacity: 1; animation: rvscan 1.05s linear infinite; }
@keyframes rvscan { to { top: 104%; } }
.rv-status { position: absolute; left: 50%; bottom: -3.6dvh; transform: translateX(-50%); white-space: nowrap; font: 600 14px var(--font); color: #9fe8d3; opacity: 0; transition: opacity .3s; }
.rv.rv-scan .rv-status { opacity: 1; }
.rv-ring { width: var(--R); height: var(--R); position: relative; opacity: 0; transform: scale(.86); transition: opacity .5s, transform .6s cubic-bezier(.2,.8,.2,1); }
.rv.ring-on .rv-ring, .rv.nophoto .rv-ring { opacity: 1; transform: none; }
.rv-ring svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 0 14px rgba(110,100,255,.55)); }
.rv-ring .v { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.rv-ring b { font: 800 calc(var(--R) * .3)/1 var(--font-head); letter-spacing: -.04em; font-variant-numeric: tabular-nums; background: linear-gradient(#fff, #c4cdff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rv-ring small { color: #a9b0cf; font: 600 13px var(--font); margin-top: 4px; }
.rv-tier { margin-top: 2.4dvh; font: 800 clamp(20px, 3.2dvh, 30px) var(--font-head); padding: .32em .95em; border-radius: 999px; background: var(--grad); opacity: 0; transform: scale(.55); transition: opacity .35s, transform .5s cubic-bezier(.2,1.5,.35,1); }
.rv.tier-on .rv-tier { opacity: 1; transform: none; }
.rv-pot { margin-top: 1.2dvh; font: 700 15px var(--font); border: 1.5px solid rgba(255,255,255,.25); border-radius: 999px; padding: .42em 1em; opacity: 0; transform: translateY(8px); transition: opacity .4s, transform .4s; }
.rv.pot-on .rv-pot { opacity: 1; transform: none; }
.rv-rows { width: 100%; max-width: 320px; margin-top: 2.2dvh; display: grid; gap: 1.2dvh; }
.rv-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; align-items: baseline; font: 600 14px var(--font); color: #e3e7f7; opacity: 0; transform: translateY(10px); transition: opacity .4s, transform .4s; }
.rv-row b { font: 800 15px var(--font-head); }
.rv-row i { grid-column: 1 / -1; height: 6px; border-radius: 6px; background: rgba(255,255,255,.1); overflow: hidden; display: block; }
.rv-row em { display: block; height: 100%; width: 0; border-radius: 6px; background: var(--grad); transition: width .9s cubic-bezier(.2,.7,.2,1); }
.rv.rows-on .rv-row { opacity: 1; transform: none; }
.rv.rows-on .rv-row em { width: var(--w); }
.rv.rows-on .rv-row:nth-child(2), .rv.rows-on .rv-row:nth-child(2) em { transition-delay: .35s; }
.rv.rows-on .rv-row:nth-child(3), .rv.rows-on .rv-row:nth-child(3) em { transition-delay: .7s; }
.rv-ctl { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 18px calc(16px + env(safe-area-inset-bottom)); background: linear-gradient(rgba(7,11,26,0), rgba(7,11,26,.94) 28%); text-align: center; transition: opacity .3s; }
.rv.playing .rv-ctl { opacity: 0; pointer-events: none; }
.rv-hint { color: #b7bedb; font-size: .86rem; margin: 0 auto 10px; max-width: 380px; }
.rv-btns { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; max-width: 420px; margin: 0 auto; }
.rv-btns .btn-ghost { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.22); }
