/* ===== BRIDGINGX DESIGN SYSTEM ===== */

/* ===== CSS VARIABLES ===== */
:root {
    /* Colors */
    --color-navy: #1a2332;
    --color-navy-light: #2d3a4f;
    --color-slate: #3a4a5c;
    --color-grey-dark: #4a5568;
    --color-grey: #718096;
    --color-grey-light: #a0aec0;
    --color-off-white: #f7f8fa;
    --color-white: #ffffff;
    --color-rose: #c75450;
    --color-rose-dark: #a84440;
    --color-rose-light: #d4706c;
    --color-amber: #d4915c;
    --color-amber-muted: rgba(212, 145, 92, 0.3);
    
    /* Typography */
    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    --space-3xl: 6rem;
    --space-4xl: 8rem;
    
    /* Layout */
    --max-width: 1200px;
    --max-width-narrow: 800px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-navy);
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: inherit;
    text-decoration: none;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 3.75rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
}

p {
    max-width: 65ch;
}

.text-large {
    font-size: 1.25rem;
    line-height: 1.7;
}

.text-small {
    font-size: 0.875rem;
}

.text-muted {
    color: var(--color-grey);
}

/* ===== LAYOUT ===== */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.container--narrow {
    max-width: var(--max-width-narrow);
}

section {
    padding: var(--space-4xl) 0;
}

/* ===== NAVIGATION ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--color-navy);
    padding: var(--space-sm) 0;
}

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

.nav__logo {
    font-family: var(--font-body);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--color-white);
}

.nav__logo span {
    color: var(--color-rose);
}

.nav__links {
    display: none;
    align-items: center;
    gap: var(--space-lg);
    list-style: none;
}

@media (min-width: 768px) {
    .nav__links {
        display: flex;
    }
}

.nav__link {
    color: var(--color-white);
    font-size: 0.9375rem;
    font-weight: 500;
    opacity: 0.9;
    transition: opacity var(--transition-fast);
}

.nav__link:hover {
    opacity: 1;
}

/* Dropdown Navigation */
.nav__dropdown {
    position: relative;
}

.nav__dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 220px;
    background: var(--color-white);
    border-radius: 6px;
    box-shadow: 0 10px 40px rgba(26, 35, 50, 0.15);
    padding: var(--space-sm) 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    margin-top: var(--space-sm);
}

.nav__dropdown:hover .nav__dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.nav__dropdown-menu li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    color: var(--color-navy);
    font-size: 0.9375rem;
    transition: background var(--transition-fast);
}

.nav__dropdown-menu li a:hover {
    background: var(--color-off-white);
}

.nav__dropdown-menu li a span {
    font-size: 0.75rem;
    color: var(--color-grey);
    font-weight: 500;
}

.nav__cta {
    display: none;
    align-items: center;
    gap: var(--space-sm);
}

@media (min-width: 768px) {
    .nav__cta {
        display: flex;
    }
}

/* Mobile menu toggle */
.nav__toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
}

.nav__toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-white);
    transition: all var(--transition-fast);
}

.nav__toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav__toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav__toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

@media (min-width: 768px) {
    .nav__toggle {
        display: none;
    }
}

/* Mobile Menu Overlay */
.nav__links--mobile {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-navy);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg);
    z-index: 1000;
    padding: var(--space-2xl);
}

.nav__links--mobile.active {
    display: flex;
}

.nav__links--mobile .nav__link {
    font-size: 1.25rem;
}

.nav__mobile-cta {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
}

@media (min-width: 768px) {
    .nav__links--mobile {
        display: none !important;
    }
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 4px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn--primary {
    background: var(--color-rose);
    color: var(--color-white);
    border-color: var(--color-rose);
}

.btn--primary:hover {
    background: var(--color-rose-dark);
    border-color: var(--color-rose-dark);
}

.btn--secondary {
    background: var(--color-slate);
    color: var(--color-white);
    border-color: var(--color-slate);
}

.btn--secondary:hover {
    background: var(--color-navy);
    border-color: var(--color-navy);
}

.btn--outline {
    background: transparent;
    color: var(--color-navy);
    border-color: var(--color-navy);
}

.btn--outline:hover {
    background: var(--color-navy);
    color: var(--color-white);
}

.btn--outline-light {
    background: transparent;
    color: var(--color-white);
    border-color: var(--color-white);
}

.btn--outline-light:hover {
    background: var(--color-white);
    color: var(--color-navy);
}

.btn--small {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
}

.btn--large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

/* ===== CARDS ===== */
.card {
    background: var(--color-white);
    border-radius: 8px;
    padding: var(--space-xl);
    box-shadow: 0 4px 20px rgba(26, 35, 50, 0.08);
    transition: all var(--transition-base);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(26, 35, 50, 0.12);
}

.card--dark {
    background: var(--color-navy);
    color: var(--color-white);
}

.card--bordered {
    border: 1px solid rgba(26, 35, 50, 0.1);
    box-shadow: none;
}

/* ===== PAGE HEADER ===== */
.page-header {
    padding: calc(80px + var(--space-3xl)) 0 var(--space-3xl);
    background: var(--color-navy);
    color: var(--color-white);
}

.page-header--light {
    background: var(--color-off-white);
    color: var(--color-navy);
}

.page-header__label {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-rose-light);
    margin-bottom: var(--space-sm);
}

.page-header--light .page-header__label {
    color: var(--color-rose);
}

.page-header__title {
    margin-bottom: var(--space-md);
}

.page-header__description {
    font-size: 1.25rem;
    line-height: 1.7;
    max-width: 600px;
    opacity: 0.9;
}

/* ===== SECTION STYLES ===== */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-3xl);
}

.section-header__label {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-rose);
    margin-bottom: var(--space-sm);
}

.section-header__title {
    margin-bottom: var(--space-md);
}

.section-header__description {
    font-size: 1.125rem;
    color: var(--color-grey-dark);
    line-height: 1.7;
}

/* ===== GRID LAYOUTS ===== */
.grid {
    display: grid;
    gap: var(--space-lg);
}

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

@media (min-width: 768px) {
    .grid--2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

@media (min-width: 768px) {
    .grid--3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid--3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

@media (min-width: 600px) {
    .grid--4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid--4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ===== FEATURE BLOCKS ===== */
.feature {
    padding: var(--space-xl);
    background: var(--color-off-white);
    border-radius: 8px;
    border-left: 4px solid var(--color-rose);
}

.feature__icon {
    width: 48px;
    height: 48px;
    margin-bottom: var(--space-md);
    color: var(--color-rose);
}

.feature__title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: var(--color-navy);
}

.feature__description {
    color: var(--color-grey-dark);
    line-height: 1.7;
}

/* ===== PRODUCT CARDS ===== */
.product-card {
    padding: var(--space-xl);
    background: var(--color-white);
    border-radius: 8px;
    border: 1px solid rgba(26, 35, 50, 0.1);
    transition: all var(--transition-base);
}

.product-card:hover {
    border-color: var(--color-rose);
    box-shadow: 0 12px 40px rgba(26, 35, 50, 0.1);
}

.product-card__stage {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-rose);
    margin-bottom: var(--space-xs);
}

.product-card__name {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-navy);
    margin-bottom: var(--space-sm);
}

.product-card__tagline {
    font-size: 1rem;
    color: var(--color-grey);
    margin-bottom: var(--space-md);
}

.product-card__description {
    color: var(--color-grey-dark);
    line-height: 1.7;
    margin-bottom: var(--space-lg);
}

.product-card__link {
    font-weight: 600;
    color: var(--color-rose);
    transition: color var(--transition-fast);
}

.product-card__link:hover {
    color: var(--color-rose-dark);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--color-navy);
    color: var(--color-grey-light);
    padding: var(--space-3xl) 0 var(--space-2xl);
}

.footer__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

@media (min-width: 768px) {
    .footer__grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
}

.footer__brand {
    max-width: 300px;
}

.footer__logo {
    font-family: var(--font-body);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--color-white);
    margin-bottom: var(--space-md);
    display: inline-block;
}

.footer__logo span {
    color: var(--color-rose);
}

.footer__tagline {
    font-size: 0.9375rem;
    line-height: 1.7;
    opacity: 0.8;
}

.footer__nav-title {
    font-weight: 600;
    color: var(--color-white);
    margin-bottom: var(--space-md);
    font-size: 0.9375rem;
}

.footer__nav {
    list-style: none;
}

.footer__nav li {
    margin-bottom: var(--space-sm);
}

.footer__nav a {
    font-size: 0.875rem;
    opacity: 0.8;
    transition: opacity var(--transition-fast);
}

.footer__nav a:hover {
    opacity: 1;
}

.footer__bottom {
    padding-top: var(--space-2xl);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
}

.footer__copy {
    font-size: 0.8125rem;
    opacity: 0.6;
}

.footer__legal {
    display: flex;
    gap: var(--space-lg);
    list-style: none;
}

.footer__legal a {
    font-size: 0.8125rem;
    opacity: 0.6;
    transition: opacity var(--transition-fast);
}

.footer__legal a:hover {
    opacity: 1;
}

/* ===== UTILITY CLASSES ===== */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

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

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

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

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }

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

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

.animate-in {
    animation: fadeInUp 0.6s ease forwards;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }
