/* ============================================================
   CARYFY CORPORATE SITE — style.css
   Design System: Institutional. Data-forward. Restrained.
   Typographic DNA: DM Serif Display + Instrument Sans
   Build: Static HTML/CSS/JS — no frameworks
   ============================================================ */

/* --- DESIGN TOKENS --- */
:root {
    /* Core palette — shared DNA with CareBravo, darker bias */
    --ink: #0B1623;
    --ink-deep: #060E18;
    --ink-light: #1A2A40;
    --ink-muted: #3A4D65;
    --slate: #6B7F96;
    --silver: #A8B8C8;
    --pearl: #E8EDF2;
    --cloud: #F4F6F9;
    --white: #FFFFFF;

    /* Accent — copper family, slightly more muted for corporate */
    --accent: #B87333;
    --accent-light: #D4945A;
    --accent-glow: rgba(184, 115, 51, 0.10);
    --accent-soft: #FDF6F0;

    /* Teal — consistent with CareBravo */
    --teal: #2A9D8F;
    --teal-soft: #E8F5F3;

    /* Semantic */
    --success: #2A9D8F;
    --caution: #D4945A;

    /* Typography */
    --serif: 'DM Serif Display', Georgia, serif;
    --sans: 'Instrument Sans', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Layout */
    --content-width: 820px;
    --wide-width: 1100px;
    --section-pad: 7rem 3rem;
    --hero-pad: 12rem 3rem 6rem;
    --page-hero-pad: 10rem 3rem 5rem;
}


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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--sans);
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.7;
    color: var(--ink-muted);
    background: var(--white);
    overflow-x: hidden;
}

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

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-light);
}


/* --- TYPOGRAPHY --- */
h1, h2, h3, h4 {
    line-height: 1.2;
    font-weight: 400;
}

h1 {
    font-family: var(--serif);
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    color: var(--white);
    letter-spacing: -0.01em;
}

h2 {
    font-family: var(--serif);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    color: var(--ink);
    margin-bottom: 1.5rem;
}

h2.light {
    color: var(--white);
}

h3 {
    font-family: var(--sans);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 0.75rem;
}

h4 {
    font-family: var(--sans);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ink);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.5rem;
}

.body-text {
    max-width: var(--content-width);
}

.body-text p {
    margin-bottom: 1.5rem;
    color: var(--ink-muted);
}

.body-text p:last-child {
    margin-bottom: 0;
}

.body-text strong {
    font-weight: 600;
    color: var(--ink);
}

blockquote {
    font-family: var(--serif);
    font-size: 1.3rem;
    font-style: italic;
    color: var(--ink);
    border-left: 3px solid var(--accent);
    padding-left: 1.5rem;
    margin: 2rem 0;
    max-width: var(--content-width);
}


/* --- LAYOUT --- */
.section-inner {
    max-width: var(--content-width);
    margin: 0 auto;
}

.section-inner.wide {
    max-width: var(--wide-width);
}

section {
    padding: var(--section-pad);
}


/* --- SECTION TAGS & EYEBROWS --- */
.section-tag {
    font-family: var(--sans);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
    display: block;
    margin-bottom: 1rem;
}

.hero-eyebrow {
    font-family: var(--sans);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--teal);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(42, 157, 143, 0.3);
    padding: 0.35rem 1rem;
    border-radius: 100px;
    margin-bottom: 1.5rem;
}

.eyebrow-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--teal);
    display: inline-block;
}


/* --- HOMEPAGE HERO --- */
.hero {
    background: var(--ink-deep);
    padding: var(--hero-pad);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(42, 157, 143, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(42, 157, 143, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 30%, transparent 80%);
    pointer-events: none;
}

.hero-inner {
    max-width: var(--content-width);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: clamp(2.6rem, 5vw, 3.8rem);
    margin-bottom: 1.5rem;
}

.hero-sub {
    font-family: var(--sans);
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--silver);
    line-height: 1.7;
    max-width: 640px;
    margin-bottom: 2.5rem;
}


/* --- PAGE HERO (non-homepage) --- */
.page-hero {
    background: var(--ink);
    padding: var(--page-hero-pad);
    position: relative;
    overflow: hidden;
}

.page-hero .hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(42, 157, 143, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(42, 157, 143, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black 20%, transparent 70%);
    pointer-events: none;
}

.page-hero .hero-inner {
    position: relative;
    z-index: 1;
}

.page-hero h1 {
    margin-bottom: 1.25rem;
}

.page-hero .hero-sub {
    font-size: 1.15rem;
    margin-bottom: 2rem;
}


/* --- BUTTONS --- */
.hero-ctas {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent);
    color: var(--white);
    font-family: var(--sans);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.9rem 2rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
    text-decoration: none;
}

.btn-primary:hover {
    background: var(--accent-light);
    color: var(--white);
    transform: translateY(-1px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--silver);
    font-family: var(--sans);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.9rem 2rem;
    border-radius: 6px;
    border: 1px solid rgba(168, 184, 200, 0.2);
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
    text-decoration: none;
}

.btn-secondary:hover {
    color: var(--white);
    border-color: rgba(168, 184, 200, 0.4);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--accent);
    font-family: var(--sans);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.9rem 2rem;
    border-radius: 6px;
    border: 1px solid var(--accent);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    text-decoration: none;
}

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

.btn-arrow {
    transition: transform 0.2s ease;
    display: inline-block;
}

.btn-primary:hover .btn-arrow,
.btn-secondary:hover .btn-arrow,
.btn-outline:hover .btn-arrow {
    transform: translateX(3px);
}


/* --- PROOF / STAT BLOCKS --- */
.proof {
    background: var(--ink);
    padding: var(--section-pad);
    text-align: center;
}

.proof-stat {
    margin-bottom: 3rem;
}

.stat-number {
    font-family: var(--serif);
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 400;
    color: var(--white);
    line-height: 1;
}

.stat-number span {
    color: var(--accent);
}

.stat-label {
    font-family: var(--sans);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--silver);
    margin-top: 0.75rem;
}

.proof-bar {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    max-width: var(--wide-width);
    margin: 0 auto;
    padding-top: 2.5rem;
    border-top: 1px solid rgba(168, 184, 200, 0.1);
}

.proof-bar-item {
    text-align: center;
}

.proof-bar-item strong {
    font-family: var(--sans);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--white);
    display: block;
}

.proof-bar-item span {
    font-family: var(--sans);
    font-size: 0.85rem;
    color: var(--silver);
}


/* --- COMPARISON GRID --- */
.compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    margin: 2.5rem 0;
    max-width: var(--wide-width);
}

.compare-col {
    padding: 2.5rem;
    border-radius: 8px;
}

.compare-col.legacy {
    background: var(--cloud);
    border: 1px solid var(--pearl);
}

.compare-col.was {
    background: var(--ink);
    border: 1px solid var(--ink-light);
}

.compare-col.was h3,
.compare-col.was p,
.compare-col.was li {
    color: var(--silver);
}

.compare-col.was h3 {
    color: var(--white);
}

.compare-col h3 {
    margin-bottom: 1rem;
}

.compare-col p {
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: 0.75rem;
}


/* --- CARD GRID --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2.5rem;
    max-width: var(--wide-width);
}

.card {
    background: var(--white);
    border: 1px solid var(--pearl);
    border-radius: 8px;
    padding: 2.5rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    border-color: rgba(184, 115, 51, 0.3);
    box-shadow: 0 4px 24px rgba(11, 22, 35, 0.06);
}

.card h3 {
    font-size: 1.05rem;
}

.card p {
    font-size: 0.95rem;
    color: var(--ink-muted);
    margin-top: 0.5rem;
}

/* Dark-bg cards */
.card.dark {
    background: var(--ink-light);
    border-color: rgba(168, 184, 200, 0.08);
}

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

.card.dark p {
    color: var(--silver);
}


/* --- FAQ ACCORDION --- */
.faq {
    padding: var(--section-pad);
}

.faq-list {
    max-width: var(--content-width);
    margin-top: 2rem;
}

.faq-item {
    border-bottom: 1px solid var(--pearl);
}

.faq-item:first-child {
    border-top: 1px solid var(--pearl);
}

.faq-q,
.faq-question {
    width: 100%;
    background: none;
    border: none;
    font-family: var(--sans);
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink);
    text-align: left;
    padding: 1.25rem 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    transition: color 0.2s ease;
}

.faq-q:hover,
.faq-question:hover {
    color: var(--accent);
}

.faq-toggle {
    font-size: 1.3rem;
    font-weight: 300;
    color: var(--slate);
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.faq-item.open .faq-toggle {
    transform: rotate(45deg);
}

.faq-a,
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-item.open .faq-a,
.faq-item.open .faq-answer {
    max-height: 600px;
    padding-bottom: 1.25rem;
}

.faq-a p,
.faq-answer p {
    color: var(--ink-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}


/* --- SECTION CONCLUSION --- */
.section-conclusion {
    border-left: 3px solid var(--accent);
    padding-left: 1.5rem;
    margin-top: 2.5rem;
    max-width: var(--content-width);
}

.section-conclusion p {
    font-size: 1rem;
    color: var(--ink-muted);
}

.section-conclusion strong {
    color: var(--ink);
}


/* --- FINAL CTA --- */
.final-cta {
    background: var(--ink);
    padding: var(--section-pad);
    text-align: center;
}

.final-cta h2 {
    color: var(--white);
    margin-bottom: 1rem;
}

.final-cta .body-text {
    margin: 0 auto 2rem;
}

.final-cta .body-text p {
    color: var(--silver);
}

.cta-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.cta-link {
    font-family: var(--sans);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--silver);
    transition: color 0.2s ease;
}

.cta-link:hover {
    color: var(--white);
}


/* --- AUTHOR BLOCK --- */
.author-block {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin: 3rem 0;
    max-width: var(--content-width);
}

.author-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.author-info strong {
    font-size: 1.05rem;
    color: var(--ink);
    display: block;
}

.author-info span {
    font-size: 0.85rem;
    color: var(--slate);
    display: block;
    margin-bottom: 0.5rem;
}

.author-info p {
    font-size: 0.95rem;
    color: var(--ink-muted);
    margin-bottom: 0.5rem;
}


/* --- HEADER / NAV --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.25rem 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(6, 14, 24, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(168, 184, 200, 0.06);
    transition: background 0.3s ease;
}

.site-logo {
    font-family: var(--sans);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
    letter-spacing: 0.02em;
}

.site-logo .logo-dot {
    color: var(--accent);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.site-nav a {
    font-family: var(--sans);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--silver);
    text-decoration: none;
    transition: color 0.2s ease;
    position: relative;
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--white);
}

.site-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
}

.nav-cta {
    background: var(--accent);
    color: var(--white) !important;
    padding: 0.5rem 1.25rem;
    border-radius: 5px;
    font-weight: 600 !important;
    transition: background 0.2s ease !important;
}

.nav-cta:hover {
    background: var(--accent-light) !important;
}

a.nav-cta.nav-cta--login {
    margin-left: -12px;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--silver);
    margin: 5px 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

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

.menu-toggle.open span:nth-child(2) {
    opacity: 0;
}

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


/* --- FOOTER --- */
.site-footer {
    background: var(--ink-deep);
    padding: 4rem 3rem 2rem;
    border-top: 1px solid rgba(168, 184, 200, 0.06);
}

.footer-grid {
    max-width: var(--wide-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
}

.footer-brand p {
    font-size: 0.85rem;
    color: var(--slate);
    line-height: 1.6;
    margin-top: 0.75rem;
    max-width: 320px;
}

.footer-col h4 {
    font-family: var(--sans);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--silver);
    margin-bottom: 1rem;
}

.footer-col a {
    display: block;
    font-family: var(--sans);
    font-size: 0.85rem;
    color: var(--slate);
    text-decoration: none;
    margin-bottom: 0.6rem;
    transition: color 0.2s ease;
}

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

.footer-bottom {
    max-width: var(--wide-width);
    margin: 3rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(168, 184, 200, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-legal {
    font-size: 0.78rem;
    color: var(--slate);
    line-height: 1.6;
    text-align: center;
}

.footer-legal a {
    color: var(--slate);
    text-decoration: underline;
    text-decoration-color: rgba(107, 127, 150, 0.3);
}

.footer-legal a:hover {
    color: var(--silver);
}

.footer-addresses {
    font-size: 0.78rem;
    color: var(--slate);
    line-height: 1.6;
    text-align: left;
}

.footer-addresses strong {
    color: var(--silver);
    font-weight: 600;
}


/* --- SCROLL REVEAL --- */
.reveal {
    
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}


/* --- UTILITY --- */
.text-accent { color: var(--accent); }
.text-teal { color: var(--teal); }
.text-silver { color: var(--silver); }
.text-white { color: var(--white); }
.bg-cloud { background: var(--cloud); }
.bg-ink { background: var(--ink); }
.bg-ink-deep { background: var(--ink-deep); }


/* --- RESPONSIVE --- */
@media (max-width: 900px) {



    :root {
        --section-pad: 4rem 1.5rem;
        --hero-pad: 8rem 1.5rem 4rem;
        --page-hero-pad: 7rem 1.5rem 3.5rem;
    }

    .site-header {
        padding: 1rem 1.5rem !important;
    }
   

      /* Mobile nav overlay */
    .site-nav {
        display: none;
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--ink-deep);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 1.75rem;
        z-index: 1001;          /* above header (1000) and toggle (was 1001→now 1002) */
        overflow-y: scroll !important;
        padding: 2rem 2rem 2rem;
    }

    .site-nav.open {
        display: flex;
                display: flex;
        width: 100%;
        height: 80vh;
        overflow-y: auto;
        margin-top: 0px;

    }

    .site-nav a {
        font-size: 1.2rem;
    }


  /* Both CTA buttons on mobile — full width, consistent, stacked */
    .site-nav .nav-cta {
        width: 200px;
        height: 48px;
        justify-content: center;
        font-size: 1rem !important;
        border-radius: 6px;
        text-align: center;
    }

     /* Login keeps its outlined look on mobile too */
    .site-nav .nav-cta--login {
        margin-top: -8px;
        margin-left: 0px !important;
        background: transparent !important;
        color: var(--accent) !important;
        border: 1.5px solid var(--accent) !important;
    }
    
     .site-nav .nav-cta--login:hover {
        background: var(--accent) !important;
        color: var(--white) !important;
    }

    .menu-toggle {
        display: block;
        z-index: 1002;          /* above the open nav overlay */
    }


.nav-cta--login:hover {
    background: var(--accent);
    color: var(--white) !important;
}




/* 
    .menu-toggle {
        display: block;
        z-index: 1001;
    } */

    .compare-grid {
        grid-template-columns: 1fr !important;
    }

    .card-grid {
        grid-template-columns: 1fr !important;
    }

    .proof-bar {
        flex-direction: column !important;
        gap: 1.5rem !important;
    }

    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    .footer-bottom {
        flex-direction: column !important;
    }

    .footer-addresses {
        text-align: left !important;
    }

    .hero-ctas {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .cta-links {
        flex-direction: column !important;
        align-items: center !important;
        gap: 1rem !important;
    }

    .author-block {
        flex-direction: column !important;
    }



}
