/* ============================================
   First CTO – Modern Rebrand Styles
   ============================================ */

:root {
    --bg: #0a0a0b;
    --surface: #111113;
    --surface-2: #1a1a1f;
    --border: #222228;
    --text: #ededef;
    --text-muted: #8a8a9a;
    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.15);
    --green: #22c55e;
    --yellow: #eab308;
    --red: #ef4444;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --mono: 'JetBrains Mono', 'Fira Code', monospace;
    --radius: 12px;
    --radius-sm: 8px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ---- Navbar ---- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 10, 11, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text);
}

.logo-mark {
    font-family: var(--mono);
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--accent-light);
}

.logo-text {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--text);
}

.nav-cta {
    background: var(--accent);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
}

.nav-cta:hover {
    background: var(--accent-light);
    transform: translateY(-1px);
}

/* ---- Hero ---- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8rem 2rem 4rem;
    overflow: hidden;
}

.hero-grid {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.grid-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, transparent, var(--border) 30%, var(--border) 70%, transparent);
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin-bottom: 4rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 0.4rem 1rem;
    border-radius: 100px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-light), #a78bfa, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
    font-weight: 400;
}

.hero-subtitle em {
    color: var(--text);
    font-style: normal;
    font-weight: 600;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 0 24px var(--accent-glow);
}

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

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--text-muted);
    background: var(--surface);
    transform: translateY(-2px);
}

/* ---- Terminal Visual ---- */
.hero-visual {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 700px;
}

.terminal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px var(--accent-glow);
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.red { background: var(--red); }
.dot.yellow { background: var(--yellow); }
.dot.green { background: var(--green); }

.terminal-title {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.terminal-body {
    padding: 1.25rem 1.5rem;
    font-family: var(--mono);
    font-size: 0.9rem;
    line-height: 1.8;
}

.terminal-line {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.prompt {
    color: var(--accent-light);
    font-weight: 500;
}

.command {
    color: var(--text);
}

.terminal-output .output-line {
    opacity: 0;
    animation: fadeInUp 0.4s ease forwards;
}

.delay-1 { animation-delay: 0.8s; }
.delay-2 { animation-delay: 1.4s; }
.delay-3 { animation-delay: 2.0s; }
.delay-4 { animation-delay: 2.6s; }
.delay-5 { animation-delay: 3.2s; }
.delay-6 { animation-delay: 3.8s; }
.delay-7 { animation-delay: 4.4s; }

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

.check {
    color: var(--green);
    margin-right: 0.5rem;
}

.warn {
    color: var(--yellow);
    margin-right: 0.5rem;
}

.success {
    color: var(--accent-light);
    font-weight: 500;
}

/* ---- Features / Offerings ---- */
.features {
    position: relative;
    z-index: 1;
    padding: 6rem 2rem;
    border-top: 1px solid var(--border);
}

.features-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 3rem;
}

.features-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
}

.features-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

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

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    position: relative;
}

.feature-card.featured {
    border-color: var(--accent);
    box-shadow: 0 0 40px var(--accent-glow);
}

.feature-badge {
    position: absolute;
    top: -12px;
    right: 1.5rem;
    background: var(--accent);
    color: white;
    padding: 0.2rem 0.85rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.feature-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 30px var(--accent-glow);
    transform: translateY(-4px);
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-glow);
    border-radius: 10px;
    margin-bottom: 1.25rem;
    color: var(--accent-light);
}

.feature-price {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.feature-price span {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
}

.feature-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

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

.feature-cta {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.7rem 1.5rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    text-align: center;
}

.feature-cta:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.feature-card.featured .feature-cta {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.feature-card.featured .feature-cta:hover {
    background: var(--accent-light);
    border-color: var(--accent-light);
}

/* ---- CTA Section ---- */
.cta-section {
    position: relative;
    z-index: 1;
    padding: 6rem 2rem;
    text-align: center;
    border-top: 1px solid var(--border);
}

.cta-inner {
    max-width: 600px;
    margin: 0 auto;
}

.cta-inner h2 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
}

.cta-inner p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* ---- Footer ---- */
.footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border);
    padding: 2rem;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ---- PRD Page Specific ---- */
#prd-navbar {
    width: 100%;
    height: 64px;
    background: rgba(10, 10, 11, 0.95);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    box-sizing: border-box;
    border-bottom: 1px solid var(--border);
    position: fixed;
    top: 0;
    z-index: 100;
}

#mobile-block {
    display: none;
    text-align: center;
    padding: 4rem 2rem;
    font-size: 1.1rem;
    background: var(--bg);
    color: var(--text-muted);
    min-height: 100vh;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#container {
    display: flex;
    height: calc(100vh - 64px);
    margin-top: 64px;
}

#chat {
    width: 50%;
    padding: 1.5rem;
    box-sizing: border-box;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border);
}

#messages {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
}

#messages::-webkit-scrollbar {
    width: 4px;
}

#messages::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.message {
    max-width: 80%;
    padding: 0.85rem 1.15rem;
    border-radius: 16px;
    margin-bottom: 0.75rem;
    line-height: 1.5;
    font-size: 0.95rem;
    word-wrap: break-word;
}

.message.user {
    background: var(--accent);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.message.agent {
    background: var(--surface-2);
    color: var(--text);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    border: 1px solid var(--border);
}

#input-bar {
    display: flex;
    gap: 0.5rem;
}

#input {
    flex: 1;
    padding: 0.85rem 1.15rem;
    font-size: 0.95rem;
    font-family: var(--font);
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
}

#input:focus {
    border-color: var(--accent);
}

#input::placeholder {
    color: var(--text-muted);
}

#send-btn {
    background: var(--accent);
    color: white;
    padding: 0.85rem 1.5rem;
    font-size: 0.95rem;
    font-family: var(--font);
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

#send-btn:hover {
    background: var(--accent-light);
}

#waiting {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 0.5rem;
    display: none;
}

#prd {
    width: 50%;
    background: #fafafa;
    padding: 2rem;
    overflow-y: auto;
    box-sizing: border-box;
    position: relative;
}

#prd h2 {
    margin-top: 0;
    font-size: 1.5rem;
    color: #111;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

#prd-content {
    white-space: pre-wrap;
    font-size: 0.95rem;
    color: #333;
    line-height: 1.6;
    margin-top: 1rem;
    background: white;
    border: 1px solid #e5e5e5;
    padding: 1.5rem;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    font-family: var(--font);
    min-height: 200px;
}

#prd-content h2 {
    font-size: 1.3rem;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 0.25rem;
}

#prd-content h3 {
    font-size: 1.1rem;
    margin-top: 1rem;
    margin-bottom: 0.4rem;
    font-weight: 600;
}

#prd-content h4 {
    font-size: 1rem;
    margin-top: 0.8rem;
    margin-bottom: 0.3rem;
    font-weight: 600;
    color: #555;
}

#prd-content p {
    margin: 0.4rem 0;
    line-height: 1.6;
}

#prd-content ul {
    padding-left: 1.5rem;
    margin: 0.5rem 0;
}

#prd-content li {
    margin-bottom: 0.3rem;
}

.prd-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.prd-btn {
    background: #111;
    color: white;
    padding: 0.6rem 1.25rem;
    font-size: 0.85rem;
    font-family: var(--font);
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.prd-btn:hover {
    background: #333;
    transform: translateY(-1px);
}

.prd-btn.danger {
    background: transparent;
    color: var(--red);
    border: 1px solid var(--red);
}

.prd-btn.danger:hover {
    background: var(--red);
    color: white;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .hero {
        padding: 7rem 1.5rem 3rem;
    }

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

    .hero-subtitle {
        font-size: 1rem;
    }

    .nav-inner {
        padding: 0 1rem;
    }

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

    .terminal-body {
        font-size: 0.75rem;
    }
}

@media (max-width: 991px) {
    #container {
        flex-direction: column;
        height: calc(100vh - 64px);
        overflow: hidden;
    }

    #chat, #prd {
        width: 100%;
        height: 50%;
        padding: 1rem;
        box-sizing: border-box;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    #chat {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    #messages {
        flex: 1;
        overflow-y: auto;
    }

    #prd-content {
        flex: 1;
        overflow-y: auto;
    }

    #input-bar {
        flex-shrink: 0;
    }
}
