/* ===== LocalGraph Landing Page — Design System ===== */

h1:focus {
    outline: none;
}

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* --- CSS Custom Properties — MAUI palette --- */
:root {
    --app-bg: #111315;
    --surface-0: #16181C;
    --surface-1: #1B1E24;
    --surface-2: #20242B;
    --surface-3: #262B33;
    --border-color: #2D333C;
    --text-primary: #E6EAF2;
    --text-secondary: #9AA4B2;
    --text-muted: #6F7A88;
    --accent: #4DA3FF;
    --accent-hover: #2D8CFF;
    --success: #3FC17A;

    /* derived */
    --accent-glow: rgba(77, 163, 255, 0.15);
    --accent-glow-strong: rgba(77, 163, 255, 0.25);
    --surface-glass: rgba(22, 24, 28, 0.7);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--app-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- Animated Background --- */
.bg-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.bg-grid::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(77, 163, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(77, 163, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 60% 50% at 50% 30%, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 30%, black 20%, transparent 70%);
}

.bg-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.4;
    animation: glow-drift 12s ease-in-out infinite alternate;
}

.bg-glow--1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(77, 163, 255, 0.12), transparent 70%);
    top: -200px;
    left: 10%;
    animation-delay: 0s;
}

.bg-glow--2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(63, 193, 122, 0.08), transparent 70%);
    bottom: 10%;
    right: 5%;
    animation-delay: -4s;
}

.bg-glow--3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(77, 163, 255, 0.06), transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -8s;
}

@keyframes glow-drift {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -20px) scale(1.1); }
    100% { transform: translate(-20px, 30px) scale(0.95); }
}

/* --- Container --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 16px 0;
    transition: var(--transition-smooth);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(17, 19, 21, 0.8);
    border-bottom: 1px solid transparent;
}

.navbar--scrolled {
    border-bottom-color: var(--border-color);
    background: rgba(17, 19, 21, 0.95);
}

.navbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.navbar__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
}

.navbar__logo-dot {
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--accent-glow-strong);
    animation: pulse-dot 3s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 12px var(--accent-glow-strong); }
    50% { box-shadow: 0 0 20px var(--accent-glow-strong), 0 0 40px var(--accent-glow); }
}

.navbar__logo-text {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.navbar__links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.navbar__link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color var(--transition-fast);
    position: relative;
}

.navbar__link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width var(--transition-fast);
    border-radius: 1px;
}

.navbar__link:hover {
    color: var(--text-primary);
}

.navbar__link:hover::after {
    width: 100%;
}

.navbar__cta {
    padding: 8px 20px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.navbar__cta:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(77, 163, 255, 0.3);
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
}

.hero__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 48px;
    width: 100%;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--surface-1);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    animation: fadeInDown 0.6s ease-out;
}

.hero__badge-dot {
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

.hero__content {
    max-width: 720px;
    animation: fadeInUp 0.8s ease-out;
}

.hero__title {
    font-size: clamp(40px, 6vw, 72px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -2px;
    margin-bottom: 24px;
}

.hero__title-accent {
    background: linear-gradient(135deg, var(--accent), #7CC4FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero__subtitle {
    font-size: 18px;
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 540px;
    margin: 0 auto 32px;
}

.hero__actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
}

.btn--primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 0 0 rgba(77, 163, 255, 0);
}

.btn--primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(77, 163, 255, 0.3);
}

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

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

/* --- App Preview --- */
.hero__preview {
    width: 100%;
    max-width: 960px;
    animation: fadeInUp 1s ease-out 0.3s both;
}

.preview-window {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--surface-0);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.03),
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 120px rgba(77, 163, 255, 0.08);
    transition: var(--transition-smooth);
}

.preview-window:hover {
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 30px 80px rgba(0, 0, 0, 0.6),
        0 0 160px rgba(77, 163, 255, 0.12);
    transform: translateY(-4px);
}

.preview-window__bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    background: var(--surface-1);
    border-bottom: 1px solid var(--border-color);
}

.preview-window__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.preview-window__dot--red { background: #FF5F57; }
.preview-window__dot--yellow { background: #FEBC2E; }
.preview-window__dot--green { background: #28C840; }

.preview-window__title {
    flex: 1;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.preview-window__img {
    width: 100%;
    display: block;
}

/* --- Platform Icons (below preview) --- */
.hero__platforms {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-top: 8px;
    animation: fadeInUp 1.2s ease-out 0.5s both;
}

.hero__platform {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
}

.hero__platform svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    opacity: 0.7;
}

/* --- Features Section --- */
.features {
    padding: 120px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
}

.section-label__line {
    width: 20px;
    height: 1px;
    background: var(--accent);
    opacity: 0.5;
}

.section-title {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.2;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto;
}

.features__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature-card {
    position: relative;
    padding: 32px;
    background: var(--surface-1);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: var(--transition-smooth);
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

.feature-card:hover {
    border-color: rgba(77, 163, 255, 0.2);
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card__icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-3);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    color: var(--accent);
    transition: var(--transition-smooth);
}

.feature-card:hover .feature-card__icon {
    background: var(--accent-glow);
    box-shadow: 0 0 24px var(--accent-glow);
}

.feature-card__icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.feature-card__title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.3px;
}

.feature-card__desc {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* --- How It Works Section --- */
.how-it-works {
    padding: 120px 0;
    background: var(--surface-0);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    position: relative;
}

.steps::before {
    content: '';
    position: absolute;
    top: 32px;
    left: 80px;
    right: 80px;
    height: 2px;
    background: linear-gradient(90deg, var(--border-color), var(--accent), var(--border-color));
    opacity: 0.3;
}

.step {
    text-align: center;
    position: relative;
}

.step__number {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 2px solid var(--border-color);
    font-size: 22px;
    font-weight: 800;
    color: var(--accent);
    position: relative;
    z-index: 1;
    transition: var(--transition-smooth);
}

.step:hover .step__number {
    border-color: var(--accent);
    box-shadow: 0 0 24px var(--accent-glow);
    transform: scale(1.1);
}

.step__title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.3px;
}

.step__desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 280px;
    margin: 0 auto;
}

/* --- Download Section --- */
.download {
    padding: 120px 0;
}

.download__inner {
    position: relative;
    padding: 64px;
    background: var(--surface-1);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    text-align: center;
    overflow: hidden;
}

.download__inner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 0%, rgba(77, 163, 255, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

.download__title {
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 16px;
    position: relative;
}

.download__subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 48px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.download__grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.store-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 16px;
    background: var(--surface-2);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition-smooth);
    cursor: pointer;
}

.store-card:hover {
    border-color: var(--accent);
    background: var(--surface-3);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.store-card--disabled {
    opacity: 0.5;
    cursor: default;
    pointer-events: none;
}

.store-card__icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.store-card__icon svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}

.store-card__name {
    font-size: 14px;
    font-weight: 600;
}

.store-card__status {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.store-card__status--available {
    color: var(--success);
}

/* --- Footer --- */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
}

.footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer__brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}

.footer__brand-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0.6;
}

.footer__links {
    display: flex;
    align-items: center;
    gap: 24px;
    list-style: none;
}

.footer__link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    transition: color var(--transition-fast);
}

.footer__link:hover {
    color: var(--text-secondary);
}

.footer__copy {
    color: var(--text-muted);
    font-size: 13px;
}

.footer__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

/* --- Culture Selector --- */
.culture-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
}

.selector-separator {
    color: var(--text-muted);
    opacity: 0.5;
}

.lang-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
    padding: 2px 6px;
    border-radius: 4px;
}

.lang-link:hover {
    color: var(--text-primary);
    background: var(--surface-1);
}

.lang-link.active {
    color: var(--accent);
    background: var(--accent-glow);
}

/* --- Waitlist Form --- */
.waitlist-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.waitlist-desc {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 8px;
}

.waitlist-input-group {
    display: flex;
    gap: 8px;
}

.waitlist-input {
    flex: 1;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--surface-0);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 15px;
}

.waitlist-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

.waitlist-btn {
    padding: 14px 24px;
    white-space: nowrap;
}

.waitlist-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--text-muted);
    font-size: 13px;
    justify-content: center;
    cursor: pointer;
    margin-top: -4px;
    text-align: left;
}

.waitlist-consent input[type="checkbox"] {
    accent-color: var(--accent);
    cursor: pointer;
    margin-top: 3px;
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll reveal animation class */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.reveal--visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .features__grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .steps {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .steps::before {
        display: none;
    }

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

    .download__inner {
        padding: 40px 24px;
    }

    .navbar__links {
        display: none;
    }

    .hero {
        padding: 100px 0 60px;
    }
}

@media (max-width: 600px) {
    .download__grid {
        grid-template-columns: 1fr;
        max-width: 280px;
    }

    .waitlist-input-group {
        flex-direction: column;
    }

    .waitlist-btn {
        width: 100%;
    }

    .hero__actions {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .footer__inner {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }

    .footer__meta {
        align-items: center;
        gap: 16px;
    }

    .hero__platforms {
        flex-wrap: wrap;
        gap: 16px;
    }

    .hero__title {
        letter-spacing: -1px;
    }
}