/**
 * GRN LABS — GLOBAL STYLESHEET
 * Design standard: /vascular-intelligence + /vascular-age-calculator
 * All site pages link this file (except dashboard, admin, gift, redeem, success pages)
 *
 * Tokens, typography reset, nav, footer, shared utilities.
 * Page-specific layout CSS stays in each page's <style> block.
 */

/* ================================================================
   DESIGN TOKENS
   ================================================================ */
:root {
    /* Palette */
    --cream: #f9f5ef;
    --cream-d: #f0ebe1;
    --cream-dd: #e6ddd0;
    --forest: #2d5a3d;
    --forest-d: #1e3d2a;
    --forest-l: rgba(45, 90, 61, 0.08);
    --navy: #1a2b3c;
    --body: #3d4a5c;
    --muted: #7a8694; /* ADA: #7a8694 on white = ~4.3:1 contrast. Acceptable at 16px+ body text; MODERATE VIOLATION if used at < 14px. See known issues at bottom of file. */
    --border: #e0d8cc;
    --gold: #c8952a;
    --white: #ffffff;

    /* Typography */
    --serif: 'Cormorant Garamond', Georgia, serif;
    --sans: 'Inter', system-ui, -apple-system, sans-serif;

    /* Radius / shadow */
    --radius: 8px;
    --radius-lg: 16px;
    --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.06);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.10);
    --shadow-lg: 0 24px 64px rgba(30, 61, 42, 0.14);
}


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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.7;
    color: var(--body);
    background: var(--cream);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: inherit;
}


/* ================================================================
   TYPOGRAPHY — HEADINGS
   ================================================================ */
h1,
h2,
h3 {
    font-family: var(--serif);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--navy);
}

h4,
h5,
h6 {
    font-family: var(--sans);
    font-weight: 600;
    color: var(--navy);
}


/* ================================================================
   NAV — MINIMAL (logo + single CTA, as on reference pages)
   Used on pages with simple nav: <nav id="mainNav">
   ================================================================ */
#mainNav,
nav#mainNav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(249, 245, 239, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#mainNav.scrolled {
    border-color: var(--border);
    box-shadow: var(--shadow-sm);
}

.nav-in {
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: var(--serif);
    font-size: 20px;
    font-weight: 600;
    color: var(--navy);
    text-decoration: none;
    letter-spacing: 0.01em;
}

.logo span {
    color: var(--forest);
}

/* Single CTA button in minimal nav */
#mainNav .nav-cta {
    padding: 11px 26px;
    background: var(--forest);
    color: var(--white);
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
    white-space: nowrap;
}

#mainNav .nav-cta:hover {
    background: var(--forest-d);
    transform: translateY(-1px);
}


/* ================================================================
   NAV — FULL (multi-link, used on homepage / screening)
   <nav class="site-nav" id="siteNav">
   ================================================================ */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(249, 245, 239, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.site-nav.scrolled {
    border-color: var(--border);
    box-shadow: var(--shadow-sm);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--serif);
    font-size: 20px;
    font-weight: 600;
    color: var(--navy);
    text-decoration: none;
    letter-spacing: 0.01em;
}

.nav-logo span {
    color: var(--forest);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    font-size: 14px;
    font-weight: 500;
    color: var(--body);
    text-decoration: none;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--forest);
}

.nav-links .nav-cta,
.nav-links a.nav-cta {
    padding: 10px 24px;
    background: var(--forest);
    color: var(--white) !important;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s, transform 0.15s;
}

.nav-links .nav-cta:hover,
.nav-links a.nav-cta:hover {
    background: var(--forest-d);
    transform: translateY(-1px);
}

/* Mobile hamburger */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    gap: 5px;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--navy);
    border-radius: 2px;
    transition: 0.3s;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: calc(100% + 1px);
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--cream);
        border-bottom: 1px solid var(--border);
        padding: 20px 24px;
        gap: 16px;
        align-items: flex-start;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-inner {
        padding: 14px 24px;
        position: relative;
    }
}


/* ================================================================
   FOOTER
   ================================================================ */
.site-footer {
    background: var(--navy);
    color: var(--white);
    padding: 72px 0 40px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 48px;
}

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

.footer-brand-name {
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 600;
    color: var(--white);
    letter-spacing: 0.01em;
    margin-bottom: 14px;
}

.footer-brand-name span {
    color: var(--gold);
}

.footer-brand p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.65;
    max-width: 280px;
}

.footer-col h4 {
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 18px;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col ul li a {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    transition: color 0.2s;
}

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

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

.footer-copy {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.35);
}

.footer-legal {
    display: flex;
    gap: 24px;
}

.footer-legal a {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.35);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-legal a:hover {
    color: rgba(255, 255, 255, 0.7);
}

.footer-disclaimer {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
    line-height: 1.55;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 20px;
}

@media (max-width: 900px) {
    .footer-top {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

@media (max-width: 600px) {
    .footer-inner {
        padding: 0 24px;
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* ================================================================
   SHARED SECTION UTILITIES
   ================================================================ */
.section-inner,
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 48px;
}

@media (max-width: 768px) {

    .section-inner,
    .container {
        padding: 72px 24px;
    }

    .nav-in {
        padding: 14px 24px;
    }
}

/* Eyebrow label */
.eyebrow {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--forest);
    margin-bottom: 14px;
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 36px;
    background: var(--forest);
    color: var(--white);
    border-radius: var(--radius);
    font-family: var(--sans);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
    letter-spacing: 0.01em;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--forest-d);
    transform: translateY(-1px);
}

/* Generic CTA link-button (used on article/comparison page footers) */
.cta-button {
    display: inline-flex;
    align-items: center;
    padding: 14px 32px;
    background: var(--forest);
    color: var(--white);
    border-radius: var(--radius);
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    background: var(--forest-d);
    transform: translateY(-1px);
}

/* Section heading block */
.section-hd {
    margin-bottom: 56px;
}

.section-hd h2 {
    font-family: var(--serif);
    font-size: 44px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--navy);
    margin-bottom: 14px;
}

.section-hd p {
    font-size: 18px;
    color: var(--body);
    max-width: 620px;
    line-height: 1.7;
}

/* Divider */
hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 48px 0;
}

/* Scroll padding for fixed nav */
[id] {
    scroll-margin-top: 80px;
}

/* ===== ADA: Skip navigation link ===== */
.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.skip-link:focus {
    position: static;
    left: auto;
    width: auto;
    height: auto;
    overflow: visible;
    background: #1a2b3c;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    z-index: 9999;
    display: inline-block;
}

/* ===== ADA: Visible focus states (WCAG 2.1 AA) ===== */
:focus-visible {
    outline: 2px solid #4a7c59;
    outline-offset: 2px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid #4a7c59;
    outline-offset: 2px;
}

/* ADA: Color contrast known issues — moderate violations to review:
   - .muted color (#7a8694) on white/cream surfaces.
     Contrast ratio ~4.3:1. Acceptable at 16px+ but borderline at smaller sizes.
     TODO: audit all uses of .muted at font-size < 18px for WCAG AA compliance.
*/