/* ── Reset & Base ─────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;600;700;800&display=swap');

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

:root {
    --primary: #007AFF;
    --primary-light: #5AC8FA;
    --primary-dark: #0056b3;
    --accent: #FF2D55;
    
    --bg-color: #F5F5F9;
    --text-main: #1D1D1F;
    --text-muted: #86868B;
    
    --surface-bg: rgba(255, 255, 255, 0.7);
    --surface-border: rgba(255, 255, 255, 0.5);
    --surface-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    
    --glass-blur: blur(24px);
    --radius-lg: 24px;
    --radius-md: 16px;
    
    --gradient-hero: linear-gradient(135deg, #007AFF 0%, #5AC8FA 100%);
    --gradient-text: linear-gradient(135deg, #007AFF 0%, #AF52DE 100%);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #000000;
        --text-main: #F5F5F7;
        --text-muted: #A1A1A6;
        
        --surface-bg: rgba(28, 28, 30, 0.65);
        --surface-border: rgba(255, 255, 255, 0.1);
        --surface-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
        
        --gradient-hero: linear-gradient(135deg, #0A2463 0%, #3E1E68 100%);
        --gradient-text: linear-gradient(135deg, #5AC8FA 0%, #E58AED 100%);
    }
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

h1, h2, h3, h4, .nav-brand {
    font-family: 'Outfit', sans-serif;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

a:hover {
    opacity: 0.8;
}

/* ── Glassmorphism Core ───────────────────────────── */
.nav, .feature-card, .model-card, .step, .platform, .links-card {
    background: var(--surface-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--surface-border);
    box-shadow: var(--surface-shadow);
    border-radius: var(--radius-lg);
}

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

/* ── Nav ──────────────────────────────────────────── */
.nav {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    height: 64px;
    width: 90%;
    max-width: 1100px;
    border-radius: 32px;
    animation: slideDown 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.nav-brand {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

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

.nav-links a {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-main);
    position: relative;
    padding: 6px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-links a:hover {
    color: var(--text-main);
    opacity: 1;
}

.nav-links a:hover::after {
    width: 100%;
}

/* ── Hero ─────────────────────────────────────────── */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 60px;
    position: relative;
    overflow: hidden;
}

/* Animated Background Shapes */
.hero::before, .hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    z-index: -1;
    animation: float 12s ease-in-out infinite alternate;
}

.hero::before {
    width: 600px;
    height: 600px;
    background: rgba(0, 122, 255, 0.15);
    top: -150px;
    right: -150px;
    animation-delay: 0s;
}

.hero::after {
    width: 700px;
    height: 700px;
    background: rgba(175, 82, 222, 0.12);
    bottom: -200px;
    left: -250px;
    animation-delay: -6s;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-icon {
    font-size: 88px;
    margin-bottom: 24px;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.15));
    animation: bounce 3s infinite cubic-bezier(0.28, 0.84, 0.42, 1);
}

.hero h1 {
    font-size: clamp(3.5rem, 8vw, 5.5rem);
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 16px;
    line-height: 1.1;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: clamp(1.15rem, 3vw, 1.4rem);
    color: var(--text-muted);
    max-width: 680px;
    margin: 0 auto 48px;
    font-weight: 400;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 56px;
}

.hero-badges span {
    background: var(--surface-bg);
    border: 1px solid var(--surface-border);
    backdrop-filter: var(--glass-blur);
    padding: 10px 22px;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
}

.hero-badges span:hover {
    transform: translateY(-3px) scale(1.03);
    border-color: var(--primary-light);
    box-shadow: 0 8px 20px rgba(0, 122, 255, 0.15);
}

.btn {
    display: inline-block;
    padding: 18px 52px;
    border-radius: 40px;
    font-size: 1.15rem;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    border: none;
    letter-spacing: 0.5px;
}

.btn-white {
    background: var(--text-main);
    color: var(--bg-color);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.btn-white:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
    opacity: 0.95;
}

/* ── Sections ─────────────────────────────────────── */
section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 24px;
    position: relative;
    z-index: 2;
}

.section-title {
    text-align: center;
    margin-bottom: 16px;
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.section-sub {
    text-align: center;
    color: var(--text-muted);
    max-width: 680px;
    margin: 0 auto 72px;
    font-size: 1.2rem;
}

/* ── Feature Cards ────────────────────────────────── */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.feature-card {
    padding: 40px 32px;
    background: var(--surface-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--surface-border);
    border-radius: 28px;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.12);
    border-color: rgba(0, 122, 255, 0.4);
}

.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 28px;
    color: white;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.feature-icon-1 { background: linear-gradient(135deg, #FF9A9E 0%, #FECFEF 100%); }
.feature-icon-2 { background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%); }
.feature-icon-3 { background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%); }
.feature-icon-4 { background: linear-gradient(135deg, #fccb90 0%, #d57eeb 100%); }
.feature-icon-5 { background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%); }
.feature-icon-6 { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }

.feature-card:hover .feature-icon {
    transform: scale(1.1) translateY(-4px);
}

.feature-card h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
    font-weight: 700;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

/* ── TTS Models ───────────────────────────────────── */
.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 32px;
}

.model-card {
    overflow: hidden;
    background: var(--surface-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--surface-border);
    border-radius: 28px;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.model-card-1 { border-top: 6px solid #007AFF; }
.model-card-2 { border-top: 6px solid #34C759; }
.model-card-3 { border-top: 6px solid #AF52DE; }

.model-card-1 .model-badge { background: rgba(0, 122, 255, 0.1); color: #007AFF; }
.model-card-2 .model-badge { background: rgba(52, 199, 89, 0.1); color: #34C759; }
.model-card-3 .model-badge { background: rgba(175, 82, 222, 0.1); color: #AF52DE; }

.model-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.1);
}

.model-header {
    padding: 36px 36px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.model-badge {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    flex-shrink: 0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.model-card h3 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.model-card .model-tag {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 700;
    background: rgba(0, 122, 255, 0.12);
    padding: 6px 12px;
    border-radius: 12px;
    display: inline-block;
}

.model-body {
    padding: 28px 36px 36px;
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
    flex-grow: 1;
}

.model-body ul {
    list-style: none;
    margin-top: 24px;
}

.model-body li {
    padding: 10px 0;
    padding-left: 36px;
    position: relative;
    font-weight: 500;
}

.model-body li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23007AFF' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: 14px;
    background-position: center;
    background-repeat: no-repeat;
    background-color: rgba(0, 122, 255, 0.1);
}

/* ── Workflow ─────────────────────────────────────── */
.workflow-steps {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
    counter-reset: step;
}

.step {
    padding: 32px 40px;
    width: 100%;
    max-width: 720px;
    text-align: left;
    position: relative;
    counter-increment: step;
    transition: transform 0.4s ease, border-color 0.4s;
    display: grid;
    grid-template-columns: 64px 1fr;
    grid-template-rows: auto auto;
    column-gap: 32px;
    align-items: center;
}

.step:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 122, 255, 0.4);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
}

.step-number {
    grid-column: 1;
    grid-row: 1 / 3;
    width: 64px;
    height: 64px;
    background: var(--gradient-hero);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.5rem;
    margin: 0;
    box-shadow: 0 12px 24px rgba(0, 122, 255, 0.35);
    transition: transform 0.3s ease;
}

.step:hover .step-number {
    transform: scale(1.08);
}

.step h4 {
    grid-column: 2;
    grid-row: 1;
    font-size: 1.25rem;
    margin-bottom: 6px;
    margin-top: 0;
    font-weight: 700;
    align-self: end;
}

.step p {
    grid-column: 2;
    grid-row: 2;
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
    align-self: start;
}

/* ── Platform Support ─────────────────────────────── */
.platforms {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    max-width: 800px;
    margin: 0 auto;
}

.platform {
    padding: 48px;
    text-align: center;
    background: var(--surface-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--surface-border);
    border-radius: 32px;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-main);
}

.platform:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.08);
}

.platform-icon {
    font-size: 80px;
    margin-bottom: 24px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.platform:hover .platform-icon {
    transform: scale(1.1) translateY(-4px);
}

.platform-label {
    font-weight: 800;
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.platform-badge {
    font-size: 0.9rem;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-block;
    transition: background 0.3s;
}

.platform-badge-primary {
    background: rgba(0, 122, 255, 0.1);
    color: #007AFF;
}

.platform-badge-accent {
    background: rgba(175, 82, 222, 0.1);
    color: #AF52DE;
}

.platform:hover .platform-badge-primary { background: rgba(0, 122, 255, 0.15); }
.platform:hover .platform-badge-accent { background: rgba(175, 82, 222, 0.15); }

/* ── Links ────────────────────────────────────────── */
.links-wrap {
    display: flex;
    justify-content: center;
}

.links-card {
    padding: 40px 48px;
    width: 100%;
    max-width: 700px;
}

.links-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.links-divider {
    height: 1px;
    background: var(--surface-border);
    margin: 12px 0;
}

.link-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 0.95rem;
    color: var(--text-main);
    font-weight: 500;
    transition: all 0.25s ease;
    background: rgba(255, 255, 255, 0.03);
}

.link-item:hover {
    background: rgba(0, 122, 255, 0.08);
    color: var(--primary);
    transform: translateX(12px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.link-item--accent {
    color: var(--primary);
    font-weight: 700;
}

.link-icon {
    font-size: 26px;
    flex-shrink: 0;
}

/* ── Footer ───────────────────────────────────────── */
footer {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-muted);
    font-size: 1rem;
    border-top: 1px solid var(--surface-border);
    max-width: 1200px;
    margin: 0 auto;
}

footer a {
    color: var(--primary);
    font-weight: 600;
}

/* ── Animations ───────────────────────────────────── */
@keyframes slideDown {
    from { transform: translate(-50%, -100%); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

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

@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(30px, 50px) rotate(10deg); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 768px) {
    .nav {
        width: 95%;
        padding: 0 20px;
        height: 60px;
    }

    .nav-links {
        display: none;
    }

    .hero {
        padding: 140px 20px 60px;
    }

    .hero h1 {
        font-size: clamp(2.5rem, 8vw, 3.5rem);
    }

    section {
        padding: 80px 20px;
    }

    .section-title {
        font-size: 2.2rem;
    }

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

    .step {
        max-width: 100%;
        width: 100%;
    }
    
    .platform {
        width: 100%;
    }
    
    .links-card {
        padding: 24px;
    }
    
    .link-item {
        padding: 16px;
        font-size: 1rem;
    }
}