/* Global Styles & Variables */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --accent-color: #f43f5e;
    --text-main: #1e293b;
    --text-light: #64748b;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

/* Header */
.header {
    background-color: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.nav a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 15px;
    transition: color 0.2s;
}

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

.btn-primary {
    background-color: var(--primary-color);
    color: white !important;
    padding: 10px 20px;
    border-radius: 8px;
    transition: background-color 0.2s;
}

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

/* Hero Section */
.hero {
    padding: 100px 20px;
    text-align: center;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    width: 50%;
    height: 150%;
    background: radial-gradient(circle, rgba(37,99,235,0.1) 0%, transparent 70%);
    z-index: 0;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.badge {
    display: inline-block;
    background: rgba(244, 63, 94, 0.1);
    color: var(--accent-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 20px 0;
    color: #0f172a;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-light);
    margin-bottom: 40px;
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    padding: 15px 30px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(37, 99, 235, 0.4);
}

/* Features — 6-col grid so bottom 2 cards sit perfectly centred */
.features {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 30px;
}

.feature-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    transition: transform 0.3s, box-shadow 0.3s;
    /* Top row: each card spans 2 of 6 columns */
    grid-column: span 2;
}

/* Bottom row: offset by 1 col so the pair is centered */
.feature-card:nth-child(4) {
    grid-column: 2 / 4;
}

.feature-card:nth-child(5) {
    grid-column: 4 / 6;
}

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

.feature-icon {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 20px;
    margin: 0 0 10px 0;
    color: #0f172a;
}

.feature-card p {
    color: var(--text-light);
    margin: 0;
}

/* Demo Section */
.demo-section {
    background-color: white;
    padding: 80px 20px;
    border-top: 1px solid #e2e8f0;
}

.demo-container {
    max-width: 900px;
    margin: 0 auto;
}

.demo-header {
    text-align: center;
    margin-bottom: 40px;
}

.demo-header h2 {
    font-size: 36px;
    font-weight: 800;
    margin: 0 0 15px 0;
}

.demo-interactive {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 40px;
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(10px);
}

.input-area label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #0f172a;
}

.input-area textarea {
    width: 100%;
    height: 200px;
    padding: 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-family: inherit;
    font-size: 16px;
    resize: vertical;
    transition: border-color 0.2s;
    background: #f8fafc;
}

.input-area textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #fff;
}

.action-area {
    margin: 30px 0;
    display: flex;
    justify-content: center;
}

.btn-generate {
    background-color: #0f172a;
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.2s, transform 0.2s;
}

.btn-generate:hover {
    background-color: #1e293b;
    transform: scale(1.02);
}

.btn-generate:disabled {
    background-color: #94a3b8;
    cursor: not-allowed;
    transform: none;
}

/* Player Widget */
.player-area {
    margin-top: 20px;
}

.omnivoice-player {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 20px 30px;
    border-radius: 100px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid #f1f5f9;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.player-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), #60a5fa);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.player-text {
    display: flex;
    flex-direction: column;
}

.player-title {
    font-weight: 700;
    font-size: 16px;
}

.player-subtitle {
    font-size: 13px;
    color: var(--text-light);
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.play-btn {
    background: #f1f5f9;
    border: none;
    color: var(--primary-color);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    transition: all 0.2s;
}

.play-btn:not(:disabled):hover {
    background: #e2e8f0;
    transform: scale(1.1);
}

.play-btn:disabled {
    color: #cbd5e1;
    cursor: not-allowed;
    background: #f8fafc;
}

/* Visualizer */
.visualizer {
    display: none;
    align-items: flex-end;
    gap: 4px;
    height: 24px;
    width: 40px;
}

.visualizer.active {
    display: flex;
}

.visualizer .bar {
    width: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
    animation: bounce 1s infinite alternate ease-in-out;
}

.visualizer .bar:nth-child(1) { height: 12px; animation-delay: 0.1s; }
.visualizer .bar:nth-child(2) { height: 24px; animation-delay: 0.2s; }
.visualizer .bar:nth-child(3) { height: 18px; animation-delay: 0.3s; }
.visualizer .bar:nth-child(4) { height: 14px; animation-delay: 0.4s; }
.visualizer .bar:nth-child(5) { height: 20px; animation-delay: 0.5s; }

@keyframes bounce {
    0% { height: 4px; }
    100% { height: 24px; }
}

/* Loader Spinner */
.loader {
    display: none;
    width: 24px;
    height: 24px;
    border: 3px solid #e2e8f0;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader.active {
    display: block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.footer {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
    font-size: 14px;
}

/* Contact Section */
.contact-section {
    padding: 80px 20px;
    text-align: center;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.contact-section h2 {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 8px 0;
    color: #0f172a;
}

.contact-section h2::before {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
    margin: 0 auto 20px auto;
}

.contact-section p {
    color: var(--text-light);
    font-size: 16px;
    margin: 0 0 24px 0;
}

.contact-email {
    display: inline-block;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 17px;
    text-decoration: none;
    padding: 10px 24px;
    border: 2px solid var(--primary-color);
    border-radius: 100px;
    transition: all 0.2s;
}

.contact-email:hover {
    background: var(--primary-color);
    color: white;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Responsive */
@media (max-width: 960px) {
    .features {
        grid-template-columns: repeat(2, 1fr);
    }
    .feature-card {
        grid-column: auto;
    }
    .feature-card:nth-child(4) {
        grid-column: auto;
    }
    .feature-card:nth-child(5) {
        grid-column: 1 / -1;
        max-width: 480px;
        justify-self: center;
    }
}

@media (max-width: 768px) {
    .hero-title { font-size: 40px; }
    .demo-interactive { padding: 20px; }
    .omnivoice-player { flex-direction: column; gap: 20px; border-radius: 20px; }
    .contact-card { padding: 40px 30px; }
    .contact-card h2 { font-size: 28px; }
    .contact-email { font-size: 16px; padding: 14px 28px; }
}

@media (max-width: 600px) {
    .features {
        grid-template-columns: 1fr;
    }
    .feature-card,
    .feature-card:nth-child(4),
    .feature-card:nth-child(5) {
        grid-column: auto;
        max-width: none;
    }
}
