/* ── Design tokens (mirrors the app) ─────────────────────────────────────────── */
:root {
    --bg: #09090b;
    --surface: rgba(24, 24, 27, 0.65);
    --primary: #ec4899;
    --accent: #818cf8;
    --gradient: linear-gradient(135deg, #ec4899, #818cf8);
    --border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
    --radius: 16px;
    --radius-lg: 24px;
    --maxw: 1100px;
}

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

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg);
    background-image:
        radial-gradient(circle at 12% 10%, rgba(236, 72, 153, 0.10), transparent 30%),
        radial-gradient(circle at 88% 0%, rgba(129, 140, 248, 0.12), transparent 34%);
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; }

.grad {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    background: var(--primary);
    color: #fff;
    padding: 0.6rem 1rem;
    border-radius: 0 0 8px 0;
    z-index: 100;
}
.skip-link:focus { left: 0; }

/* ── Scroll progress bar ──────────────────────────────────────────────────────── */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient);
    transform: scaleX(0);
    transform-origin: 0 50%;
    z-index: 60;
    pointer-events: none;
    will-change: transform;
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.5);
}

.glass {
    background:
        linear-gradient(rgba(24, 24, 27, 0.7), rgba(24, 24, 27, 0.7)) padding-box,
        linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.03)) border-box;
    border: 1px solid transparent;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* ── Header / nav ─────────────────────────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(9, 9, 11, 0.7);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    transition: padding 0.35s ease, background 0.35s ease, border-color 0.35s ease;
}

/* Once scrolled, the full-width bar fades out and the nav collapses into a
   floating glassmorphism pill. */
.site-header.scrolled {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom-color: transparent;
    padding-top: 0.6rem;
}

.nav {
    position: relative;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0.85rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid transparent;
    border-radius: 0;
    transition: max-width 0.45s cubic-bezier(0.16, 1, 0.3, 1), padding 0.35s ease,
        border-radius 0.45s ease, background 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.site-header.scrolled .nav {
    max-width: 920px;
    padding: 0.55rem 1.25rem;
    border-radius: 999px;
    background:
        linear-gradient(rgba(24, 24, 27, 0.72), rgba(24, 24, 27, 0.72)) padding-box,
        linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04)) border-box;
    border: 1px solid transparent;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 900;
    font-size: 1.15rem;
    letter-spacing: -0.03em;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.92rem;
}

.nav-links a { color: var(--text-dim); transition: color 0.2s; }
.nav-links a:hover { color: var(--text-main); }

.nav-cta {
    background: var(--gradient);
    color: #fff !important;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-weight: 600;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.4rem;
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
}

/* ── Buttons ──────────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.5rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}

.btn-primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(236, 72, 153, 0.35); }

.btn-ghost {
    background: var(--surface);
    color: var(--text-main);
    border-color: var(--border);
}
.btn-ghost:hover { background: rgba(63, 63, 70, 0.6); }

.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ── Hero ─────────────────────────────────────────────────────────────────────── */
.hero {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 4.5rem 1.25rem 3rem;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 2.5rem;
    align-items: center;
}

.eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 900; }

.lead {
    color: var(--text-dim);
    font-size: 1.05rem;
    margin: 1.25rem 0 1.75rem;
    max-width: 36ch;
}

.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.hero-note { color: var(--text-dim); font-size: 0.82rem; margin-top: 1rem; }

/* Phone mockup */
.hero-visual { display: flex; justify-content: center; }

.phone {
    width: 100%;
    max-width: 320px;
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.phone-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin-bottom: 0.5rem; }

.stat {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.7rem 0.4rem;
    text-align: center;
}
.stat-val { display: block; font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat-lbl { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); }
.stat.alert .stat-val { color: #ff6b6b; }
.stat.warn .stat-val { color: #ffb84d; }

.phone-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
}
.phone-row .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.phone-row .dot-low { background: #ff6b6b; }
.phone-row .dot-warn { background: #ffb84d; }
.phone-row .qty { margin-left: auto; font-weight: 800; font-variant-numeric: tabular-nums; }
.phone-row .qty.low { color: #ff6b6b; }

/* ── Sections ─────────────────────────────────────────────────────────────────── */
.section { max-width: var(--maxw); margin: 0 auto; padding: 3.5rem 1.25rem; }

.section-title {
    font-size: clamp(1.6rem, 3.5vw, 2.3rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 2.25rem;
}

/* Feature grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

.card { border-radius: var(--radius); padding: 1.6rem; transition: transform 0.2s; }
.card:hover { transform: translateY(-4px); }
.card-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.card h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.card p { color: var(--text-dim); font-size: 0.92rem; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; }
.step { position: relative; padding: 1.5rem 1.25rem 1.25rem; }
.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient);
    color: #fff;
    font-weight: 800;
    margin-bottom: 0.75rem;
}
.step h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.step p { color: var(--text-dim); font-size: 0.92rem; }

/* Privacy band */
.privacy-card { border-radius: var(--radius-lg); padding: 2.5rem; text-align: center; max-width: 760px; margin: 0 auto; }
.privacy-card h2 { font-size: 1.7rem; margin-bottom: 0.9rem; }
.privacy-card p { color: var(--text-dim); margin: 0 auto 1.5rem; max-width: 60ch; }
.privacy-links { display: flex; gap: 1.25rem; justify-content: center; flex-wrap: wrap; }
.privacy-links a { color: var(--accent); font-weight: 600; }
.privacy-links a:hover { text-decoration: underline; }

/* Get the app */
.get { text-align: center; }
.get-sub { color: var(--text-dim); margin-bottom: 1.5rem; }
.get-actions { display: flex; justify-content: center; gap: 0.75rem; flex-wrap: wrap; }

/* ── Contact form ─────────────────────────────────────────────────────────────── */
.contact-sub { text-align: center; color: var(--text-dim); margin-bottom: 2rem; }
.contact-sub a { color: var(--accent); }

.contact-form {
    max-width: 560px;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field label { font-size: 0.8rem; color: var(--text-dim); font-weight: 600; }
.field .opt { color: rgba(148, 163, 184, 0.6); font-weight: 400; }

.field input, .field textarea {
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-main);
    padding: 0.85rem 1rem;
    font: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    resize: vertical;
}
.field input:focus, .field textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.15);
}
.field input:invalid:not(:placeholder-shown) { border-color: rgba(255, 107, 107, 0.5); }

/* Honeypot — visually hidden but present for bots */
.hp {
    position: absolute;
    left: -5000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ── Toasts ───────────────────────────────────────────────────────────────────── */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column-reverse;
    gap: 0.5rem;
    pointer-events: none;
    width: min(380px, 92vw);
}

.toast {
    background: rgba(24, 24, 27, 0.97);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: 12px;
    padding: 0.85rem 1.1rem;
    font-size: 0.9rem;
    color: var(--text-main);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
    transform: translateY(12px);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
    pointer-events: auto;
    line-height: 1.45;
}

.toast--visible { transform: translateY(0); opacity: 1; }
.toast--success { border-left-color: #00c896; }
.toast--error   { border-left-color: #ff4444; }
.toast--warning { border-left-color: #ffa500; }
.toast--info    { border-left-color: var(--primary); }

/* ── Footer ───────────────────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--border); margin-top: 2rem; padding: 2.5rem 1.25rem 2rem; }
.footer-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem 2.5rem;
    align-items: flex-start;
    justify-content: space-between;
}
.footer-brand { display: flex; align-items: center; gap: 0.5rem; font-weight: 900; flex-wrap: wrap; }
.footer-tag { flex-basis: 100%; color: var(--text-dim); font-size: 0.85rem; font-weight: 400; margin-top: 0.25rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.25rem; font-size: 0.9rem; }
.footer-links a { color: var(--text-dim); }
.footer-links a:hover { color: var(--text-main); }
.footer-social { display: flex; gap: 0.6rem; }
.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-dim);
    transition: color 0.2s, transform 0.2s;
}
.footer-social a:hover { color: var(--text-main); transform: translateY(-2px); }
.copyright { text-align: center; color: var(--text-dim); font-size: 0.8rem; margin-top: 2rem; }

/* ── Entrance & scroll animations ─────────────────────────────────────────────── */
/* Hero animates in on load. */
.hero-text > * { animation: heroIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) both; }
.hero-text > *:nth-child(1) { animation-delay: 0.05s; }
.hero-text > *:nth-child(2) { animation-delay: 0.12s; }
.hero-text > *:nth-child(3) { animation-delay: 0.19s; }
.hero-text > *:nth-child(4) { animation-delay: 0.26s; }
.hero-text > *:nth-child(5) { animation-delay: 0.33s; }
.hero-visual { animation: heroIn 0.8s 0.2s cubic-bezier(0.16, 1, 0.3, 1) both; }

/* The phone gently floats. */
.phone { animation: float 6s ease-in-out 1.2s infinite; }

@keyframes heroIn {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: none; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
}

/* Scroll-reveal — class is added by script.js, then removed once it has played so
   it never blocks hover transitions (e.g. the card lift). */
.reveal { opacity: 0; }
.reveal.in { animation: revealUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both; }

@keyframes revealUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: none; }
}

/* ── Interactive showcase selector ────────────────────────────────────────────── */
.showcase-selector {
    display: flex;
    gap: 10px;
    height: 560px;
    width: 100%;
    max-width: 680px;          /* keeps the expanded panel close to a 9:16 phone shape */
    margin: 0.5rem auto 0;
}

.showcase-panel {
    position: relative;
    flex: 1 1 0%;
    min-width: 0;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    background-color: #18181b;
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
    border: 1px solid var(--border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    /* entrance (toggled by .in from script.js) */
    opacity: 0;
    transform: translateX(-40px);
    transition: flex-grow 0.7s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease,
        border-color 0.4s ease, opacity 0.6s ease, transform 0.6s ease;
}

.showcase-panel.in { opacity: 1; transform: none; }

.showcase-panel.active {
    flex-grow: 4;   /* with ~680px width + 560px height, the active panel lands near 9:16 */
    border-color: rgba(255, 255, 255, 0.45);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Scrim so the label stays legible over any screenshot */
.showcase-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(9, 9, 11, 0.92) 0%, rgba(9, 9, 11, 0.25) 42%, transparent 66%);
    pointer-events: none;
}

.sp-label {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 14px;
    z-index: 2;
}

.sp-icon {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    border-radius: 50%;
    background: rgba(24, 24, 27, 0.75);
    border: 1px solid var(--border);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.sp-info { min-width: 0; }

.sp-title,
.sp-sub {
    white-space: nowrap;
    opacity: 0;
    transform: translateX(16px);
    transition: opacity 0.5s ease 0.1s, transform 0.5s ease 0.1s;
}

.sp-title { font-weight: 700; font-size: 1.05rem; }
.sp-sub { font-size: 0.85rem; color: var(--text-dim); }

.showcase-panel.active .sp-title,
.showcase-panel.active .sp-sub { opacity: 1; transform: none; }

.showcase-panel:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

@media (max-width: 768px) {
    .showcase-selector { flex-direction: column; height: 600px; max-width: 440px; }
    .showcase-panel { transform: translateY(40px); }
    .showcase-panel.in { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .showcase-panel { opacity: 1 !important; transform: none !important; }
}

/* ── Responsive ───────────────────────────────────────────────────────────────── */
@media (max-width: 820px) {
    .hero { grid-template-columns: 1fr; padding-top: 3rem; }
    .hero-visual { order: -1; }
    .phone { max-width: 280px; }

    .nav-toggle { display: flex; align-items: center; justify-content: center; }
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: rgba(9, 9, 11, 0.97);
        border-bottom: 1px solid var(--border);
        padding: 0.5rem 1.25rem 1rem;
        display: none;
    }
    .nav-links.open { display: flex; }
    .nav-links li { width: 100%; }
    .nav-links a { display: block; padding: 0.85rem 0; }
    .nav-cta { text-align: center; margin-top: 0.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
    .reveal { opacity: 1 !important; }
}
