/* ============================================================
   styles-v2.css — Hongdu Advisory Design System v2
   DM Serif Display · Montserrat · Open Sans
   Palette: Navy #0f1c2e · Gold #f4b41a · Off-white #f4f7f9
   ============================================================ */

/* ─── RESET & ROOT ─────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

:root {
    --navy:      #0f1c2e;
    --navy2:     #1a2b3c;
    --gold:      #f4b41a;
    --gold-dark: #e5a800;
    --off:       #f4f7f9;
    --rule:      #e1e8ed;
    --muted:     #6b7280;
    --white:     #ffffff;
    --serif:     'DM Serif Display', Georgia, serif;
    --sans:      'Montserrat', sans-serif;
    --body:      'Open Sans', sans-serif;
    --red:       #d9534f;
}

body {
    font-family: var(--body);
    color: #333;
    line-height: 1.6;
    padding-top: 70px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

/* ─── TYPOGRAPHY ────────────────────────────────────────────── */
/* v2 uses DM Serif for headings — no uppercase transform */
h1, h2, h3 {
    font-family: var(--serif);
    font-weight: 400;
    text-transform: none;
    line-height: 1.18;
    letter-spacing: -0.01em;
}
h4, h5, h6 {
    font-family: var(--sans);
    font-weight: 700;
    text-transform: none;
    line-height: 1.3;
}
p { line-height: 1.78; }
a { color: inherit; }
strong { font-weight: 700; }

/* ─── LAYOUT HELPERS ────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 60px; }
section { padding: 80px 0; }

/* ─── SCROLL REVEAL ─────────────────────────────────────────── */
.reveal   { opacity: 0; transform: translateY(22px);  transition: opacity .6s ease, transform .6s ease; }
.reveal-l { opacity: 0; transform: translateX(-26px); transition: opacity .6s ease, transform .6s ease; }
.reveal-r { opacity: 0; transform: translateX(26px);  transition: opacity .6s ease, transform .6s ease; }
.reveal.in, .reveal-l.in, .reveal-r.in { opacity: 1; transform: none; }
.d1 { transition-delay: .1s; }
.d2 { transition-delay: .2s; }
.d3 { transition-delay: .3s; }
.d4 { transition-delay: .4s; }

/* ─── EYEBROW LABEL ─────────────────────────────────────────── */
.eyebrow {
    font-family: var(--sans);
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--gold);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.eyebrow::before { content: ''; width: 18px; height: 2px; background: var(--gold); flex-shrink: 0; }
.eyebrow.light { color: rgba(244,180,26,.65); }
.eyebrow.light::before { background: rgba(244,180,26,.65); }

/* ─── NAVIGATION ────────────────────────────────────────────── */
header {
    background: var(--navy);
    padding: 15px 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 2px solid var(--gold);
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    display: flex;
    align-items: center;
    color: var(--white);
    font-family: var(--sans);
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: 1px;
    text-decoration: none;
}
.logo span { color: var(--gold); }
.logo img { height: 40px; width: auto; max-width: 200px; }

.nav-links { display: flex; align-items: center; gap: 25px; }
.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-family: var(--sans);
    font-weight: 600;
    font-size: .8rem;
    transition: color .25s;
}
.nav-links a:hover { color: var(--gold); }

/* Active page highlight */
.nav-links a.active-page,
.nav-links .dropbtn.active-page { color: var(--gold) !important; }
.nav-links a.active-page::after {
    content: '';
    display: block;
    width: 100%;
    height: 2px;
    background: var(--gold);
    margin-top: 3px;
}

/* CTA button in nav */
.btn-sm {
    background: var(--gold);
    color: var(--navy) !important;
    padding: 8px 16px;
    font-family: var(--sans);
    font-weight: 700;
    font-size: .75rem;
    text-decoration: none;
    transition: background .2s, transform .2s;
}
.btn-sm:hover { background: var(--gold-dark); transform: translateY(-2px); }
.nav-links a.btn-sm.active-page {
    background: transparent;
    color: var(--gold) !important;
    border: 2px solid var(--gold);
    padding: 6px 14px;
}
.nav-links a.btn-sm.active-page:hover { background: var(--gold); color: var(--navy) !important; }

/* Hamburger toggle */
.menu-toggle { display: none; color: var(--white); font-size: 1.5rem; cursor: pointer; padding: 5px; }

/* ─── DROPDOWN ──────────────────────────────────────────────── */
.dropdown { position: relative; display: inline-block; }
.dropbtn {
    background: none;
    border: none;
    color: var(--white);
    font-family: var(--sans);
    font-weight: 600;
    font-size: .8rem;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 5px;
}
.dropbtn:hover { color: var(--gold); }
.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    padding-top: 10px;  /* visual gap filled with invisible padding — no hover dead zone */
    background: transparent;
    min-width: 220px;
    z-index: 1001;
}
.dropdown-content::before {
    content: '';
    display: block;
    position: absolute;
    top: 10px; left: 0; right: 0; bottom: 0;
    background: var(--navy);
    border: 1px solid var(--gold);
    box-shadow: 0 8px 24px rgba(0,0,0,.25);
    z-index: -1;
}
.dropdown-content a {
    display: block;
    color: var(--white) !important;
    padding: 12px 16px;
    font-family: var(--sans);
    font-size: .85rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(255,255,255,.08);
    transition: background .2s, color .2s;
}
.dropdown-content a:last-child { border-bottom: none; }
.dropdown-content a:hover { background: var(--navy2); color: var(--gold) !important; }

/* ─── FOOTER ────────────────────────────────────────────────── */
footer {
    background: var(--navy);
    color: rgba(255,255,255,.45);
    font-family: var(--sans);
    font-size: .82rem;
}

/* footer.js renders a 3-col grid inside footer */
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 56px 60px 40px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 48px;
}
.footer-brand .footer-logo {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--white);
    text-decoration: none;
    display: inline-block;
    margin-bottom: 14px;
}
.footer-brand .footer-logo span { color: var(--gold); }
.footer-brand p { font-size: .84rem; line-height: 1.75; color: rgba(255,255,255,.45); max-width: 300px; }
.footer-col h5 {
    font-family: var(--sans);
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--gold);
    margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a {
    color: rgba(255,255,255,.45);
    text-decoration: none;
    font-size: .84rem;
    transition: color .2s;
}
.footer-col ul li a:hover { color: var(--gold); }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social a {
    width: 34px;
    height: 34px;
    background: rgba(255,255,255,.07);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.5);
    text-decoration: none;
    font-size: .9rem;
    transition: background .2s, color .2s;
}
.footer-social a:hover { background: var(--gold); color: var(--navy); }
.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 60px;
    border-top: 1px solid rgba(255,255,255,.07);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .78rem;
    color: rgba(255,255,255,.3);
    flex-wrap: wrap;
    gap: 8px;
}
.footer-bottom a { color: rgba(255,255,255,.3); text-decoration: none; }
.footer-bottom a:hover { color: var(--gold); }

/* ─── HERO (shared base for all v2 pages) ───────────────────── */
.pg-hero {
    background:
        linear-gradient(170deg, rgba(15,28,46,.97) 0%, rgba(15,28,46,.87) 100%),
        url('../img/hero-bg.avif') center / cover no-repeat;
    padding: 110px 0 90px;
    position: relative;
    overflow: hidden;
}
.pg-hero::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 5px;
    background: var(--gold);
}
.pg-hero-wm {
    position: absolute;
    right: -40px;
    bottom: -60px;
    font-family: var(--serif);
    font-size: clamp(16rem, 28vw, 26rem);
    color: rgba(244,180,26,.035);
    line-height: 1;
    pointer-events: none;
    user-select: none;
}
.pg-hero h1 {
    font-family: var(--serif);
    font-size: clamp(2.4rem, 4.5vw, 4rem);
    font-weight: 400;
    color: var(--white);
    text-transform: none;
    line-height: 1.1;
    letter-spacing: -.01em;
    margin-bottom: 24px;
}
.pg-hero-sub {
    font-size: 1rem;
    line-height: 1.82;
    color: rgba(255,255,255,.65);
    max-width: 580px;
}

/* ─── SECTION HEADING ───────────────────────────────────────── */
.pg-h {
    font-family: var(--serif);
    font-size: clamp(1.7rem, 2.4vw, 2.4rem);
    font-weight: 400;
    color: var(--navy);
    text-transform: none;
    line-height: 1.2;
    letter-spacing: -.01em;
    margin-bottom: 28px;
}
.pg-h.light { color: var(--white); }

/* Section header two-col layout */
.section-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: end;
    margin-bottom: 60px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--rule);
}
.section-header p { color: var(--muted); font-size: .95rem; line-height: 1.78; }

/* ─── BUTTONS ───────────────────────────────────────────────── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--navy);
    color: var(--white);
    text-decoration: none;
    padding: 15px 34px;
    font-family: var(--sans);
    font-weight: 700;
    font-size: .83rem;
    letter-spacing: .04em;
    border: none;
    cursor: pointer;
    transition: background .2s, transform .2s;
}
.btn-primary:hover { background: var(--navy2); transform: translateY(-2px); }

.btn-gold {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--gold);
    color: var(--navy);
    text-decoration: none;
    padding: 15px 34px;
    font-family: var(--sans);
    font-weight: 700;
    font-size: .83rem;
    letter-spacing: .04em;
    border: none;
    cursor: pointer;
    transition: background .2s, transform .2s;
}
.btn-gold:hover { background: var(--gold-dark); transform: translateY(-2px); }

.btn-outline-white {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    color: var(--white);
    text-decoration: none;
    padding: 13px 34px;
    font-family: var(--sans);
    font-weight: 700;
    font-size: .83rem;
    letter-spacing: .04em;
    border: 2px solid rgba(255,255,255,.45);
    cursor: pointer;
    transition: border-color .2s, background .2s;
}
.btn-outline-white:hover { border-color: var(--white); background: rgba(255,255,255,.07); }

/* ─── GOLD CTA BAND ─────────────────────────────────────────── */
.gold-cta { background: var(--gold); padding: 80px 0; text-align: center; }
.gold-cta h2 {
    font-family: var(--serif);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 400;
    color: var(--navy);
    text-transform: none;
    letter-spacing: -.01em;
    margin-bottom: 14px;
}
.gold-cta p { color: rgba(15,28,46,.7); font-size: .97rem; margin-bottom: 28px; }

/* ─── DARK BAND UTILITY ─────────────────────────────────────── */
.dark-band { background: var(--navy); color: var(--white); padding: 80px 0; }

/* ─── CARD GRID UTILITIES ───────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 28px; }
.grid-2-tight { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.grid-3-tight { display: grid; grid-template-columns: repeat(3,1fr); gap: 2px; }
.grid-4-tight { display: grid; grid-template-columns: repeat(4,1fr); gap: 2px; }

/* ─── STANDARD CARD ─────────────────────────────────────────── */
.v2-card {
    background: var(--off);
    padding: 36px;
    border-top: 4px solid transparent;
    transition: border-top-color .25s, box-shadow .25s, background .25s;
}
.v2-card:hover {
    border-top-color: var(--gold);
    box-shadow: 0 10px 32px rgba(0,0,0,.07);
    background: var(--white);
}
.v2-card h3, .v2-card h4 { color: var(--navy); margin-bottom: 10px; }
.v2-card p { font-size: .9rem; color: #555; line-height: 1.78; }

/* Dark card */
.v2-card-dark {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.07);
    padding: 32px;
    border-top: 3px solid rgba(244,180,26,.3);
    transition: border-top-color .25s, background .25s;
}
.v2-card-dark:hover { border-top-color: var(--gold); background: rgba(255,255,255,.07); }
.v2-card-dark h4 { font-family: var(--sans); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--white); margin-bottom: 10px; }
.v2-card-dark p { font-size: .84rem; color: rgba(255,255,255,.5); line-height: 1.7; }

/* ─── ARROW LIST ────────────────────────────────────────────── */
.arrow-list { list-style: none; }
.arrow-list li {
    font-size: .88rem;
    color: #555;
    padding: 7px 0;
    border-bottom: 1px solid var(--rule);
    display: flex;
    align-items: baseline;
    gap: 10px;
    line-height: 1.55;
}
.arrow-list li:last-child { border-bottom: none; }
.arrow-list li::before { content: '→'; color: var(--gold); font-weight: 700; flex-shrink: 0; font-size: .8rem; }

/* Dark variant */
.arrow-list.dark li { color: rgba(255,255,255,.55); border-bottom-color: rgba(255,255,255,.07); }
.arrow-list.dark li::before { color: var(--gold); }

/* Tick variant */
.tick-list { list-style: none; }
.tick-list li {
    font-size: .84rem;
    color: rgba(255,255,255,.6);
    padding: 4px 0;
    display: flex;
    gap: 9px;
    line-height: 1.5;
}
.tick-list li::before { content: '✓'; color: var(--gold); font-size: .78rem; flex-shrink: 0; margin-top: 1px; }

/* ─── OUTCOME / DARK FOOTER INSIDE CARD ────────────────────── */
.card-outcome {
    margin-top: 20px;
    padding: 16px;
    background: var(--navy);
    border-left: 3px solid var(--gold);
}
.card-outcome .out-label {
    font-family: var(--sans);
    font-size: .66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--gold);
    margin-bottom: 8px;
}

/* ─── FAQ ROWS ──────────────────────────────────────────────── */
.faq-list { border: 1px solid var(--rule); }
.faq-row {
    background: var(--white);
    border-bottom: 1px solid var(--rule);
    padding: 28px 32px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: start;
}
.faq-row:last-child { border-bottom: none; }
.faq-row h4 { font-family: var(--sans); font-size: .85rem; font-weight: 700; color: var(--navy); margin-bottom: 10px; text-transform: none; }
.faq-row p { font-size: .88rem; color: var(--muted); line-height: 1.75; }
.faq-tick {
    width: 28px; height: 28px;
    background: rgba(244,180,26,.12);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; margin-top: 2px;
}
.faq-tick i { color: var(--gold); font-size: .8rem; }

/* ─── CROSS-LINK BAND ───────────────────────────────────────── */
.crosslink { background: var(--navy2); padding: 44px 0; }
.crosslink-inner {
    max-width: 1200px; margin: 0 auto; padding: 0 60px;
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 24px;
}
.crosslink-inner p { font-family: var(--sans); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: #aaa; margin-bottom: 6px; }
.crosslink-inner h4 { font-family: var(--serif); font-size: 1.1rem; font-weight: 400; color: var(--white); text-transform: none; }
.crosslink-inner a {
    display: inline-flex; align-items: center; gap: 10px;
    background: var(--gold); color: var(--navy);
    text-decoration: none; padding: 12px 24px;
    font-family: var(--sans); font-weight: 700; font-size: .78rem;
    letter-spacing: .04em; white-space: nowrap; transition: background .2s;
}
.crosslink-inner a:hover { background: var(--gold-dark); }

/* ─── FORM ELEMENTS ─────────────────────────────────────────── */
label {
    display: block;
    font-family: var(--sans);
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--navy);
    margin-bottom: 6px;
}
input, select, textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--rule);
    background: var(--white);
    font-size: .93rem;
    font-family: var(--body);
    color: var(--navy);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    -webkit-appearance: none;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(244,180,26,.15);
}

/* ─── COMPARISON TABLE ──────────────────────────────────────── */
.matrix-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 560px; }
thead th {
    background: var(--navy);
    color: var(--white);
    font-family: var(--sans);
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: 14px 18px;
    text-align: left;
    white-space: nowrap;
}
thead th:first-child { color: rgba(255,255,255,.45); }
tbody tr { border-bottom: 1px solid var(--rule); }
tbody tr:nth-child(even) { background: var(--off); }
td { padding: 14px 18px; color: #444; vertical-align: middle; line-height: 1.55; font-size: .85rem; }
td:first-child {
    font-family: var(--sans);
    font-weight: 700;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--navy);
    white-space: nowrap;
}

/* ─── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .container, .nav-container, .footer-inner, .footer-bottom, .crosslink-inner { padding-left: 40px; padding-right: 40px; }
}

@media (max-width: 768px) {
    body { padding-top: 70px; }

    .container { padding: 0 20px; }
    .nav-container { padding: 0 20px; }
    section { padding: 56px 0; }

    /* NAV MOBILE */
    .menu-toggle { display: block !important; }
    .nav-links {
        position: absolute;
        top: 70px;
        right: -100%;
        width: 100%;
        background: var(--navy);
        flex-direction: column;
        align-items: center;
        padding: 8px 0 24px;
        transition: right .4s ease;
        z-index: 999;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        max-height: calc(100dvh - 70px);
    }
    .nav-links.active { right: 0; }
    .nav-links a {
        font-size: 1rem;
        width: 100%;
        text-align: center;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255,255,255,.08);
        line-height: 1;
    }
    .nav-links a.btn-sm {
        width: 85%;
        margin: 8px 0;
        border-radius: 3px;
        padding: 12px 20px;
    }
    .nav-links a.active-page::after { display: none; }

    /* DROPDOWN MOBILE — hidden by default, .open toggles it */
    .dropdown-content {
        position: static;
        display: none;
        border: none;
        background: rgba(0,0,0,.2);
        width: 100%;
        box-shadow: none;
    }
    .dropdown-content.open {
        display: block;
    }

    /* FOOTER MOBILE */
    .footer-inner { grid-template-columns: 1fr; gap: 32px; padding: 40px 20px; }
    .footer-bottom { flex-direction: column; text-align: center; padding: 16px 20px; }

    /* GRIDS COLLAPSE */
    .grid-2, .grid-3, .grid-4,
    .grid-2-tight, .grid-3-tight, .grid-4-tight,
    .section-header { grid-template-columns: 1fr; gap: 24px; }

    .crosslink-inner { flex-direction: column; padding: 0 20px; }
    .faq-row { grid-template-columns: 1fr; }
    .faq-tick { display: none; }

    .pg-hero { padding: 80px 0 60px; }
    .pg-hero h1 { font-size: clamp(2rem, 7vw, 2.8rem); }
    .gold-cta { padding: 56px 24px; }

    /* LOGO MOBILE */
    .logo img { height: 32px; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .pg-h { font-size: 1.5rem; }
}

/* ─── DROPDOWN STATE ────────────────────────────────────────── */
/* JS adds/removes .open — this is the single source of truth   */
.dropdown-content.open { display: block; }

/* Desktop :hover also works for mouse users (non-touch) */
@media (hover: hover) and (pointer: fine) {
    .dropdown:hover .dropdown-content { display: block; }
}

/* Caret transition */
.dropbtn i { transition: transform .2s; display: inline-block; }

/* Ensure dropbtn visually matches nav links */
.dropbtn {
    font-family: var(--sans);
    font-weight: 600;
    font-size: .8rem;
    color: var(--white);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 5px;
    letter-spacing: normal;
    text-transform: none;
}
.dropbtn:hover, .dropbtn.active-page { color: var(--gold); }

/* Mobile: dropdown sits inline, always visible when nav is open */
@media (max-width: 768px) {
    .dropdown { width: 100%; }
    .dropbtn {
        width: 100%;
        justify-content: center;
        font-size: 1rem;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255,255,255,.08);
    }
    /* Mobile: hidden by default, .open class shows it */
    .dropdown-content {
        position: static;
        display: none;
        border: none;
        background: rgba(0,0,0,.2);
        width: 100%;
        box-shadow: none;
        border-top: none;
    }
    .dropdown-content.open {
        display: block;
    }
    .dropdown-content a {
        font-size: .9rem;
        padding: 9px 0;
        text-align: center;
    }
}
