/* Public pages: landing, registration, login */
:root {
    --pub-ink: #0f1b2d;
    --pub-muted: #5b6676;
    --pub-accent: #1f6feb;
    --pub-accent-2: #16a34a;
    --pub-bg-soft: #f4f7fb;
}
body.public { background: #fff; color: var(--pub-ink); }
.public-nav { background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); border-bottom: 1px solid #e8edf3; }
.public-nav .nav-link { color: var(--pub-ink); font-weight: 500; }
.public-nav .nav-link:hover { color: var(--pub-accent); }

/* hero */
.hero { background: radial-gradient(1200px 500px at 85% -10%, #2a4a73 0, transparent 60%), linear-gradient(135deg, #0f1b2d, #1c3352); color: #fff; padding: 5rem 0 4.5rem; overflow: hidden; }
.hero h1 { font-size: clamp(2rem, 4.2vw, 3.3rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.hero .lead { color: #c9d6e8; font-size: 1.2rem; max-width: 560px; }
.hero .btn-lg { padding: .8rem 1.4rem; font-weight: 600; }
.hero-trust { color: #9fb3cc; font-size: .9rem; }
.hero-trust i { color: #4ade80; }
.hero-visual { background: #0b1422; border: 1px solid #2c4362; border-radius: 1rem; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); padding: .8rem; }
.hero-visual svg { display: block; width: 100%; height: auto; border-radius: .6rem; }
.hero-ticket { background: #fff; color: var(--pub-ink); border-radius: .7rem; padding: .7rem 1rem; margin-top: .8rem; display: flex; align-items: center; gap: .8rem; font-size: .9rem; }
.hero-ticket .ok { width: 34px; height: 34px; border-radius: 50%; background: #dcfce7; color: #15803d; display: grid; place-items: center; font-size: 1.1rem; flex: none; }

/* stats strip */
.stats { background: var(--pub-bg-soft); border-bottom: 1px solid #e8edf3; }
.lstat b { display: block; font-size: 1.6rem; font-weight: 800; color: var(--pub-ink); }
.lstat span { color: var(--pub-muted); font-size: .9rem; }

/* visitor counter in the hero: seen as soon as the page opens */
.hero-visits { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .45rem; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .2); color: #dbe4f0; padding: .45rem 1rem; border-radius: 2rem; font-size: .95rem; }
.hero-visits b { color: #fff; font-size: 1.05rem; }
.hero-visits .sep { opacity: .5; }
@media (max-width: 575.98px) {
    .hero-visits { border-radius: 1rem; row-gap: .25rem; }
    .hero-visits .sep, .hero-visits .bi-eye { display: none; }
    .hero-visits > span:not(.live-dot) { flex-basis: calc(100% - 9px - .45rem); }
    .hero-visits > span:last-child { margin-left: calc(9px + .45rem); }
}
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 0 rgba(74, 222, 128, .6); animation: live-pulse 2s infinite; }
@keyframes live-pulse { 70% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }

/* sections */
.section { padding: 5rem 0; }
.section-soft { background: var(--pub-bg-soft); }
.section h2 { font-weight: 800; letter-spacing: -.01em; }
.section .sub { color: var(--pub-muted); max-width: 640px; margin: 0 auto; }
.feature { background: #fff; border: 1px solid #e6ebf2; border-radius: 1rem; padding: 1.4rem; height: 100%; transition: box-shadow .2s, transform .2s; }
.feature:hover { box-shadow: 0 12px 30px rgba(15, 27, 45, .08); transform: translateY(-2px); }
.feature .ico { width: 46px; height: 46px; border-radius: .8rem; display: grid; place-items: center; font-size: 1.35rem; background: #e8f0fe; color: var(--pub-accent); margin-bottom: .9rem; }
.feature h3 { font-size: 1.05rem; font-weight: 700; }
.feature p { color: var(--pub-muted); font-size: .93rem; margin: 0; }

.step { position: relative; padding-left: 3.6rem; margin-bottom: 1.8rem; }
.step .num { position: absolute; left: 0; top: 0; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--pub-accent); color: #fff; display: grid; place-items: center; font-weight: 800; }
.step h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: .25rem; }
.step p { color: var(--pub-muted); margin: 0; }

/* pricing */
.price-card { border: 1px solid #e1e7ef; border-radius: 1.1rem; padding: 1.8rem; height: 100%; background: #fff; position: relative; display: flex; flex-direction: column; }
.price-card.popular { border: 2px solid var(--pub-accent); box-shadow: 0 18px 50px rgba(31, 111, 235, .15); }
.price-card .tag { position: absolute; top: -.8rem; left: 50%; transform: translateX(-50%); background: var(--pub-accent); color: #fff; font-size: .75rem; font-weight: 700; padding: .25rem .8rem; border-radius: 1rem; }
.price-card .name { font-weight: 700; font-size: 1.15rem; }
.price-card .price { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; }
.price-card .per { color: var(--pub-muted); font-size: .9rem; }
.price-card ul { list-style: none; padding: 0; margin: 1.2rem 0 1.5rem; flex: 1; }
.price-card li { padding: .3rem 0; font-size: .93rem; }
.price-card li .bi-check-circle-fill { color: var(--pub-accent-2); }
.price-card li.off { color: #9aa4b0; }
.trial-note { background: #ecfdf3; border: 1px solid #bbf7d0; color: #166534; border-radius: .8rem; padding: .8rem 1.2rem; display: inline-block; }

/* contact */
.contact-card { background: #fff; border: 1px solid #e1e7ef; border-radius: 1.1rem; padding: 1.6rem; }
.contact-avatar { width: 56px; height: 56px; border-radius: 50%; background: #e8f0fe; color: var(--pub-accent); display: grid; place-items: center; font-size: 1.6rem; }

/* faq / cta */
.faq .accordion-button { font-weight: 600; }
.cta { background: linear-gradient(135deg, #1f6feb, #1c3352); color: #fff; border-radius: 1.4rem; padding: 3rem 2rem; }
.public-footer { background: #0f1b2d; color: #dbe4f0; padding: 3rem 0 2rem; }
.public-footer a { color: #dbe4f0; text-decoration: none; }
.public-footer a:hover { color: #fff; text-decoration: underline; }

/* registration / login */
.auth-wrap { min-height: calc(100vh - 66px); background: var(--pub-bg-soft); padding: 3rem 0; }
.auth-card { border: 0; border-radius: 1.1rem; box-shadow: 0 20px 60px rgba(15, 27, 45, .1); }
.auth-side { background: linear-gradient(135deg, #0f1b2d, #1c3352); color: #fff; border-radius: 1.1rem; padding: 2rem; height: 100%; }
.auth-side li { margin-bottom: .6rem; }
.auth-side i { color: #4ade80; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* in-app banners */
.app-banner { border-radius: 0; margin: 0; border-left: 0; border-right: 0; border-top: 0; padding: .55rem 1.2rem; font-size: .92rem; }

/* ---------- animated gate in the hero (8 s loop) ---------- */
.scene { display: block; width: 100%; height: auto; border-radius: .6rem; }
.scene-car { transform-box: fill-box; transform-origin: 50% 100%; animation: car-drive 8s infinite; }
.scene-detect { opacity: 0; animation: detect 8s infinite; }
.scene-arm { transform-box: fill-box; transform-origin: 100% 50%; animation: arm 8s infinite; }
.scene-lamp-red { animation: lamp-red 8s infinite; }
.scene-lamp-green { opacity: 0; animation: lamp-green 8s infinite; }
.scene-scan { opacity: 0; animation: scan 8s infinite linear; }
.scene-beam { opacity: .7; }
.scene-rec { animation: rec 1.2s infinite; }
.scene-lane { animation: lane 8s infinite; }
.hero-ticket { display: grid; }
.ticket-state { grid-area: 1 / 1; display: flex; align-items: center; gap: .8rem; }
.ticket-wait { animation: t-wait 8s infinite; }
.ticket-done { opacity: 0; animation: t-done 8s infinite; }
.hero-ticket .ok.wait { background: #e0f2fe; color: #0369a1; }

@keyframes car-drive {
    0%        { transform: translateY(-110px) scale(.4); opacity: 0; animation-timing-function: cubic-bezier(.2, .7, .3, 1); }
    6%        { opacity: 1; }
    36%, 64%  { transform: translateY(0) scale(1); opacity: 1; animation-timing-function: cubic-bezier(.5, 0, .9, .6); }
    84%       { transform: translateY(150px) scale(1.75); opacity: 1; }
    88%, 100% { transform: translateY(150px) scale(1.75); opacity: 0; }
}
@keyframes detect   { 0%, 40% { opacity: 0; } 43%, 64% { opacity: 1; } 68%, 100% { opacity: 0; } }
@keyframes arm      { 0%, 46% { transform: rotate(0); } 53%, 86% { transform: rotate(78deg); } 93%, 100% { transform: rotate(0); } }
@keyframes lamp-red { 0%, 47% { opacity: 1; } 49%, 90% { opacity: 0; } 92%, 100% { opacity: 1; } }
@keyframes lamp-green { 0%, 47% { opacity: 0; } 49%, 90% { opacity: 1; } 92%, 100% { opacity: 0; } }
@keyframes scan     { 0%, 8% { opacity: 0; transform: translateX(0); } 10% { opacity: .9; } 38% { opacity: .9; transform: translateX(637px); } 39%, 100% { opacity: 0; transform: translateX(637px); } }
@keyframes rec      { 50% { opacity: .25; } }
@keyframes lane     { 0%, 64% { opacity: .6; } 75% { opacity: .3; } 100% { opacity: .6; } }
@keyframes t-wait   { 0%, 40% { opacity: 1; } 41.5%, 93% { opacity: 0; } 95%, 100% { opacity: 1; } }
@keyframes t-done   { 0%, 42% { opacity: 0; } 43.5%, 90% { opacity: 1; } 91.5%, 100% { opacity: 0; } }

/* Visitors who switched off animations see the finished moment: plate read, barrier open. */
@media (prefers-reduced-motion: reduce) {
    .scene *, .ticket-state { animation: none !important; }
    .scene-detect, .scene-lamp-green, .ticket-done { opacity: 1; }
    .scene-lamp-red, .scene-scan, .ticket-wait { opacity: 0; }
    .scene-arm { transform: rotate(78deg); }
}