/* ============================================
   RailGuard Marketing Website
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1a73e8;
    --primary-dark: #1557b0;
    --primary-light: #4a90e2;
    --secondary: #1a5f2a;
    --secondary-light: #2d8a3e;
    --accent: #4CAF50;
    --accent-light: #66BB6A;
    --danger: #f44336;
    --warning: #ff9800;
    --text: #1e293b;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    --bg: #ffffff;
    --bg-light: #f8fafc;
    --bg-dark: #0f172a;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    line-height: 1.6;
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

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

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}
.btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

.btn-ghost {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border-color: rgba(255,255,255,0.3);
}
.btn-ghost:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.5);
}

.btn-white {
    background: #fff;
    color: var(--primary);
    border-color: #fff;
}
.btn-white:hover {
    background: var(--bg-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-outline-white {
    background: transparent;
    color: #fff;
    border-color: rgba(255,255,255,0.5);
}
.btn-outline-white:hover {
    background: rgba(255,255,255,0.1);
    border-color: #fff;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.05rem;
}

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: var(--transition);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo img {
    height: 40px;
}

.logo-dark {
    display: none;
}

.navbar.scrolled {
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    padding: 10px 0;
}

.navbar.scrolled .logo-white {
    display: none;
}
.navbar.scrolled .logo-dark {
    display: block;
}

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

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.85);
    position: relative;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
    color: #fff;
}
.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.navbar.scrolled .nav-links a {
    color: var(--text-light);
}
.navbar.scrolled .nav-links a:hover,
.navbar.scrolled .nav-links a.active {
    color: var(--primary);
}
.navbar.scrolled .nav-links a::after {
    background: var(--primary);
}

.nav-actions {
    display: flex;
    gap: 12px;
}

.nav-actions .btn-outline {
    color: #fff;
    border-color: rgba(255,255,255,0.4);
    padding: 8px 20px;
    font-size: 0.9rem;
}
.nav-actions .btn-outline:hover {
    background: #fff;
    color: var(--primary);
    border-color: #fff;
}

.nav-actions .btn-primary {
    padding: 8px 20px;
    font-size: 0.9rem;
}

.navbar.scrolled .nav-actions .btn-outline {
    color: var(--primary);
    border-color: var(--primary);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #fff;
    cursor: pointer;
}

.navbar.scrolled .nav-toggle {
    color: var(--text);
}

/* --- Hero --- */
.hero {
    position: relative;
    padding: 160px 0 100px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-dark) 0%, #1a3a5c 40%, var(--secondary) 100%);
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(10, 25, 47, 0.85) 0%, rgba(26, 58, 92, 0.75) 40%, rgba(76, 175, 80, 0.6) 100%),
        url('../images/large-hero-back.png') center/cover no-repeat;
}

.hero .container {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: rgba(76, 175, 80, 0.15);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 100px;
    color: var(--accent-light);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    color: #fff;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.7;
    margin-bottom: 36px;
    max-width: 520px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    margin-bottom: 60px;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 32px;
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
}

.stat-label {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
    font-weight: 500;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255,255,255,0.15);
}

/* Dashboard Preview */
.dashboard-preview {
    background: #ffffff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.hero-dashboard-img {
    width: 100%;
    height: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f8faf8;
    border-bottom: 1px solid rgba(76, 175, 80, 0.15);
}

.preview-dots {
    display: flex;
    gap: 6px;
}
.preview-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e0e0e0;
}
.preview-dots span:first-child { background: #ff5f57; }
.preview-dots span:nth-child(2) { background: #febc2e; }
.preview-dots span:last-child { background: #28c840; }

.preview-title {
    font-size: 0.8rem;
    color: #6b7280;
}

.preview-body {
    display: flex;
    min-height: 280px;
}

.preview-sidebar {
    width: 60px;
    background: #f0f7f0;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-right: 1px solid rgba(76, 175, 80, 0.1);
}

.preview-nav-item {
    height: 8px;
    border-radius: 4px;
    background: #d4e8d4;
}
.preview-nav-item.active {
    background: var(--accent);
}

.preview-content {
    flex: 1;
    padding: 16px;
    background: #ffffff;
}

.preview-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.preview-card {
    height: 50px;
    border-radius: 6px;
    opacity: 0.85;
}
.preview-card.green { background: linear-gradient(135deg, #43a047, #66bb6a); }
.preview-card.blue { background: linear-gradient(135deg, #e8f5e9, #c8e6c9); }
.preview-card.orange { background: linear-gradient(135deg, #a5d6a7, #81c784); }
.preview-card.red { background: linear-gradient(135deg, #2e7d32, #388e3c); }

.preview-chart {
    height: 80px;
    border-radius: 6px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 50%, #a5d6a7 100%);
    border: 1px solid rgba(76, 175, 80, 0.15);
}

.preview-table {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.preview-row {
    height: 16px;
    background: #f1f8f1;
    border-radius: 4px;
    border: 1px solid rgba(76, 175, 80, 0.08);
}

/* --- Social Proof --- */
.social-proof {
    padding: 48px 0;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border);
}

.social-proof-label {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    margin-bottom: 24px;
}

.social-proof-logos {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}

.proof-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.95rem;
}

.proof-item i {
    font-size: 1.3rem;
    color: var(--accent);
}

/* --- Section Styles --- */
.section-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 60px;
}

.section-tag {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(26, 115, 232, 0.08);
    color: var(--primary);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
}

.section-desc {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.7;
}

/* --- Problem / Solution --- */
.problem-solution {
    padding: 100px 0;
    background: var(--bg);
}

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.comparison-card {
    padding: 40px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.comparison-card.old {
    background: #fef2f2;
    border-color: #fecaca;
}
.comparison-card.new {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.comparison-icon {
    font-size: 2rem;
    margin-bottom: 16px;
}
.comparison-card.old .comparison-icon { color: var(--danger); }
.comparison-card.new .comparison-icon { color: var(--accent); }

.comparison-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.comparison-card ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comparison-card li {
    font-size: 0.95rem;
    color: var(--text-light);
    padding-left: 24px;
    position: relative;
}

.comparison-card.old li::before {
    content: '\F659';
    font-family: 'bootstrap-icons';
    position: absolute;
    left: 0;
    color: var(--danger);
    font-size: 0.8rem;
}

.comparison-card.new li::before {
    content: '\F26A';
    font-family: 'bootstrap-icons';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 0.8rem;
}

/* --- Features --- */
.features {
    padding: 100px 0;
    background: var(--bg-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.feature-card {
    background: #fff;
    padding: 32px 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(26, 115, 232, 0.2);
}

.feature-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(26, 115, 232, 0.1), rgba(76, 175, 80, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
}

.features-cta {
    text-align: center;
    margin-top: 48px;
}

/* --- How It Works --- */
.how-it-works {
    padding: 100px 0;
    background: var(--bg);
}

.steps-grid {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 20px;
}

.step {
    text-align: center;
    max-width: 280px;
}

.step-number {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.step h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.step p {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.6;
}

.step-connector {
    display: flex;
    align-items: center;
    padding-top: 20px;
    color: var(--text-muted);
    font-size: 1.2rem;
}

/* --- Testimonial --- */
.testimonial {
    padding: 80px 0;
    background: var(--bg-light);
}

.testimonial-card {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.testimonial-quote i {
    font-size: 3rem;
    color: var(--primary);
    opacity: 0.3;
    margin-bottom: 20px;
    display: block;
}

.testimonial-quote blockquote {
    font-size: 1.25rem;
    color: var(--text);
    line-height: 1.8;
    font-style: italic;
    margin-bottom: 32px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.author-avatar i {
    font-size: 2.5rem;
    color: var(--text-muted);
}

.author-info {
    text-align: left;
}

.author-info strong {
    display: block;
    font-weight: 600;
}

.author-info span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* --- Enterprise --- */
.enterprise {
    padding: 100px 0;
    background: var(--bg);
}

.enterprise-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.enterprise-content .section-tag {
    margin-bottom: 16px;
}

.enterprise-content h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.enterprise-content p {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 28px;
}

.enterprise-features {
    margin-bottom: 32px;
}

.enterprise-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    font-weight: 500;
    font-size: 0.95rem;
}

.enterprise-features i {
    color: var(--accent);
    font-size: 1.1rem;
}

/* Tenant Cards Visual */
.tenant-cards {
    position: relative;
    height: 320px;
}

.tenant-card {
    position: absolute;
    width: 260px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.tenant-card:hover {
    transform: translateY(-4px);
}

.tenant-header {
    height: 40px;
}

.tenant-body {
    padding: 20px;
    background: #fff;
}

.tenant-line {
    height: 10px;
    background: var(--bg-light);
    border-radius: 4px;
    margin-bottom: 8px;
}
.tenant-line.short {
    width: 60%;
}

.tenant-card.t1 {
    top: 0;
    left: 0;
    z-index: 3;
}
.tenant-card.t1 .tenant-header { background: linear-gradient(135deg, var(--primary), var(--primary-light)); }

.tenant-card.t2 {
    top: 40px;
    left: 80px;
    z-index: 2;
}
.tenant-card.t2 .tenant-header { background: linear-gradient(135deg, var(--secondary), var(--accent)); }

.tenant-card.t3 {
    top: 80px;
    left: 160px;
    z-index: 1;
}
.tenant-card.t3 .tenant-header { background: linear-gradient(135deg, #e65100, var(--warning)); }

/* --- CTA --- */
.cta {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--bg-dark) 0%, #1a3a5c 40%, var(--secondary) 100%);
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 50%, rgba(76, 175, 80, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 30%, rgba(26, 115, 232, 0.1) 0%, transparent 50%);
}

.cta-content {
    position: relative;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 2.4rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 16px;
}

.cta-content p {
    color: rgba(255,255,255,0.7);
    font-size: 1.1rem;
    margin-bottom: 36px;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* --- Footer --- */
.footer {
    background: var(--bg-dark);
    color: rgba(255,255,255,0.7);
    padding: 80px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-logo {
    height: 36px;
    margin-bottom: 16px;
}

.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.5);
}

.footer-links h4 {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.footer-links a {
    display: block;
    padding: 6px 0;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.5);
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
}

.footer-bottom p {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.4);
}

.footer-social {
    display: flex;
    gap: 16px;
}

.footer-social a {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.4);
}
.footer-social a:hover {
    color: var(--accent);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    .hero-subtitle {
        margin: 0 auto 36px;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-visual {
        display: none;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .enterprise-grid {
        grid-template-columns: 1fr;
    }

    .enterprise-visual {
        display: none;
    }

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

@media (max-width: 768px) {
    .nav-links,
    .nav-actions {
        display: none;
    }

    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-dark);
        padding: 24px;
        gap: 16px;
        box-shadow: var(--shadow-lg);
    }

    .nav-actions.open {
        display: flex;
        position: absolute;
        top: calc(100% + 200px);
        left: 0;
        right: 0;
        background: var(--bg-dark);
        padding: 0 24px 24px;
        justify-content: center;
        box-shadow: var(--shadow-lg);
    }

    .nav-toggle {
        display: block;
    }

    .hero {
        padding: 130px 0 60px;
        min-height: auto;
    }

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

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }

    .stat-divider {
        width: 40px;
        height: 1px;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    .comparison-grid {
        grid-template-columns: 1fr;
    }

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

    .steps-grid {
        flex-direction: column;
        align-items: center;
    }

    .step-connector {
        transform: rotate(90deg);
        padding-top: 0;
    }

    .cta-content h2 {
        font-size: 1.8rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

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

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

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

.animate-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-in.visible {
    opacity: 1;
    transform: translateY(0);
}
