@view-transition {
    navigation: auto;
}

::view-transition-old(root) {
    animation: 150ms cubic-bezier(0.4, 0, 1, 1) both vtFadeOut;
}

::view-transition-new(root) {
    animation: 180ms cubic-bezier(0.22, 1, 0.36, 1) both vtFadeIn;
}

@keyframes vtFadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes vtFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    ::view-transition-old(root),
    ::view-transition-new(root) {
        animation: none !important;
    }
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    overflow-x: clip;
}

:root {
    --font-brand: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --secondary: #64748b;
    --dark: #0a0a0a;
    --light: #f8fafc;
    --white: #ffffff;
    --border: #e2e8f0;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --text-heading: var(--dark);

    --font-main: 'Manrope', sans-serif;


    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;
    --space-20: 80px;


    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;


    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 40px -10px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 60px -15px rgba(0, 0, 0, 0.2);


    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;


    --z-navbar: 1000;
    --z-sidebar: 1200;
    --z-bottom-nav: 1500;
    --z-cookie: 2000;
    --z-modal-overlay: 10000;
    --z-modal-content: 10001;
    --z-auth-modal: 10000;
    --z-picker: 20000;
    --z-toast: 30000;


    --bg-body: var(--white);
    --card-bg: rgba(255, 255, 255, 0.95);
    --nav-bg: rgba(255, 255, 255, 0.9);


    --text-main: var(--dark);
    --text-muted: var(--secondary);
    --text-secondary: var(--secondary);
}

[data-theme="dark"] {
    --bg-body: #000000;
    --text-main: #ffffff;
    --text-heading: #ffffff;
    --text-muted: #888888;
    --card-bg: #111111;
    --nav-bg: rgba(0, 0, 0, 0.8);
    --border: #222222;
    --light: #1a1a1a;
    --shadow-lg: 0 10px 40px -10px rgba(0, 0, 0, 0.8);
    --shadow-xl: 0 20px 60px -15px rgba(0, 0, 0, 0.6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--text-main);
    background-color: var(--bg-body);
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s, color 0.3s;
}

.tabular-nums,
.stat-value,
.mine-stat-value,
.receipt-amount,
.items-tab-count,
.days-left-count,
.notif-time,
.custom-datepicker-time {
    font-variant-numeric: tabular-nums;
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}


.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-6);
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: all var(--transition-base);
    font-family: var(--font-main);
    line-height: 1;
}

.btn.btn-primary {
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

@media (hover: hover) {
    .btn.btn-primary:hover {
        background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
    }
}

.btn.btn-primary:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.btn-outline {
    border: 2px solid var(--border);
    background: transparent;
    color: var(--text-main);
}

@media (hover: hover) and (pointer: fine) {
    .btn-outline:hover {
        border-color: var(--primary);
        color: var(--primary);
        background: rgba(59, 130, 246, 0.05);
    }
}

.btn-outline:active {
    transform: scale(0.97);
}

/* Компактный модификатор кнопки. Раньше был определён только в privacy.css
   и roadmap.css, поэтому на index.html (грузит только style.css) кнопка
   "Вход" в навбаре рендерилась обычного размера, а не small — из-за этого
   строка .nav-wrapper была выше, и центрированная по ней надпись VALUON
   визуально смещалась при переходе между страницами. */
.btn.small {
    padding: 10px 20px;
    font-size: 0.85rem;
}

/* "Вход" в навбаре index.html (внутри .controls, есть только на этой
   странице) — чуть крупнее общего .btn.small, чтобы не теряться рядом с
   40px круглыми icon-btn. Высота всё равно держится в пределах тех же
   40px (12*2 + ~15px строки шрифта), поэтому строка .nav-wrapper не
   становится выше и надпись VALUON не съезжает при переходах между
   страницами — именно этого добивались отдельным фиксом ранее. */
.controls .btn.small {
    padding: 12px 24px;
    font-size: 0.95rem;
}

.section {
    padding: var(--space-20) 0;
}

.bg-dark {
    background-color: var(--dark);
    color: var(--white);
}

.icon-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
    font-size: 0.9rem;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) and (pointer: fine) {
    .icon-btn:hover {
        border-color: var(--primary);
        color: var(--primary);
        background: rgba(59, 130, 246, 0.05);
    }
}

.icon-btn:active {
    transform: scale(0.95);
}



.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: var(--z-navbar);
    padding: var(--space-5) 0;
    transition: var(--transition-base);
    border-bottom: 1px solid transparent;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    will-change: transform;
}

.navbar.scrolled {
    box-shadow: var(--shadow-sm);
}

[data-theme="light"] .navbar,
:not([data-theme="dark"]) .navbar {
    background: rgba(255, 255, 255, 0.75);
    border-bottom-color: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .navbar {
    background: rgba(0, 0, 0, 0.6);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-family: var(--font-brand);
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
}

.nav-list {
    display: flex;
    gap: var(--space-8);
    align-items: center;
}

.nav-list a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
    text-decoration: none;
    transition: var(--transition-base);
}

.nav-list a:hover {
    color: var(--primary);
}

.controls {
    display: flex;
    gap: var(--space-3);
    align-items: center;
}


.nav-icon {
    display: none;
}

html.scroll-locked {
    overflow: hidden;
    height: 100%;
}


.back-link {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition-base);
}

.back-link:hover {
    color: var(--primary);
    transform: translateX(-3px);
}

.hero-section {
    padding: 180px 0 120px;
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    z-index: 0;
    pointer-events: none;
    opacity: 0.35;
    animation: heroBlobDrift 16s ease-in-out infinite;
    will-change: transform;
}

.hero-blob-1 {
    width: 420px;
    height: 420px;
    top: -120px;
    right: -80px;
    background: radial-gradient(circle, var(--primary-light), transparent 70%);
}

.hero-blob-2 {
    width: 320px;
    height: 320px;
    bottom: -140px;
    left: -60px;
    background: radial-gradient(circle, #a78bfa, transparent 70%);
    animation-delay: -8s;
}

[data-theme="dark"] .hero-blob {
    opacity: 0.18;
}

@keyframes heroBlobDrift {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(-24px, 24px) scale(1.08);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-blob {
        animation: none;
    }
}

.hero-grid {
    position: relative;
    z-index: 1;
}

.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    font-weight: 800;
    padding-bottom: 0.15em;
    margin-bottom: calc(24px - 0.15em);
    display: inline-block;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    background-image: linear-gradient(to right,
            var(--text-main) 0%,
            var(--text-main) 34%,
            #2563eb 47%,
            #3b82f6 53%,
            var(--text-main) 66%,
            var(--text-main) 100%);
    background-size: 300% 100%;
    background-position: 300% 0;
}

[data-theme="dark"] .hero-text h1 {
    background-image: linear-gradient(to right,
            var(--text-main) 0%,
            var(--text-main) 34%,
            #60a5fa 47%,
            #93c5fd 53%,
            var(--text-main) 66%,
            var(--text-main) 100%);
}

@keyframes shimmer {
    0% {
        background-position: 300% 0;
    }

    60% {
        background-position: 300% 0;
    }

    100% {
        background-position: -300% 0;
    }
}

.highlight {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(139, 92, 246, 0.18) 50%, rgba(59, 130, 246, 0.12) 100%);
    border-radius: 6px;
    padding: 2px 8px;
    margin: 0 -4px;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.1);
    animation: highlightFadeIn 0.8s ease-out both;
}

[data-theme="dark"] .highlight {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(139, 92, 246, 0.28) 50%, rgba(59, 130, 246, 0.2) 100%);
    box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.15);
}

@keyframes highlightFadeIn {
    from {
        opacity: 0;
        filter: blur(4px);
    }

    to {
        opacity: 1;
        filter: blur(0);
    }
}

.hero-text p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: 0.85rem;
}

.btn-lg {
    padding: var(--space-5) var(--space-8);
    font-size: 1.1rem;
}

.btn-danger {
    background: var(--error);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

.btn-danger:active {
    transform: translateY(0);
}

.hero-subtext {
    display: block;
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
    opacity: 0.8;
}

.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    margin-top: -12px;
}

.hero-visual::before {
    content: '';
    position: absolute;
    inset: 20px;
    background:
        repeating-linear-gradient(0deg, transparent, transparent 40px, rgba(59, 130, 246, 0.03) 40px, rgba(59, 130, 246, 0.03) 41px),
        repeating-linear-gradient(90deg, transparent, transparent 40px, rgba(59, 130, 246, 0.03) 40px, rgba(59, 130, 246, 0.03) 41px);
    border-radius: 32px;
    z-index: 0;
    pointer-events: none;
}

[data-theme="dark"] .hero-visual::before {
    background:
        repeating-linear-gradient(0deg, transparent, transparent 40px, rgba(96, 165, 250, 0.04) 40px, rgba(96, 165, 250, 0.04) 41px),
        repeating-linear-gradient(90deg, transparent, transparent 40px, rgba(96, 165, 250, 0.04) 40px, rgba(96, 165, 250, 0.04) 41px);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.section-eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 0.32rem 0.85rem;
    margin-bottom: 14px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.22);
}

.section-scope-note {
    margin: 14px auto 0;
    max-width: 520px;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-muted);
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--text-main);
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.white h2,
.white p {
    color: var(--white) !important;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 32px;
}

.business-section {
    background: linear-gradient(180deg, var(--bg-body) 0%, var(--light) 100%);
}

.business-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.business-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    padding: var(--space-6);
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.b-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary) 0%, #2563eb 100%);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: white;
}

.business-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-main);
}

.business-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.business-cta {
    text-align: center;
    padding: 40px 0;
}

.business-subtext {
    margin-top: 16px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.verify-section {
    background: var(--light);
}

.verify-scanner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.verify-scanner-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    padding: var(--space-6);
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.verify-scanner-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.vs-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.5rem;
    color: white;
}

.verify-scanner-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-main);
}

.verify-scanner-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.verify-scanner-cta {
    text-align: center;
    padding: 16px 0 40px;
}

[data-theme="dark"] .verify-section {
    background: rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .vs-icon {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}


.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    padding: var(--space-6);
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.feature-item {
    padding: var(--space-8);
    border-radius: var(--radius-2xl);
    border: 1px solid var(--border);
    transition: var(--transition-base);
    background: var(--bg-body);
}

.f-icon {
    width: 60px;
    height: 60px;
    background: #eff6ff;
    color: var(--primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 24px;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="dark"] .f-icon {
    background: rgba(59, 130, 246, 0.1);
}

.timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-top: 60px;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 0;
}

.timeline-item {
    position: relative;
    z-index: 1;
    text-align: center;
    flex: 1;
}

.t-number {
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    margin: 0 auto 24px;
    box-shadow: 0 0 0 8px var(--dark);
}

.t-content h3 {
    color: var(--white);
    margin-bottom: 8px;
}

.t-content p {
    color: #94a3b8;
    font-size: 0.9rem;
    padding: 0 20px;
}

.vision-section {
    padding: 140px 0;
    background: var(--bg-body);
}

.vision-wrapper {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.vision-content h2 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 32px;
    line-height: 1.2;
    color: var(--text-main);
}

.vision-content p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 48px;
    line-height: 1.7;
}

.footer {
    background: var(--light);
    padding: 80px 0 40px;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col h4 {
    margin-bottom: 24px;
    font-weight: 700;
    color: var(--text-main);
}

.footer-col a {
    display: block;
    margin-bottom: 12px;
    color: var(--text-muted);
}

.footer-col a:hover {
    color: var(--primary);
}

.socials {
    display: flex;
    gap: 16px;
}

.socials a {
    font-size: 1.2rem;
    color: var(--text-muted);
}

.socials a:hover {
    color: var(--primary);
}

.copyright {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 20px;
    margin-bottom: 14px;
}

.footer-nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.15s ease;
}

.footer-nav-links a:hover {
    color: var(--primary);
}

.contact-links {
    margin-top: var(--space-2);
    display: flex;
    justify-content: center;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.8s forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-text h1 {
    animation: titleReveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both,
        shimmer 8s ease-in-out 1.5s 4 forwards;
}

@keyframes titleReveal {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


.input-group {
    margin-bottom: var(--space-5);
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: var(--space-2);
}

.input-group input,
.input-group textarea,
.input-group select {
    width: 100%;
    padding: var(--space-4);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-family: var(--font-main);
    font-size: 1rem;
    color: var(--text-main);
    background: var(--light);
    transition: var(--transition-fast);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:active,
input:autofill,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:active,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px var(--card-bg) inset !important;
    box-shadow: 0 0 0 1000px var(--card-bg) inset !important;
    -webkit-text-fill-color: var(--text-main) !important;
    caret-color: var(--text-main);
    transition: background-color 99999s ease-in-out 0s;
}

input:-webkit-autofill:focus,
input:autofill:focus,
textarea:-webkit-autofill:focus,
select:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--card-bg) inset, 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
    box-shadow: 0 0 0 1000px var(--card-bg) inset, 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
    -webkit-text-fill-color: var(--text-main) !important;
    caret-color: var(--text-main);
}

[data-theme="dark"] {
    color-scheme: dark;
}

.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    background: var(--card-bg);
}

.input-group input:focus-visible,
.input-group textarea:focus-visible,
.input-group select:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

[data-theme="dark"] .input-group input,
[data-theme="dark"] .input-group textarea,
[data-theme="dark"] .input-group select {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .input-group input:focus,
[data-theme="dark"] .input-group textarea:focus,
[data-theme="dark"] .input-group select:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

[data-theme="dark"] .input-group input:focus-visible,
[data-theme="dark"] .input-group textarea:focus-visible,
[data-theme="dark"] .input-group select:focus-visible {
    outline-color: #60a5fa;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.field-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: var(--space-1);
    opacity: 0.8;
    line-height: 1.3;
}


.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base), visibility var(--transition-base);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal-overlay.active,
.modal-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: relative;
    background: var(--card-bg);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
    transform: translateY(40px);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}

.modal-overlay.active .modal-content,
.modal-overlay.is-active .modal-content {
    transform: translateY(0);
    opacity: 1;
}

.modal-overlay.closing .modal-content,
.modal-overlay.closing.is-active .modal-content {
    transform: translateY(30px);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.2s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-6);
}

.modal-header h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
}

.btn-close {
    background: var(--light);
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
}

.btn-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border-color: var(--error);
}

.modal-actions {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-8);
}

.modal-actions button {
    flex: 1;
}

@media (max-width: 1024px) {
    .hero-section {
        min-height: 100vh;
        min-height: 100dvh;
        display: flex;
        align-items: center;
        padding: 116px 0 40px;
    }

    .hero-grid {
        width: 100%;
        grid-template-columns: 1fr;
        gap: 0;
        text-align: center;
    }

    .hero-text {
        max-width: 680px;
        margin: 0 auto;
    }

    .hero-text p {
        margin: 0 auto 24px;
    }

    .hero-actions {
        justify-content: center;
        margin-bottom: 12px;
    }

    .hero-subtext {
        text-align: center;
    }

    .hero-visual {
        display: none;
    }
}

@media (max-width: 968px) {
    .timeline {
        flex-direction: column;
        gap: 40px;
    }

    .timeline::before {
        display: none;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .vision-content h2 {
        font-size: 2rem;
    }

    .vision-section {
        padding: 80px 0;
    }
}

@media (max-width: 768px) {
    .navbar {
        height: 72px;
    }

    .navbar.nav-open {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    [data-theme="light"] .navbar.nav-open,
    :not([data-theme="dark"]) .navbar.nav-open {
        background: rgba(255, 255, 255, 0.98);
    }

    [data-theme="dark"] .navbar.nav-open {
        background: rgba(0, 0, 0, 0.95);
    }

    .hero-section {
        padding: 104px 0 40px;
    }

    .hero-text h1 {
        font-size: 2.2rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }

    .btn.large {
        width: 100%;
        justify-content: center;
    }

    .nav-list {
        display: flex;
        align-items: center;
        gap: 0;
    }

    .nav-list > li:not(.controls) {
        display: none;
    }

    .controls {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-top: 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 380px) {
    .navbar .brand {
        font-size: 1.25rem;
    }

    .controls {
        gap: 6px;
    }

    .navbar .icon-btn {
        width: 34px;
        height: 34px;
        font-size: 0.82rem;
    }

    .navbar .btn.small {
        padding: 7px 12px;
        font-size: 0.84rem;
    }
}

.item-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.item-card .demo-card {
    z-index: 2;
    transform: translateY(0);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    animation: floatSmooth 6s ease-in-out infinite;

}

@keyframes floatSmooth {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

[data-theme="dark"] .item-card {
    background: var(--card-bg);
    border-color: rgba(255, 255, 255, 0.08);
}

.demo-card {
    animation: floatSmooth 6s ease-in-out infinite;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-icon {
    width: 48px;
    height: 48px;
    background: var(--light);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--secondary);
}

[data-theme="dark"] .item-icon {
    background: rgba(255, 255, 255, 0.05);
}

.item-status-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 100px;
    text-transform: uppercase;
}

.item-status-badge.active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.item-status-badge.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.item-status-badge.expired {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

[data-theme="dark"] .item-status-badge.active {
    background: rgba(16, 185, 129, 0.15);
}

[data-theme="dark"] .item-status-badge.warning {
    background: rgba(245, 158, 11, 0.15);
}

[data-theme="dark"] .item-status-badge.expired {
    background: rgba(239, 68, 68, 0.15);
}

.item-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.item-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
    margin: 0;
}

.item-brand {
    font-size: 0.9rem;
    color: var(--secondary);
    font-weight: 500;
}

.item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.tag {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 100px;
    background: var(--light);
    color: var(--secondary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

[data-theme="dark"] .tag {
    background: rgba(255, 255, 255, 0.05);
}

.item-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.progress-bar-bg {
    height: 8px;
    background: var(--light);
    border-radius: 100px;
    overflow: hidden;
    width: 100%;
}

[data-theme="dark"] .progress-bar-bg {
    background: rgba(255, 255, 255, 0.08);
}

.progress-bar-fill {
    height: 100%;
    border-radius: 100px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}


.progress-bar-fill.active {
    background: var(--success);
}

.progress-bar-fill.warning {
    background: var(--warning);
}

.progress-bar-fill.expired {
    background: var(--error);
}

.days-left-text {
    font-size: 0.95rem;
    font-weight: 700;
}

.days-left-text.active {
    color: var(--success);
}

.days-left-text.warning {
    color: var(--warning);
}

.days-left-text.expired {
    color: var(--error);
}

.iphone-frame {
    width: 260px;
    background: var(--card-bg);
    border-radius: 40px;
    padding: 10px;
    outline: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: var(--shadow-xl);
    position: relative;
    animation: frameSuccessGlow 5.5s ease-in-out infinite;
}

@keyframes frameSuccessGlow {

    0%,
    48% {
        box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255, 255, 255, 0.08);
    }

    56% {
        box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 30px 4px rgba(16, 185, 129, 0.28);
    }

    82% {
        box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 30px 4px rgba(16, 185, 129, 0.28);
    }

    92%,
    100% {
        box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255, 255, 255, 0.08);
    }
}

[data-theme="dark"] .iphone-frame {
    background: #0a0a0a;
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.iphone-notch {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 26px;
    background: #000;
    border-radius: 14px;
    z-index: 10;
}

.iphone-notch::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #1a1a2e;
    border-radius: 50%;
    border: 1px solid #2a2a3e;
}

.iphone-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px 0;
    font-size: 0.7rem;
    color: var(--text-main);
    font-weight: 600;
}

.status-icons {
    display: flex;
    gap: 5px;
    font-size: 0.65rem;
    opacity: 0.8;
}

.iphone-screen {
    background: var(--bg-body);
    border-radius: 28px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-height: 270px;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .iphone-screen {
    background: #0a0a0a;
}

.iphone-home-bar {
    width: 120px;
    height: 4px;
    background: rgba(0, 0, 0, 0.12);
    border-radius: 2px;
    margin: 8px auto 4px;
}

[data-theme="dark"] .iphone-home-bar {
    background: rgba(255, 255, 255, 0.2);
}

.scan-area {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 132px;
    height: 132px;
    margin-top: 10px;
}

.scan-corner {
    position: absolute;
    z-index: 5;
    width: 20px;
    height: 20px;
    border-color: var(--primary);
    border-style: solid;
    animation: cornerPulse 5.5s ease-in-out infinite;
}

@keyframes cornerPulse {

    0%,
    5% {
        border-color: var(--primary);
        opacity: 0.6;
    }

    15% {
        opacity: 1;
    }

    35% {
        border-color: var(--primary);
        opacity: 1;
    }

    42% {
        border-color: var(--success);
        opacity: 1;
    }

    48% {
        border-color: var(--success);
        opacity: 0.8;
    }

    55% {
        border-color: var(--success);
        opacity: 0;
    }

    100% {
        border-color: var(--primary);
        opacity: 0.6;
    }
}

.scan-corner.tl {
    top: 4px;
    left: 4px;
    border-width: 2px 0 0 2px;
    border-radius: 6px 0 0 0;
}

.scan-corner.tr {
    top: 4px;
    right: 4px;
    border-width: 2px 2px 0 0;
    border-radius: 0 6px 0 0;
}

.scan-corner.bl {
    bottom: 4px;
    left: 4px;
    border-width: 0 0 2px 2px;
    border-radius: 0 0 0 6px;
}

.scan-corner.br {
    bottom: 4px;
    right: 4px;
    border-width: 0 2px 2px 0;
    border-radius: 0 0 6px 0;
}

.scan-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0;
    animation: particleRise 5.5s ease-in-out infinite;
}

.scan-particle.p1 {
    left: 20%;
    animation-delay: 0s;
}

.scan-particle.p2 {
    left: 55%;
    animation-delay: 0.6s;
}

.scan-particle.p3 {
    left: 75%;
    animation-delay: 1.2s;
}

.scan-particle.p4 {
    left: 35%;
    animation-delay: 0.3s;
}

@keyframes particleRise {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0);
    }

    10% {
        opacity: 0.8;
        transform: translateY(30px) scale(1);
    }

    30% {
        opacity: 0.6;
        transform: translateY(-10px) scale(0.8);
    }

    42% {
        opacity: 0.9;
        transform: translateY(-30px) scale(1.2);
        background: var(--success);
    }

    48% {
        opacity: 0;
        transform: translateY(-50px) scale(0);
    }

    100% {
        opacity: 0;
        transform: translateY(50px) scale(0);
    }
}

.scan-ripple {
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgba(16, 185, 129, 0.4);
    width: 0;
    height: 0;
    opacity: 0;
    animation: rippleExpand 5.5s ease-out infinite;
}

.scan-ripple.r1 {
    animation-delay: 0s;
}

.scan-ripple.r2 {
    animation-delay: 0.15s;
}

@keyframes rippleExpand {

    0%,
    40% {
        width: 0;
        height: 0;
        opacity: 0;
    }

    44% {
        width: 40px;
        height: 40px;
        opacity: 0.6;
    }

    50% {
        width: 120px;
        height: 120px;
        opacity: 0.1;
    }

    56% {
        width: 160px;
        height: 160px;
        opacity: 0;
    }

    100% {
        width: 0;
        height: 0;
        opacity: 0;
    }
}

.qr-mock {
    position: relative;
    width: 96px;
    height: 96px;
    padding: 8px;
    background: var(--light);
    border-radius: 14px;
    overflow: hidden;
    transition: box-shadow 0.3s;
    animation: qrMockGlow 5.5s ease-in-out infinite;
    z-index: 2;
}

@keyframes qrMockGlow {

    0%,
    3% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }

    10% {
        box-shadow: 0 0 14px 2px rgba(59, 130, 246, 0.15);
    }

    35% {
        box-shadow: 0 0 18px 4px rgba(59, 130, 246, 0.2);
    }

    42% {
        box-shadow: 0 0 28px 6px rgba(16, 185, 129, 0.25);
    }

    48% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

[data-theme="dark"] .qr-mock {
    background: rgba(255, 255, 255, 0.05);
}

.qr-svg {
    width: 100%;
    height: 100%;
    color: var(--text-main);
    animation: qrPulse 5.5s ease-in-out infinite;
}

@keyframes qrPulse {

    0%,
    5% {
        transform: scale(1);
    }

    15% {
        transform: scale(1.02);
    }

    25% {
        transform: scale(0.98);
    }

    35% {
        transform: scale(1);
    }

    42% {
        transform: scale(1.04);
    }

    46% {
        transform: scale(1);
    }

    100% {
        transform: scale(1);
    }
}

.qr-scan-line {
    position: absolute;
    left: 8px;
    right: 8px;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    box-shadow: 0 0 10px 2px rgba(59, 130, 246, 0.5), 0 0 20px 4px rgba(59, 130, 246, 0.15);
    animation: qrScan 5.5s ease-in-out infinite;
}

@keyframes qrScan {
    0% {
        top: 6%;
        opacity: 0;
        transform: scaleX(0.5);
    }

    6% {
        opacity: 1;
        transform: scaleX(1);
    }

    38% {
        top: 88%;
        opacity: 1;
        transform: scaleX(1);
    }

    42% {
        top: 88%;
        opacity: 0;
        transform: scaleX(0.5);
    }

    100% {
        top: 6%;
        opacity: 0;
        transform: scaleX(0.5);
    }
}

.qr-demo-arrow {
    color: var(--secondary);
    font-size: 1rem;
    margin: 2px 0;
    animation: qrArrowCycle 5.5s ease-in-out infinite;
}

@keyframes qrArrowCycle {

    0%,
    18% {
        transform: translateY(0) scale(1);
        opacity: 0.4;
    }

    30% {
        transform: translateY(5px) scale(1);
        opacity: 1;
    }

    40% {
        transform: translateY(8px) scale(0.6);
        opacity: 0;
    }

    100% {
        transform: translateY(0) scale(1);
        opacity: 0.4;
    }
}

.qr-demo-stage {
    display: grid;
    width: 100%;
    align-items: start;
}

.qr-demo-processing {
    grid-area: 1 / 1;
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px dashed rgba(59, 130, 246, 0.28);
    background: rgba(59, 130, 246, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--secondary);
    opacity: 1;
    animation: processingFade 5.5s ease-in-out infinite;
}

[data-theme="dark"] .qr-demo-processing {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(96, 165, 250, 0.25);
}

.qr-demo-skel {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.qr-skel-line {
    height: 10px;
    border-radius: 6px;
    background: rgba(100, 116, 139, 0.14);
}

.qr-skel-line.is-mid {
    width: 72%;
}

.qr-skel-line.is-short {
    width: 48%;
}

[data-theme="dark"] .qr-skel-line {
    background: rgba(148, 163, 184, 0.16);
}

.rotating-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.rotating-loader-spinner {
    font-size: 2rem;
    color: var(--primary);
    animation: spin 0.8s linear infinite;
}

.rotating-loader-text {
    display: grid;
    height: 1.6em;
    overflow: hidden;
}

.rotating-loader-phrase {
    grid-area: 1 / 1;
    opacity: 0;
    transition: opacity 0.3s ease;
    white-space: nowrap;
    text-align: center;
}

.rotating-loader-phrase.active {
    opacity: 1;
}

.rotating-loader-dots {
    display: flex;
    gap: 6px;
}

.rotating-loader-dots .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border);
    transition: background 0.3s ease, transform 0.3s ease;
}

.rotating-loader-dots .dot.active {
    background: var(--primary);
    transform: scale(1.3);
}

[data-theme="dark"] .rotating-loader-dots .dot.active {
    background: var(--primary-light);
}

.rotating-loader--inline {
    flex-direction: row;
    gap: 6px;
    width: 100%;
}

.rotating-loader--inline .rotating-loader-spinner {
    font-size: 0.85rem;
}

.rotating-loader--inline .rotating-loader-text {
    height: 1.6em;
}

.rotating-loader--inline .rotating-loader-phrase {
    font-size: 0.8rem;
    color: var(--secondary);
    text-align: left;
}

.rotating-loader--inline .rotating-loader-dots {
    display: none;
}

.qr-demo-processing .rotating-loader-phrase,
.qr-demo-processing .rotating-loader-phrase.active {
    opacity: 0;
    transition: none;
}

.qr-demo-processing .rotating-loader-phrase:nth-child(1) {
    animation: qrPhrase1 5.5s ease-in-out infinite;
}

.qr-demo-processing .rotating-loader-phrase:nth-child(2) {
    animation: qrPhrase2 5.5s ease-in-out infinite;
}

.qr-demo-processing .rotating-loader-phrase:nth-child(3) {
    animation: qrPhrase3 5.5s ease-in-out infinite;
}

@keyframes qrPhrase1 {
    0%, 15% {
        opacity: 1;
        transform: translateY(0);
    }
    19%, 91% {
        opacity: 0;
        transform: translateY(-4px);
    }
    92% {
        opacity: 0;
        transform: translateY(4px);
    }
    96%, 100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes qrPhrase2 {
    0%, 16% {
        opacity: 0;
        transform: translateY(4px);
    }
    20%, 33% {
        opacity: 1;
        transform: translateY(0);
    }
    37%, 100% {
        opacity: 0;
        transform: translateY(-4px);
    }
}

@keyframes qrPhrase3 {
    0%, 34% {
        opacity: 0;
        transform: translateY(4px);
    }
    38%, 51% {
        opacity: 1;
        transform: translateY(0);
    }
    55%, 100% {
        opacity: 0;
        transform: translateY(-4px);
    }
}

@keyframes processingFade {

    0%,
    44% {
        opacity: 1;
        transform: translateY(0);
    }

    50%,
    90% {
        opacity: 0;
        transform: translateY(-4px);
    }

    96%,
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.qr-demo-result {
    grid-area: 1 / 1;
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(16, 185, 129, 0.1);
    text-align: left;
    opacity: 0;
    transform: translateY(14px) scale(0.95);
    animation: resultAppear 5.5s ease-in-out infinite;
}

@keyframes resultAppear {

    0%,
    48% {
        opacity: 0;
        transform: translateY(14px) scale(0.95);
    }

    54% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    82% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    90% {
        opacity: 0;
        transform: translateY(-6px) scale(0.97);
    }

    100% {
        opacity: 0;
        transform: translateY(14px) scale(0.95);
    }
}

[data-theme="dark"] .qr-demo-result {
    background: rgba(16, 185, 129, 0.15);
}

.qr-result-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.qr-result-icon {
    font-size: 1.5rem;
    color: var(--success);
    flex-shrink: 0;
    z-index: 1;
    animation: checkmarkPop 5.5s ease-in-out infinite;
}

@keyframes checkmarkPop {

    0%,
    48% {
        transform: scale(0);
        opacity: 0;
    }

    54% {
        transform: scale(1.3);
        opacity: 1;
    }

    58% {
        transform: scale(0.9);
        opacity: 1;
    }

    62% {
        transform: scale(1.1);
        opacity: 1;
    }

    66% {
        transform: scale(1);
        opacity: 1;
    }

    82% {
        transform: scale(1);
        opacity: 1;
    }

    90% {
        transform: scale(0.5);
        opacity: 0;
    }

    100% {
        transform: scale(0);
        opacity: 0;
    }
}

.qr-result-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    z-index: 1;
}

.qr-result-text strong {
    font-size: 0.93rem;
    color: var(--text-main);
}

.qr-result-text .result-store {
    font-size: 0.72rem;
    color: var(--primary);
    opacity: 0.9;
}

.qr-signature-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--success);
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 20px;
    padding: 3px 9px;
    margin-bottom: 8px;
    opacity: 0;
    transform: translateY(4px) scale(0.96);
    animation: signatureBadgeIn 5.5s ease-in-out infinite;
}

.qr-signature-badge i {
    font-size: 0.6rem;
}

@keyframes signatureBadgeIn {

    0%,
    55% {
        opacity: 0;
        transform: translateY(4px) scale(0.96);
    }

    60% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    82% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    90% {
        opacity: 0;
        transform: translateY(-4px) scale(0.97);
    }

    100% {
        opacity: 0;
        transform: translateY(4px) scale(0.96);
    }
}

.qr-result-divider {
    height: 1px;
    background: rgba(16, 185, 129, 0.2);
    margin: 6px 0;
}

.qr-result-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 6px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.72rem;
    color: var(--text-main);
    opacity: 0;
    animation: itemFadeIn 5.5s ease-out infinite;
}

.result-item:nth-child(1) {
    animation-delay: 0s;
}

.result-item:nth-child(2) {
    animation-delay: 0.08s;
}

.result-item:nth-child(3) {
    animation-delay: 0.16s;
}

@keyframes itemFadeIn {

    0%,
    52% {
        opacity: 0;
        transform: translateX(-6px);
    }

    58% {
        opacity: 0.9;
        transform: translateX(0);
    }

    82% {
        opacity: 0.9;
        transform: translateX(0);
    }

    90% {
        opacity: 0;
        transform: translateX(4px);
    }

    100% {
        opacity: 0;
        transform: translateX(-6px);
    }
}

.result-item .ri-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 8px;
}

.result-item .ri-qty {
    color: var(--secondary);
    flex-shrink: 0;
}

.result-item .ri-price {
    color: var(--text-main);
    font-weight: 600;
}

.qr-result-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-main);
    padding-top: 6px;
    border-top: 1px solid rgba(16, 185, 129, 0.15);
}

.total-amount {
    color: var(--success);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .qr-mock {
        animation: none;
    }

    .qr-svg {
        animation: none;
    }

    .qr-scan-line {
        animation: none;
        top: 50%;
        opacity: 1;
    }

    .qr-demo-arrow {
        animation: none;
        opacity: 1;
    }

    .qr-demo-processing {
        animation: none;
        opacity: 0;
        display: none;
    }

    .qr-demo-result {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .qr-result-icon {
        animation: none;
    }

    .scan-corner {
        animation: none;
        opacity: 1;
    }

    .scan-particle {
        display: none;
    }

    .scan-ripple {
        display: none;
    }

    .qr-signature-badge {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .iphone-frame {
        animation: none;
    }
}

.email-link {
    color: #3b82f6;
    text-decoration: none;
    transition: opacity 0.2s;
}

.email-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}


[data-animate] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: var(--anim-delay, 0ms);
    will-change: opacity, transform;
}

[data-animate="fade"] {
    transform: none;
}

[data-animate="zoom"] {
    transform: scale(0.92);
}

[data-animate="left"] {
    transform: translateX(-32px);
}

[data-animate="right"] {
    transform: translateX(32px);
}

[data-animate="down"] {
    transform: translateY(-28px);
}

[data-animate].is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {

    [data-animate] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

.input-group:has([required]) label::after {
    content: ' *';
    color: var(--error);
}

@media (max-width: 768px) {
    .modal-overlay {
        padding: 2rem 1rem;
        align-items: center;
    }

    .modal-content {
        max-height: calc(100vh - 4rem);
        padding: var(--space-6);
        border-radius: 16px;
    }
}

html.modal-open {
    overflow: hidden;
    height: 100%;
}

.cookie-banner {
    position: fixed;
    bottom: 20px;
    right: 20px;
    left: auto;
    transform: translateY(120%);
    max-width: 400px;
    width: calc(100% - 40px);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    z-index: var(--z-cookie);
    font-size: 0.84rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.4s ease, opacity 0.3s ease, visibility 0.3s ease;
    box-shadow: var(--shadow-lg);
    border-radius: 14px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    will-change: transform, opacity;
}

.cookie-banner.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

[data-theme="light"] .cookie-banner,
:not([data-theme="dark"]) .cookie-banner {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .cookie-banner {
    background: rgba(17, 17, 17, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.cookie-banner p {
    margin: 0;
    line-height: 1.4;
    color: var(--text-main);
}

.cookie-banner a {
    color: var(--primary);
    text-decoration: underline;
}

.cookie-banner .btn {
    flex-shrink: 0;
}

@media (max-width: 900px) {
    .cookie-banner {
        top: auto;
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        left: 50%;
        right: auto;
        transform: translateX(-50%) translateY(150%);
        max-width: 600px;
        width: calc(100% - 24px);
        padding: 14px 16px;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    body:has(.bottom-nav) .cookie-banner {
        bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    }

    .cookie-banner.show {
        transform: translateX(-50%) translateY(0);
    }

    .cookie-banner .btn {
        width: 100%;
    }
}

@supports not (backdrop-filter: blur(4px)) {

    .navbar,
    .modal-overlay,
    .cookie-banner {
        background: rgba(255, 255, 255, 0.92);
    }

    [data-theme="dark"] .navbar,
    [data-theme="dark"] .modal-overlay,
    [data-theme="dark"] .cookie-banner {
        background: rgba(20, 20, 20, 0.92);
    }
}


/* === UI Micro-Interactions & View Transitions === */
a,
button,
[role="button"],
.btn,
.nav-item,
.bottom-nav-item {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

@view-transition {
    navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
    animation: none;
    mix-blend-mode: normal;
}

::view-transition-old(root) {
    z-index: 1;
}

::view-transition-new(root) {
    z-index: 9999;
}

.is-collapsing {
    opacity: 0 !important;
    transform: translateX(18px) !important;
    height: 0 !important;
    min-height: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border-top-width: 0 !important;
    border-bottom-width: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
    transition:
        opacity 0.2s ease,
        transform 0.22s ease,
        height 0.22s ease,
        margin 0.22s ease,
        padding 0.22s ease !important;
}

@keyframes valuonHighlightPulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.45); border-color: var(--primary, #2563eb); }
    45% { box-shadow: 0 0 0 8px rgba(37, 99, 235, 0.14); border-color: var(--primary, #2563eb); }
    100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

.is-highlighted {
    animation: valuonHighlightPulse 1.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes valuonBellRing {
    0%, 100% { transform: rotate(0deg); }
    15% { transform: rotate(15deg); }
    30% { transform: rotate(-13deg); }
    45% { transform: rotate(10deg); }
    60% { transform: rotate(-7deg); }
    75% { transform: rotate(4deg); }
}

.bell-ring {
    display: inline-block;
    transform-origin: top center;
    animation: valuonBellRing 0.65s ease;
}

@keyframes valuonCopyPop {
    0% { transform: scale(0.65); }
    55% { transform: scale(1.16); }
    100% { transform: scale(1); }
}

.is-copied {
    color: #10b981 !important;
    border-color: rgba(16, 185, 129, 0.45) !important;
}

.is-copied i {
    animation: valuonCopyPop 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
    .is-highlighted,
    .bell-ring,
    .is-copied i {
        animation: none !important;
    }
    .is-collapsing {
        transition: none !important;
    }
}


/* === Network Online/Offline Status Pill === */
.net-status-pill {
    position: fixed;
    top: max(12px, env(safe-area-inset-top, 12px));
    left: 50%;
    transform: translate(-50%, -140%);
    z-index: 10050;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.92);
    color: #f8fafc;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    pointer-events: none;
    opacity: 0;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.24s ease, background 0.24s ease;
}

.net-status-pill.is-visible {
    transform: translate(-50%, 0);
    opacity: 1;
}

.net-status-pill.is-online {
    background: rgba(16, 185, 129, 0.95);
    color: #ffffff;
}
