/* ═══════════════════════════════════════════════════════════════════════════
   Neweb Landing Theme — Main CSS
   Converted from neweb-landing-next/globals.css preserving all effects
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── CSS Variables ─────────────────────────────────────────────────────────── */
:root {
    --color-brand: #247fc3;
    --color-brand-hover: #186bb1;
    --color-brand-glow: rgba(36, 127, 195, 0.15);
    --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
    --font-serif: 'Instrument Serif', Georgia, serif;
}

/* ── Base Reset & Typography ───────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    color: #1e293b;
    background-color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ── Dark Mode ─────────────────────────────────────────────────────────────── */
[data-theme="dark"] body,
[data-theme="dark"] {
    color: #e2e8f0;
    background-color: #0c1222;
}

/* ── Film Grain Overlay ────────────────────────────────────────────────────── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 128px 128px;
}

/* ── Aurora Background Effect ──────────────────────────────────────────────── */
.neweb-aurora {
    position: relative;
    overflow: hidden;
}

.neweb-aurora::before,
.neweb-aurora::after {
    content: '';
    position: absolute;
    width: 60vw;
    height: 60vw;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.07;
    pointer-events: none;
    will-change: transform;
}

.neweb-aurora::before {
    top: -20%;
    left: -10%;
    background: radial-gradient(circle, var(--color-brand) 0%, transparent 70%);
    animation: aurora-drift 22s ease-in-out infinite alternate;
}

.neweb-aurora::after {
    bottom: -20%;
    right: -10%;
    background: radial-gradient(circle, #6366f1 0%, transparent 70%);
    animation: aurora-drift 28s ease-in-out infinite alternate-reverse;
}

@keyframes aurora-drift {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(5vw, -3vw) scale(1.1); }
    66% { transform: translate(-3vw, 5vw) scale(0.95); }
    100% { transform: translate(2vw, -2vw) scale(1.05); }
}

/* ── Dot Grid Pattern ──────────────────────────────────────────────────────── */
.neweb-dot-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(148, 163, 184, 0.15) 1px, transparent 1px);
    background-size: 24px 24px;
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

[data-theme="dark"] .neweb-dot-grid {
    background-image: radial-gradient(circle, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
}

/* ── Section Divider ───────────────────────────────────────────────────────── */
.neweb-divider {
    height: 1px;
    max-width: 72rem;
    margin: 0 auto;
    background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.2) 30%, rgba(148, 163, 184, 0.2) 70%, transparent);
}

[data-theme="dark"] .neweb-divider {
    background: linear-gradient(90deg, transparent, rgba(71, 85, 105, 0.3) 30%, rgba(71, 85, 105, 0.3) 70%, transparent);
}

/* ── Browser Chrome Mockup ─────────────────────────────────────────────────── */
.browser-chrome {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .browser-chrome {
    border-color: #334155;
    background: #1e293b;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}

.browser-chrome-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

[data-theme="dark"] .browser-chrome-bar {
    border-bottom-color: #334155;
    background: #0f172a;
}

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

.browser-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.browser-dots span:nth-child(1) { background: #ef4444; }
.browser-dots span:nth-child(2) { background: #f59e0b; }
.browser-dots span:nth-child(3) { background: #22c55e; }

.browser-url {
    flex: 1;
    margin-left: 8px;
    padding: 5px 12px;
    border-radius: 6px;
    background: #f1f5f9;
    font-size: 12px;
    color: #94a3b8;
}

[data-theme="dark"] .browser-url {
    background: #1e293b;
    color: #64748b;
}

.browser-chrome img {
    display: block;
    width: 100%;
    height: auto;
}

/* ── Shooting Star Button (btn-star) ───────────────────────────────────────── */
.btn-star {
    --btn-bg: var(--color-brand);
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    padding: 14px 32px;
    overflow: hidden;
    cursor: pointer;
    border: none;
    text-decoration: none;
    isolation: isolate;
    transition: transform 0.2s;
}

.btn-star:hover {
    transform: scale(1.03);
}

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

.btn-star .spark {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    overflow: hidden;
    pointer-events: none;
}

.btn-star .spark::before {
    content: '';
    position: absolute;
    inset: -50%;
    background: conic-gradient(from 0deg, transparent 0%, transparent 40%, rgba(255,255,255,0.5) 50%, transparent 60%, transparent 100%);
    animation: spark-rotate 3s linear infinite;
}

@keyframes spark-rotate {
    100% { transform: rotate(360deg); }
}

.btn-star .btn-backdrop {
    position: absolute;
    inset: 1.5px;
    border-radius: inherit;
    background: var(--btn-bg);
    z-index: 1;
}

.btn-star .btn-label {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    color: #ffffff;
}

/* ── Ghost Button ──────────────────────────────────────────────────────────── */
.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 9999px;
    border: 1px solid #e2e8f0;
    background: transparent;
    color: #475569;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-ghost:hover {
    border-color: rgba(36, 127, 195, 0.3);
    background: rgba(36, 127, 195, 0.04);
    color: #1e293b;
    box-shadow: 0 0 20px rgba(36, 127, 195, 0.08);
}

[data-theme="dark"] .btn-ghost {
    border-color: #475569;
    color: #94a3b8;
}

[data-theme="dark"] .btn-ghost:hover {
    border-color: rgba(36, 127, 195, 0.4);
    background: rgba(36, 127, 195, 0.08);
    color: #e2e8f0;
}

/* ── Highlighted Pricing Card ──────────────────────────────────────────────── */
.highlighted-pricing-card {
    background: linear-gradient(135deg, rgba(36, 127, 195, 0.03) 0%, rgba(99, 102, 241, 0.02) 100%);
    box-shadow:
        0 0 0 1px rgba(36, 127, 195, 0.15),
        0 0 40px rgba(36, 127, 195, 0.06),
        0 20px 40px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .highlighted-pricing-card {
    background: linear-gradient(135deg, rgba(36, 127, 195, 0.08) 0%, rgba(99, 102, 241, 0.04) 100%);
    box-shadow:
        0 0 0 1px rgba(36, 127, 195, 0.2),
        0 0 60px rgba(36, 127, 195, 0.08),
        0 20px 40px rgba(0, 0, 0, 0.2);
}

/* ── Scroll Reveal Animation ───────────────────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.revealed {
    opacity: 1;
    transform: none;
}

.reveal-left {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.revealed {
    opacity: 1;
    transform: none;
}

.reveal-right {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right.revealed {
    opacity: 1;
    transform: none;
}

.scale-in {
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.scale-in.revealed {
    opacity: 1;
    transform: scale(1);
}

/* Staggered delays */
.reveal-delay-1 { transition-delay: 0.05s; }
.reveal-delay-2 { transition-delay: 0.1s; }
.reveal-delay-3 { transition-delay: 0.15s; }
.reveal-delay-4 { transition-delay: 0.2s; }
.reveal-delay-5 { transition-delay: 0.25s; }
.reveal-delay-6 { transition-delay: 0.3s; }
.reveal-delay-7 { transition-delay: 0.35s; }

/* ── Utility Classes (Tailwind equivalents) ────────────────────────────────── */
.text-brand { color: var(--color-brand); }
.bg-brand { background-color: var(--color-brand); }
.bg-brand-10 { background-color: rgba(36, 127, 195, 0.1); }
.bg-brand-15 { background-color: rgba(36, 127, 195, 0.15); }
.border-brand-40 { border-color: rgba(36, 127, 195, 0.4); }
.border-brand-30 { border-color: rgba(36, 127, 195, 0.3); }

.font-serif { font-family: var(--font-serif); }
.font-body { font-family: var(--font-body); }

/* ── Animated Gradient Line ────────────────────────────────────────────────── */
.gradient-line {
    height: 2px;
    background: linear-gradient(90deg, var(--color-brand), #6366f1, var(--color-brand));
    background-size: 200% 100%;
    animation: gradient-shift 4s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Line width animation on scroll */
.gradient-line-animated {
    width: 0%;
    transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.gradient-line-animated.revealed {
    width: 100%;
}

/* ── Counter Animation ─────────────────────────────────────────────────────── */
.counter-value {
    font-variant-numeric: tabular-nums;
}

/* ── Theme Toggle Button ───────────────────────────────────────────────────── */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}

.theme-toggle:hover {
    background: #f1f5f9;
    color: #1e293b;
}

[data-theme="dark"] .theme-toggle:hover {
    background: #1e293b;
    color: #e2e8f0;
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    width: 18px;
    height: 18px;
}

.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

/* ── Responsive Helpers ────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .md-hidden { display: none !important; }
}

@media (min-width: 769px) {
    .md-visible { display: flex !important; }
    .mobile-only { display: none !important; }
}
