/* ═══════════════════════════════════════════════════════
   BRIDGECARE OS — SHARED DESIGN SYSTEM
   Single source of truth for tokens, nav, footer, buttons,
   animations, and responsive breakpoints.
   ═══════════════════════════════════════════════════════ */

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

/* ── DESIGN TOKENS ── */
:root {
    /* Core Palette */
    --navy-900: #061729;
    --navy:     #0A2342;
    --navy-700: #0E2D54;
    --navy-600: #132E54;
    --navy-400: #1E4D80;
    --navy-200: #3A6EA5;

    --coral:       #F4846B;
    --coral-600:   #E5735A;
    --coral-400:   #F9A994;
    --coral-200:   #FCDBD3;
    --coral-100:   #FEF0EC;
    --coral-50:    #FFF8F6;

    /* Neutrals */
    --white:    #FFFFFF;
    --gray-50:  #F8FAFB;
    --gray-100: #F1F4F7;
    --gray-200: #E2E7ED;
    --gray-300: #C5CDD8;
    --gray-400: #8D95A3;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-800: #1F2937;

    /* Semantic */
    --cream:      #FDF8F6;
    --cream-warm: #FBF3EF;

    /* Gradients */
    --grad-coral: linear-gradient(135deg, #F4846B 0%, #F9A994 100%);
    --grad-navy:  linear-gradient(135deg, #0A2342 0%, #1E4D80 100%);
    --grad-warm:  linear-gradient(135deg, #FDF8F6 0%, #FEF0EC 50%, #F8FAFB 100%);
    --grad-glass: linear-gradient(135deg, rgba(255,255,255,.8) 0%, rgba(255,255,255,.4) 100%);

    /* Shadows (Elevation System) */
    --shadow-xs:  0 1px 2px rgba(10,35,66,.04);
    --shadow-sm:  0 2px 8px rgba(10,35,66,.06);
    --shadow-md:  0 4px 16px rgba(10,35,66,.08);
    --shadow-lg:  0 8px 32px rgba(10,35,66,.10);
    --shadow-xl:  0 16px 48px rgba(10,35,66,.12);
    --shadow-2xl: 0 24px 64px rgba(10,35,66,.16);
    --shadow-coral: 0 8px 32px rgba(244,132,107,.3);

    /* Radius */
    --radius-sm:   8px;
    --radius-md:  12px;
    --radius-lg:  16px;
    --radius-xl:  24px;
    --radius-2xl: 32px;
    --radius-full: 9999px;

    /* Motion */
    --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --dur-fast: .15s;
    --dur-med:  .3s;
    --dur-slow: .6s;
}

html { scroll-behavior: smooth }

body {
    font-family: 'Poppins', system-ui, sans-serif;
    color: var(--navy);
    background: var(--white);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ── GRAIN TEXTURE (Premium Depth) ── */
/* Promoted to own compositing layer with will-change to avoid
   repainting the entire page on scroll. The fixed overlay was
   previously triggering full-page repaints on every frame. */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: .028;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px;
    will-change: transform;
}

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

/* ═══════════════════════════════════════
   NAV — Frosted Glass
   ═══════════════════════════════════════ */
nav {
    position: fixed;
    top: 0; left: 0; width: 100%;
    z-index: 1000;
    padding: 0 3rem;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(10,35,66,.06);
    transition: all var(--dur-med) var(--ease-out);
}
nav.scrolled {
    box-shadow: var(--shadow-md);
    height: 64px;
}
.nav-logo { height: 38px; transition: height var(--dur-med) var(--ease-out) }
nav.scrolled .nav-logo { height: 34px }

.nav-links { display: flex; align-items: center; gap: 2.5rem }
.nav-link {
    text-decoration: none;
    font-size: .85rem;
    font-weight: 500;
    color: var(--gray-500);
    transition: color var(--dur-fast);
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0;
    width: 0; height: 2px;
    background: var(--coral);
    border-radius: 1px;
    transition: width var(--dur-med) var(--ease-out);
}
.nav-link:hover { color: var(--navy) }
.nav-link:hover::after { width: 100% }
.nav-link.active { color: var(--navy); font-weight: 600 }
.nav-link.active::after { width: 100% }

.nav-login {
    padding: .55rem 1.25rem;
    border: 1.5px solid var(--navy);
    border-radius: var(--radius-full);
    color: var(--navy);
    font-weight: 600;
    font-size: .85rem;
    text-decoration: none;
    transition: all var(--dur-med) var(--ease-out);
    background: transparent;
}
.nav-login:hover {
    background: var(--navy);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.nav-cta {
    padding: .55rem 1.5rem;
    background: var(--navy);
    border-radius: var(--radius-full);
    color: var(--white);
    font-weight: 600;
    font-size: .85rem;
    text-decoration: none;
    transition: all var(--dur-med) var(--ease-out);
    box-shadow: var(--shadow-sm);
}
.nav-cta:hover {
    background: var(--navy-600);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* ═══════════════════════════════════════
   MOBILE HAMBURGER MENU
   ═══════════════════════════════════════ */
.nav-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: .5rem;
    z-index: 1001;
}
.nav-hamburger svg {
    width: 24px; height: 24px;
    stroke: var(--navy);
    stroke-width: 2;
    stroke-linecap: round;
    fill: none;
}

/* ═══════════════════════════════════════
   FOOTER — Premium Multi-Column
   ═══════════════════════════════════════ */
footer {
    background: var(--navy-900);
    padding: 4.5rem 3rem 2.5rem;
}
.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
}
.footer-columns {
    display: grid;
    grid-template-columns: 1.5fr repeat(4, 1fr);
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255,255,255,.06);
    margin-bottom: 2rem;
}
.footer-brand { display: flex; flex-direction: column; gap: .75rem }
.footer-logo { height: 30px; filter: brightness(0) invert(1); opacity: .8 }
.footer-tagline {
    font-size: .82rem;
    color: rgba(255,255,255,.3);
    line-height: 1.7;
    margin-top: .25rem;
}
.footer-email {
    color: var(--coral-400);
    text-decoration: none;
    font-size: .82rem;
    font-weight: 500;
    transition: color var(--dur-fast);
}
.footer-email:hover { color: var(--coral) }
.footer-col { display: flex; flex-direction: column; gap: .6rem }
.footer-col h4 {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255,255,255,.5);
    margin-bottom: .5rem;
}
.footer-col a {
    color: rgba(255,255,255,.35);
    text-decoration: none;
    font-size: .82rem;
    font-weight: 400;
    transition: color var(--dur-fast);
}
.footer-col a:hover { color: var(--coral-400) }
.footer-social { display: flex; gap: 1rem; margin-top: .5rem }
.footer-social a {
    width: 36px; height: 36px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,.05);
    display: flex; align-items: center; justify-content: center;
    transition: all var(--dur-fast);
}
.footer-social a:hover { background: rgba(244,132,107,.15) }
.footer-social a svg { width: 16px; height: 16px; fill: none; stroke: rgba(255,255,255,.4); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round }
.footer-social a:hover svg { stroke: var(--coral-400) }
.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
}
.footer-copy { color: rgba(255,255,255,.2); font-size: .75rem }

/* ═══════════════════════════════════════
   SECTION HEAD — Reusable
   ═══════════════════════════════════════ */
.section-head {
    text-align: center;
    max-width: 620px;
    margin: 0 auto 4rem;
}
.section-head .section-label {
    display: inline-block;
    text-transform: uppercase;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--coral);
    margin-bottom: 1rem;
    padding: .35rem .85rem;
    background: var(--coral-100);
    border-radius: var(--radius-full);
}
.section-head h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 700;
    margin-bottom: .75rem;
    letter-spacing: -.01em;
}
.section-head p { font-size: 1rem; color: var(--gray-400); max-width: 520px; margin: 0 auto }

/* ═══════════════════════════════════════
   CTA — Dark Section
   ═══════════════════════════════════════ */
.cta {
    background: var(--navy);
    padding: 6rem 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cta::before {
    content: '';
    position: absolute;
    width: 600px; height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(244,132,107,.08) 0%, transparent 70%);
    top: -200px; right: -200px;
}
.cta-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    margin: 0 auto;
}
.cta h2 {
    color: var(--white);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -.02em;
}
.cta h2 .gradient-text {
    background: var(--grad-coral);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.cta p {
    color: rgba(255,255,255,.5);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    max-width: 480px;
    margin-left: auto; margin-right: auto;
}
.cta-btn-row {
    display: flex; gap: 1rem;
    justify-content: center; flex-wrap: wrap;
}

/* ═══════════════════════════════════════
   BUTTONS — Refined System
   ═══════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .85rem 2.2rem;
    border-radius: var(--radius-full);
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: .92rem;
    text-decoration: none;
    transition: all var(--dur-med) var(--ease-out);
    cursor: pointer;
    border: none;
    position: relative;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--dur-med) var(--ease-out) }
.btn:hover svg { transform: translateX(3px) }

.btn-primary {
    background: var(--coral);
    color: var(--white);
    box-shadow: var(--shadow-coral);
}
.btn-primary:hover {
    background: var(--coral-600);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(244,132,107,.4);
}

.btn-dark {
    background: var(--navy);
    color: var(--white);
    box-shadow: 0 4px 20px rgba(10,35,66,.2);
}
.btn-dark:hover {
    background: var(--navy-600);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(10,35,66,.3);
}

.btn-outline {
    background: transparent;
    color: var(--navy);
    border: 1.5px solid var(--gray-200);
}
.btn-outline:hover { border-color: var(--navy); background: rgba(10,35,66,.02) }

.btn-white {
    background: var(--white);
    color: var(--navy);
    box-shadow: var(--shadow-sm);
}
.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-ghost-light {
    background: rgba(255,255,255,.08);
    color: rgba(255,255,255,.8);
    border: 1.5px solid rgba(255,255,255,.15);
}
.btn-ghost-light:hover {
    background: rgba(255,255,255,.12);
    border-color: rgba(255,255,255,.3);
    color: var(--white);
}

/* ═══════════════════════════════════════
   DEMO BANNER — Reusable
   ═══════════════════════════════════════ */
.demo-banner {
    padding: 4.5rem 3rem;
    background: var(--cream);
    position: relative;
}
.demo-banner-inner {
    max-width: 860px;
    margin: 0 auto;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: 3rem;
    display: flex;
    align-items: center;
    gap: 2.5rem;
    box-shadow: var(--shadow-md);
    transition: all var(--dur-med) var(--ease-out);
}
.demo-banner-inner:hover {
    border-color: var(--coral-200);
    box-shadow: var(--shadow-xl);
}
.demo-banner-icon {
    width: 64px; height: 64px;
    background: var(--coral-100);
    border-radius: var(--radius-lg);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.demo-banner-icon svg {
    width: 28px; height: 28px;
    fill: none; stroke: var(--coral);
    stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.demo-banner-text { flex: 1 }
.demo-banner-text h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: .35rem;
    color: var(--navy);
}
.demo-banner-text p {
    font-size: .9rem;
    color: var(--gray-500);
    line-height: 1.6;
    margin: 0;
}
.demo-banner-text .demo-creds {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-top: .5rem;
    padding: .35rem .75rem;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-family: 'Inter', monospace;
    font-size: .78rem;
    color: var(--gray-600);
    user-select: all;
}
.demo-banner-actions {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    flex-shrink: 0;
}
@media (max-width: 768px) {
    .demo-banner-inner { flex-direction: column; text-align: center; padding: 2rem 1.5rem }
    .demo-banner-actions { width: 100% }
    .demo-banner-actions .btn { width: 100%; justify-content: center }
}
@media (max-width: 640px) {
    .demo-banner { padding: 3rem 1.25rem }
}

/* ═══════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(32px) }
    to   { opacity: 1; transform: translateY(0) }
}
@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 3px rgba(244,132,107,.2) }
    50% { opacity: .5; box-shadow: 0 0 0 6px rgba(244,132,107,.08) }
}
@keyframes float {
    0%, 100% { transform: translateY(0) }
    50% { transform: translateY(-10px) }
}
@keyframes breathe {
    0%, 100% { transform: scale(1); opacity: 1 }
    50% { transform: scale(1.05); opacity: .7 }
}
@keyframes marquee {
    0% { transform: translateX(0) }
    100% { transform: translateX(-50%) }
}

.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
}
.reveal.visible { opacity: 1; transform: translateY(0) }
.reveal-d1 { transition-delay: .1s }
.reveal-d2 { transition-delay: .2s }
.reveal-d3 { transition-delay: .3s }
.reveal-d4 { transition-delay: .4s }

/* ═══════════════════════════════════════
   RESPONSIVE — Shared Breakpoints
   ═══════════════════════════════════════ */
@media (max-width: 768px) {
    .nav-hamburger { display: block }
    .nav-links {
        position: fixed;
        top: 0; right: -100%;
        width: 280px; height: 100vh;
        background: var(--white);
        flex-direction: column;
        padding: 5rem 2rem 2rem;
        gap: 1.5rem;
        box-shadow: var(--shadow-2xl);
        transition: right var(--dur-med) var(--ease-out);
        z-index: 1000;
    }
    .nav-links.open { right: 0 }
    .nav-link { display: block; font-size: 1rem }
}
@media (max-width: 1024px) {
    .footer-columns { grid-template-columns: 1fr 1fr 1fr; gap: 2.5rem }
    .footer-brand { grid-column: 1 / -1 }
}
@media (max-width: 640px) {
    nav { padding: 0 1.25rem; height: 60px }
    .nav-logo { height: 30px }
    .cta { padding: 5rem 1.25rem }
    footer { padding: 2.5rem 1.25rem 2rem }
    .footer-columns { grid-template-columns: 1fr 1fr; gap: 2rem }
    .footer-brand { grid-column: 1 / -1; text-align: center; align-items: center }
    .footer-bottom { flex-direction: column; text-align: center; gap: 1rem }
}
