/* =============================================================================
   Fabi-SC ID Landing Page
   Matches the main application's design system
   ============================================================================= */

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-heading: #1a365d;
    --border-light: #e2e8f0;
    --border-medium: #cbd5e1;

    --color-navy: #1a365d;
    --color-blue: #3182ce;
    --color-cyan: #00bcd4;
    --color-green: #10b981;
    --color-error: #ef4444;

    --header-bg: rgba(255, 255, 255, 0.95);
    --logo-filter: none;
}

[data-theme="dark"] {
    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --bg-tertiary: #2d2d2d;
    --text-primary: #f5f5f5;
    --text-secondary: #a0a0a0;
    --text-muted: #6b6b6b;
    --text-heading: #93c5fd;
    --border-light: #2d2d2d;
    --border-medium: #404040;

    --header-bg: rgba(18, 18, 18, 0.95);
    --logo-filter: brightness(100);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg-primary: #121212;
        --bg-secondary: #1e1e1e;
        --bg-tertiary: #2d2d2d;
        --text-primary: #f5f5f5;
        --text-secondary: #a0a0a0;
        --text-muted: #6b6b6b;
        --text-heading: #93c5fd;
        --border-light: #2d2d2d;
        --border-medium: #404040;

        --header-bg: rgba(18, 18, 18, 0.95);
        --logo-filter: brightness(100);
    }
}

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

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-secondary);
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Typography */
h1, h2, h3, h4 {
    color: var(--text-heading);
    font-weight: 600;
    line-height: 1.3;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }

p {
    color: var(--text-secondary);
}

a {
    color: var(--color-blue);
    text-decoration: none;
    transition: color 150ms ease;
}

a:hover {
    color: var(--text-heading);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 0.5rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 150ms ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--color-blue);
    color: #fff;
}

.btn-primary:hover {
    background: var(--color-navy);
    color: #fff;
}

.btn-outline {
    background: transparent;
    border-color: var(--color-blue);
    color: var(--color-blue);
}

.btn-outline:hover {
    background: var(--color-blue);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1.0625rem;
}

/* =============================================================================
   Header
   ============================================================================= */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--header-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
}

.logo img {
    filter: var(--logo-filter);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--text-heading);
}

.logo:hover {
    color: var(--text-heading);
}

.logo img {
    width: 32px;
    height: 32px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav a {
    font-weight: 500;
    color: var(--text-secondary);
}

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

.nav-mobile-only {
    display: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.theme-toggle {
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 150ms ease, color 150ms ease;
}

.theme-toggle:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.theme-toggle .fa-moon {
    display: none;
}

[data-theme="dark"] .theme-toggle .fa-sun,
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle .fa-sun {
        display: none;
    }
}

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

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle .fa-moon {
        display: block;
    }
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
    position: relative;
    width: 40px;
    height: 40px;
}

.mobile-toggle i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 200ms ease, transform 200ms ease;
}

.mobile-toggle .fa-bars {
    opacity: 1;
}

.mobile-toggle .fa-xmark {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(-90deg);
}

.mobile-toggle.active .fa-bars {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(90deg);
}

.mobile-toggle.active .fa-xmark {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg);
}

/* =============================================================================
   Hero
   ============================================================================= */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(1px);
    transform: scale(1.01);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.75);
    z-index: 1;
}

[data-theme="dark"] .hero-overlay {
    background: rgba(18, 18, 18, 0.8);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .hero-overlay {
        background: rgba(18, 18, 18, 0.8);
    }
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.hero-lead {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: var(--text-secondary);
    font-size: 1.5rem;
    animation: bounce 2s infinite;
    text-decoration: none;
}

.scroll-indicator:hover {
    color: var(--color-blue);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* =============================================================================
   Section Header
   ============================================================================= */
.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 3rem;
}

.section-header h2 {
    margin-bottom: 0.75rem;
}

.section-header p {
    font-size: 1.0625rem;
}

/* =============================================================================
   Features
   ============================================================================= */
.features {
    padding: 5rem 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.feature-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: transform 150ms ease, box-shadow 150ms ease;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.feature-icon.blue {
    background: rgba(49, 130, 206, 0.1);
    color: var(--color-blue);
}

.feature-icon.cyan {
    background: rgba(0, 188, 212, 0.1);
    color: var(--color-cyan);
}

.feature-icon.green {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-green);
}

.feature-icon.navy {
    background: rgba(26, 54, 93, 0.1);
    color: var(--color-navy);
}

.feature-card h3 {
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 0.9375rem;
    margin: 0;
}

/* =============================================================================
   How It Works
   ============================================================================= */
.how-it-works {
    padding: 5rem 0;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 1.5rem;
}

.step {
    flex: 1;
    max-width: 280px;
    text-align: center;
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--color-blue);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 auto 1rem;
}

.step h3 {
    margin-bottom: 0.5rem;
}

.step p {
    font-size: 0.9375rem;
    margin: 0;
}

.step-arrow {
    display: flex;
    align-items: center;
    padding-top: 0.75rem;
    color: var(--border-medium);
    font-size: 1.25rem;
}

/* =============================================================================
   Security
   ============================================================================= */
.security {
    padding: 5rem 0;
}

.security-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.security-info h2 {
    margin-bottom: 1rem;
}

.security-info > p {
    font-size: 1.0625rem;
    margin-bottom: 1.5rem;
}

.security-list {
    list-style: none;
    margin-bottom: 1.5rem;
}

.security-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.security-list li i {
    color: var(--color-green);
    margin-top: 0.25rem;
}

.security-visual {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.security-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
}

.security-card-icon {
    width: 48px;
    height: 48px;
    background: rgba(49, 130, 206, 0.1);
    color: var(--color-blue);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.security-card-icon.green {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-green);
}

.security-card-icon.cyan {
    background: rgba(0, 188, 212, 0.1);
    color: var(--color-cyan);
}

.security-card-content {
    display: flex;
    flex-direction: column;
}

.security-card-content strong {
    color: var(--text-heading);
    font-weight: 600;
}

.security-card-content span {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* =============================================================================
   Developers
   ============================================================================= */
.developers {
    padding: 5rem 0;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.dev-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dev-feature {
    text-align: center;
}

.dev-feature > i {
    width: 56px;
    height: 56px;
    background: rgba(49, 130, 206, 0.1);
    color: var(--color-blue);
    border-radius: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.dev-feature h3 {
    margin-bottom: 0.5rem;
}

.dev-feature p {
    font-size: 0.9375rem;
    margin: 0;
}

.dev-cta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* =============================================================================
   Gateway
   ============================================================================= */
.gateway {
    padding: 5rem 0;
}

.gateway .section-header {
    margin-bottom: 1.5rem;
}

.gateway-content {
    max-width: 800px;
    margin: 0 auto;
}

.gateway-info > p {
    font-size: 1.0625rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.gateway-features {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.gateway-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 0.5rem;
    padding: 1rem;
}

.gateway-features li i {
    color: var(--color-blue);
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.gateway-features li span {
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.gateway-cta {
    display: flex;
    justify-content: center;
}

/* =============================================================================
   FAQ
   ============================================================================= */
.faq {
    padding: 5rem 0;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.faq-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.faq-item h3 {
    margin-bottom: 0.5rem;
    font-size: 1.0625rem;
}

.faq-item p {
    font-size: 0.9375rem;
    margin: 0;
}

/* =============================================================================
   CTA
   ============================================================================= */
.cta {
    padding: 5rem 0;
    text-align: center;
    background: var(--color-navy);
    color: #fff;
}

.cta h2 {
    color: #fff;
    margin-bottom: 0.75rem;
}

.cta p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

.cta .btn-primary {
    background: #fff;
    color: var(--color-navy);
}

.cta .btn-primary:hover {
    background: var(--bg-secondary);
}

/* =============================================================================
   Footer
   ============================================================================= */
.footer {
    padding: 3rem 0 1.5rem;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-light);
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-brand p {
    margin-top: 0.75rem;
    font-size: 0.9375rem;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.footer-column h4 {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.footer-column a {
    display: block;
    color: var(--text-primary);
    font-size: 0.9375rem;
    padding: 0.25rem 0;
    white-space: nowrap;
}

.footer-column a:hover {
    color: var(--color-blue);
}

.footer-bottom {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
    text-align: center;
}

.footer-bottom p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

/* =============================================================================
   Responsive
   ============================================================================= */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dev-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .security-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 910px) {
    .header .container {
        position: relative;
    }

    .nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 0;
        border-bottom: 1px solid var(--border-light);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 300ms ease, opacity 200ms ease;
        display: flex;
    }

    .nav.mobile-open {
        max-height: calc(100vh - 64px);
        overflow-y: auto;
        opacity: 1;
    }

    .nav a {
        padding: 1rem 1.5rem;
        border-bottom: 1px solid var(--border-light);
    }

    .nav a:last-child {
        border-bottom: none;
    }

    .nav .nav-mobile-only {
        display: block;
    }

    .nav .nav-mobile-only.btn {
        margin: 1rem 1.5rem;
        text-align: center;
    }

    .header-actions {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

    .hero {
        min-height: 100vh;
    }

    .hero h1 {
        font-size: 2.25rem;
    }

    .hero-lead {
        font-size: 1.0625rem;
    }

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

    .steps {
        flex-direction: column;
        align-items: center;
    }

    .step {
        max-width: 100%;
    }

    .step-arrow {
        transform: rotate(90deg);
        padding: 0.5rem 0;
    }

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

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

    .gateway-features {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .dev-cta {
        flex-direction: column;
    }

    .dev-cta .btn {
        width: 100%;
    }
}
