/* ==========================================================================
    80Startups — Premium Design System
    White · Red · Premium Startup Identity
    ========================================================================== */

:root {
    /* Brand foundation — white/light backgrounds */
    --white: #ffffff;
    --off-white: #f8f9fa;
    --gray-light: #f0f2f5;
    --gray-surface: #eef1f5;

    /* Primary accent — 80 Startups red */
    --primary: #dc2626;
    --primary-dark: #b91c1c;
    --primary-deep: #991b1b;
    --primary-soft: rgba(220, 38, 38, 0.08);
    --primary-glow: rgba(220, 38, 38, 0.12);

    /* Secondary accent — warm red-orange */
    --secondary: #ea580c;
    --secondary-soft: rgba(234, 88, 12, 0.08);

    /* Tertiary accent — warm amber */
    --amber: #d97706;
    --amber-soft: rgba(217, 119, 6, 0.08);

    /* Cyan alias for backward compatibility — warm accent */
    --cyan: #d97706;
    --cyan-soft: rgba(217, 119, 6, 0.1);

    /* Crimson fallback for backward compatibility */
    --crimson: #dc2626;
    --crimson-dark: #b91c1c;
    --crimson-deep: #991b1b;
    --crimson-soft: rgba(220, 38, 38, 0.08);

    /* Text — dark on white backgrounds */
    --text: #0a0e1a;
    --text-secondary: #4a5568;
    --text-muted: #718096;

    /* Surfaces */
    --surface: #ffffff;
    --surface-alt: #f8f9fa;
    --surface-card: #ffffff;
    --surface-card-hover: #f0f2f5;

    /* Borders */
    --line: #e2e8f0;
    --line-light: #d1d5db;

    /* Status colors */
    --success: #10b981;
    --success-soft: rgba(16, 185, 129, 0.1);
    --warning: #d97706;
    --warning-soft: rgba(217, 119, 6, 0.1);
    --error: #dc2626;
    --error-soft: rgba(220, 38, 38, 0.1);

    /* Ink (text on light backgrounds — same as text now) */
    --ink: #0a0e1a;
    --ink-soft: #4a5568;
    --muted: #718096;

    /* Gold accent */
    --gold: #d97706;

    /* Spacing & geometry */
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;

    /* Shadows — lighter for white backgrounds */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 24px -6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 48px -12px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 24px -4px rgba(220, 38, 38, 0.1);

    /* Typography */
    --font-display: 'Lato', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body: 'Lato', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
    --transition-slow: 0.35s ease;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--text);
    line-height: 1.2;
}

.display-1 { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 900; letter-spacing: -0.03em; line-height: 1.05; }
.display-2 { font-size: clamp(2.2rem, 4vw, 3.25rem); font-weight: 900; letter-spacing: -0.025em; line-height: 1.08; }
.display-3 { font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 800; letter-spacing: -0.02em; }
.display-4 { font-size: clamp(1.5rem, 2.5vw, 2rem); font-weight: 800; letter-spacing: -0.02em; }
.display-5 { font-size: clamp(1.3rem, 2vw, 1.6rem); font-weight: 800; letter-spacing: -0.015em; }

p { color: var(--text-secondary); line-height: 1.7; }
.lead { font-size: 1.15rem; color: var(--text-secondary); line-height: 1.65; }
small, .small { font-size: 0.875rem; }

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover { color: var(--primary-dark); }

/* ==========================================================================
   Color Utilities (backward compatible)
   ========================================================================== */

.text-primary { color: var(--primary) !important; }
.text-crimson { color: var(--primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-gold { color: var(--gold) !important; }
.text-success { color: var(--success) !important; }
.text-error { color: var(--error) !important; }
.text-white { color: #fff !important; }
.text-body { color: var(--text) !important; }

.bg-primary { background-color: var(--primary) !important; }
.bg-crimson { background-color: var(--primary) !important; }
.bg-crimson-soft { background-color: var(--primary-soft) !important; }
.bg-surface { background-color: var(--surface-card) !important; }
.bg-surface-alt { background-color: var(--surface-alt) !important; }
.bg-dark { background-color: #0a0e1a !important; color: #f1f5f9 !important; }

.bg-primary.bg-opacity-10 { background-color: var(--primary-soft) !important; }
.badge.bg-primary.bg-opacity-10 { color: var(--primary) !important; background-color: var(--primary-soft) !important; }
.badge.bg-primary { background-color: var(--primary) !important; }

.link-primary { color: var(--primary) !important; }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    font-weight: 700;
    border-radius: 999px;
    padding: 0.6rem 1.5rem;
    transition: all var(--transition-base);
    font-size: 0.9rem;
    letter-spacing: 0.01em;
    border: 2px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    --bs-btn-bg: var(--primary);
    --bs-btn-border-color: var(--primary);
    --bs-btn-hover-bg: var(--primary-dark);
    --bs-btn-hover-border-color: var(--primary-dark);
    --bs-btn-active-bg: var(--primary-deep);
    --bs-btn-active-border-color: var(--primary-deep);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.25);
    color: #fff;
}
.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.35);
    color: #fff;
}
.btn-primary:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.btn-outline-primary {
    --bs-btn-color: var(--primary);
    --bs-btn-border-color: var(--primary);
    --bs-btn-hover-bg: var(--primary);
    --bs-btn-hover-border-color: var(--primary);
    --bs-btn-active-bg: var(--primary-dark);
    --bs-btn-active-border-color: var(--primary-dark);
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
}
.btn-outline-primary:hover {
    color: #fff;
    background: var(--primary);
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.2);
}
.btn-outline-primary:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    background: transparent;
    border-radius: 999px;
    padding: 0.6rem 1.5rem;
    font-weight: 700;
}
.btn-outline-light:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}
.btn-outline-light:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    padding: 0.5rem 1rem;
    font-weight: 600;
}
.btn-ghost:hover {
    color: var(--text);
    background: rgba(0, 0, 0, 0.04);
}
.btn-ghost:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.btn-lg { padding: 0.8rem 2rem; font-size: 1rem; }
.btn-sm { padding: 0.4rem 1rem; font-size: 0.8rem; }

.btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Button micro-interactions */
.btn {
    position: relative;
    overflow: hidden;
}
.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(255,255,255,0.15), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.btn:hover::after {
    opacity: 1;
}

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
    background: var(--surface-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
    overflow: hidden;
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--line-light);
}
.card-header {
    background: transparent;
    border-bottom: 1px solid var(--line);
    font-weight: 800;
    padding: 1rem 1.25rem;
    color: var(--text);
}
.card-body { padding: 1.25rem; }
.card-footer {
    background: transparent;
    border-top: 1px solid var(--line);
    padding: 1rem 1.25rem;
}
.card-img-top { object-fit: cover; }
.card-title { color: var(--text); }

/* Premium card variant */
.card-premium {
    border-color: transparent;
    background: linear-gradient(135deg, var(--surface-card), var(--surface-alt));
    position: relative;
}
.card-premium::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    padding: 1px;
    background: linear-gradient(135deg, var(--primary), transparent 50%, var(--secondary));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* Statistic card */
.card-stat {
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--surface-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: border-color var(--transition-base);
}
.card-stat:hover {
    border-color: var(--line-light);
}
.card-stat .stat-number {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 0.5rem;
    font-family: var(--font-display);
}
.card-stat .stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Event card */
.card-event {
    position: relative;
    background: var(--surface-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}
.card-event:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--line-light);
}
.card-event .card-title { color: var(--text); }
.card-event .card-text { color: var(--text-secondary); }

/* Feature card */
.card-feature {
    padding: 1.5rem;
    background: var(--surface-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: all var(--transition-base);
}
.card-feature:hover {
    border-color: var(--line-light);
    box-shadow: var(--shadow-md);
}
.card-feature .feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background: var(--primary-soft);
    color: var(--primary);
    margin-bottom: 1rem;
}

/* ==========================================================================
   Section Scaffolding
   ========================================================================== */

.section { padding: 5rem 0; }
.section-alt { background: var(--surface-alt); }
.section-tight { padding: 3rem 0; }
.section-dark { background: #0a0e1a; color: #f1f5f9; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary);
}
.eyebrow::before {
    content: "";
    width: 24px;
    height: 2px;
    background: var(--primary);
    display: inline-block;
    border-radius: 1px;
}
.section-heading {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    color: var(--text);
}
.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 600px;
}
.section-cta {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ==========================================================================
   Badges & Status Pills
   ========================================================================== */

.badge {
    font-weight: 700;
    border-radius: 999px;
    padding: 0.3rem 0.7rem;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
}

.badge-primary { background: var(--primary-soft); color: var(--primary); }
.badge-secondary { background: var(--secondary-soft); color: var(--secondary); }
.badge-cyan { background: var(--cyan-soft); color: var(--cyan); }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-error { background: var(--error-soft); color: var(--error); }
.badge-neutral { background: rgba(255, 255, 255, 0.08); color: var(--text-secondary); }

.sector-badge { border-radius: 999px; }

/* Status pills */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.status-open { background: rgba(16, 185, 129, 0.12); color: #34d399; }
.status-upcoming { background: rgba(59, 130, 246, 0.12); color: #60a5fa; }
.status-live { background: rgba(239, 68, 68, 0.12); color: #f87171; }
.status-closed { background: rgba(100, 116, 139, 0.2); color: #94a3b8; }
.status-registered { background: var(--primary-soft); color: var(--primary); }
.status-winner { background: rgba(250, 204, 21, 0.15); color: #fbbf24; }

/* ==========================================================================
   Forms — Refined
   ========================================================================== */

.form-label {
    font-weight: 700;
    color: var(--text);
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
}

.form-control, .form-select, textarea.form-control {
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--line) !important;
    padding: 0.65rem 0.9rem;
    font-family: var(--font-body);
    background: var(--off-white);
    color: var(--text);
    font-size: 0.9rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    width: 100%;
}
.form-control:hover, .form-select:hover, textarea.form-control:hover {
    border-color: var(--line-light) !important;
}
.form-control:focus, .form-select:focus, textarea.form-control:focus {
    background: var(--white);
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px var(--primary-soft);
    outline: none;
    color: var(--text);
}
.form-control::placeholder, textarea.form-control::placeholder {
    color: var(--text-muted);
}
.form-control.is-invalid, .form-select.is-invalid, textarea.form-control.is-invalid {
    border-color: var(--error) !important;
    box-shadow: 0 0 0 3px var(--error-soft);
}

/* Select — fixed chevron styling */
.form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'%3E%3Cpath fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M1 1l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    background-size: 14px 8px;
    padding-right: 2.5rem;
    cursor: pointer;
}
.form-select option {
    background: var(--white);
    color: var(--text);
    padding: 0.5rem;
}
.form-select option:checked {
    background: var(--primary-soft);
    color: var(--primary);
}
.form-select:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px var(--primary-soft);
}
.form-select.is-invalid {
    border-color: var(--error) !important;
    box-shadow: 0 0 0 3px var(--error-soft);
}

/* Checkbox */
.form-check-input {
    background-color: var(--off-white);
    border: 1.5px solid var(--line);
    border-radius: 4px;
    width: 1.1em;
    height: 1.1em;
    cursor: pointer;
}
.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}
.form-check-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
    outline: none;
}

/* Radio */
.form-check-input[type="radio"] {
    border-radius: 50%;
}

/* File input */
input[type="file"].form-control {
    padding: 0.45rem;
    color: var(--text-secondary);
}
input[type="file"].form-control::file-selector-button {
    border: none;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 700;
    padding: 0.4rem 1rem;
    margin-right: 0.75rem;
    cursor: pointer;
    transition: background var(--transition-fast);
}
input[type="file"].form-control::file-selector-button:hover {
    background: rgba(220, 38, 38, 0.15);
}

.form-text, .help-text {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 0.3rem;
}
.error-text {
    color: var(--error);
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.3rem;
}

/* Form section heading */
.form-section-heading {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 800;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    color: var(--text);
}
.form-section-heading .step-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 900;
}

/* ==========================================================================
   Horizontal Application Form (backward compatible)
   ========================================================================== */

.hform-row {
    display: grid;
    grid-template-columns: 190px 1fr;
    column-gap: 1.5rem;
    row-gap: 0.5rem;
    align-items: start;
    padding: 1.05rem 0;
    border-bottom: 1px solid var(--line);
}
.hform-row:first-of-type { border-top: 1px solid var(--line); }
.hform-label {
    font-weight: 700;
    font-size: 0.92rem;
    padding-top: 0.55rem;
    display: flex;
    align-items: baseline;
    gap: 0.15rem;
    color: var(--text);
}
.hform-label .req { color: var(--primary); }
.hform-label .opt {
    font-weight: 500;
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-left: 0.2rem;
}
.hform-field .form-control, .hform-field .form-select { width: 100%; }
.hform-field .help { color: var(--text-muted); font-size: 0.78rem; margin-top: 0.3rem; }
.hform-field .error { color: var(--error); font-size: 0.8rem; margin-top: 0.3rem; font-weight: 600; }

@media (max-width: 767px) {
    .hform-row { grid-template-columns: 1fr; padding: 0.8rem 0; }
    .hform-label { padding-top: 0; }
}

/* Sticky submit bars */
.apply-submit, .apply-subbar {
    position: sticky;
    bottom: 1rem;
    z-index: 5;
    background: var(--surface-card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0.8rem 1rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: space-between;
}
.apply-submit .progress-note {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Team member row */
.team-member-row { position: relative; }
.team-member-row .remove-member {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: var(--text-muted);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}
.team-member-row .remove-member:hover {
    color: var(--error);
    background: var(--error-soft);
}
.team-member-row .form-control { padding-right: 2.5rem; }

/* File dropzone */
.dropzone {
    border: 2px dashed var(--line);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    background: var(--off-white);
    transition: border-color var(--transition-fast), background var(--transition-fast);
}
.dropzone:hover, .dropzone.dragover {
    border-color: var(--primary);
    background: var(--primary-soft);
}
.dropzone .dz-icon { font-size: 1.6rem; color: var(--primary); }

/* ==========================================================================
   90-Day Journey Timeline (backward compatible)
   ========================================================================== */

.journey { position: relative; padding-left: 3rem; }
.journey::before {
    content: "";
    position: absolute;
    left: 1.35rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--primary) 0%, transparent 100%);
}
.journey-step { position: relative; margin-bottom: 1.25rem; }
.journey-marker {
    position: absolute;
    left: -3rem;
    top: 1rem;
    width: 2.7rem;
    height: 2.7rem;
    border-radius: 50%;
    background: var(--surface-card);
    border: 2px solid var(--primary);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0.85rem;
    box-shadow: var(--shadow-sm);
    z-index: 1;
}
.journey-step-final .journey-marker {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.journey-card {
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    background: var(--surface-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.25rem;
}
.journey-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.journey-week {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary);
    background: var(--primary-soft);
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    margin-bottom: 0.5rem;
}
.journey-card h6 { color: var(--text); }
.journey-card p { color: var(--text-secondary); }
@media (max-width: 767px) {
    .journey { padding-left: 2.5rem; }
    .journey::before { left: 1.1rem; }
    .journey-marker { left: -2.5rem; width: 2.2rem; height: 2.2rem; }
}

/* ==========================================================================
   Navbar
   ========================================================================== */

.navbar {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid var(--line);
    transition: background var(--transition-base), box-shadow var(--transition-base);
}
.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
.navbar .nav-link {
    font-weight: 600;
    color: var(--text-secondary);
    padding: 0.5rem 0.85rem !important;
    border-radius: 999px;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}
.navbar .nav-link:hover {
    color: var(--text);
    background: rgba(0, 0, 0, 0.04);
}
.navbar .nav-link.active {
    color: var(--primary);
    background: var(--primary-soft);
}
.navbar-toggler {
    border: none;
    padding: 0.4rem;
}
.navbar-toggler:focus {
    box-shadow: 0 0 0 3px var(--primary-soft);
}
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

/* Brand */
.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-family: var(--font-display);
    font-weight: 900;
}
.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    font-weight: 900;
    font-size: 1rem;
    border-radius: 9px;
    width: 38px;
    height: 38px;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.25);
}
.brand-word {
    color: var(--text);
    font-size: 1.2rem;
    letter-spacing: -0.02em;
}
.brand-word span { color: var(--primary); }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(800px 400px at 70% -20%, rgba(220, 38, 38, 0.06), transparent 60%),
        radial-gradient(600px 400px at 30% 80%, rgba(234, 88, 12, 0.04), transparent 50%),
        var(--surface);
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(220, 38, 38, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(220, 38, 38, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at 50% 60%, black 20%, transparent 60%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 60%, black 20%, transparent 60%);
    pointer-events: none;
}
.hero .display-1 { line-height: 1.05; color: var(--text); }
.hero .lead { color: var(--text-secondary); }
.hero-graphic { position: relative; min-height: 360px; }

/* World dots */
.world-dots {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(220, 38, 38, 0.08) 1.5px, transparent 1.5px);
    background-size: 22px 22px;
    mask-image: radial-gradient(circle at 50% 50%, #000 40%, transparent 75%);
    -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 40%, transparent 75%);
}

/* Stat chips floating over hero */
.stat-chip {
    position: absolute;
    background: var(--surface-card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0.7rem 1rem;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text);
    backdrop-filter: blur(8px);
}
.stat-chip i { color: var(--primary); }

/* ==========================================================================
   Pipeline / Journey (backward compatible)
   ========================================================================== */

.pipeline {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, 1fr);
}
.pipeline-step {
    position: relative;
    background: var(--surface-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.6rem 1.4rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}
.pipeline-step:hover {
    border-color: var(--line-light);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.pipeline-step .num {
    font-weight: 900;
    font-size: 0.8rem;
    color: var(--primary);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.pipeline-step h5 { color: var(--text); }
.pipeline-step p { color: var(--text-secondary); }
.pipeline-step .arrow {
    position: absolute;
    right: -14px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.25);
}
@media (max-width: 991px) {
    .pipeline { grid-template-columns: 1fr; }
    .pipeline-step .arrow { display: none; }
}

/* ==========================================================================
   Domain / Sector Cards (backward compatible)
   ========================================================================== */

.domain-card {
    position: relative;
    overflow: hidden;
    height: 100%;
    background: var(--surface-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.8rem;
    transition: all var(--transition-base);
}
.domain-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
    transform: translateY(-3px);
}
.domain-card .icon {
    width: 52px;
    height: 52px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    background: var(--primary-soft);
    color: var(--primary);
}
.domain-card h6 { color: var(--text); }
.domain-card p { color: var(--text-secondary); }

/* ==========================================================================
   Feature Icon Strip
   ========================================================================== */

.feature-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 1.2rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
    background: #0a0e1a;
    color: #94a3b8;
    position: relative;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.footer h6 {
    color: #f1f5f9;
    font-weight: 800;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.footer a {
    color: #cbd5e1;
    transition: color var(--transition-fast);
    font-size: 0.9rem;
}
.footer a:hover { color: #fff; }
.footer .brand-word { color: #f1f5f9; }
.footer p { color: #94a3b8; line-height: 1.7; }
.footer-map {
    position: absolute;
    right: -5%;
    bottom: -10%;
    width: 60%;
    height: 90%;
    opacity: 0.04;
    pointer-events: none;
}
.footer hr {
    border-color: rgba(255, 255, 255, 0.06) !important;
}
.footer .footer-social {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}
.footer .footer-social:hover {
    background: var(--primary-soft);
    color: var(--primary);
    transform: translateY(-2px);
}
.footer .list-unstyled li {
    margin-bottom: 0.5rem;
}
.footer .list-unstyled a {
    display: inline-block;
}
.footer .list-unstyled a:hover {
    color: var(--primary);
}

/* ==========================================================================
   Accordion
   ========================================================================== */

.accordion-item {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm) !important;
    overflow: hidden;
    background: var(--surface-card);
}
.accordion-button {
    font-weight: 700;
    font-family: var(--font-body);
    color: var(--text);
    background: transparent;
    font-size: 0.95rem;
}
.accordion-button:not(.collapsed) {
    background: var(--primary-soft);
    color: var(--primary);
    box-shadow: none;
}
.accordion-button::after {
    filter: brightness(0.7);
}
.accordion-body {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ==========================================================================
   Tables
   ========================================================================== */

.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text);
    --bs-table-striped-color: var(--text);
    --bs-table-hover-color: var(--text);
    color: var(--text);
}
.table > :not(caption) > * > * {
    border-bottom-color: var(--line);
    padding: 0.85rem 0.75rem;
}
.table thead th {
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--line);
}
.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(255, 255, 255, 0.02);
}
.table-hover > tbody > tr:hover > * {
    background-color: rgba(255, 255, 255, 0.04);
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.page-link {
    background: var(--surface-card);
    border-color: var(--line);
    color: var(--text-secondary);
    font-weight: 600;
    padding: 0.5rem 1rem;
}
.page-link:hover {
    background: var(--surface-alt);
    border-color: var(--line-light);
    color: var(--text);
}
.page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.page-item.disabled .page-link {
    background: var(--surface-alt);
    border-color: var(--line);
    color: var(--text-muted);
}

/* ==========================================================================
   Alerts / Messages
   ========================================================================== */

.alert {
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.8rem 1rem;
}
.alert-success {
    background: var(--success-soft);
    color: #34d399;
}
.alert-error, .alert-danger {
    background: var(--error-soft);
    color: #f87171;
}
.alert-warning {
    background: var(--warning-soft);
    color: #fbbf24;
}
.alert-info {
    background: var(--primary-soft);
    color: var(--primary-dark);
}
.alert-dismissible .btn-close {
    filter: brightness(0) invert(0.7);
}

/* ==========================================================================
   Breadcrumb
   ========================================================================== */

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-size: 0.85rem;
}
.breadcrumb-item + .breadcrumb-item::before {
    content: '/';
    color: var(--text-muted);
    padding: 0 0.2rem;
}
.breadcrumb-item.active {
    color: var(--text-secondary);
}
.breadcrumb-item a {
    color: var(--text-muted);
}
.breadcrumb-item a:hover {
    color: var(--primary);
}

/* ==========================================================================
   Animations & Transitions
   ========================================================================== */

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}
.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}
.animate-scale-in {
    animation: scaleIn 0.4s ease forwards;
}

/* Scroll reveal (used with JS) */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Hover lift */
.hover-lift {
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.hover-lift:hover {
    transform: translateY(-3px);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ==========================================================================
    Responsive Utilities
    ========================================================================== */

.container {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

@media (max-width: 575.98px) {
    .section { padding: 3rem 0; }
    .section-tight { padding: 2rem 0; }
    .display-1 { font-size: 2rem; }
    .display-2 { font-size: 1.8rem; }
    .hero-graphic { min-height: 200px; }
    .stat-chip { font-size: 0.75rem; padding: 0.5rem 0.75rem; }
    .pipeline { grid-template-columns: 1fr; }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .pipeline { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .pipeline { grid-template-columns: 1fr 1fr; }
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.min-width-0 { min-width: 0; }
.object-cover { object-fit: cover; }

.rounded-4 { border-radius: var(--radius) !important; }
.rounded-lg { border-radius: var(--radius-lg) !important; }
.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.gradient-border {
    border: 1px solid transparent;
    background-clip: padding-box;
    position: relative;
}
.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, var(--primary), transparent, var(--secondary));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}
.backdrop-blur {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--line);
}
.sticky-sidebar {
    position: sticky;
    top: 5rem;
}

/* Image placeholder for fallback areas */
.img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gray-surface), var(--surface-alt));
}

/* Focus-visible ring for custom elements */
.focus-ring:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.min-vh-75 {
    min-height: 75vh;
}

/* Scrollbar styling */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--surface-alt); }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--line-light); }