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

:root {
    /* Beige Color Palette */
    --cream: #FAF7F0;
    --beige-light: #F5EFE6;
    --beige: #E8DCC8;
    --beige-dark: #D4C4A8;
    --brown-light: #A08968;
    --brown: #7D6E57;
    --brown-dark: #5C5346;
    --text-primary: #2C2416;
    --text-secondary: #6B5D4F;
    --accent: #D17B47;
    --accent-hover: #B8643A;
    --success: #8B9F6E;
    --shadow-sm: 0 2px 8px rgba(44, 36, 22, 0.08);
    --shadow-md: 0 4px 20px rgba(44, 36, 22, 0.12);
    --shadow-lg: 0 8px 32px rgba(44, 36, 22, 0.16);
}

html {
    scroll-behavior: smooth;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
}

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

.italic-accent {
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    color: var(--accent);
}

/* Floating Navigation */
.nav-floating {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(250, 247, 240, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--beige);
    padding: 0.5rem 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo-link:hover {
    transform: scale(1.02);
}

.logo-image {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

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

.nav-item {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-item:hover {
    color: var(--accent);
}

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

.nav-github {
    background: var(--text-primary);
    color: var(--cream);
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-github::after {
    display: none;
}

.nav-github:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Hero Section */
.hero-section {
    padding: 10rem 2rem 6rem;
    background: linear-gradient(135deg, var(--cream) 0%, var(--beige-light) 100%);
}

.hero-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    max-width: 600px;
}

.hero-badge {
    display: inline-block;
    background: var(--beige);
    color: var(--brown);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-heading {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    line-height: 1.1;
}

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

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent);
    color: white;
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--beige);
    color: var(--text-primary);
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid var(--beige-dark);
}

.btn-secondary:hover {
    background: var(--beige-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.install-box {
    background: white;
    border: 2px solid var(--beige);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
}

.install-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.install-command {
    flex: 1;
    min-width: 200px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 1rem;
    color: var(--accent);
    background: var(--beige-light);
    padding: 0.75rem 1rem;
    border-radius: 6px;
}

.install-copy {
    background: var(--text-primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.install-copy:hover {
    background: var(--accent);
    transform: scale(1.05);
}

.install-copy.copied {
    background: var(--success);
}

/* Hero Visual */
.hero-visual {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.waveform-display {
    background: white;
    border: 2px solid var(--beige);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    height: 250px;
}

#hero-wave {
    width: 100%;
    height: 100%;
}

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

.stat-box {
    background: white;
    border: 2px solid var(--beige);
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-box:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Sections */
.section-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-heading {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

.section-heading.centered {
    text-align: center;
}

/* About Section */
.about-section {
    padding: 6rem 0;
    background: white;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text .text-block {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.about-text p {
    font-size: 1.15rem;
    line-height: 1.8;
}

.features-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.feature-pill {
    background: var(--beige-light);
    border: 1px solid var(--beige);
    color: var(--brown);
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.feature-pill:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    transform: scale(1.05);
}

/* Capabilities Section */
.capabilities-section {
    padding: 6rem 0;
    background: var(--beige-light);
}

.capabilities-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.capability-card {
    background: white;
    border: 2px solid var(--beige);
    border-radius: 16px;
    padding: 2.5rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.capability-card.large {
    grid-column: span 2;
}

.capability-card.accent {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    border-color: var(--accent);
}

.capability-card.accent * {
    color: white !important;
}

.capability-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.capability-icon {
    width: 60px;
    height: 60px;
    background: var(--beige-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--accent);
}

.capability-card.accent .capability-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.capability-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.capability-description {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.capability-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.capability-list li {
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.capability-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
}

/* Examples Section */
.examples-section {
    padding: 6rem 0;
    background: white;
}

.examples-tabs {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.tab-btn {
    background: var(--beige-light);
    border: 2px solid var(--beige);
    color: var(--text-secondary);
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.tab-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.tab-btn:hover:not(.active) {
    background: var(--beige);
    border-color: var(--beige-dark);
}

.examples-content {
    max-width: 1000px;
    margin: 0 auto;
}

.example-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.example-panel.active {
    display: block;
}

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

.example-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.example-header h3 {
    font-size: 1.75rem;
    color: var(--text-primary);
}

.copy-code {
    background: var(--beige);
    border: 2px solid var(--beige-dark);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-code:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    transform: scale(1.05);
}

.copy-code.copied {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.code-block {
    background: var(--text-primary);
    color: var(--cream);
    padding: 2rem;
    border-radius: 12px;
    overflow-x: auto;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.7;
    box-shadow: var(--shadow-lg);
}

.code-block .k {
    color: #E8A87C;
    font-weight: 600;
}

.code-block .s {
    color: #A8C984;
}

.code-block .n {
    color: #9BB6E8;
}

.code-block .c {
    color: #8B9F6E;
    font-style: italic;
}

/* Documentation Section */
.documentation-section {
    padding: 6rem 0;
    background: var(--beige-light);
}

.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.doc-card {
    background: white;
    border: 2px solid var(--beige);
    border-radius: 16px;
    padding: 2.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.doc-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.doc-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.doc-card h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.doc-card p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Section Subtitle */
.section-subtitle {
    text-align: center;
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin: -2rem auto 4rem;
    max-width: 700px;
}

/* Playground Section */
.playground-section {
    padding: 6rem 0;
    background: var(--cream);
}

.playground-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 2.5rem;
    margin-bottom: 4rem;
}

.playground-card {
    background: white;
    border: 2px solid var(--beige);
    border-radius: 20px;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    transition: all 0.4s ease;
    box-shadow: var(--shadow-sm);
}

.playground-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.playground-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.playground-icon {
    color: var(--accent);
    flex-shrink: 0;
}

.playground-header h3 {
    font-size: 1.75rem;
    color: var(--text-primary);
    margin: 0;
}

.playground-description {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex: 1;
}

.playground-features {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.feature-tag {
    background: var(--beige-light);
    color: var(--brown);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--beige);
}

.playground-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: var(--accent);
    color: white;
    padding: 1.25rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.playground-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.quick-start-box {
    background: white;
    border: 2px solid var(--beige);
    border-radius: 16px;
    padding: 3rem;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: var(--shadow-md);
}

.quick-start-box h4 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.quick-start-box p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.quick-code {
    background: var(--text-primary);
    color: var(--cream);
    padding: 2rem;
    border-radius: 12px;
    overflow-x: auto;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.copy-quick-start {
    background: var(--accent);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.copy-quick-start:hover {
    background: var(--accent-hover);
    transform: scale(1.02);
}

.copy-quick-start.copied {
    background: var(--success);
}

/* Demos Section */
.demos-section {
    padding: 6rem 0;
    background: white;
}

.demo-feature {
    background: var(--beige-light);
    border: 2px solid var(--beige);
    border-radius: 20px;
    padding: 3rem;
    margin-bottom: 4rem;
}

.demo-title {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-align: center;
}

.demo-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 2rem;
}

.waveform-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.wave-btn {
    background: white;
    border: 2px solid var(--beige);
    color: var(--text-secondary);
    padding: 0.75rem 1.75rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.wave-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    transform: scale(1.05);
}

.wave-btn:hover:not(.active) {
    background: var(--beige);
    border-color: var(--beige-dark);
}

.waveform-display-large {
    background: white;
    border: 2px solid var(--beige);
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    height: 350px;
}

#demo-wave {
    width: 100%;
    height: 100%;
}

.waveform-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.info-item {
    background: white;
    border: 2px solid var(--beige);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent);
}

.demos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.demo-card {
    background: var(--beige-light);
    border: 2px solid var(--beige);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.demo-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.demo-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}

.demo-card-header h4 {
    font-size: 1.35rem;
    color: var(--text-primary);
    margin: 0;
}

.demo-badge {
    background: var(--accent);
    color: white;
    padding: 0.4rem 0.9rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.demo-card > p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

.demo-code {
    background: var(--text-primary);
    color: var(--cream);
    padding: 1.5rem;
    border-radius: 10px;
    overflow-x: auto;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.demo-output {
    background: white;
    border: 2px solid var(--beige);
    border-radius: 10px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.output-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.output-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent);
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: var(--beige-light);
    padding: 4rem 0 2rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 3rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-logo {
    width: 48px;
    height: 48px;
    border-radius: 8px;
}

.footer-brand h3 {
    font-size: 1.5rem;
    color: var(--cream);
}

.footer-brand p {
    color: var(--beige);
}

.footer-column h4 {
    font-size: 1.1rem;
    color: var(--cream);
    margin-bottom: 1rem;
    font-weight: 700;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-column a {
    color: var(--beige);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

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

.footer-bottom {
    max-width: 1400px;
    margin: 3rem auto 0;
    padding: 2rem 2rem 0;
    border-top: 1px solid rgba(232, 220, 200, 0.2);
    text-align: center;
    color: var(--beige);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .capability-card.large {
        grid-column: span 1;
    }

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

    .demos-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }

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

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        gap: 1rem;
    }

    .nav-item {
        font-size: 0.85rem;
    }

    .hero-section {
        padding: 8rem 1.5rem 4rem;
    }

    .hero-actions {
        flex-direction: column;
    }

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

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

    .examples-tabs {
        gap: 0.5rem;
    }

    .tab-btn {
        padding: 0.6rem 1.25rem;
        font-size: 0.9rem;
    }

    .footer-container {
        grid-template-columns: 1fr;
    }
}

/* Selection */
::selection {
    background: var(--accent);
    color: white;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--beige-light);
}

::-webkit-scrollbar-thumb {
    background: var(--beige-dark);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}
