@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
    --teal: #137EA2;
    --orange: #F1993F;
    --indigo: #2C2A74;
    --navy: #192F52;
    --yellow: #FCDD83;
    --cyan: #20DDE3;
    --hero-warm-start: #2C2A74;
    --hero-warm-mid: #5A3AA6;
    --hero-warm-glow: #F1993F;
    --glass-dark: rgba(8, 10, 24, 0.72);
    --glass-border: rgba(255, 255, 255, 0.08);
    --bg: #f7fafc;
    --text: #1a1a2e;
    --text-muted: #5a5a7a;
    --code-bg: #1a1a2e;
    --border: #e1e4e8;
    --card-bg: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

html {
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

a:hover {
    color: var(--cyan);
}

.header {
    background: linear-gradient(135deg, rgba(18, 12, 30, 0.88) 0%, rgba(44, 42, 116, 0.65) 55%, rgba(90, 58, 166, 0.55) 100%);
    backdrop-filter: blur(16px) saturate(120%);
    -webkit-backdrop-filter: blur(16px) saturate(120%);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(241, 153, 63, 0.18);
    box-shadow: 0 12px 30px rgba(8, 10, 24, 0.35);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-left a {
    display: flex;
    align-items: center;
}

.logo {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    filter: drop-shadow(0 0 20px rgba(251, 186, 79, 0.3));
    animation: none;
    transform: translateY(1px);
    display: block;
}

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

.header h1 {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
}

.header h1 span {
    color: var(--orange);
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav a {
    color: rgba(255,255,255,0.8);
    font-weight: 500;
    transition: color 0.2s;
}

.nav a:hover {
    color: var(--cyan);
    text-decoration: none;
}

.main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem;
    padding-top: 6rem;
}

.hero {
    text-align: center;
    padding: 8rem 2rem 5rem 2rem;
    background: linear-gradient(135deg, var(--hero-warm-start) 0%, var(--hero-warm-mid) 45%, var(--hero-warm-glow) 100%);
    color: white;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-top: -6rem;
    position: relative;
    overflow: visible;
    box-shadow: 0 24px 60px -40px rgba(44, 42, 116, 0.6);
}

.hero::before {
    content: "";
    position: absolute;
    inset: -20% -10% auto -10%;
    height: 70%;
    background: radial-gradient(60% 60% at 70% 20%, rgba(241, 153, 63, 0.45) 0%, rgba(241, 153, 63, 0.0) 65%);
    pointer-events: none;
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 0.5rem;
}

.hero h2 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #fff 0%, #ffe3c2 55%, var(--cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    padding-bottom: 0.15em;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.hero .tagline {
    font-size: 1.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    max-width: 700px;
    margin: 0 auto 1rem auto;
    line-height: 1.4;
}

.hero .tagline-sub {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.75);
    max-width: 650px;
    margin: 0 auto 2.5rem auto;
    line-height: 1.7;
}

.cta-button {
    display: inline-block;
    background: var(--orange);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 14px 0 rgba(241, 153, 63, 0.4);
}

.cta-button:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px 0 rgba(241, 153, 63, 0.5);
    text-decoration: none;
    color: white;
}

.cta-button.secondary {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: none;
}

.cta-button.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: none;
}

.warning {
    background: var(--yellow);
    color: var(--navy);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin: 2rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 2;
}

.section {
    margin: 3rem 0;
}

.section:first-of-type {
    margin-top: 0;
}

/* Intro Section */
.intro-section {
    max-width: 800px;
}

.intro-text {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 1rem;
}

.intro-text:last-child {
    margin-bottom: 0;
}

.intro-text strong {
    color: var(--indigo);
}

.section h3 {
    font-size: 2.25rem;
    color: var(--navy);
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.15rem;
    margin-bottom: 2.5rem;
}

/* IDD Flow Section */
.idd-cycle {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
}

.idd-step {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    position: relative;
}

.idd-step-number {
    position: absolute;
    top: -1rem;
    left: 2rem;
    width: 2.5rem;
    height: 2.5rem;
    background: linear-gradient(135deg, var(--indigo) 0%, var(--teal) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(44, 42, 116, 0.3);
}

.idd-step h4 {
    color: var(--indigo);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    margin-top: 0.5rem;
    font-weight: 700;
}

.idd-step > p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.idd-step pre {
    margin: 0;
    font-size: 0.8rem;
}

.idd-step pre code {
    padding: 1rem;
}

/* IAL Demo Section */
.ial-demo {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
}

.ial-explanation p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
}

.ial-explanation pre {
    margin: 1rem 0;
}

/* Intent Studio Section */
.studio-feature {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
}

.studio-description p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.studio-features-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

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

.studio-features-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--teal);
    font-weight: 700;
}

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

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

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

.feature-card h4 {
    color: var(--indigo);
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

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

/* Code Blocks */
.code-window {
    background: var(--code-bg);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    margin: 1.5rem 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.window-header {
    background: #151525;
    padding: 0.75rem 1rem;
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.red { background: #ff5f56; }
.yellow { background: #ffbd2e; }
.green { background: #27c93f; }

/* Code block container - holds the button outside the scrolling pre */
.code-container {
    position: relative;
    margin: 1.5rem 0;
}

.code-container pre {
    margin: 0;
}

pre {
    background: var(--code-bg);
    border-radius: 12px;
    padding: 2.5rem 1.5rem 1.5rem 1.5rem;
    overflow-x: auto;
    font-family: 'JetBrains Mono', 'SF Mono', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #e2e8f0;
    box-shadow: var(--shadow);
}

.copy-button {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 0.35rem 0.6rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
    z-index: 10;
}

.copy-button:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.35);
}

.copy-button.copied {
    background: rgba(241, 153, 63, 0.95);
    border-color: rgba(241, 153, 63, 1);
    color: #1a1a2e;
}

code {
    font-family: 'JetBrains Mono', 'SF Mono', Consolas, 'Liberation Mono', Menlo, monospace;
    background: rgba(25, 47, 82, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.9em;
    color: var(--indigo);
}

pre code {
    background: none;
    padding: 0;
    color: #e2e8f0;
}

/* Prism.js syntax highlighting - matches VS Code dark theme */
/* Override Prism defaults to use our dark theme */
pre,
pre[class*="language-"],
code[class*="language-"] {
    background: var(--code-bg) !important;
    text-shadow: none !important;
    color: #e2e8f0 !important;
}

pre code,
pre code[class*="language-"] {
    background: none !important;
}

.token.comment { color: #6A9955; font-style: italic; }
.token.annotation { color: #6A9955; font-style: italic; }
.token.string { color: #CE9178; }
.token.number { color: #B5CEA8; }
.token.boolean { color: #569CD6; }
.token.keyword { color: #C586C0; }
.token.declaration { color: #569CD6; }
.token.contract { color: #C586C0; font-style: italic; }
.token.type { color: #4EC9B0; }
.token.builtin { color: #DCDCAA; }
.token.function { color: #DCDCAA; }
.token.operator { color: #D4D4D4; }
.token.punctuation { color: #808080; }

/* Intent file tokens */
.token.label { color: #DCDCAA; }
.token.method { color: #569CD6; }
.token.assertion { color: #C586C0; }

.footer {
    background: var(--navy);
    color: rgba(255,255,255,0.7);
    padding: 3rem 2rem;
    text-align: center;
    margin-top: 5rem;
}

.footer a {
    color: var(--cyan);
}

.powered-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--indigo) 0%, var(--teal) 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(19, 126, 162, 0.3);
}

.powered-icon {
    width: 18px;
    height: 18px;
    border-radius: 4px;
}

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

.why-item {
    background: var(--card-bg);
    border-left: 4px solid var(--teal);
    padding: 1.75rem;
    border-radius: 0 12px 12px 0;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.why-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-lg);
}

.why-item h4 {
    color: var(--navy);
    margin-bottom: 0.75rem;
    font-weight: 700;
    font-size: 1.15rem;
}

.why-item p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.learn-section {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.5rem;
    margin: 2.5rem 0;
    box-shadow: var(--shadow);
}

.learn-section h4 {
    color: var(--indigo);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.step {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0 0.75rem 0;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--teal);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.step strong {
    color: var(--navy);
    font-size: 1.05rem;
}

.blog-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.blog-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s;
    box-shadow: var(--shadow);
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--teal);
}

.blog-card h4 {
    color: var(--navy);
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.blog-card h4 a {
    color: inherit;
    transition: color 0.2s;
}

.blog-card h4 a:hover {
    color: var(--teal);
}

.blog-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.blog-excerpt {
    color: var(--text-muted);
    line-height: 1.6;
}

/* Page headers for Learn, Blog list, etc. */
.page-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.page-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--indigo) 0%, var(--teal) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.page-header .tagline {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin: 0;
}

/* Blog-specific header with playful style */
.page-header.blog-header h2 {
    background: linear-gradient(135deg, var(--orange) 0%, var(--indigo) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blog-post {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
}

.blog-post h2 {
    color: var(--navy);
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.blog-post .content {
    margin-top: 2rem;
}

.blog-post .content h3 {
    color: var(--indigo);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.blog-post .content p {
    margin-bottom: 1.25rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.blog-post .content ul,
.blog-post .content ol {
    margin: 1rem 0 1.5rem 2rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.blog-post .content li {
    margin-bottom: 0.5rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    color: var(--teal);
    font-weight: 500;
    transition: transform 0.2s;
}

.back-link:hover {
    transform: translateX(-4px);
}

/* CTA Section */
.cta-section {
    background: radial-gradient(circle at top right, var(--indigo) 0%, var(--navy) 100%);
    border-radius: 20px;
    padding: 4rem 2rem;
    text-align: center;
    color: white;
    margin: 4rem 0;
    position: relative;
    overflow: hidden;
}

.cta-section h3 {
    color: white;
    margin-bottom: 1rem;
}

.cta-section p {
    color: rgba(255, 255, 255, 0.8);
    max-width: 500px;
    margin: 0 auto 2rem;
}

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

    .nav {
        gap: 1rem;
    }

    .hero {
        padding: 5.5rem 1.5rem 3rem 1.5rem;
    }

    .hero h2 {
        font-size: 2.25rem;
    }

    .hero .tagline {
        font-size: 1.1rem;
    }

    .main {
        padding: 1.5rem;
        padding-top: 8rem;
    }

    .section h3 {
        font-size: 1.75rem;
    }

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

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

    .learn-section {
        padding: 1.5rem;
    }

    .blog-post {
        padding: 1.5rem;
    }
}
