/* ===========================
   Reset
   =========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===========================
   Design Tokens — Frosted Glass Cathedral
   =========================== */
:root {
    /* Core palette */
    --color-midnight-canvas: #05060f;
    --color-steel-plate: #2f343e;
    --color-fog-veil: #9da7ba;
    --color-moon-mist: #c7d3ea;
    --color-frost-glow: #d1e4fa;
    --color-ice-highlight: #d8ecf8;
    --color-ice-highlight-2: #98c0ef;
    --color-pure-white: #ffffff;
    --color-void-violet: #663af3;
    --color-blueprint-blue: #b6d9fc;
    --color-gridline-blue: #3f4959;

    --gradient-skywash: linear-gradient(0deg, #d8ecf8 0%, #98c0ef 100%);

    /* Hairlines & translucent fills */
    --glass-edge: rgba(186, 215, 247, 0.12);
    --glass-edge-strong: rgba(186, 215, 247, 0.24);
    --glass-edge-soft: rgba(186, 215, 247, 0.06);
    --luminous-fill: rgba(199, 211, 234, 0.12);
    --frost-wash: rgba(186, 214, 247, 0.06);
    --frost-wash-strong: rgba(186, 214, 247, 0.12);
    --surface-glass: rgba(186, 214, 247, 0.03);
    --surface-deep-glass: rgba(5, 6, 15, 0.9);

    /* Backwards-compatible aliases used across sub-pages */
    --primary-color: var(--color-frost-glow);
    --bg-dark: var(--color-midnight-canvas);
    --bg-card: var(--surface-deep-glass);
    --text-light: var(--color-frost-glow);
    --text-gray: var(--color-moon-mist);
    --gradient-1: var(--gradient-skywash);
    --shadow-lg: inset 0 1px 1px rgba(199, 211, 234, 0.12), inset 0 24px 48px rgba(199, 211, 234, 0.05), 0 24px 32px rgba(6, 6, 14, 0.7);
    --shadow-xl: inset 0 1px 1px rgba(216, 236, 248, 0.2), inset 0 24px 48px rgba(168, 216, 245, 0.06), 0 16px 32px rgba(0, 0, 0, 0.45);

    /* Typography */
    --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Space Grotesk', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

    /* Radius */
    --radius-cards: 16px;
    --radius-badges: 6px;
    --radius-inputs: 6px;
    --radius-buttons: 999px;
    --radius-icon: 9999px;

    /* Layout */
    --page-max-width: 1200px;
    --section-gap: 120px;
    --card-padding: 24px;
    --element-gap: 16px;
}

body {
    font-family: var(--font-sans);
    background: var(--color-midnight-canvas);
    color: var(--color-frost-glow);
    overflow-x: hidden;
    line-height: 1.6;
    letter-spacing: -0.01em;
}

.container {
    max-width: var(--page-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: inherit;
}

/* ===========================
   Ambient Background — Blueprint Grid + Spotlight
   =========================== */
.bg-atmosphere {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-color: var(--color-midnight-canvas);
    background-image:
        linear-gradient(var(--glass-edge-soft) 1px, transparent 1px),
        linear-gradient(90deg, var(--glass-edge-soft) 1px, transparent 1px);
    background-size: 88px 88px;
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 90%);
    mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 90%);
}

.bg-atmosphere::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60vh;
    background: conic-gradient(at 50% -5%, transparent 45%, rgba(124, 145, 182, 0.28) 49%, rgba(124, 145, 182, 0.45) 50%, rgba(124, 145, 182, 0.28) 51%, transparent 55%);
    opacity: 0.7;
}

/* ===========================
   Top Nav
   =========================== */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    max-width: var(--page-max-width);
    margin: 0 auto;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    color: var(--color-frost-glow);
}

.nav-brand img {
    width: 28px;
    height: 28px;
    border-radius: 8px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ===========================
   Language Toggle
   =========================== */
.lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border-radius: var(--radius-buttons);
    background: var(--frost-wash);
    box-shadow: 0 0 0 1px var(--glass-edge) inset;
}

.lang-toggle a,
.lang-toggle span {
    display: inline-block;
    padding: 5px 12px;
    border-radius: var(--radius-buttons);
    font-size: 13px;
    font-weight: 500;
    color: var(--color-moon-mist);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.lang-toggle a:hover {
    color: var(--color-frost-glow);
}

.lang-toggle a.is-active {
    background: var(--frost-wash-strong);
    color: var(--color-pure-white);
    box-shadow: 0 0 0 1px var(--glass-edge-strong) inset;
}

/* ===========================
   Pill Buttons (Ghost / Outlined)
   =========================== */
.btn-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 22px;
    border-radius: var(--radius-buttons);
    background: var(--frost-wash);
    color: var(--color-pure-white);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    font-family: var(--font-sans);
    box-shadow: 0 0 0 1px var(--glass-edge) inset;
    transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
    border: none;
    white-space: nowrap;
}

.btn-pill:hover {
    background: var(--frost-wash-strong);
    transform: translateY(-2px);
    box-shadow: 0 0 0 1px var(--glass-edge-strong) inset;
}

.btn-pill--sm {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-pill svg {
    flex-shrink: 0;
}

/* ===========================
   Hero Section
   =========================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px 100px;
    position: relative;
}

.eyebrow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    max-width: 480px;
    margin: 0 auto 24px;
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-moon-mist);
}

.eyebrow::before,
.eyebrow::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-edge));
}

.eyebrow::after {
    background: linear-gradient(90deg, var(--glass-edge), transparent);
}

.logo-container {
    text-align: center;
    margin-bottom: 8px;
}

.wordmark {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(3rem, 11vw, 6.5rem);
    line-height: 1.05;
    text-align: center;
    background: var(--gradient-skywash);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 40px rgba(152, 192, 239, 0.25));
}

.main-title {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(1.6rem, 3vw, 2.5rem);
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.25;
    color: var(--color-frost-glow);
}

.gradient-text {
    background: var(--gradient-skywash);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: clamp(1rem, 1.6vw, 1.15rem);
    text-align: center;
    color: var(--color-moon-mist);
    margin-bottom: 48px;
    font-weight: 400;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

/* ===========================
   Floating App Screens (hero fan)
   =========================== */
.screens-fan {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    max-width: 900px;
    width: 100%;
    margin: 56px auto 0;
    padding: 0 10px;
}

.screen-card {
    position: relative;
    width: clamp(96px, 24vw, 200px);
    aspect-ratio: 9 / 19.5;
    border-radius: 28px;
    background: var(--surface-deep-glass);
    box-shadow:
        inset 0 1px 1px rgba(216, 236, 248, 0.2),
        inset 0 24px 48px rgba(168, 216, 245, 0.06),
        0 16px 32px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    flex-shrink: 0;
    transition: transform 0.4s ease;
}

.screen-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.screen-card.img-missing {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-glass);
}

.screen-card.img-missing::after {
    content: attr(data-label);
    font-size: 12px;
    color: var(--color-fog-veil);
    text-align: center;
    padding: 0 16px;
    font-family: var(--font-mono);
    letter-spacing: 0.05em;
}

.screen-card--left {
    transform: rotate(-7deg) translate(18px, 12px);
    z-index: 1;
}

.screen-card--center {
    width: clamp(112px, 28vw, 236px);
    transform: scale(1.08);
    z-index: 2;
}

.screen-card--right {
    transform: rotate(7deg) translate(-18px, 12px);
    z-index: 1;
}

.screens-fan:hover .screen-card--left {
    transform: rotate(-10deg) translate(10px, 18px);
}

.screens-fan:hover .screen-card--right {
    transform: rotate(10deg) translate(-10px, 18px);
}

.screens-fan--single {
    margin-top: 40px;
}

.screens-fan--single .screen-card--center {
    width: clamp(160px, 34vw, 260px);
    transform: none;
}

/* ===========================
   CTA Row (Download buttons)
   =========================== */
.cta-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

/* ===========================
   Section Rhythm
   =========================== */
.section {
    max-width: 780px;
    margin: 0 auto;
    text-align: center;
    padding: var(--section-gap) 0 0;
}

.section-heading {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(1.8rem, 3.4vw, 2.75rem);
    line-height: 1.16;
    margin-bottom: 16px;
    color: var(--color-ice-highlight);
}

.section-body {
    font-size: 16px;
    color: var(--color-moon-mist);
    max-width: 640px;
    margin: 0 auto;
}

.section-title {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    text-align: center;
    margin-bottom: 40px;
}

/* ===========================
   Download Cards
   =========================== */
.download-section {
    max-width: 900px;
    margin: 40px auto 0;
}

.download-card {
    background: var(--surface-glass);
    border-radius: var(--radius-cards);
    padding: 40px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.download-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.card-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-icon);
    background: var(--frost-wash-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--color-frost-glow);
    box-shadow: 0 0 0 1px var(--glass-edge) inset;
}

.card-content {
    text-align: center;
    width: 100%;
}

.card-content h3 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.card-content p {
    color: var(--color-moon-mist);
    margin-bottom: 24px;
    font-size: 1rem;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--radius-buttons);
    transition: all 0.25s ease;
    background: var(--frost-wash);
    color: var(--color-pure-white);
    box-shadow: 0 0 0 1px var(--glass-edge) inset;
}

.download-btn:hover {
    background: var(--frost-wash-strong);
    transform: translateY(-2px);
    box-shadow: 0 0 0 1px var(--glass-edge-strong) inset;
}

/* ===========================
   Social Media Section
   =========================== */
.social-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 32px;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--radius-buttons);
    color: var(--color-pure-white);
    background: var(--frost-wash);
    box-shadow: 0 0 0 1px var(--glass-edge) inset;
    transition: all 0.25s ease;
}

.social-btn:hover {
    transform: translateY(-3px);
    background: var(--frost-wash-strong);
    box-shadow: 0 0 0 1px var(--glass-edge-strong) inset;
}

/* ===========================
   Feature Icon Tiles
   =========================== */
.features-row {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 8px;
    margin-top: 56px;
    position: relative;
}

.feature-item {
    text-align: center;
    flex: 1;
    max-width: 260px;
    position: relative;
    padding-top: 0;
}

.feature-item::before {
    content: '';
    position: absolute;
    top: 32px;
    left: -50%;
    width: 100%;
    height: 1px;
    background: var(--glass-edge);
    z-index: 0;
}

.feature-item:first-child::before {
    display: none;
}

.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-icon);
    background: var(--frost-wash-strong);
    box-shadow: 0 0 0 1px var(--glass-edge) inset;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    position: relative;
    z-index: 1;
}

.feature-icon-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.feature-item h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 500;
    margin-bottom: 10px;
    color: var(--color-frost-glow);
}

.feature-item p {
    color: var(--color-moon-mist);
    font-size: 0.92rem;
    padding: 0 8px;
}

/* ===========================
   Spotlight Section (single showcase card)
   =========================== */
.spotlight-card {
    max-width: 760px;
    margin: 56px auto 0;
    padding: 16px;
    background: var(--surface-glass);
    border-radius: var(--radius-cards);
    box-shadow: var(--shadow-lg);
    position: relative;
}

.spotlight-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    display: block;
    object-fit: cover;
    object-position: center;
    border-radius: var(--radius-cards);
    box-shadow:
        inset 0 1px 1px rgba(216, 236, 248, 0.2),
        0 16px 32px rgba(0, 0, 0, 0.45);
}

.spotlight-badges {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-badges);
    background: var(--luminous-fill);
    color: var(--color-frost-glow);
    font-size: 12px;
    font-weight: 500;
    box-shadow: 0 1px 1px rgba(199, 211, 234, 0.12) inset;
}

/* ===========================
   Footer
   =========================== */
.footer {
    background: rgba(5, 6, 15, 0.6);
    backdrop-filter: blur(10px);
    padding: 40px 0;
    margin-top: var(--section-gap);
    box-shadow: 0 1px 0 var(--glass-edge) inset;
}

.footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.footer p {
    color: var(--color-fog-veil);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: var(--color-moon-mist);
    text-decoration: none;
    transition: color 0.25s ease;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--color-ice-highlight);
}

/* ===========================
   Animaciones
   =========================== */
.fade-in {
    animation: fadeIn 1s ease-out forwards;
    opacity: 0;
}

.fade-in-up {
    animation: fadeInUp 1s ease-out forwards;
    opacity: 0;
}

.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.45s; }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* ===========================
   Back to top
   =========================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-icon);
    background: var(--surface-deep-glass);
    color: var(--color-frost-glow);
    border: none;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 0 0 1px var(--glass-edge) inset, 0 16px 32px rgba(0, 0, 0, 0.4);
}

.back-to-top:hover {
    box-shadow: 0 0 0 1px var(--glass-edge-strong) inset, 0 16px 32px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 860px) {
    .features-row {
        flex-direction: column;
        gap: 32px;
        align-items: center;
    }

    .feature-item::before {
        display: none;
    }

    .feature-item {
        max-width: 320px;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 24px 20px 80px;
    }

    .download-card {
        padding: 28px 20px;
    }

    .screens-fan {
        margin-top: 32px;
    }

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

    .social-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    .footer .container {
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .download-btn,
    .btn-pill {
        padding: 12px 22px;
        font-size: 0.95rem;
    }

    .card-content h3 {
        font-size: 1.35rem;
    }
}

/* ===========================
   Accesibilidad
   =========================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-contrast: high) {
    .download-card {
        box-shadow: 0 0 0 2px var(--color-pure-white) inset;
    }

    .gradient-text,
    .wordmark {
        -webkit-text-fill-color: var(--color-frost-glow);
    }
}
