/* ============================================================
   MyCDLPractice - redesign.css  (v3 visual layer)
   Loaded AFTER main.css. Everything here is an override or an
   addition, so removing the <link> reverts to the old look.

   Direction: "transportation signage" — Oswald condensed display
   type (highway-sign energy), Barlow body (humanist, signage
   heritage, very legible for ESL + mobile), deep navy + gold,
   with depth and a restrained hazard-stripe accent motif.
   ============================================================ */

/* --- Tokens (override) --- */
:root {
    --primary: #0B2545;
    --primary-hover: #15375f;
    --primary-deep: #071a33;       /* hero / dark sections */
    --primary-deepest: #050f1f;
    --accent: #E0A43B;             /* slightly brighter, warmer gold */
    --accent-hover: #f0b653;
    --accent-ink: #2a1c05;

    --ink: #111a27;
    --ink-muted: #586273;
    --ink-soft: #8b93a0;

    --bg: #F6F5F1;
    --bg-card: #FFFFFF;
    --bg-soft: #EDEBE4;

    --border: #E1DED4;
    --border-strong: #C6C2B5;

    --radius-sm: 5px;
    --radius: 10px;
    --radius-lg: 18px;

    --shadow-sm: 0 1px 2px rgba(7, 26, 51, .06), 0 2px 6px rgba(7, 26, 51, .05);
    --shadow-md: 0 4px 14px rgba(7, 26, 51, .08), 0 10px 30px rgba(7, 26, 51, .07);
    --shadow-lg: 0 18px 50px rgba(7, 26, 51, .16);

    --font: "Barlow", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-display: "Oswald", var(--font);
}

/* --- Base type --- */
body {
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.6;
    color: var(--ink);
    background:
        radial-gradient(1200px 500px at 100% -200px, rgba(11,37,69,.05), transparent 60%),
        var(--bg);
}

h1, h2, h3, h4, .section-head h2, .hero h1 {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.08;
    color: var(--ink);
}
h1 { font-weight: 700; }

/* A reusable "signage label" look for eyebrows / small caps */
.hero-eyebrow,
.promo-tag,
.endorsement-meta,
.stat span,
.instructor-note-tag {
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 0.13em;
    font-weight: 500;
}

/* --- Hazard-stripe accent (used as thin decorative dividers) --- */
.stripe-accent,
.hero::after {
    background-image: repeating-linear-gradient(
        -45deg,
        var(--accent) 0 14px,
        var(--primary-deep) 14px 28px
    );
}

/* --- Header --- */
.site-header {
    background: rgba(255, 255, 255, .9);
    backdrop-filter: saturate(140%) blur(8px);
    -webkit-backdrop-filter: saturate(140%) blur(8px);
    border-bottom: 1px solid var(--border);
}
.brand-text { font-family: var(--font-display); font-weight: 600; letter-spacing: .01em; }
.brand-mark { color: var(--accent); }
.nav-menu li a {
    font-weight: 500;
    color: var(--ink-muted);
}
.nav-menu li a:hover { color: var(--primary); }

/* --- Buttons --- */
.btn {
    font-family: var(--font-display);
    font-weight: 500;
    letter-spacing: .03em;
    text-transform: uppercase;
    border-radius: var(--radius);
    transition: transform .12s ease, box-shadow .15s ease, background .15s ease;
}
.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); color:#fff; }
.btn-accent {
    background: var(--accent);
    color: var(--accent-ink);
    box-shadow: var(--shadow-sm);
}
.btn-accent:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); color: var(--accent-ink); }
.btn-ghost {
    background: transparent;
    border: 1.5px solid var(--border-strong);
    color: var(--ink);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

/* --- HERO (dark, signage) --- */
.hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(900px 400px at 85% -120px, rgba(224,164,59,.18), transparent 60%),
        linear-gradient(160deg, var(--primary-deep), var(--primary-deepest));
    color: #eaf0f7;
    padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(2.5rem, 6vw, 4rem);
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(700px 360px at 30% 20%, #000, transparent 80%);
    -webkit-mask-image: radial-gradient(700px 360px at 30% 20%, #000, transparent 80%);
    pointer-events: none;
}
.hero::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 6px;
}
.hero .container { position: relative; z-index: 1; }
.hero-eyebrow {
    display: inline-block;
    color: var(--accent);
    border: 1px solid rgba(224,164,59,.4);
    background: rgba(224,164,59,.08);
    padding: .35rem .7rem;
    border-radius: 999px;
    font-size: .8rem;
    margin-bottom: 1.1rem;
}
.hero h1 {
    color: #fff;
    font-size: clamp(2.3rem, 6.5vw, 4rem);
    margin-bottom: .6rem;
}
.hero h1 .accent { color: var(--accent); }
.hero-sub {
    color: #b9c6d6;
    font-size: clamp(1.05rem, 2.4vw, 1.3rem);
    max-width: 34ch;
}
.hero-cta { margin-top: 1.6rem; }
.hero-stats { margin-top: 2.2rem; gap: 2.2rem; }
.hero-stats .stat strong {
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 4vw, 2.3rem);
    color: #fff;
    font-weight: 600;
}
.hero-stats .stat span { color: #8fa1b6; font-size: .72rem; }

/* page-level mini heroes (hub, endorsement) keep light treatment */
.hero.hero--light {
    background: var(--bg);
    color: var(--ink);
}

/* --- Section headings --- */
.section-head h2 {
    font-size: clamp(1.7rem, 4vw, 2.4rem);
    position: relative;
    display: inline-block;
}
.section-head h2::after {
    content: "";
    display: block;
    width: 48px; height: 4px;
    margin-top: .55rem;
    border-radius: 2px;
    background: var(--accent);
}
.section-head p { color: var(--ink-muted); }

/* --- Endorsement cards --- */
.endorsement-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    transition: transform .14s ease, box-shadow .16s ease, border-color .16s ease;
}
.endorsement-card::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: var(--accent);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform .18s ease;
}
.endorsement-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-strong);
}
.endorsement-card:hover::before { transform: scaleY(1); }
.endorsement-icon { color: var(--primary); }
.endorsement-card:hover .endorsement-icon { color: var(--accent); }
.endorsement-card h3 { font-weight: 600; }
.endorsement-meta { color: var(--ink-soft); font-size: .72rem; }
.endorsement-arrow { color: var(--ink-soft); transition: transform .15s ease, color .15s ease; }
.endorsement-card:hover .endorsement-arrow { color: var(--accent); transform: translateX(3px); }

/* --- How-it-works --- */
.howto li h3 { font-weight: 600; }

/* --- FAQ --- */
.faq-list details {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.faq-list summary { font-family: var(--font-display); font-weight: 500; }

/* --- Cross-promo --- */
.promo-card {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform .14s ease, box-shadow .16s ease;
}
.promo-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.promo-cta { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .05em; }

/* --- Author / instructor blocks polish --- */
.instructor-note { box-shadow: var(--shadow-sm); border-radius: var(--radius); }
.instructor-note-lead { font-family: var(--font); }

/* ============================================================
   CDL-NEEDS TOOL  (/which-cdl-do-i-need)
   ============================================================ */
.tool-hero {
    background: linear-gradient(160deg, var(--primary-deep), var(--primary-deepest));
    color: #eaf0f7;
    padding: clamp(2.5rem, 6vw, 3.5rem) 0 clamp(2rem, 5vw, 3rem);
}
.tool-hero h1 { color: #fff; font-size: clamp(2rem, 5.5vw, 3rem); }
.tool-hero p { color: #b9c6d6; max-width: 52ch; }

.tool-shell {
    max-width: 720px;
    margin: -2.5rem auto 0;
    position: relative;
    z-index: 2;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: clamp(1.4rem, 4vw, 2.4rem);
}
.tool-step-label {
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: .76rem;
    color: var(--accent);
    font-weight: 500;
}
.tool-question {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.4rem, 3.5vw, 1.9rem);
    margin: .35rem 0 1.3rem;
    color: var(--ink);
}
.tool-options { display: grid; gap: .7rem; }
.tool-option {
    display: flex; align-items: center; gap: .85rem;
    width: 100%;
    text-align: left;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    font-size: 1.02rem;
    font-weight: 500;
    color: var(--ink);
    transition: border-color .14s ease, background .14s ease, transform .12s ease;
}
.tool-option:hover { border-color: var(--accent); transform: translateY(-1px); }
.tool-option.is-selected { border-color: var(--accent); background: rgba(224,164,59,.1); }
.tool-option .opt-mark {
    flex: 0 0 auto;
    width: 30px; height: 30px;
    border-radius: 8px;
    display: grid; place-items: center;
    background: var(--primary-soft, #E8EEF5);
    color: var(--primary);
}
.tool-option:hover .opt-mark,
.tool-option.is-selected .opt-mark { background: var(--accent); color: var(--accent-ink); }
.opt-sub { display:block; font-size:.82rem; font-weight:400; color: var(--ink-muted); margin-top: .12rem; }

.tool-actions { display: flex; gap: .6rem; margin-top: 1.5rem; flex-wrap: wrap; }
.tool-actions .btn { flex: 0 0 auto; }
.tool-progress {
    display: flex; gap: 6px; margin-bottom: 1.4rem;
}
.tool-progress span {
    height: 5px; flex: 1; border-radius: 3px; background: var(--border);
}
.tool-progress span.is-done { background: var(--accent); }

/* Result */
.tool-result-class {
    display: inline-flex; align-items: baseline; gap: .5rem;
    font-family: var(--font-display); font-weight: 700;
    font-size: clamp(2rem, 6vw, 3rem);
    color: var(--primary);
}
.tool-result-class .cls-badge {
    background: var(--accent); color: var(--accent-ink);
    border-radius: 8px; padding: .1rem .55rem; font-size: .8em;
}
.tool-block { margin-top: 1.6rem; }
.tool-block h3 {
    font-family: var(--font-display); text-transform: uppercase;
    letter-spacing: .08em; font-size: .85rem; color: var(--ink-muted);
    margin-bottom: .7rem;
}
.tool-test-list { display: grid; gap: .5rem; }
.tool-test-link {
    display: flex; align-items: center; justify-content: space-between;
    padding: .85rem 1rem;
    border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--bg-card); color: var(--ink); font-weight: 600;
    box-shadow: var(--shadow-sm);
    transition: border-color .14s ease, transform .12s ease;
}
.tool-test-link:hover { border-color: var(--accent); transform: translateX(2px); color: var(--ink); }
.tool-test-link .order-num {
    font-family: var(--font-display); color: var(--accent); font-weight: 600;
    margin-right: .7rem;
}
.tool-test-link.is-endorsement { background: var(--bg-soft); }
.tool-note {
    border-left: 4px solid var(--accent);
    background: var(--bg-soft);
    padding: .85rem 1.1rem; border-radius: 0 var(--radius) var(--radius) 0;
    font-size: .95rem; color: var(--ink); margin-top: .6rem;
}

/* --- Homepage tool CTA banner --- */
.tool-cta {
    position: relative; overflow: hidden;
    background: linear-gradient(150deg, var(--primary), var(--primary-deep));
    color: #fff;
    border-radius: var(--radius-lg);
    padding: clamp(1.6rem, 5vw, 2.6rem);
    display: flex; align-items: center; justify-content: space-between;
    gap: 1.5rem; flex-wrap: wrap;
    box-shadow: var(--shadow-md);
}
.tool-cta::after {
    content: ""; position: absolute; right: -40px; bottom: -40px;
    width: 200px; height: 200px; border-radius: 50%;
    background: radial-gradient(circle, rgba(224,164,59,.25), transparent 70%);
    pointer-events: none;
}
.tool-cta-text { position: relative; z-index: 1; max-width: 40ch; }
.tool-cta-text h2 { color: #fff; }
.tool-cta-text p { color: #c4d0de; margin: .4rem 0 0; }
.tool-cta .btn { position: relative; z-index: 1; }

/* --- Staggered hero reveal (one orchestrated load) --- */
@media (prefers-reduced-motion: no-preference) {
    .hero .hero-eyebrow,
    .hero h1,
    .hero-sub,
    .hero-cta,
    .hero-stats { animation: rise .6s cubic-bezier(.2,.7,.2,1) backwards; }
    .hero h1 { animation-delay: .06s; }
    .hero-sub { animation-delay: .14s; }
    .hero-cta { animation-delay: .22s; }
    .hero-stats { animation-delay: .3s; }
    @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}

@media (max-width: 600px) {
    .tool-cta { flex-direction: column; align-items: flex-start; }
}

/* --- Instagram-style "stories" quick-start strip (homepage) --- */
.stories-eyebrow {
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: .76rem;
    font-weight: 500;
    color: var(--ink-soft);
    margin-bottom: .65rem;
}
.stories {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: .2rem .1rem .6rem;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.stories::-webkit-scrollbar { display: none; }
.story {
    flex: 0 0 auto;
    width: 74px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .45rem;
    scroll-snap-align: start;
    text-decoration: none;
}
.story-ring {
    width: 66px; height: 66px;
    border-radius: 50%;
    padding: 3px;
    background: conic-gradient(from 140deg, var(--accent), var(--primary) 55%, var(--accent));
    display: grid; place-items: center;
    transition: transform .14s ease, filter .14s ease;
}
.story:hover .story-ring { transform: scale(1.06); filter: brightness(1.05); }
.story-inner {
    width: 100%; height: 100%;
    border-radius: 50%;
    background: var(--bg-card);
    display: grid; place-items: center;
    color: var(--primary);
}
.story-inner svg { width: 30px; height: 30px; }
.story:hover .story-inner { color: var(--accent); }
.story-label {
    font-size: .72rem;
    line-height: 1.15;
    text-align: center;
    color: var(--ink-muted);
    max-width: 74px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- Nav layout fix: keep language toggle always visible (incl. mobile) --- */
.primary-nav { gap: .85rem; }
.nav-menu { gap: 1.4rem; }
.lang-toggle { flex: 0 0 auto; }
@media (max-width: 767px) {
    .lang-toggle { order: 1; }          /* sit just left of the hamburger */
    .nav-toggle { order: 2; }
}

/* --- Hero ghost button: white text on the dark hero (was dark-on-dark) --- */
.hero .btn-ghost {
    color: #fff;
    border-color: rgba(255, 255, 255, .5);
}
.hero .btn-ghost:hover {
    color: #fff;
    border-color: #fff;
    background: rgba(255, 255, 255, .08);
}