/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Push footer to bottom on short-content pages */
.page-content { flex: 1; }

h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text);
}

h1 { font-size: 48px; }
h2 { font-size: 32px; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; -webkit-tap-highlight-color: transparent; }
ul, ol { list-style: none; }

/* Remove default focus/tap highlight */
*, *::before, *::after {
    -webkit-tap-highlight-color: transparent;
}

a, button {
    outline: none;
    border: none;
}

a:focus, button:focus {
    outline: none;
}

a:active, button:active {
    outline: none;
}

/* Keyboard-only focus (a11y safe) */
a:focus-visible, button:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 8px;
}

::selection { background: var(--primary); color: #fff; }

/* ===== Utility: Card ===== */
.card {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 18px;
}

.brand-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    object-fit: cover;
}

.brand-icon.sm { width: 32px; height: 32px; border-radius: 8px; }

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 4px;
}

.nav-links { display: flex; gap: 4px; }

.nav-links a {
    color: var(--text-secondary);
    font-family: var(--font-button);
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
    background: var(--hover-bg);
}

/* ===== Buttons ===== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--gradient);
    color: #fff;
    font-family: var(--font-button);
    font-weight: 500;
    font-size: 15px;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px var(--glow-primary);
}

.btn-primary.btn-lg {
    padding: 16px 36px;
    font-size: 17px;
    border-radius: 14px;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    color: var(--text-secondary);
    font-family: var(--font-button);
    font-weight: 500;
    font-size: 15px;
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.btn-ghost:hover {
    border-color: var(--primary);
    color: var(--text);
    background: var(--hover-bg);
    transform: translateY(-2px);
}

/* ===== Hero ===== */
.hero {
    position: relative;
    padding: 160px 0 100px;
    overflow: hidden;
    background: var(--bg);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 50% at 50% 0%, var(--glow-primary), transparent),
        radial-gradient(ellipse 50% 40% at 80% 20%, var(--glow-secondary), transparent),
        radial-gradient(ellipse 40% 30% at 20% 60%, var(--glow-accent), transparent);
    pointer-events: none;
}

.hero-content { position: relative; text-align: center; }

.hero-badge {
    display: inline-block;
    padding: 6px 18px;
    background: var(--badge-bg);
    color: var(--secondary);
    font-family: var(--font-button);
    font-size: 13px;
    font-weight: 600;
    border-radius: 100px;
    margin-bottom: 28px;
    border: 1px solid var(--border-subtle);
}

.hero-title {
    font-size: 56px;
    line-height: 1.2;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.hero-title .accent { color: var(--secondary); }
.hero-title .accent2 { color: var(--accent); }

.hero-subtitle {
    font-family: var(--font-body);
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 64px;
}

.hero-preview {
    max-width: 760px;
    margin: 0 auto;
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 24px 80px rgba(0,0,0,0.4), 0 0 40px var(--glow-secondary);
}

.hero-img { width: 100%; object-fit: cover; }

/* ===== Section Common ===== */
.section-header { text-align: center; margin-bottom: 64px; }

.section-label {
    display: inline-block;
    font-family: var(--font-button);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--secondary);
    margin-bottom: 12px;
}

.section-title { font-size: 40px; letter-spacing: 1px; }

/* ===== Features ===== */
.features {
    padding: 120px 0;
    background: var(--card);
    position: relative;
}

.features::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glow-primary), transparent);
}

.feature-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 80px;
}

.feature-card:last-child { margin-bottom: 0; }
.feature-card.reverse { direction: rtl; }
.feature-card.reverse > * { direction: ltr; }
.feature-card.reverse .feature-info { text-align: right; }

.feature-visual {
    flex: 1;
    max-width: 280px;
    margin: 0 auto;
}

.feature-visual img {
    border-radius: var(--radius-lg);
    width: 100%;
    object-fit: cover;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.feature-visual img:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px var(--glow-primary);
}

.feature-num {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.1em;
    margin-bottom: 12px;
    display: block;
}

.feature-info h3 {
    font-size: 26px;
    margin-bottom: 16px;
    letter-spacing: 1px;
}

.feature-info p {
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ===== About ===== */
.about {
    padding: 100px 0;
    background: var(--bg);
    position: relative;
}

.about::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glow-secondary), transparent);
}

.about-content { max-width: 720px; margin: 0 auto; }

.about-content p {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 32px;
}

.about-content h4 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 16px;
    letter-spacing: 1px;
}

.about-content ul, .about-content ol { margin-bottom: 32px; }

.about-content ul li,
.about-content ol li {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.9;
    padding-left: 24px;
    position: relative;
}

.about-content ul li::before {
    content: '';
    position: absolute;
    left: 4px; top: 11px;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 6px var(--glow-primary);
}

.about-content ol { counter-reset: steps; }
.about-content ol li { counter-increment: steps; }
.about-content ol li::before {
    content: counter(steps) ".";
    position: absolute;
    left: 0;
    font-weight: 600;
    color: var(--accent);
}

/* Legal page styles */
.about-content h2 {
    font-size: 28px;
    margin: 48px 0 16px;
    letter-spacing: 0.5px;
}

.about-content h3 {
    font-size: 20px;
    margin: 32px 0 12px;
    color: var(--text);
}

.about-content h4 {
    margin-top: 24px;
}

.about-content strong {
    color: var(--text);
}

.about-content hr {
    border: none;
    height: 1px;
    background: var(--border-subtle);
    margin: 32px 0;
}

.about-content a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.about-content a:hover {
    color: var(--secondary);
}

/* ===== CTA ===== */
.cta {
    padding: 100px 0;
    background: var(--card);
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 50% at 50% 50%, var(--glow-secondary), transparent);
    pointer-events: none;
}

.cta-inner { text-align: center; position: relative; }
.cta h2 { font-size: 40px; margin-bottom: 12px; }
.cta p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

/* ===== Footer ===== */
.footer {
    padding: 64px 0 0;
    background: var(--footer-bg);
    border-top: 1px solid var(--border-subtle);
}

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

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 16px;
    color: var(--text);
    margin-bottom: 12px;
}

.footer-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
}

.footer-col h4 {
    font-family: var(--font-button);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.footer-col a {
    display: block;
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--text-secondary);
    padding: 4px 0;
    transition: color 0.2s ease;
}

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

.footer-col p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-top: 4px;
}

.footer-bottom {
    text-align: center;
    padding: 24px 0;
    margin-top: 48px;
    border-top: 1px solid var(--border-line);
    font-size: 13px;
    color: var(--text-faint);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .hero-title { font-size: 44px; }
    .section-title { font-size: 32px; }
    .feature-card { gap: 40px; }
    .feature-info h3 { font-size: 22px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .nav-links {
        display: none;
        position: absolute;
        top: 72px; left: 0; right: 0;
        flex-direction: column;
        background: var(--nav-bg);
        padding: 16px 24px;
        border-bottom: 1px solid var(--border-subtle);
    }
    .nav-links.open { display: flex; }
    .hero { padding: 120px 0 60px; }
    .hero-title { font-size: 32px; }
    .hero-subtitle { font-size: 16px; }
    .feature-card,
    .feature-card.reverse {
        grid-template-columns: 1fr;
        gap: 24px;
        direction: ltr;
        margin-bottom: 56px;
        text-align: center;
    }
    .feature-card.reverse .feature-info { text-align: center; }
    .feature-visual { max-width: 220px; }
    .feature-info h3 { font-size: 22px; }
    .features { padding: 80px 0; }
    .about { padding: 64px 0; }
    .cta h2 { font-size: 28px; }
    .cta { padding: 64px 0; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    h1 { font-size: 36px; }
    h2 { font-size: 28px; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 26px; }
    .section-title { font-size: 24px; }
    .hero-actions { flex-direction: column; align-items: center; }
    .btn-primary, .btn-ghost { width: 100%; justify-content: center; }
    h1 { font-size: 28px; }
}
