/* Fonts are loaded via <link rel="preconnect"> + <link> in index.html <head> for a faster first paint. */

:root {
    /* Color Palette */
    --bg-dark: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --border-color: rgba(0, 0, 0, 0.1);
    --border-focus: #00f5a0;
    
    --text-primary: #0f172a;
    --text-muted: #475569;
    --text-dark: #94a3b8;
    
    /* Modern gradients */
    --gradient-primary: linear-gradient(135deg, #00f5a0 0%, #00d9f6 100%);
    --gradient-glow: radial-gradient(circle, rgba(0, 245, 160, 0.15) 0%, rgba(0, 217, 246, 0.05) 50%, transparent 100%);
    --gradient-card: #ffffff;
    
    /* Layout Tokens */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    
    /* Micro-Transitions */
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 245, 160, 0.3);
}

/* Typography & Headers */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Base Layout Containers */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(12px);
    background-color: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-normal);
}

header.scrolled {
    padding: 12px 0;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    transition: var(--transition-normal);
}

/* Logo container and styling (Applying user request to make Martinez AI Solutions smaller) */
.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-img {
    height: 32px;
    width: 32px;
    object-fit: contain;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-main {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 20px;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    line-height: 1.1;
}

.logo-sub {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 8px;
    letter-spacing: 0.25em;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-top: 1px;
    opacity: 0.8;
}

/* Navigation Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition-fast);
}

.nav-links a:hover {
    color: var(--text-primary);
}

/* Custom Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: var(--transition-normal);
    cursor: pointer;
    border: none;
    gap: 8px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #000;
    box-shadow: 0 4px 20px rgba(0, 245, 160, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 245, 160, 0.35);
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    position: relative;
    padding: 180px 0 100px 0;
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    top: -10%;
    left: 50%;
    transform: translate(-50%, 0);
    width: 600px;
    height: 600px;
    background: var(--gradient-glow);
    z-index: -1;
    pointer-events: none;
    border-radius: 50%;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
}

.hero-content h1 {
    font-size: 56px;
    line-height: 1.15;
    margin-bottom: 24px;
}

.hero-content p {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 520px;
}

.hero-actions {
    display: flex;
    gap: 16px;
}

/* Interactive Chatbot Demo Component */
.chatbot-demo-wrapper {
    position: relative;
    width: 100%;
}

.chatbot-ambient-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 217, 246, 0.08) 0%, transparent 70%);
    z-index: -1;
}

.chatbot-window {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 480px;
    backdrop-filter: blur(12px);
}

.chatbot-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.02);
}

.chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-weight: 700;
    font-size: 12px;
}

.chatbot-header-text h4 {
    font-size: 14px;
    font-weight: 600;
}

.chatbot-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    color: #00f5a0;
}

.chatbot-status-dot {
    width: 6px;
    height: 6px;
    background-color: #00f5a0;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.chatbot-industry-selector {
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 12px;
    font-family: inherit;
    outline: none;
}

.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chat-bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 13.5px;
    line-height: 1.5;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-bubble.bot {
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    align-self: flex-start;
    border-top-left-radius: 4px;
}

.chat-bubble.user {
    background: var(--gradient-primary);
    color: #000;
    font-weight: 500;
    align-self: flex-end;
    border-top-right-radius: 4px;
}

.chatbot-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 20px 16px 20px;
}

.chat-option-btn {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.chat-option-btn:hover {
    color: var(--text-primary);
    border-color: #00f5a0;
    background: rgba(0, 245, 160, 0.05);
}

.chatbot-input-area {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    background: rgba(0, 0, 0, 0.01);
}

.chatbot-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    font-family: inherit;
    transition: var(--transition-fast);
}

.chatbot-input:focus {
    border-color: var(--border-focus);
    background: rgba(0, 0, 0, 0.05);
}

.chatbot-send-btn {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: var(--gradient-primary);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-normal);
}

.chatbot-send-btn:hover {
    transform: scale(1.05);
}

.chatbot-send-btn svg {
    width: 18px;
    height: 18px;
    fill: #000;
}

/* Sections General */
section {
    padding: 100px 0;
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px auto;
}

.section-header h2 {
    font-size: 40px;
    margin-bottom: 16px;
    line-height: 1.2;
}

.section-header p {
    color: var(--text-muted);
    font-size: 16px;
}

/* Interactive ROI Calculator Section */
.calculator-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(12px);
}

.calc-inputs {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.calc-input-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.calc-input-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
}

.calc-input-group label span {
    color: #00f5a0;
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
}

.calc-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.1);
    outline: none;
    cursor: pointer;
}

.calc-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gradient-primary);
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: 0 0 10px rgba(0, 245, 160, 0.5);
}

.calc-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.calc-select-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.calc-type-btn {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 12px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition-fast);
    text-align: center;
}

.calc-type-btn:hover {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.2);
}

.calc-type-btn.active {
    background: rgba(0, 245, 160, 0.05);
    border-color: #00f5a0;
    color: #00f5a0;
}

.calc-results {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 32px;
    position: relative;
    overflow: hidden;
}

.calc-result-glow {
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(0, 217, 246, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.calc-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.calc-stat-label {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.calc-stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 40px;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-primary);
}

.calc-stat-value.highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.calc-disclaimer {
    font-size: 11px;
    color: var(--text-dark);
}

/* Solutions Showcase Grid */
.solutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}

.solution-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 32px;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.solution-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition-normal);
}

.solution-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 0, 0, 0.15);
    background: var(--bg-card-hover);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.solution-card:hover::before {
    opacity: 1;
}

.solution-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: rgba(0, 245, 160, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00f5a0;
    margin-bottom: 24px;
    transition: var(--transition-normal);
}

.solution-card:hover .solution-icon {
    background: var(--gradient-primary);
    color: #000;
}

.solution-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.solution-card p {
    color: var(--text-muted);
    font-size: 14px;
    flex: 1;
    margin-bottom: 24px;
}

.solution-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #00d9f6;
    text-decoration: none;
}

.solution-link svg {
    width: 14px;
    height: 14px;
    transition: var(--transition-fast);
}

.solution-card:hover .solution-link svg {
    transform: translateX(4px);
}

/* Dashboard Mockup Showcase */
.dashboard-showcase {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    backdrop-filter: blur(12px);
}

.dash-header {
    background: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dash-controls {
    display: flex;
    gap: 6px;
}

.dash-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dash-dot.red { background-color: #ff5f56; }
.dash-dot.yellow { background-color: #ffbd2e; }
.dash-dot.green { background-color: #27c93f; }

.dash-tabs {
    display: flex;
    gap: 8px;
}

.dash-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.dash-tab-btn:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.03);
}

.dash-tab-btn.active {
    color: #00f5a0;
    background: rgba(0, 245, 160, 0.06);
}

.dash-content {
    padding: 24px;
    height: 380px;
    overflow-y: auto;
}

.dash-panel {
    display: none;
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.dash-panel.active {
    display: block;
}

/* Dashboard Mockup Grid (Overview) */
.dash-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.dash-stat-card {
    background: rgba(0, 0, 0, 0.015);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: var(--radius-md);
}

.dash-stat-title {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.dash-stat-num {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.dash-stat-trend {
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.dash-stat-trend.up { color: #00f5a0; }
.dash-stat-trend.neutral { color: var(--text-dark); }

/* Chart Mockup */
.chart-container {
    background: rgba(0, 0, 0, 0.01);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.chart-title {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

.chart-bars {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 120px;
    padding-top: 10px;
}

.chart-bar-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    gap: 8px;
}

.chart-bar-track {
    width: 16px;
    height: 90px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.chart-bar-fill {
    width: 100%;
    position: absolute;
    bottom: 0;
    left: 0;
    border-radius: 8px;
    background: var(--gradient-primary);
    transition: height 1s ease-in-out;
}

.chart-bar-label {
    font-size: 10px;
    color: var(--text-dark);
}

/* Dashboard Mockup - Live Chat stream */
.live-stream {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stream-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.015);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stream-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stream-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 217, 246, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00d9f6;
    font-size: 11px;
}

.stream-info h5 {
    font-size: 13px;
    font-weight: 600;
}

.stream-info p {
    font-size: 11px;
    color: var(--text-muted);
}

.stream-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
}

.stream-badge.lead {
    background: rgba(0, 245, 160, 0.1);
    color: #00f5a0;
}

.stream-badge.booking {
    background: rgba(0, 217, 246, 0.1);
    color: #00d9f6;
}

/* Contact Form section */
.contact-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 60px;
}

.contact-info h2 {
    font-size: 40px;
    margin-bottom: 20px;
}

.contact-info p {
    color: var(--text-muted);
    font-size: 16px;
    margin-bottom: 40px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.contact-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00f5a0;
}

.contact-text h4 {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.contact-text p {
    font-size: 16px;
    color: var(--text-primary);
    margin: 0;
}

.contact-form-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(12px);
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: var(--transition-fast);
}

.form-input:focus {
    border-color: var(--border-focus);
    background: rgba(0, 0, 0, 0.04);
}

textarea.form-input {
    resize: none;
    height: 120px;
}

/* Success Micro-Animation */
.form-success-container {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
    text-align: center;
    animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.success-checkmark {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(0, 245, 160, 0.1);
    border: 2px solid #00f5a0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00f5a0;
    margin-bottom: 24px;
}

.success-checkmark svg {
    width: 32px;
    height: 32px;
    stroke: #00f5a0;
    stroke-width: 3px;
}

/* Footer styling */
footer {
    border-top: 1px solid var(--border-color);
    padding: 60px 0;
    background: #04060a;
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-right {
    font-size: 13px;
    color: var(--text-dark);
}

/* Responsive Styles */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 60px;
    }
    
    .hero-content h1 {
        font-size: 46px;
    }
    
    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .calculator-card {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none; /* In a real project we would build a drawer, but for this demo a simplified nav is fine */
    }
    
    .section-header h2 {
        font-size: 32px;
    }
    
    .calculator-card {
        padding: 24px;
    }
    
    .calc-stat-value {
        font-size: 32px;
    }
    
    .dash-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }
}

/* Keyframes Animations */
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.6; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(12px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}


/* ================================================================
   FUNCTIONAL + UI UPGRADES  (additive — extends the base styles)
   ================================================================ */

/* --- Mobile hamburger toggle --- */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1100;
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    border-radius: 2px;
    background: var(--text-primary);
    margin: 5px 0;
    transition: var(--transition-fast);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Active nav link (scroll-spy) --- */
.nav-links a.active:not(.btn) {
    color: #00a37a;
}

/* --- Scroll reveal (fail-visible: only hides when html.reveal-on is present) --- */
html.reveal-on .section-header,
html.reveal-on .calculator-card,
html.reveal-on .dashboard-showcase,
html.reveal-on .contact-info,
html.reveal-on .contact-form-card {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Solution cards fade only (no transform) so the hover-lift keeps working */
html.reveal-on .solution-card {
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
html.reveal-on .solution-card:nth-child(2) { transition-delay: 0.05s; }
html.reveal-on .solution-card:nth-child(3) { transition-delay: 0.10s; }
html.reveal-on .solution-card:nth-child(4) { transition-delay: 0.15s; }
html.reveal-on .solution-card:nth-child(5) { transition-delay: 0.20s; }
html.reveal-on .solution-card:nth-child(6) { transition-delay: 0.25s; }

html.reveal-on .section-header.revealed,
html.reveal-on .calculator-card.revealed,
html.reveal-on .dashboard-showcase.revealed,
html.reveal-on .contact-info.revealed,
html.reveal-on .contact-form-card.revealed {
    opacity: 1;
    transform: none;
}
html.reveal-on .solution-card.revealed { opacity: 1; }

/* --- Chatbot "typing…" indicator --- */
.chat-bubble.typing {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: fit-content;
}
.chat-bubble.typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
    animation: typingBlink 1.2s infinite ease-in-out;
}
.chat-bubble.typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-bubble.typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBlink {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-4px); opacity: 1; }
}

/* --- Contact form error message --- */
.form-error {
    display: none;
    margin-top: 14px;
    color: #e11d48;
    font-size: 13px;
    text-align: center;
}
.form-error.show { display: block; }

/* --- Accessibility: visible keyboard focus --- */
:focus-visible {
    outline: 2px solid var(--border-focus);
    outline-offset: 2px;
    border-radius: 4px;
}

/* --- Mobile nav drawer (overrides the base display:none) --- */
@media (max-width: 768px) {
    .nav-toggle { display: block; }

    .nav-links {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
        padding: 12px 24px 20px;
        opacity: 0;
        transform: translateY(-10px);
        pointer-events: none;
        transition: opacity 0.25s ease, transform 0.25s ease;
    }
    .nav-links.open {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }
    .nav-links li { width: 100%; }
    .nav-links a { display: block; padding: 12px 2px; }
    .nav-links a.btn { margin-top: 8px; }
}

/* --- Respect reduced-motion preferences --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}


/* ================================================================
   UX / UI AUDIT FIXES (additive)
   ================================================================ */

/* --- Accessible text shades: keep the bright brand color for fills/borders/icons,
       but use darker shades where the color is small TEXT on a light background --- */
.chatbot-status,
.calc-input-group label span,
.dash-stat-trend.up,
.dash-tab-btn.active,
.calc-type-btn.active,
.stream-badge.lead {
    color: #0a7d5c;
}
.solution-link,
.stream-badge.booking {
    color: #0e7490;
}

/* --- Footer wordmark was dark-on-dark after the light-mode conversion --- */
footer .logo-main { color: #f1f5f9; }
footer .logo-sub  { color: #94a3b8; }

/* --- "Sample data" tag on the demo dashboard (honesty: it's a mockup) --- */
.dash-sample-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color);
    padding: 4px 10px;
    border-radius: 999px;
}
.dash-sample-tag::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f59e0b;
}

/* --- Privacy note under the contact form --- */
.form-privacy {
    margin-top: 14px;
    font-size: 12px;
    color: var(--text-dark);
    text-align: center;
}
.form-privacy a { color: var(--text-muted); }

/* --- "How it works" 3-step section --- */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    counter-reset: step;
}
.step-card {
    position: relative;
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 32px 28px;
    transition: var(--transition-normal);
}
.step-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}
.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: var(--gradient-primary);
    color: #000;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 18px;
    margin-bottom: 20px;
}
.step-card h3 {
    font-size: 19px;
    margin-bottom: 10px;
}
.step-card p {
    color: var(--text-muted);
    font-size: 14px;
}

@media (max-width: 768px) {
    .steps-grid { grid-template-columns: 1fr; }
}

/* --- "We connect you to the right tools" auto-scrolling marquee --- */
.tools-marquee {
    position: relative;
    overflow: hidden;
    padding: 30px 0;
    background: rgba(0, 0, 0, 0.015);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.tools-track {
    display: flex;
    width: max-content;
    /* Always slide, even when the OS requests reduced motion (mild, on-brand marquee) */
    animation: toolScroll 42s linear infinite !important;
}
.tools-marquee:hover .tools-track {
    animation-play-state: paused;
}
.tools-set {
    display: flex;
    align-items: center;
    gap: 64px;
    padding-right: 64px;
}
.tool-logo {
    height: 46px;
    width: auto;
    max-width: 190px;
    object-fit: contain;
    filter: grayscale(1);
    opacity: 0.55;
    transition: filter 0.3s ease, opacity 0.3s ease;
}
.tool-logo:hover {
    filter: grayscale(0);
    opacity: 1;
}

@keyframes toolScroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* --- Hero typewriter caret (rotating Arizona cities) --- */
.type-cursor {
    display: inline-block;
    width: 3px;
    height: 0.82em;
    margin-left: 3px;
    background: #00d9f6;
    border-radius: 1px;
    vertical-align: baseline;
    -webkit-text-fill-color: #00d9f6;
    animation: caretBlink 1s step-end infinite !important;
}
@keyframes caretBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
