/* --- Design Tokens & Variables --- */
:root {
    /* Brand Colors (Editorial v2 Refresh) */
    --color-navy: #071520;       /* Dark Navy background */
    --color-navy-light: #0b1e2c; /* Lighter navy for cards/panels */
    --color-ink: #111827;        /* Almost black for text on cream */
    --color-paper: #f0e3be;      /* Warm cream paper */
    --color-paper-warm: #f7f4ed; /* Very warm light paper */
    --color-sage-mist: #eaece4;  /* Sage mist grey-green */
    --color-rule: #d9c989;       /* Rule lines */
    --color-rule-strong: #c0ad73;/* Strong rule lines */
    --color-accent: #c16647;     /* Editorial Terracotta orange */
    --color-teal: #1A535C;       /* Brand Primary Teal */
    --color-teal-light: #26B0A1; /* Lighter bright teal for highlights */
    
    /* Legacy aliases mapped to Brand Colors */
    --color-cyan: var(--color-teal-light);
    --color-blue: #3e7f80;
    --color-green: #10b981;
    --color-purple: #c16647;     /* Map purple to terracotta */
    
    /* Semantic mappings */
    --bg-base: var(--color-navy);
    --bg-panel: rgba(11, 30, 44, 0.85);
    --bg-card: rgba(15, 38, 56, 0.6);
    --bg-input: rgba(7, 21, 32, 0.9);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-active: var(--color-teal-light);
    
    --text-primary: #ffffff;
    --text-secondary: #e2e8f0;
    --text-muted: #94a3b8;
    
    --gradient-primary: linear-gradient(135deg, var(--color-teal-light) 0%, #3e7f80 100%);
    --gradient-glow: radial-gradient(circle, rgba(38, 176, 161, 0.12) 0%, rgba(62, 127, 128, 0) 70%);
    
    /* Typography */
    --font-heading: 'Fraunces', Georgia, serif;
    --font-body: 'Inter', system-ui, sans-serif;
    --font-mono: 'Fira Code', monospace;
    
    --shadow-soft: 0 8px 30px 0 rgba(0, 0, 0, 0.35);
    --shadow-glow: 0 0 20px rgba(38, 176, 161, 0.25);
    --shadow-glow-green: 0 0 20px rgba(16, 185, 129, 0.25);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* --- Floating Background Mesh Orbs --- */
.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.45;
}

.bg-glow-1 {
    width: 600px;
    height: 600px;
    top: -200px;
    left: -100px;
    background: radial-gradient(circle, rgba(38, 176, 161, 0.2) 0%, rgba(0, 0, 0, 0) 70%);
    animation: floatOrb 25s infinite alternate ease-in-out;
}

.bg-glow-2 {
    width: 500px;
    height: 500px;
    bottom: -150px;
    right: -100px;
    background: radial-gradient(circle, rgba(193, 102, 71, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    animation: floatOrb 20s infinite alternate-reverse ease-in-out;
}

.bg-glow-3 {
    width: 400px;
    height: 400px;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(38, 176, 161, 0.1) 0%, rgba(0, 0, 0, 0) 70%);
}

@keyframes floatOrb {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 40px) scale(1.1); }
}

/* --- Typography Utilities --- */
.font-serif-display {
    font-family: 'Fraunces', Georgia, serif;
    font-variation-settings: "opsz" 144, "SOFT" 40;
    font-weight: 400;
    letter-spacing: -0.02em;
}

h1, h2, h3 {
    font-family: 'Fraunces', Georgia, serif;
    font-variation-settings: "opsz" 144, "SOFT" 40;
    font-weight: 400;
    letter-spacing: -0.02em;
}

h4 {
    font-family: var(--font-body);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.highlight {
    color: var(--color-accent);
    font-weight: 700;
}

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

/* Connective Accents */
.cp-heading-accent {
    position: relative;
    display: inline-block;
    padding-bottom: 14px;
}

.cp-heading-accent::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 2px;
    background-color: var(--color-accent); /* Terracotta Orange */
}

.cp-heading-accent-left {
    position: relative;
    display: inline-block;
    padding-bottom: 12px;
}

.cp-heading-accent-left::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 32px;
    height: 2px;
    background-color: var(--color-accent); /* Terracotta Orange */
}

/* Connective Motifs - Ring Divider */
.ring-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 32px;
    width: 100%;
    margin: 0;
    z-index: 10;
}

.ring-divider::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 1px;
}

.ring-divider-ring {
    position: relative;
    z-index: 2;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ring-divider-ring svg {
    width: 14px;
    height: 14px;
    stroke: var(--color-accent);
    stroke-width: 2.5;
    fill: none;
}

/* Ring Divider Background Variants */
.ring-divider.variant-dark::before {
    background-color: rgba(240, 227, 190, 0.15);
}
.ring-divider.variant-dark .ring-divider-ring {
    background-color: var(--color-navy);
}

.ring-divider.variant-paper::before {
    background-color: var(--color-rule);
}
.ring-divider.variant-paper .ring-divider-ring {
    background-color: var(--color-paper);
}

.ring-divider.variant-paper-warm::before {
    background-color: var(--color-rule);
}
.ring-divider.variant-paper-warm .ring-divider-ring {
    background-color: var(--color-paper-warm);
}

.ring-divider.variant-sage-mist::before {
    background-color: var(--color-rule);
}
.ring-divider.variant-sage-mist .ring-divider-ring {
    background-color: var(--color-sage-mist);
}

a {
    color: var(--color-cyan);
    text-decoration: none;
    transition: var(--transition-smooth);
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Header Layout --- */
.main-header {
    background: rgba(8, 12, 22, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: 72px;
    display: flex;
    align-items: center;
}

.header-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.35rem;
    font-family: var(--font-heading);
    font-weight: 700;
}

.logo-icon-img {
    height: 30px;
    width: auto;
}

.logo-text {
    display: flex;
    align-items: baseline;
    gap: 6px;
    color: var(--text-primary);
}

.logo-text .by-text {
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0.65;
    color: var(--text-secondary);
}

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

.nav-link {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    padding: 6px 0;
    display: inline-block;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--color-accent); /* Terracotta */
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease-out;
}

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

.nav-link:hover::after {
    transform: scaleX(1);
}

.nav-link.nav-btn-primary::after {
    display: none; /* No hover underline for the button */
}

.nav-btn-primary {
    background-color: var(--color-accent);
    color: #ffffff !important;
    padding: 8px 20px;
    border-radius: 9999px;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(193, 102, 71, 0.2);
    transition: var(--transition-smooth);
}

.nav-btn-primary:hover {
    background-color: #d97d5d; /* lighter terracotta */
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(193, 102, 71, 0.4);
    filter: none;
}

/* --- System Status Indicator --- */
.system-status {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.online {
    background-color: var(--color-green);
    box-shadow: 0 0 10px var(--color-green);
}

.status-dot.offline {
    background-color: #ef4444;
    box-shadow: 0 0 10px #ef4444;
}

/* --- Hero Section --- */
.hero-section {
    padding-top: 160px;
    padding-bottom: 80px;
    position: relative;
    background-color: var(--color-navy);
    overflow: hidden;
}

.hero-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('images/landing/hero-mountains.webp');
    background-size: cover;
    background-position: center bottom;
    opacity: 0.25;
    filter: sepia(0.2) hue-rotate(-15deg) saturate(1.15);
    z-index: 1;
    pointer-events: none;
}

.hero-section::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(7, 21, 32, 0.4) 0%, rgba(7, 21, 32, 1) 100%);
    z-index: 2;
    pointer-events: none;
}

.hero-container {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 64px;
}

.hero-content {
    position: relative;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.badge {
    background: rgba(38, 176, 161, 0.08);
    border: 1px solid rgba(38, 176, 161, 0.2);
    color: var(--color-cyan);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.15;
    margin-bottom: 24px;
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 1.15rem;
    margin-bottom: 36px;
    max-width: 540px;
}

.hero-actions {
    display: flex;
    gap: 16px;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-primary {
    background: var(--gradient-primary);
    color: #080c16;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
    box-shadow: 0 0 25px rgba(38, 176, 161, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Hero Section Pill-shaped Button Overrides */
.hero-section .btn {
    border-radius: 9999px; /* rounded pill */
}

.hero-section .btn-primary {
    background: #ffffff;
    color: var(--color-navy);
    border: 1px solid #ffffff;
    box-shadow: 0 4px 14px rgba(255, 255, 255, 0.1);
}

.hero-section .btn-primary:hover {
    background: var(--color-paper);
    border-color: var(--color-paper);
    color: var(--color-navy);
    box-shadow: 0 6px 20px rgba(240, 227, 190, 0.2);
    filter: none;
}

.hero-section .btn-secondary {
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-section .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.8);
}

/* PACT Alignment Row */
.pact-alignment-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 36px;
    opacity: 0.9;
}

.pact-label {
    font-size: 0.82rem;
    font-family: var(--font-body);
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pact-badge-img {
    height: 24px;
    display: block;
    transition: opacity 0.2s ease;
}

.pact-badge-img:hover {
    opacity: 0.8;
}

.pact-standards {
    font-size: 0.85rem;
    font-family: var(--font-body);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.5);
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    padding-left: 16px;
}

/* --- Hero Visual Card --- */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.visual-card-wrapper {
    position: relative;
    width: 100%;
    max-width: 440px;
}

.visual-card {
    background: var(--bg-panel);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
    padding: 24px;
    position: relative;
    z-index: 10;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 12px;
}

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

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.dot:nth-child(1) { background-color: #ff5f56; }
.dot:nth-child(2) { background-color: #ffbd2e; }
.dot:nth-child(3) { background-color: #27c93f; }

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

.card-body pre {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: #e2e8f0;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.json-key { color: var(--color-cyan); }
.json-str { color: var(--color-green); }

.floating-badge {
    position: absolute;
    background: rgba(8, 12, 22, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    padding: 10px 18px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-soft);
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 20;
    animation: floatBadge 6s infinite ease-in-out;
}

.badge-1 {
    top: -20px;
    right: -20px;
    border-left: 3px solid var(--color-green);
    animation-delay: 0s;
}

.badge-2 {
    bottom: -15px;
    left: -20px;
    border-left: 3px solid var(--color-cyan);
    animation-delay: 3s;
}

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

/* --- Section Global Layout --- */
.section {
    padding: 100px 0;
    border-top: none;
}

.features-section {
    background-color: var(--color-paper-warm);
    color: var(--color-ink);
    border-top: none;
    border-bottom: none;
}

.features-section .section-title {
    color: var(--color-ink);
}

.features-section .section-subtitle {
    color: rgba(17, 24, 39, 0.7);
}

.tools-section {
    background-color: var(--color-sage-mist);
    color: var(--color-ink);
    border-bottom: none;
}

.tools-section .section-title {
    color: var(--color-ink);
}

.tools-section .section-subtitle {
    color: rgba(17, 24, 39, 0.7);
}

.code-section {
    background-color: var(--color-paper);
    color: var(--color-ink);
    border-bottom: none;
}

.code-section .section-title {
    color: var(--color-ink);
}

.code-section .section-subtitle {
    color: rgba(17, 24, 39, 0.7);
}

.section-header {
    margin-bottom: 64px;
}

.section-title {
    font-size: 2.25rem;
    margin-bottom: 16px;
    text-align: center;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.text-center {
    text-align: center;
}

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

.feature-card {
    background: #ffffff;
    border: 1px solid var(--color-rule);
    border-radius: 16px;
    padding: 36px;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 100%);
    z-index: 0;
    pointer-events: none;
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--color-accent);
    box-shadow: 0 12px 32px rgba(193, 102, 71, 0.08);
}

.feature-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.feature-icon-wrapper.purple {
    background: rgba(193, 102, 71, 0.08);
    color: var(--color-accent);
}

.feature-icon-wrapper.cyan {
    background: rgba(26, 83, 92, 0.08);
    color: var(--color-teal);
}

.feature-icon-wrapper.green {
    background: rgba(38, 176, 161, 0.08);
    color: var(--color-teal-light);
}

.feature-icon {
    width: 24px;
    height: 24px;
}

.feature-title {
    font-size: 1.25rem;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
    color: var(--color-ink);
}

.feature-desc {
    color: rgba(17, 24, 39, 0.7);
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
}

/* --- Tools Explorer Showcase --- */
.tools-explorer {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 40px;
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid var(--color-rule);
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.02);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.tools-sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tool-cat-btn {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--color-rule);
    border-radius: 10px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--color-ink);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.95rem;
    text-align: left;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.tool-cat-btn:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: var(--color-rule-strong);
    color: var(--color-ink);
}

.tool-cat-btn.active {
    background: var(--color-teal);
    border-color: var(--color-teal);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(26, 83, 92, 0.15);
}

.cat-icon {
    font-size: 1.2rem;
}

.tools-content-panel {
    min-height: 380px;
}

.tool-category-view {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.tool-category-view.active {
    display: block;
}

.tool-category-view h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--color-ink);
}

.cat-intro-text {
    color: rgba(17, 24, 39, 0.7);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

.tool-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tool-item {
    background: #ffffff;
    border: 1px solid var(--color-rule);
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.01);
    transition: var(--transition-smooth);
}

.tool-item:hover {
    background: #ffffff;
    border-color: var(--color-accent);
    box-shadow: 0 4px 12px rgba(193, 102, 71, 0.08);
}

.tool-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.tool-method {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}

.tool-method.get {
    background: rgba(26, 83, 92, 0.08);
    color: var(--color-teal);
}

.tool-method.post {
    background: rgba(193, 102, 71, 0.08);
    color: var(--color-accent);
}

.tool-name {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-ink);
}

.tool-description {
    color: rgba(17, 24, 39, 0.75);
    font-size: 0.88rem;
}

/* --- Code Integrations Section --- */
.code-container {
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid var(--color-rule-strong);
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.02);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.code-tabs {
    display: flex;
    gap: 12px;
    border-bottom: 1px solid var(--color-rule-strong);
    padding-bottom: 16px;
    margin-bottom: 24px;
}

.code-tab-btn {
    background: none;
    border: none;
    color: rgba(17, 24, 39, 0.7);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 6px 16px;
    cursor: pointer;
    border-radius: 6px;
    transition: var(--transition-smooth);
}

.code-tab-btn:hover {
    color: var(--color-ink);
    background: rgba(255, 255, 255, 0.5);
}

.code-tab-btn.active {
    color: #ffffff;
    background: var(--color-teal);
    font-weight: 600;
}

.code-panel {
    display: none;
}

.code-panel.active {
    display: block;
    animation: fadeIn 0.4s ease forwards;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: rgba(17, 24, 39, 0.6);
    margin-bottom: 12px;
    padding: 0 4px;
}

.btn-copy {
    background: #ffffff;
    border: 1px solid var(--color-rule);
    color: var(--color-ink);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-copy:hover {
    background: var(--color-paper-warm);
    border-color: var(--color-rule-strong);
    color: var(--color-ink);
}

.code-panel pre {
    background: #0b1c29;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 24px;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.5;
    color: #e2e8f0;
}

.code-keyword { color: #f43f5e; }
.code-str { color: var(--color-green); }
.code-comment { color: var(--text-muted); font-style: italic; }

/* --- Sandbox Section & Chat Playground --- */
.sandbox-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    min-height: 600px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    backdrop-filter: blur(16px);
}

/* Sidebar: Conversations */
.sandbox-sidebar {
    border-right: 1px solid var(--border-color);
    background: rgba(8, 12, 22, 0.4);
    display: flex;
    flex-direction: column;
    height: 600px;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.btn-new-chat {
    background: rgba(38, 176, 161, 0.08);
    border: 1px solid rgba(38, 176, 161, 0.2);
    color: var(--color-cyan);
    border-radius: 8px;
    padding: 10px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    transition: var(--transition-smooth);
}

.btn-new-chat:hover {
    background: rgba(38, 176, 161, 0.15);
    border-color: var(--color-cyan);
    box-shadow: 0 0 10px rgba(38, 176, 161, 0.15);
}

.conversations-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.empty-conversations {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    padding: 32px 12px;
}

.conversation-tab {
    background: none;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition-smooth);
    width: 100%;
    overflow: hidden;
}

.conversation-tab:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
}

.conversation-tab.active {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.conversation-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 8px;
    flex: 1;
}

.btn-delete-conv {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    opacity: 0;
    padding: 2px;
    border-radius: 4px;
    transition: var(--transition-smooth);
}

.btn-delete-conv:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
}

.conversation-tab:hover .btn-delete-conv,
.conversation-tab.active .btn-delete-conv {
    opacity: 1;
}

/* Chat Screen */
.sandbox-chat {
    display: flex;
    flex-direction: column;
    height: 600px;
    background: rgba(8, 12, 22, 0.1);
}

.sandbox-chat-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(8, 12, 22, 0.2);
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    background-color: var(--color-green);
    box-shadow: 0 0 10px var(--color-green);
}

.avatar-status-dot.offline {
    background-color: #ef4444;
    box-shadow: 0 0 10px #ef4444;
}

.chat-header-info h4 {
    font-size: 1rem;
    line-height: 1.2;
}

.model-badge {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.auth-panel {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 4px 10px;
    border-radius: 6px;
}

.auth-panel label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.auth-panel input {
    background: none;
    border: none;
    color: var(--color-cyan);
    font-size: 0.75rem;
    font-family: var(--font-mono);
    width: 120px;
    outline: none;
}

.tooltip-trigger {
    cursor: help;
    font-size: 0.8rem;
    opacity: 0.7;
    transition: var(--transition-smooth);
}

.tooltip-trigger:hover {
    opacity: 1;
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.message {
    max-width: 85%;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease forwards;
}

.message-sender {
    font-size: 0.75rem;
    font-family: var(--font-heading);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.message-content {
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 0.95rem;
    word-break: break-word;
}

.message.user {
    align-self: flex-end;
}

.message.user .message-sender {
    text-align: right;
    color: var(--color-teal-light); /* bright brand teal */
}

.message.user .message-content {
    background: rgba(38, 176, 161, 0.12); /* brand teal background */
    border: 1px solid rgba(38, 176, 161, 0.25); /* brand teal border */
    border-top-right-radius: 2px;
    color: var(--text-primary);
}

.message.assistant {
    align-self: flex-start;
}

.message.assistant .message-sender {
    color: var(--color-cyan);
}

.message.assistant .message-content {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-top-left-radius: 2px;
    color: var(--text-primary);
}

.message.system {
    max-width: 95%;
    align-self: center;
}

.message.system .message-sender {
    text-align: center;
    color: var(--text-muted);
}

.message.system .message-content {
    background: rgba(255, 255, 255, 0.01);
    border: 1px dashed var(--border-color);
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
}

.chat-hints-list {
    margin-top: 10px;
    padding-left: 20px;
}

.chat-hint-link {
    color: var(--color-cyan);
    text-decoration: underline;
    cursor: pointer;
}

/* Tool call specific layout inside chat bubble */
.tool-call-log {
    margin-top: 8px;
    background: rgba(0, 0, 0, 0.2);
    border-left: 2px solid var(--color-purple);
    padding: 8px 12px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Typing indicator */
.typing-indicator {
    padding: 12px 24px;
    display: none;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.typing-indicator.active {
    display: flex;
}

.indicator-dot {
    width: 6px;
    height: 6px;
    background-color: var(--color-cyan);
    border-radius: 50%;
    animation: pulseDot 1.4s infinite ease-in-out both;
}

.indicator-dot:nth-child(1) { animation-delay: -0.32s; }
.indicator-dot:nth-child(2) { animation-delay: -0.16s; }

.indicator-text {
    margin-left: 6px;
    font-style: italic;
}

@keyframes pulseDot {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1.0); }
}

/* Input Bar */
.chat-input-bar {
    border-top: 1px solid var(--border-color);
    padding: 18px 24px;
    display: flex;
    gap: 16px;
    align-items: center;
    background: rgba(8, 12, 22, 0.2);
}

.chat-input-bar input {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 18px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: var(--font-body);
    outline: none;
    transition: var(--transition-smooth);
}

.chat-input-bar input:focus {
    border-color: var(--border-active);
    box-shadow: 0 0 10px rgba(38, 176, 161, 0.15);
}

.chat-input-bar input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-send {
    background: var(--gradient-primary);
    color: #080c16;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
    transition: var(--transition-smooth);
    flex-shrink: 0;
}

.btn-send svg {
    width: 18px;
    height: 18px;
    transform: translate(-1px, 0px);
}

.btn-send:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
    box-shadow: 0 0 15px rgba(38, 176, 161, 0.35);
}

.btn-send:disabled {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* --- Footer --- */
.main-footer {
    border-top: 1px solid var(--border-color);
    padding: 80px 0 40px 0;
    background: rgba(10, 20, 30, 0.4);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 60px;
}

.footer-brand-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: left;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-logo-img {
    height: 24px;
    width: auto;
}

.footer-logo-text {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text-primary);
}

.footer-brand-desc {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.5;
    max-width: 320px;
}

.footer-aligned {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.aligned-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.aligned-badges {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.aligned-badge {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    width: fit-content;
    color: var(--text-primary);
}

.aligned-badge-text {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.footer-links-col {
    text-align: left;
}

.footer-links-col h4 {
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 20px;
}

.footer-links-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links-col a, .contact-info {
    color: var(--text-secondary);
    font-size: 0.88rem;
    transition: var(--transition-smooth);
}

.footer-links-col a:hover {
    color: var(--text-primary);
}

.contact-info {
    color: var(--text-secondary);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom .copyright {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.footer-bottom-links {
    display: flex;
    gap: 24px;
}

.footer-bottom-links a {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.footer-bottom-links a:hover {
    color: var(--text-primary);
}

/* --- Keyframe Animations --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* --- Responsive Layout --- */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 48px;
        text-align: center;
    }
    
    .hero-content {
        align-items: center;
    }
    
    .hero-title {
        font-size: 2.75rem;
    }
    
    .hero-visual {
        order: -1;
    }
    
    .tools-explorer {
        grid-template-columns: 1fr;
    }
    
    .sandbox-container {
        grid-template-columns: 1fr;
    }
    
    .sandbox-sidebar {
        height: 180px;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .sandbox-chat {
        height: 480px;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none; /* simple mobile fallback: hide menu for layout integrity */
    }
    
    .hero-title {
        font-size: 2.25rem;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .code-tabs {
        flex-direction: column;
    }
    
    .auth-panel {
        display: none; /* Hide token setting from small headers */
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

/* ── Funnel page suppression rules ──────────────────── */
body.funnel-active .bg-glow { display: none !important; }
body.funnel-active .hero-section { background-color: transparent !important; padding-top: 0 !important; }
body.funnel-active .hero-section::before,
body.funnel-active .hero-section::after { content: none !important; }
body.funnel-active .section-title { text-align: left; }
body.funnel-active .section-subtitle { color: var(--ink); }
}
