/* ═══════════════════════════════════════════════════════════════════════
   maigica — Landing Page Styles
   Matches the chatbot-fe dark minimalist theme. No gradients.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Reset & base ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg-primary:    #0d1117;
    --bg-card:       #1e2430;
    --bg-input:      #2a3140;
    --bg-hover:      #363e50;
    --border:        #3a4250;
    --text-primary:  #e6edf3;
    --text-secondary:#8b949e;
    --text-muted:    #484f58;
    --accent:        #a78bfa;
    --accent-dim:    rgba(167, 139, 250, 0.15);
    --accent-glow:   rgba(167, 139, 250, 0.35);
    --radius-sm:     10px;
    --radius-md:     16px;
    --max-w:         1100px;
    --font:          'Inter', system-ui, sans-serif;
}

/* ── Business theme — light, clean, same violet accent ────────────────── */
[data-audience="business"] {
    --bg-primary:    #f8f9fb;
    --bg-card:       #ffffff;
    --bg-input:      #eef1f5;
    --bg-hover:      #e5e9f0;
    --border:        #d0d5dd;
    --text-primary:  #1a1d23;
    --text-secondary:#555d6b;
    --text-muted:    #8b929e;
    --accent:        #7c5cbf;
    --accent-dim:    rgba(124, 92, 191, 0.10);
    --accent-glow:   rgba(124, 92, 191, 0.25);
}

/* Business theme: SVG strokes/fills inside feature & pricing icons */
[data-audience="business"] .feature-icon svg [stroke="#a78bfa"],
[data-audience="business"] .pricing-icon svg [stroke="#a78bfa"] {
    stroke: #7c5cbf;
}
[data-audience="business"] .feature-icon svg [fill="#a78bfa"],
[data-audience="business"] .pricing-icon svg [fill="#a78bfa"] {
    fill: #7c5cbf;
}

/* Business theme: logo text recolor */
[data-audience="business"] .nav-logo text { fill: var(--text-primary); }
[data-audience="business"] .nav-logo tspan { fill: var(--accent); }
[data-audience="business"] .nav-logo path { fill: var(--accent); }

/* ── Audience-based visibility (pricing + use cases) ──────────────────── */
[data-audience="personal"] .pricing-audience-business { display: none; }
[data-audience="business"] .pricing-audience-personal { display: none; }
[data-audience="personal"] .uc-audience-business { display: none; }
[data-audience="business"] .uc-audience-personal { display: none; }

/* laive persona branding — "ai" in maigica purple */
.uc-ai-accent { color: #7c5cbf; font-weight: 500; }

/* Business theme: navbar solid background + subtle shadow */
[data-audience="business"] .navbar {
    background: var(--bg-card);
    border-bottom-color: var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* Business theme: CTA circle inverts readably */
[data-audience="business"] .nav-links a.nav-cta-circle {
    background: transparent;
    border-color: var(--accent);
    color: var(--accent);
}
[data-audience="business"] .hero-cta-circle.primary {
    background: transparent;
    border-color: var(--accent);
    color: var(--accent);
}
[data-audience="business"] .btn-primary {
    background: transparent;
    color: var(--accent);
}
/* Business theme: date input text readable */
[data-audience="business"] .billing-filters input[type="date"]::-webkit-calendar-picker-indicator {
    filter: none;
}

html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background 0.4s ease, color 0.4s ease;
    text-transform: lowercase;
}
a { color: var(--accent); text-decoration: none; transition: color 0.3s; }
a:hover { text-decoration: underline; }
button, input, select { text-transform: inherit; }
textarea { text-transform: none; }

/* Exclude widget from lowercase */
#maigica-widget-root { text-transform: none; }

/* ── Typography ───────────────────────────────────────────────────────── */
h1,h2,h3,h4 { font-weight: 300; line-height: 1.25; letter-spacing: 0.5px; }
h1 { font-size: clamp(2.5rem, 6vw, 4rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); }
h3 { font-size: 1.1rem; font-weight: 300; }

.section-title {
    text-align: center;
    margin-bottom: 2.5rem;
    color: var(--text-primary);
}

/* ── Container ────────────────────────────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
.section   { padding: 5rem 0; }

/* ── Navbar ───────────────────────────────────────────────────────────── */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    height: 52px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center;
    padding: 0;
}
.navbar .container {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%;
}
.nav-logo {
    display: flex; align-items: center; gap: 0;
}
.nav-logo:hover { text-decoration: none; }
.nav-links {
    display: flex; align-items: center; gap: 1.5rem; list-style: none;
}
.nav-links a {
    color: var(--text-secondary); font-size: 0.9rem; font-weight: 400;
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--text-primary); text-decoration: none; }

/* Nav CTA circle */
.nav-links a.nav-cta-circle {
    width: 34px; height: 34px;
    border-radius: 50%;
    border: 1px solid var(--accent);
    background: transparent;
    color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.2s;
}
.nav-links a.nav-cta-circle:hover { opacity: 0.85; text-decoration: none; }
.nav-links a.nav-cta-circle.active { color: var(--bg-primary); }

/* Language dropdown */
.lang-select {
    background: transparent; border: 1px solid var(--border);
    color: var(--text-secondary); border-radius: 9999px;
    padding: 0.3rem 0.65rem; font-size: 0.8rem; font-weight: 500;
    cursor: pointer; transition: color 0.2s, border-color 0.2s;
    font-family: var(--font); appearance: none;
    -webkit-appearance: none; -moz-appearance: none;
    text-align: center; min-width: 3.2rem;
}
.lang-select:hover, .lang-select:focus { color: var(--accent); border-color: var(--accent); outline: none; }
.lang-select option { background: var(--bg-card); color: var(--text-primary); }

/* ── Nav user / logout (logged-in state) — matches chatbot-fe ─────────── */
.nav-user {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex; align-items: center; gap: 6px;
    white-space: nowrap;
}
.nav-user #session-user {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    vertical-align: middle;
}
.nav-user .fa-user-circle { font-size: 1rem; }
.nav-btn-logout {
    background: none; border: none;
    color: var(--accent);
    cursor: pointer; font-size: 0.8rem; font-weight: 400;
    padding: 2px 6px; border-radius: 6px;
    transition: background 0.2s;
    font-family: var(--font);
}
.nav-btn-logout:hover { background: var(--accent-dim); }

/* ── Plan badge (shown next to username when logged in) ────────────── */
.plan-badge {
    display: inline-block;
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
    line-height: 1.4;
}
.plan-badge--free       { background: var(--border); color: var(--text-secondary); }
.plan-badge--personal_plus { background: #8b5cf620; color: #a78bfa; border: 1px solid #a78bfa40; }
.plan-badge--business   { background: #3b82f620; color: #60a5fa; border: 1px solid #60a5fa40; }
.plan-badge--enterprise { background: #f59e0b20; color: #fbbf24; border: 1px solid #fbbf2440; }

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.65rem 1.6rem; border-radius: 9999px;
    font-weight: 500; font-size: 0.95rem; cursor: pointer;
    transition: opacity 0.2s, background 0.2s, color 0.2s, border-color 0.2s;
    border: none; font-family: var(--font); letter-spacing: 0.3px;
}
.btn-primary {
    background: transparent; color: var(--accent); border: 1px solid var(--accent);
}
.btn-primary:hover { opacity: 0.85; text-decoration: none; }
.btn-secondary {
    background: transparent; border: 1px solid var(--border);
    color: var(--text-secondary);
}
.btn-secondary:hover {
    border-color: var(--accent); color: var(--accent); text-decoration: none;
}

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero {
    min-height: 100vh; display: flex; align-items: center;
    text-align: center; padding-top: 4rem;
}
.hero[hidden] { display: none; }
.hero-content { width: 100%; }
#hero-anchor {
    font-size: clamp(1.1rem, 2.2vw, 1.5rem);
    font-weight: 300;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    margin-bottom: 0.6rem;
    line-height: 1.4;
    opacity: 0;
    animation: anchor-fade-in 1.2s ease-out 0.3s forwards;
}
@keyframes anchor-fade-in {
    0%   { opacity: 0; transform: translateY(-8px); }
    100% { opacity: 1; transform: translateY(0); }
}
#hero-anchor .wand-icon {
    display: inline-block;
    width: 1.15em;
    height: 1.15em;
    vertical-align: -0.15em;
    margin: 0 0.1em;
    color: var(--accent);
    filter: drop-shadow(0 0 0px var(--accent));
    animation: wand-glow 2.5s ease-in-out 1s forwards;
}
@keyframes wand-glow {
    0%   { filter: drop-shadow(0 0 0px var(--accent)); }
    40%  { filter: drop-shadow(0 0 8px var(--accent-glow)); }
    70%  { filter: drop-shadow(0 0 14px var(--accent-glow)); }
    100% { filter: drop-shadow(0 0 6px var(--accent-glow)); }
}
#hero-anchor .maigica-inline {
    display: inline;
    font-weight: 300;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}
#hero-anchor .maigica-inline .ai {
    font-weight: 600;
    color: var(--accent);
}
.hero-subtitle {
    font-size: clamp(1rem, 2.2vw, 1.2rem);
    color: var(--text-secondary);
    max-width: 560px; margin: 0 auto 0.75rem;
    font-weight: 400;
}
#tagline {
    font-size: clamp(1.8rem, 4.5vw, 2.8rem);
    color: var(--accent);
    font-style: normal;
    font-weight: 200;
    min-height: 3.2em;
    margin-bottom: 3.5rem;
    opacity: 1;
    letter-spacing: 0.5px;
    line-height: 1.3;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}
#tagline .cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--accent);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: blink-cursor 0.75s step-end infinite;
}
@keyframes blink-cursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
@keyframes fade-scale-in {
    0% { opacity: 0; transform: scale(1.08); }
    100% { opacity: 1; transform: scale(1); }
}
.tagline-appear {
    animation: fade-scale-in 0.6s ease-out;
}
.hero-ctas {
    display: flex; gap: 1.5rem; justify-content: center;
    align-items: center; flex-wrap: wrap; margin-top: 1rem;
}
.hero-cta-circle {
    width: 64px; height: 64px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: border-color 0.2s, background 0.2s, color 0.2s;
    font-family: var(--font);
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    text-decoration: none;
    position: relative;
}
.hero-cta-circle.primary {
    border-color: var(--accent);
    background: transparent;
    color: var(--accent);
}
.hero-cta-circle.primary:hover {
    opacity: 0.85; text-decoration: none;
}
.hero-cta-circle:not(.primary):hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-dim);
    text-decoration: none;
}

/* ── Page views (under navbar) ────────────────────────────────────────── */
.page-view {
    padding-top: 4rem; /* clear fixed navbar */
    min-height: 100vh;
    overflow-x: hidden;
}
.page-view[hidden] { display: none; }
.page-inner {
    padding: 3rem 0 4rem;
}
.page-title {
    text-align: center;
    margin-bottom: 3.5rem;
    color: var(--accent);
    font-size: clamp(1.8rem, 4.5vw, 2.8rem);
    font-weight: 200;
    letter-spacing: 0.5px;
    line-height: 1.3;
    min-height: 1.4em;
}
.page-title .cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--accent);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: blink-cursor 0.75s step-end infinite;
}

/* Active nav link highlight */
.nav-links a.active {
    color: var(--accent);
}

/* Page content entrance animation */
@keyframes fade-up {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}
.page-view .features-grid .feature-card,
.page-view .usecases-grid .usecase-card,
.page-view .pricing-grid .pricing-card {
    opacity: 0;
    animation: fade-up 0.45s ease forwards;
}
.page-view .features-grid .feature-card:nth-child(1),
.page-view .usecases-grid .usecase-card:nth-child(1),
.page-view .pricing-grid .pricing-card:nth-child(1) { animation-delay: 0.08s; }
.page-view .pricing-grid .pricing-card:nth-child(3) { animation-delay: 0.24s; }
.page-view .features-grid .feature-card:nth-child(2),
.page-view .usecases-grid .usecase-card:nth-child(2),
.page-view .pricing-grid .pricing-card:nth-child(2) { animation-delay: 0.16s; }
.page-view .features-grid .feature-card:nth-child(3),
.page-view .usecases-grid .usecase-card:nth-child(3) { animation-delay: 0.24s; }
.page-view .features-grid .feature-card:nth-child(4),
.page-view .usecases-grid .usecase-card:nth-child(4) { animation-delay: 0.32s; }
.page-view .usecases-grid .usecase-card:nth-child(5) { animation-delay: 0.40s; }
.page-view .usecases-grid .usecase-card:nth-child(6) { animation-delay: 0.48s; }
.page-view .usecases-grid .usecase-card:nth-child(7) { animation-delay: 0.56s; }
.page-view .features-grid .feature-card:nth-child(5) { animation-delay: 0.40s; }
.page-view .features-grid .feature-card:nth-child(6) { animation-delay: 0.48s; }
.page-view .features-grid .feature-card:nth-child(7) { animation-delay: 0.56s; }

/* ── Features grid ────────────────────────────────────────────────────── */
.section-subheading {
    width: 100%;
    text-align: center;
    color: var(--accent);
    font-size: 1.2rem;
    font-weight: 300;
    margin: 2.5rem 0 0.5rem;
    letter-spacing: 0.02em;
}
.features-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem;
}
.feature-card {
    background: transparent;
    border: none;
    padding: 1.5rem 1rem;
    text-align: center;
    display: flex; flex-direction: column; align-items: center;
    width: 300px;
}
.feature-icon {
    width: 56px; height: 56px;
    display: flex; justify-content: center; align-items: center;
    margin-bottom: 1rem;
}
.feature-card h3 { margin-bottom: 0.4rem; color: var(--text-primary); }
.feature-card p  { color: var(--text-secondary); font-size: 0.88rem; max-width: 260px; }

/* ── Use cases ────────────────────────────────────────────────────────── */
.usecases-section { background: var(--bg-card); }
.uc-filter-bar {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.uc-filter-btn {
    padding: 0.4rem 1rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.2s;
}
.uc-filter-btn:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}
.uc-filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
[data-audience="business"] .uc-filter-btn.active {
    color: #fff;
}
.usecases-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem;
}
.usecase-card {
    background: transparent;
    border: none;
    padding: 1.5rem 1rem;
    text-align: center;
    display: flex; flex-direction: column; align-items: center;
    width: 300px;
}
.usecase-card:hover { background: transparent; }
.usecase-icon {
    width: 56px; height: 56px;
    display: flex; justify-content: center; align-items: center;
    margin-bottom: 1rem;
}
.usecase-icon svg {
    stroke: #999;
}
.usecase-card[hidden] { display: none !important; }
.usecase-card h3 { margin-bottom: 0.4rem; }
.usecase-card p  { color: var(--text-secondary); font-size: 0.88rem; max-width: 260px; }


.uc-try-btn {
    margin-top: 0.75rem;
    padding: 0.35rem 1.2rem;
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 999px;
    border: 1px solid var(--accent);
    background: transparent;
    color: var(--accent);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.uc-try-btn:hover {
    background: transparent;
    color: var(--accent);
    border-color: var(--text-primary);
}

.uc-learn-link {
    display: block;
    margin-top: auto;
    padding-top: 0.5rem;
    font-size: 0.78rem;
    color: var(--muted, #8b949e);
    text-decoration: none;
    transition: color 0.15s;
}
.uc-learn-link:hover {
    color: var(--accent);
}


/* ── Pricing ──────────────────────────────────────────────────────────── */

/* Billing toggle (Monthly / Annual) */
.billing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin: 0 auto 1.5rem;
}
.billing-toggle__btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.4rem 1.2rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.billing-toggle__btn:first-child { border-radius: 6px 0 0 6px; }
.billing-toggle__btn:nth-child(2) { border-radius: 0 6px 6px 0; }
.billing-toggle__btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* Strikethrough price + annual pricing */
.pricing-price-wrap {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    justify-content: center;
}
.pricing-price-old {
    font-size: 1.1rem;
    color: var(--text-muted);
    text-decoration: line-through;
    font-weight: 300;
    transition: opacity 0.3s ease, max-width 0.3s ease;
    overflow: hidden;
    max-width: 8rem;
}
.pricing-period-sub {
    display: block;
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-bottom: 1rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}
.pricing-price {
    transition: opacity 0.25s ease;
}

/* Monthly billing mode: fade out strikethrough + annual sub-text */
body[data-billing="monthly"] .pricing-price-old { opacity: 0; max-width: 0; gap: 0; }
body[data-billing="monthly"] .pricing-period-sub { opacity: 0; height: 0; margin: 0; overflow: hidden; }

/* Animated stars behind personal pricing tiers */
.pricing-grid-personal {
    position: relative;
    overflow: visible;
}
.pricing-grid-personal::before {
    content: '';
    position: absolute;
    inset: -40px -60px;
    pointer-events: none;
    z-index: 0;
    background-image:
        radial-gradient(1.5px 1.5px at 8% 15%,   #a78bfa 60%, transparent 100%),
        radial-gradient(2px 2px   at 18% 70%,  #c4b5fd 60%, transparent 100%),
        radial-gradient(1.5px 1.5px at 32% 25%,   #ddd6fe 60%, transparent 100%),
        radial-gradient(2px 2px   at 45% 82%,  #a78bfa 60%, transparent 100%),
        radial-gradient(1.5px 1.5px at 55% 12%,   #c4b5fd 60%, transparent 100%),
        radial-gradient(2.5px 2.5px at 65% 55%,  #a78bfa 60%, transparent 100%),
        radial-gradient(1.5px 1.5px at 78% 30%,   #ddd6fe 60%, transparent 100%),
        radial-gradient(2px 2px   at 88% 75%,  #c4b5fd 60%, transparent 100%),
        radial-gradient(1.5px 1.5px at 95% 18%,   #a78bfa 60%, transparent 100%),
        radial-gradient(2px 2px   at 12% 45%,  #ddd6fe 60%, transparent 100%),
        radial-gradient(1.5px 1.5px at 72% 88%,   #a78bfa 60%, transparent 100%),
        radial-gradient(2px 2px   at 40% 50%,  #c4b5fd 60%, transparent 100%);
    opacity: 0.35;
    animation: starTwinkle 4s ease-in-out infinite alternate;
}
@keyframes starTwinkle {
    0%   { opacity: 0.25; }
    50%  { opacity: 0.45; }
    100% { opacity: 0.3;  }
}
.pricing-grid-personal > * { position: relative; z-index: 1; }

.pricing-group-label {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin: 2rem auto 0.75rem;
    color: var(--accent);
    opacity: 0.8;
}
.pricing-grid {
    display: flex;
    gap: 1.25rem;
    max-width: 960px;
    margin: 0 auto;
    justify-content: center;
}
.pricing-card {
    background: transparent;
    border: none;
    padding: 1.5rem 1rem;
    text-align: center;
    display: flex; flex-direction: column; align-items: center;
    flex: 1;
    max-width: 320px;
}
.pricing-card .btn {
    margin-top: auto;
}
.pricing-icon {
    width: 56px; height: 56px;
    display: flex; justify-content: center; align-items: center;
    margin-bottom: 1rem;
}
.pricing-icon svg { stroke: #1a1d23 !important; }
.pricing-name { font-size: 1.1rem; font-weight: 500; margin-bottom: 0.25rem; color: var(--text-primary); }
.pricing-price {
    font-size: 2rem; font-weight: 300; color: var(--text-primary);
    letter-spacing: -0.02em;
}
.pricing-period { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 1rem; display: block; }
.pricing-features { list-style: none; margin-bottom: 1.25rem; text-align: left; flex-grow: 1; }
.pricing-features li {
    padding: 0.3rem 0;
    color: var(--text-secondary);
    font-size: 0.88rem;
}
.pricing-features li::before {
    content: '✓ '; color: var(--text-primary); margin-right: 0.25rem;
}

/* ── Configurator active mode ─────────────────────────────────────────── */
body.configurator-active { overflow-x: hidden; }
#page-configurator.page-view { min-height: 0; }

/* ── Footer ───────────────────────────────────────────────────────────── */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 1.75rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}
.footer-links { display: flex; gap: 1.25rem; justify-content: center; margin-top: 0.4rem; }
.footer-links a { color: var(--text-secondary); font-size: 0.8rem; }

/* ── Responsive ──────────────────────────────────────────────────────── */

/* Hamburger button — hidden on desktop */
.nav-hamburger {
    display: none;
    background: none; border: none;
    color: var(--text-secondary); cursor: pointer;
    padding: 0.35rem; margin-left: auto;
    line-height: 0;
}
.nav-hamburger svg { width: 22px; height: 22px; }

/* Mobile drawer */
.mobile-menu {
    display: none;
    position: fixed; top: 52px; right: 0; bottom: 0;
    width: min(280px, 80vw);
    background: var(--bg-primary);
    border-left: 1px solid var(--border);
    z-index: 200;
    flex-direction: column; gap: 0;
    padding: 1rem 0;
    overflow-y: auto;
    box-shadow: -4px 0 20px rgba(0,0,0,0.4);
}
.mobile-menu.open { display: flex; }
.mobile-menu a, .mobile-menu button {
    display: block; padding: 0.75rem 1.5rem;
    color: var(--text-secondary); font-size: 0.95rem;
    font-weight: 400; text-decoration: none;
    background: none; border: none; text-align: left;
    font-family: var(--font); cursor: pointer;
    transition: color 0.2s, background 0.2s;
    width: 100%;
}
.mobile-menu a:hover, .mobile-menu button:hover {
    color: var(--text-primary); background: var(--bg-card);
}
.mobile-menu-backdrop {
    display: none; position: fixed; inset: 0; top: 52px;
    background: rgba(0,0,0,0.4); z-index: 199;
}
.mobile-menu-backdrop.open { display: block; }

@media (max-width: 768px) {
    .nav-hamburger { display: flex; margin-left: 0.5rem; }
    .nav-links { margin-left: auto; gap: 0.5rem; }
    .nav-links .nav-desktop { display: none; }
    .nav-links .lang-select { display: none; }
    .navbar > .container > .audience-toggle { display: none; }
    .hero { min-height: 85vh; padding-top: 5rem; }
    .section { padding: 3.5rem 0; }
    .page-inner { padding: 2rem 0 3rem; }
    .page-title { margin-bottom: 2rem; }
    .auth-box { padding: 1.5rem 1.25rem; }
}

.mobile-menu .audience-toggle {
    display: flex;
    margin: 0.5rem 1.25rem 0.75rem;
    align-self: flex-start;
}
.mobile-lang-select {
    margin: 0.5rem 1.25rem;
    align-self: flex-start;
}
@media (max-width: 480px) {
    .nav-links { gap: 0.5rem; }
    .hero-ctas { flex-direction: column; align-items: center; }
    .usecases-grid { flex-direction: column; align-items: center; }
    .pricing-grid { flex-direction: column; align-items: center; }
}

/* ── Nav sign-in / dashboard link ────────────────────────────────────── */
.nav-signin {
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    color: var(--accent) !important;
    border: 1px solid var(--accent);
    border-radius: 9999px;
    padding: 0.3rem 0.85rem;
    transition: background 0.2s, color 0.2s;
}
.nav-signin:hover {
    background: var(--accent) !important;
    color: var(--bg-primary) !important;
    text-decoration: none !important;
}

/* ── Audience toggle pill (For You / For Business) ───────────────────── */
.audience-toggle {
    display: flex;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 9999px;
    padding: 2px;
    gap: 0;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.2px;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.2s;
}
.audience-toggle:hover { border-color: var(--accent); }
.audience-toggle__btn {
    padding: 0.25rem 0.7rem;
    border-radius: 9999px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 0.72rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.25s, color 0.25s;
    white-space: nowrap;
    line-height: 1.3;
}
.audience-toggle__btn.active {
    background: var(--accent);
    color: #fff;
}
[data-audience="personal"] .audience-toggle__btn.active {
    background: var(--accent);
    color: var(--bg-primary);
}
[data-audience="business"] .audience-toggle__btn.active {
    background: var(--accent);
    color: #fff;
}

/* ── Auth box (login / register form) ───────────────────────────────── */
.auth-box {
    max-width: 400px;
    margin: 0 auto;
    padding: 2rem 1.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-card);
}

.auth-form label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}
.auth-form input {
    display: block;
    width: 100%;
    padding: 0.6rem 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.92rem;
    outline: none;
    transition: border-color 0.2s;
}
.auth-form input:focus {
    border-color: var(--accent);
}
.auth-form[hidden] { display: none; }

.auth-submit {
    width: 100%;
    margin-top: 0.5rem;
}

.auth-msg {
    padding: 0.6rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}
.auth-msg[hidden] { display: none; }
.auth-msg.error {
    background: rgba(248, 81, 73, 0.12);
    color: #f85149;
    border: 1px solid rgba(248, 81, 73, 0.25);
}
.auth-msg.success {
    background: rgba(63, 185, 80, 0.12);
    color: #3fb950;
    border: 1px solid rgba(63, 185, 80, 0.25);
}

/* Cross-link between sign-in / register */
.auth-switch {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.auth-switch a {
    color: var(--accent);
    font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════════════
   Billing page
   ═══════════════════════════════════════════════════════════════════════ */

/* Billing page entrance animations */
.pool-card,
.billing-filters,
.summary-card,
.billing-table-wrap {
    opacity: 0;
    animation: fade-up 0.45s ease forwards;
}
.pool-card:nth-child(1) { animation-delay: 0.06s; }
.pool-card:nth-child(2) { animation-delay: 0.12s; }
.pool-card:nth-child(3) { animation-delay: 0.18s; }
.pool-card:nth-child(4) { animation-delay: 0.24s; }
.billing-filters        { animation-delay: 0.30s; }
.summary-card:nth-child(1) { animation-delay: 0.08s; }
.summary-card:nth-child(2) { animation-delay: 0.16s; }
.summary-card:nth-child(3) { animation-delay: 0.24s; }
.summary-card:nth-child(4) { animation-delay: 0.32s; }
.billing-table-wrap     { animation-delay: 0.12s; }

/* Pool status cards */
.billing-pool {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.pool-card {
    background: transparent;
    border: none;
    border-top: 1px solid var(--border);
    border-radius: 0;
    padding: 1.1rem 1.25rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.pool-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
    letter-spacing: 0.5px;
}
.pool-value {
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--text-primary);
}

/* Filters row */
.billing-filters {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.billing-filters label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.billing-filters input[type="date"] {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 0.45rem 0.75rem;
    font-size: 0.85rem;
    font-family: var(--font);
}
.billing-filters input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.7);
}

/* Summary cards */
.billing-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.summary-card {
    background: transparent;
    border: none;
    border-top: 1px solid var(--border);
    border-radius: 0;
    padding: 1rem 1.25rem;
    text-align: center;
}
.summary-value {
    font-size: 1.6rem;
    font-weight: 300;
    color: var(--accent);
    line-height: 1.2;
}
.summary-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 0.3rem;
    letter-spacing: 0.5px;
}

/* Sessions table */
.billing-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.billing-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.billing-table th,
.billing-table td {
    padding: 0.6rem 0.8rem;
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid var(--border);
}
.billing-table th {
    background: transparent;
    color: var(--text-secondary);
    font-weight: 300;
    font-size: 0.78rem;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
}
.billing-table td {
    color: var(--text-primary);
}
.billing-table tbody tr:hover {
    background: transparent;
}

/* Empty state */
.billing-empty {
    text-align: center;
    color: var(--text-secondary);
    padding: 3rem 1rem;
    font-size: 0.95rem;
}
.billing-empty[hidden] { display: none; }

/* ═══════════════════════════════════════════════════════════════════════
   Reel video section — phone-frame carousel + modal player
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Carousel strip ──────────────────────────────────────────────────── */
.reels-section {
    margin-top: 3rem;
}
.reels-section .section-subheading {
    text-align: center;
    margin-bottom: 1.5rem;
}
.reels-carousel {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 0.5rem 0 1.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}
.reels-carousel::-webkit-scrollbar { height: 6px; }
.reels-carousel::-webkit-scrollbar-track { background: transparent; }
.reels-carousel::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── Phone frame ─────────────────────────────────────────────────────── */
.reel-phone {
    flex: 0 0 auto;
    scroll-snap-align: center;
    width: 200px;
    cursor: pointer;
    text-align: center;
    transition: transform 0.2s;
}
.reel-phone:hover { transform: translateY(-4px); }

.reel-frame {
    position: relative;
    width: 200px;
    height: 356px;          /* 9:16 ratio */
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid var(--border);
    background: #000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.reel-frame video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.reel-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.35);
    transition: background 0.2s;
}
.reel-phone:hover .reel-play-overlay { background: rgba(0,0,0,0.15); }
.reel-play-overlay svg {
    width: 48px;
    height: 48px;
    fill: #fff;
    opacity: 0.9;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
}
.reel-title {
    margin-top: 0.6rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-primary);
}
.reel-hook {
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
    line-height: 1.3;
}

/* ── Play badge on feature/use-case cards ────────────────────────────── */
.reel-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 0.5rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    border: 1px solid var(--accent);
    background: var(--accent-dim);
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.reel-badge:hover {
    background: var(--accent);
    color: #fff;
}
.reel-badge svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

/* ── Fullscreen video modal ──────────────────────────────────────────── */
.reel-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.92);
    align-items: center;
    justify-content: center;
}
.reel-modal.open { display: flex; }
.reel-modal-inner {
    position: relative;
    height: min(85vh, calc(90vw * 16 / 9));
    aspect-ratio: 9 / 16;
    max-width: 90vw;
    border-radius: 24px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}
.reel-modal-inner video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.reel-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.2s;
}
.reel-modal-close:hover { background: rgba(255,255,255,0.2); }

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .reel-phone { width: 160px; }
    .reel-frame { width: 160px; height: 284px; }
}

/* ═══════════════════════════════════════════════════════════════════════
   Reusable confirmation modal
   Usage: window.maigicaConfirm({ title, message, confirmLabel, cancelLabel })
   ═══════════════════════════════════════════════════════════════════════ */
.confirm-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}
.confirm-modal.open { display: flex; }
.confirm-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}
.confirm-modal__card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 2rem 2rem 1.5rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
    animation: confirm-enter 0.2s ease;
}
@keyframes confirm-enter {
    from { opacity: 0; transform: scale(0.92) translateY(8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.confirm-modal__title {
    margin: 0 0 0.6rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}
.confirm-modal__message {
    margin: 0 0 1.5rem;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-secondary);
}
.confirm-modal__actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}
.confirm-modal__btn {
    padding: 0.5rem 1.3rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    transition: opacity 0.2s, background 0.2s, border-color 0.2s;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
}
.confirm-modal__btn:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}
.confirm-modal__btn--confirm {
    background: var(--accent);
    color: var(--bg-primary);
    border-color: var(--accent);
}
.confirm-modal__btn--confirm:hover {
    opacity: 0.85;
    border-color: var(--accent);
}
.confirm-modal__btn--danger {
    background: #f44336;
    color: #fff;
    border-color: #f44336;
}
.confirm-modal__btn--danger:hover {
    opacity: 0.85;
    border-color: #f44336;
}
