/* ==========================================================================
   ETHIO-CIRCUIT - Clean Modern High-Impact Interface
   Typography: Inter (Body) + Outfit (Headings)
   Palette: Warm Ivory Canvas (#FAF9F6), Crisp White Cards (#FFFFFF),
            Deep Roasted Coffee Text (#18181B), Circuit Gold Accents (#D97706 / #E5A32B)
   ========================================================================== */

:root {
    /* Color Tokens */
    --bg-canvas: #FAF9F6;
    --bg-surface: #F4F2EC;
    --card-bg: #FFFFFF;
    
    --text-primary: #18181B;
    --text-secondary: #52525B;
    --text-muted: #71717A;

    /* Circuit Gold Brand Colors */
    --gold-primary: #D97706;
    --gold-bright: #F59E0B;
    --gold-light: rgba(217, 119, 6, 0.1);
    --gold-border: rgba(217, 119, 6, 0.25);

    /* Functional Colors */
    --green-success: #10B981;
    --red-danger: #EF4444;

    /* Borders & Shadows */
    --border-card: rgba(0, 0, 0, 0.07);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 12px 32px -8px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 45px -12px rgba(0, 0, 0, 0.1);

    /* Typography */
    --font-heading: 'Outfit', -apple-system, sans-serif;
    --font-body: 'Inter', -apple-system, sans-serif;

    --transition: all 0.25s ease-out;
}

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

html {
    scroll-behavior: smooth;
    font-family: var(--font-body);
    background-color: var(--bg-canvas);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body {
    position: relative;
    min-height: 100vh;
}

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

.section {
    padding: 90px 0;
}

/* Typography Hierarchy */
h1, h2, h3, h4, .brand-name {
    font-family: var(--font-heading);
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.highlight {
    color: var(--gold-primary);
}

.center { text-align: center; }

/* Cards & Layout */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    border-color: var(--gold-border);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* Navigation Bar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 16px 0;
    background: rgba(250, 249, 246, 0.9);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 12px 0;
    box-shadow: var(--shadow-sm);
}

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

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-img {
    height: 38px;
    width: auto;
    object-fit: contain;
    border-radius: 6px;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text-primary);
}

.brand-tag {
    font-size: 0.65rem;
    color: var(--gold-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
}

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

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.92rem;
    transition: var(--transition);
}

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    font-family: var(--font-body);
}

.btn-primary {
    background: var(--gold-primary);
    color: #FFFFFF;
}

.btn-primary:hover {
    background: var(--gold-bright);
    box-shadow: 0 4px 16px rgba(217, 119, 6, 0.3);
    transform: translateY(-1px);
}

.btn-outline {
    background: #FFFFFF;
    color: var(--text-primary);
    border: 1px solid var(--border-card);
}

.btn-outline:hover {
    border-color: var(--gold-primary);
    color: var(--gold-primary);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--red-danger);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
    background: var(--red-danger);
    color: #FFFFFF;
}

.btn-lg {
    padding: 15px 30px;
    font-size: 1rem;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-block { width: 100%; }

/* Hero Section */
.hero-section {
    padding-top: 170px;
    padding-bottom: 90px;
    text-align: center;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--gold-light);
    border: 1px solid var(--gold-border);
    border-radius: 30px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--gold-primary);
    margin-bottom: 24px;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background: var(--gold-primary);
    border-radius: 50%;
}

.hero-title {
    font-size: 3.4rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 780px;
    margin: 0 auto 36px auto;
    font-weight: 400;
}

.hero-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 60px;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.metric-card {
    background: #FFFFFF;
    border: 1px solid var(--border-card);
    padding: 24px;
    border-radius: 14px;
    text-align: left;
}

.metric-value {
    font-size: 2.2rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--gold-primary);
    margin-bottom: 4px;
}

.metric-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Section Header */
.section-header {
    margin-bottom: 50px;
}

.section-tag {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--gold-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}

.section-title {
    font-size: 2.4rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.section-description {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 660px;
    margin: 0 auto;
}

/* Grids */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

/* Solution Cards */
.solution-card {
    padding: 32px;
    position: relative;
}

.pillar-num {
    position: absolute;
    top: 20px;
    right: 24px;
    font-size: 2rem;
    font-weight: 800;
    font-family: var(--font-heading);
    opacity: 0.15;
    color: var(--gold-primary);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--gold-light);
    color: var(--gold-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 20px;
}

.solution-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.solution-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Simulator Section */
.simulator-card {
    background: #FFFFFF;
    border: 1px solid var(--border-card);
    border-radius: 20px;
    padding: 36px;
    box-shadow: var(--shadow-md);
}

.sim-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-card);
}

.sim-title {
    font-weight: 700;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green-success);
}

.sim-presets {
    display: flex;
    gap: 10px;
}

.sim-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.control-group {
    margin-bottom: 24px;
}

.control-label {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.val-badge {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--gold-primary);
    background: var(--gold-light);
    padding: 2px 10px;
    border-radius: 6px;
}

input[type=range] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--bg-surface);
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--gold-primary);
    cursor: pointer;
}

.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.sim-readout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.status-box {
    background: var(--bg-surface);
    padding: 24px;
    border-radius: 16px;
}

.status-box-header {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.status-pill {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    background: rgba(16, 185, 129, 0.15);
    color: var(--green-success);
}

.status-pill.warning { background: var(--gold-light); color: var(--gold-primary); }
.status-pill.critical { background: rgba(239, 68, 68, 0.15); color: var(--red-danger); }

.gauge-bar {
    height: 12px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 12px;
}

.gauge-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--green-success), var(--gold-primary), var(--red-danger));
    transition: width 0.3s ease;
}

.score-display {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 16px;
}

.score-num {
    font-size: 2.2rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--gold-primary);
}

.score-txt {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.prediction-box {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}

.sms-box {
    background: #FFFFFF;
    border: 1px solid var(--gold-border);
    padding: 16px;
    border-radius: 12px;
}

.sms-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--gold-primary);
    margin-bottom: 8px;
}

.sms-text {
    font-size: 0.88rem;
    font-family: monospace;
    color: var(--text-secondary);
}

/* Video Showcase */
.video-wrapper {
    max-width: 860px;
    margin: 0 auto;
}

.video-container {
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    box-shadow: var(--shadow-lg);
}

.video-container video {
    width: 100%;
    display: block;
    max-height: 480px;
    object-fit: cover;
}

/* ROI Calculator */
.calc-card {
    background: #FFFFFF;
    border: 1px solid var(--border-card);
    border-radius: 20px;
    padding: 36px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.calc-group {
    margin-bottom: 24px;
}

.calc-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.slider-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.badge {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--gold-primary);
    background: var(--gold-light);
    padding: 4px 12px;
    border-radius: 8px;
    white-space: nowrap;
}

.calc-outputs {
    display: flex;
    flex-direction: column;
    gap: 16px;
    justify-content: center;
}

.out-card {
    padding: 20px;
    border-radius: 14px;
}

.out-card.danger { background: rgba(239, 68, 68, 0.08); border: 1px solid rgba(239, 68, 68, 0.2); }
.out-card.success { background: rgba(16, 185, 129, 0.08); border: 1px solid rgba(16, 185, 129, 0.2); }

.out-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.out-card.danger .out-label { color: var(--red-danger); }
.out-card.success .out-label { color: var(--green-success); }

.out-val {
    font-size: 2.2rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--text-primary);
}

/* Matrix Table */
.table-container {
    background: #FFFFFF;
    border: 1px solid var(--border-card);
    border-radius: 16px;
    overflow-x: auto;
}

.comp-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.comp-table th, .comp-table td {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-card);
}

.comp-table th {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    background: var(--bg-surface);
}

.th-logo {
    height: 24px;
    vertical-align: middle;
    margin-right: 6px;
    border-radius: 4px;
}

.brand-td {
    background: var(--gold-light);
    color: var(--gold-primary);
}

/* Team */
.team-card {
    padding: 32px;
    text-align: center;
}

.team-initials {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--gold-light);
    color: var(--gold-primary);
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px auto;
}

.team-card h3 { font-size: 1.25rem; margin-bottom: 4px; }
.team-role { font-size: 0.85rem; font-weight: 700; color: var(--gold-primary); margin-bottom: 12px; }
.team-card p { font-size: 0.9rem; color: var(--text-secondary); }

/* Footer */
.footer {
    padding: 70px 0 36px 0;
    background: #18181B;
    color: #FAF9F6;
}

.footer h1, .footer h2, .footer h3, .footer h4, .footer .brand-name {
    color: #FAF9F6;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 50px;
}

.footer-col h4 {
    font-size: 0.95rem;
    margin-bottom: 18px;
    color: var(--gold-bright);
}

.footer-col p, .footer-col a {
    font-size: 0.9rem;
    color: #A1A1AA;
    margin-bottom: 10px;
    text-decoration: none;
    display: block;
}

.footer-col a:hover { color: var(--gold-bright); }

.footer-bottom {
    text-align: center;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.82rem;
    color: #71717A;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.modal-overlay.active { opacity: 1; pointer-events: auto; }

.modal-card {
    background: #FFFFFF;
    border-radius: 20px;
    padding: 36px;
    width: 100%;
    max-width: 480px;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-header { text-align: center; margin-bottom: 24px; }
.modal-logo { height: 48px; margin-bottom: 10px; }
.modal-header h3 { font-size: 1.3rem; margin-bottom: 4px; }
.modal-header p { font-size: 0.85rem; color: var(--text-secondary); }

.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; }
.form-group input, .form-group select {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-canvas);
    border: 1px solid var(--border-card);
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 0.9rem;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--gold-primary);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #FFFFFF;
    border: 1px solid var(--gold-primary);
    padding: 14px 22px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-md);
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition);
    z-index: 3000;
}

.toast.active { transform: translateY(0); opacity: 1; }

/* Responsive */
@media (max-width: 992px) {
    .hero-title { font-size: 2.6rem; }
    .metrics-grid { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: 1fr; }
    .sim-grid, .calc-card { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #FFFFFF;
        flex-direction: column;
        padding: 24px;
        box-shadow: var(--shadow-md);
    }
    .nav-links.active { display: flex; }
    .mobile-toggle { display: block; }
    .hero-cta { flex-direction: column; width: 100%; }
    .metrics-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
}
