/* ==========================================================================
   MS Certification — Design System
   Component layer that sits on top of the Tailwind CDN utilities.
   Brand palette:
     --primary   #002E5D  (navy)      --secondary #5BC2E7 (light blue)
     --accent    #A4CE4E  (lime)      --ink       #1D1D1B (charcoal)
     --surface   #F0F6FA  (blue-grey) --line      #D9E2E8 (border)
   ========================================================================== */

:root {
    --primary: #002E5D;
    --primary-700: #012a54;
    --primary-900: #001e3d;
    --secondary: #5BC2E7;
    --secondary-600: #34a9d4;
    --accent: #A4CE4E;
    --ink: #1D1D1B;
    --surface: #F0F6FA;
    --line: #D9E2E8;
    --shadow-sm: 0 1px 2px rgba(0, 46, 93, .06);
    --shadow-md: 0 8px 24px rgba(0, 46, 93, .08);
    --shadow-lg: 0 18px 40px rgba(0, 46, 93, .12);
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body {
    overflow-x: hidden;
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

::selection {
    background: var(--accent);
    color: var(--primary);
}

/* --------------------------------------------------------------------------
   Hero (home) gradient overlay
   -------------------------------------------------------------------------- */
.hero-gradient {
    background:
        linear-gradient(115deg, rgba(0, 30, 61, .92) 0%, rgba(0, 46, 93, .72) 45%, rgba(0, 46, 93, .25) 100%);
}

/* Subtle animated scroll cue used at the bottom of the hero */
.scroll-cue {
    animation: cueBounce 2s ease-in-out infinite;
}
@keyframes cueBounce {
    0%, 100% { transform: translateY(0); opacity: .8; }
    50%      { transform: translateY(8px); opacity: 1; }
}

/* --------------------------------------------------------------------------
   Interior page header — replaces the flat "bg-primary py-16" block.
   Deep navy with an organic radial glow + faint dotted texture.
   -------------------------------------------------------------------------- */
.page-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(120% 140% at 12% -10%, rgba(91, 194, 231, .28) 0%, rgba(91, 194, 231, 0) 42%),
        radial-gradient(90% 120% at 100% 120%, rgba(164, 206, 78, .22) 0%, rgba(164, 206, 78, 0) 46%),
        linear-gradient(180deg, var(--primary) 0%, var(--primary-900) 100%);
}
.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .10) 1px, transparent 1px);
    background-size: 22px 22px;
    -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .55), transparent 75%);
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, .55), transparent 75%);
    pointer-events: none;
}
.page-hero > * { position: relative; z-index: 1; }

/* Accent underline used under headings */
.rule-accent {
    width: 72px;
    height: 4px;
    border-radius: 9999px;
    background: linear-gradient(90deg, var(--accent), var(--secondary));
}

/* Section eyebrow label */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--secondary-600);
}
.eyebrow::before {
    content: "";
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
}
.eyebrow.eyebrow-center::before { display: none; }

/* --------------------------------------------------------------------------
   Breadcrumb
   -------------------------------------------------------------------------- */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem;
    font-size: 14px;
    font-weight: 500;
}
.breadcrumb a {
    color: rgba(255, 255, 255, .72);
    transition: color .2s;
}
.breadcrumb a:hover { color: #fff; }
.breadcrumb .sep {
    color: rgba(255, 255, 255, .40);
    font-size: 16px;
    line-height: 1;
}
.breadcrumb .current { color: var(--accent); font-weight: 600; }

/* Light breadcrumb (on white backgrounds) */
.breadcrumb-light a { color: #5b6b78; }
.breadcrumb-light a:hover { color: var(--primary); }
.breadcrumb-light .sep { color: #b7c3cc; }
.breadcrumb-light .current { color: var(--primary); }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    padding: .95rem 1.9rem;
    border-radius: .625rem;
    font-weight: 700;
    font-size: 15px;
    line-height: 1;
    letter-spacing: .01em;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
    border: 2px solid transparent;
    text-align: center;
}
.btn:active { transform: scale(.97); }
.btn .material-symbols-outlined { font-size: 20px; }

.btn-primary {
    background: var(--secondary);
    color: #fff;
    box-shadow: 0 6px 18px rgba(91, 194, 231, .35);
}
.btn-primary:hover {
    background: var(--secondary-600);
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(52, 169, 212, .40);
}
.btn-navy {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 6px 18px rgba(0, 46, 93, .28);
}
.btn-navy:hover {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(91, 194, 231, .38);
}
.btn-outline {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, .55);
}
.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}
.btn-ghost {
    background: #fff;
    color: var(--primary);
    border-color: var(--line);
}
.btn-ghost:hover {
    border-color: var(--secondary);
    color: var(--secondary-600);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Text link with sliding arrow */
.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-weight: 700;
    color: var(--secondary-600);
    transition: gap .2s ease, color .2s ease;
}
.link-arrow:hover { gap: .75rem; color: var(--primary); }

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.card-shadow {
    box-shadow: var(--shadow-sm);
    transition: box-shadow .28s ease, transform .28s ease, border-color .28s ease;
}
.card-shadow:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-6px);
    border-color: rgba(91, 194, 231, .55);
}

/* Feature card — icon tile + hover accent bar */
.feature-card {
    position: relative;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: .9rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .28s ease, transform .28s ease, border-color .28s ease;
}
.feature-card::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary), var(--accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .35s ease;
}
.feature-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-6px);
    border-color: rgba(91, 194, 231, .55);
}
.feature-card:hover::after { transform: scaleX(1); }

.icon-tile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: .85rem;
    background: linear-gradient(135deg, rgba(91, 194, 231, .18), rgba(164, 206, 78, .18));
    color: var(--secondary-600);
    transition: transform .3s ease;
}
.feature-card:hover .icon-tile { transform: scale(1.08) rotate(-3deg); }

/* Numbered process step */
.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    font-weight: 800;
    font-size: 18px;
    color: #fff;
    background: var(--primary);
    box-shadow: 0 6px 16px rgba(0, 46, 93, .25);
}

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}
.data-table thead tr {
    background: var(--primary);
    color: #fff;
}
.data-table thead th {
    padding: 1rem 1.25rem;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    white-space: nowrap;
}
.data-table tbody td { padding: 1rem 1.25rem; }
.data-table tbody tr {
    border-top: 1px solid var(--line);
    transition: background-color .18s ease;
}
.data-table tbody tr:nth-child(even) { background: #fafcfe; }
.data-table tbody tr:hover { background: var(--surface); }

/* Status pills */
.pill {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .38rem .8rem;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}
.pill-ok { background: rgba(164, 206, 78, .22); color: #3d6b0e; }
.pill-no { background: #fde2e2; color: #b91c1c; }
.pill .material-symbols-outlined { font-size: 16px; }

/* Search field for list pages */
.search-field {
    position: relative;
    max-width: 26rem;
}
.search-field .material-symbols-outlined {
    position: absolute;
    left: .9rem;
    top: 50%;
    transform: translateY(-50%);
    color: #8aa0af;
    pointer-events: none;
}
.search-field input {
    width: 100%;
    padding: .8rem 1rem .8rem 2.8rem;
    border: 1px solid var(--line);
    border-radius: .7rem;
    background: #fff;
    font-size: 15px;
    transition: border-color .2s, box-shadow .2s;
}
.search-field input:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(91, 194, 231, .25);
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.field-label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: .5rem;
}
.field-input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: .7rem;
    padding: .8rem 1rem;
    font-size: 15px;
    color: var(--ink);
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
}
.field-input::placeholder { color: #9aacb8; }
.field-input:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(91, 194, 231, .25);
}

/* --------------------------------------------------------------------------
   Rich text (news / legal content bodies)
   -------------------------------------------------------------------------- */
.prose-body h2 { font-size: 24px; line-height: 1.3; font-weight: 700; color: var(--primary); margin: 2rem 0 .75rem; }
.prose-body h3 { font-size: 20px; line-height: 1.35; font-weight: 700; color: var(--primary); margin: 1.6rem 0 .6rem; }
.prose-body p { margin-bottom: 1.1rem; }
.prose-body ul { list-style: disc; padding-left: 1.4rem; margin-bottom: 1.1rem; }
.prose-body ol { list-style: decimal; padding-left: 1.4rem; margin-bottom: 1.1rem; }
.prose-body li { margin-bottom: .4rem; }
.prose-body a { color: var(--secondary-600); text-decoration: underline; }
.prose-body a:hover { color: var(--primary); }
.prose-body strong { color: var(--primary); }
.prose-body blockquote {
    border-left: 4px solid var(--accent);
    background: var(--surface);
    padding: 1rem 1.25rem;
    border-radius: .5rem;
    margin: 1.5rem 0;
    font-style: italic;
}

/* --------------------------------------------------------------------------
   Scroll reveal — only hides content when JS is available (.js on <html>),
   so no-JS users always see everything and there is no flash of hidden content.
   -------------------------------------------------------------------------- */
.js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1);
    will-change: opacity, transform;
}
.js .reveal.is-visible {
    opacity: 1;
    transform: none;
}
.reveal-delay-1 { transition-delay: .08s; }
.reveal-delay-2 { transition-delay: .16s; }
.reveal-delay-3 { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
    .js .reveal { opacity: 1 !important; transform: none !important; transition: none; }
    .scroll-cue { animation: none; }
    html { scroll-behavior: auto; }
}

/* --------------------------------------------------------------------------
   Header scroll state
   -------------------------------------------------------------------------- */
header.is-scrolled {
    box-shadow: 0 6px 22px rgba(0, 46, 93, .10);
}
