/*
 * K Global Sourcing / Care Direct shared design system.
 * Loaded by every page, after the Tailwind CDN config. Tailwind handles layout utilities;
 * this file holds brand components (buttons, cards, forms, nav, footer, hero, steps, FAQ).
 *
 * Palette: navy #0A192F, teal #2F6F6B (text on light), soft teal #7FB8B2 (on navy),
 * mist #EEF5F4, warm sand #F7F2EB, clay #C9825B (decorative warm accent only, not for text).
 * Type: Fraunces (display headings) + Plus Jakarta Sans (UI and body).
 */
:root {
    --navy: #0A192F;
    --navy-2: #10263F;
    --navy-3: #173352;
    --teal: #2F6F6B;
    --teal-dk: #255A57;
    --teal-soft: #7FB8B2;
    --teal-200: #CFE3E0;
    --mist: #EEF5F4;
    --sand: #F7F2EB;
    --sand-2: #EFE6DA;
    --clay: #C9825B;
    --clay-dk: #9A5530;
    --ink: #1C2733;
    --muted: #5A6573;
    --line: #E3E8EC;
    --radius: 1.75rem;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --shadow-soft: 0 1px 2px rgba(10, 25, 47, 0.04), 0 12px 32px -12px rgba(10, 25, 47, 0.14);
    --shadow-lift: 0 2px 4px rgba(10, 25, 47, 0.05), 0 24px 48px -18px rgba(10, 25, 47, 0.28);
}

html { -webkit-text-size-adjust: 100%; }
body {
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    color: var(--ink);
    background: #FFFFFF;
    line-height: 1.65;
    text-rendering: optimizeLegibility;
}
.font-display, h1, h2, .h-display {
    font-family: 'Fraunces', Georgia, serif;
    font-optical-sizing: auto;
    font-variation-settings: 'SOFT' 50;
    letter-spacing: -0.015em;
}
h3, h4, h5, h6 { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; }
::selection { background: var(--teal-200); color: var(--navy); }

section[id], [id$="-form"], #opportunities, #request-care { scroll-margin-top: 6rem; }

a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
    outline: 3px solid var(--clay);
    outline-offset: 3px;
    border-radius: 6px;
}

.sr-only-focusable:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Eyebrow ---------- */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--teal);
}
.eyebrow::before {
    content: '';
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    background: var(--clay);
    box-shadow: 0 0 0 4px rgba(201, 130, 91, 0.18);
}
.on-dark .eyebrow, .eyebrow.is-light { color: var(--teal-soft); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 3rem;
    padding: 0.85rem 1.6rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.9375rem;
    line-height: 1.2;
    text-align: center;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: background-color 300ms var(--ease), color 300ms var(--ease), border-color 300ms var(--ease),
                box-shadow 300ms var(--ease), transform 300ms var(--ease);
}
.btn-sm { min-height: 2.5rem; padding: 0.55rem 1.15rem; font-size: 0.875rem; white-space: nowrap; }
.btn-lg { min-height: 3.5rem; padding: 1rem 1.9rem; font-size: 1rem; }
.btn.btn-teal { background: var(--teal); color: #FFFFFF; }
.btn.btn-teal:hover { background: var(--teal-dk); box-shadow: 0 12px 24px -10px rgba(47, 111, 107, 0.6); transform: translateY(-2px); }
.btn.btn-navy { background: var(--navy); color: #FFFFFF; }
.btn.btn-navy:hover { background: var(--navy-3); box-shadow: 0 12px 24px -10px rgba(10, 25, 47, 0.55); transform: translateY(-2px); }
.btn.btn-light { background: #FFFFFF; color: var(--navy); }
.btn.btn-light:hover { background: var(--sand); transform: translateY(-2px); box-shadow: 0 14px 28px -12px rgba(0, 0, 0, 0.45); }
.btn.btn-ghost { border-color: rgba(255, 255, 255, 0.5); color: #FFFFFF; background: rgba(255, 255, 255, 0.06); }
.btn.btn-ghost:hover { border-color: var(--teal-soft); background: rgba(127, 184, 178, 0.16); transform: translateY(-2px); }
.btn.btn-outline { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn.btn-outline:hover { background: var(--navy); color: #FFFFFF; transform: translateY(-2px); }
.btn.btn-soft { background: var(--mist); color: var(--teal-dk); }
.btn.btn-soft:hover { background: var(--teal-200); transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); transition-duration: 120ms; }
.btn:disabled { cursor: wait; opacity: 0.7; transform: none; box-shadow: none; }
.btn .fa-arrow-right, .link-arrow .fa-arrow-right { transition: transform 200ms var(--ease); }
.btn:hover .fa-arrow-right, .link-arrow:hover .fa-arrow-right { transform: translateX(4px); }

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: var(--teal);
    text-underline-offset: 4px;
}
.link-arrow:hover { color: var(--navy); text-decoration: underline; }
.on-dark .link-arrow { color: var(--teal-soft); }
.on-dark .link-arrow:hover { color: #FFFFFF; }

/* ---------- Brand marks ---------- */
.kg-mark {
    width: 2.6rem;
    height: 2.6rem;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.85rem;
    background: linear-gradient(145deg, var(--navy-3), var(--navy));
    color: #FFFFFF;
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 600;
    font-size: 1.35rem;
    position: relative;
    box-shadow: inset 0 0 0 1px rgba(127, 184, 178, 0.25);
}
.kg-mark::after {
    content: '';
    position: absolute;
    right: 0.42rem;
    bottom: 0.42rem;
    width: 0.38rem;
    height: 0.38rem;
    border-radius: 9999px;
    background: var(--teal-soft);
}
.cd-logo { display: inline-flex; align-items: center; gap: 0.7rem; }
.cd-logo svg { width: 2.6rem; height: 2.6rem; flex-shrink: 0; }
.cd-logo-name { font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: 1.35rem; letter-spacing: -0.01em; line-height: 1; }
.cd-logo-tag { display: block; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; margin-top: 0.3rem; opacity: 0.8; }

/* ---------- Navigation ---------- */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color 300ms var(--ease), box-shadow 300ms var(--ease);
}
.site-nav.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 10px 30px -20px rgba(10, 25, 47, 0.35); }
.nav-brand-name { font-weight: 800; font-size: 1.05rem; color: var(--navy); letter-spacing: -0.01em; line-height: 1.1; }
.nav-brand-tag { display: block; font-size: 0.6875rem; font-weight: 600; color: var(--muted); letter-spacing: 0.04em; margin-top: 0.15rem; }
.nav-link {
    position: relative;
    padding: 0.5rem 0.2rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
    transition: color 200ms var(--ease);
}
.nav-link::after {
    content: '';
    position: absolute;
    left: 0.2rem;
    right: 0.2rem;
    bottom: 0.1rem;
    height: 2px;
    border-radius: 2px;
    background: var(--teal);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 250ms var(--ease);
}
.nav-link:hover { color: var(--teal); }
.nav-link:hover::after, .nav-link[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.nav-link[aria-current="page"] { color: var(--teal); }
.nav-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 9999px;
    color: var(--navy);
    border: 1px solid var(--line);
    background: #FFFFFF;
    transition: border-color 200ms var(--ease), color 200ms var(--ease), background-color 200ms var(--ease);
}
.nav-icon-btn:hover { border-color: var(--teal); color: var(--teal); }

#mobile-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #FFFFFF;
    border-top: 1px solid var(--line);
    box-shadow: 0 24px 40px -20px rgba(10, 25, 47, 0.35);
    max-height: calc(100vh - 4.5rem);
    max-height: calc(100dvh - 4.5rem);
    overflow-y: auto;
    transition: opacity 200ms var(--ease), translate 200ms var(--ease);
}
#mobile-menu.km-menu-enter { opacity: 0; translate: 0 -6px; }
.m-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.95rem 0.25rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--navy);
    border-bottom: 1px solid var(--line);
}
.m-link .fa-arrow-right { font-size: 0.8rem; color: var(--teal); }
.m-link[aria-current="page"] { color: var(--teal); }

/* Portal Login dropdown (desktop) and Portal Login section (mobile menu) */
.portal-menu { position: relative; }
.portal-menu > summary { list-style: none; cursor: pointer; user-select: none; }
.portal-menu > summary::-webkit-details-marker { display: none; }
.portal-trigger { white-space: nowrap; }
.portal-caret { font-size: 0.6rem; transition: transform 200ms var(--ease); }
.portal-menu[open] .portal-caret { transform: rotate(180deg); }
.portal-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 0.6rem);
    width: 19rem;
    padding: 0.5rem;
    background: #FFFFFF;
    border: 1px solid var(--line);
    border-radius: 1.1rem;
    box-shadow: var(--shadow-lift);
    z-index: 70;
}
.portal-panel-label { padding: 0.5rem 0.7rem 0.4rem; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.portal-panel-label [data-portal-who] { text-transform: none; letter-spacing: 0; font-weight: 600; }
.portal-item { display: flex; align-items: center; gap: 0.75rem; width: 100%; padding: 0.6rem 0.7rem; border-radius: 0.8rem; text-align: left; transition: background-color 200ms var(--ease); }
.portal-item:hover, .portal-item:focus-visible { background: var(--mist); }
.portal-item strong { display: block; font-size: 0.9rem; font-weight: 700; color: var(--navy); line-height: 1.25; }
.portal-item small { display: block; font-size: 0.75rem; color: var(--muted); margin-top: 0.1rem; }
.portal-ico { flex: none; width: 2.25rem; height: 2.25rem; border-radius: 0.75rem; display: inline-flex; align-items: center; justify-content: center; background: var(--mist); color: var(--teal); font-size: 0.9rem; }
.portal-ico.is-navy { background: var(--navy); color: var(--teal-soft); }
.portal-ico.is-plain { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.m-portal { margin-top: 1.25rem; padding: 1rem; border-radius: 1.1rem; background: var(--mist); border: 1px solid var(--teal-200); }
.m-portal-label { display: flex; align-items: center; gap: 0.5rem; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal); margin-bottom: 0.35rem; }
.m-portal-link { display: flex; align-items: center; gap: 0.75rem; padding: 0.8rem 0.15rem; font-size: 1rem; font-weight: 600; color: var(--navy); text-align: left; }
.m-portal-link + .m-portal-link { border-top: 1px solid var(--teal-200); }
.m-portal-link > span { flex: 1; }
.m-portal-link > .fa-solid:first-child { width: 1.25rem; text-align: center; color: var(--teal); }
.m-portal-link .fa-arrow-right { font-size: 0.8rem; color: var(--teal); }

/* Mobile quick-action bar: call, email, request care */
.mobile-bar {
    position: fixed;
    left: 0.75rem;
    right: 0.75rem;
    bottom: max(0.75rem, env(safe-area-inset-bottom));
    z-index: 45;
    display: grid;
    grid-template-columns: 1fr 1fr 1.6fr;
    gap: 0.4rem;
    padding: 0.4rem;
    border-radius: 9999px;
    background: rgba(10, 25, 47, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 18px 40px -12px rgba(10, 25, 47, 0.55);
}
.mobile-bar a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 2.9rem;
    border-radius: 9999px;
    color: #FFFFFF;
    font-weight: 700;
    font-size: 0.875rem;
}
.mobile-bar a.is-primary { background: var(--teal); }
.mobile-bar a:not(.is-primary):hover { background: rgba(255, 255, 255, 0.08); }
@media (min-width: 1024px) { .mobile-bar { display: none; } }
@media (max-width: 1023px) { body { padding-bottom: 5.25rem; } }

/* ---------- Surfaces ---------- */
.bg-sand { background-color: var(--sand); }
.bg-mist { background-color: var(--mist); }
.surface-navy {
    background:
        radial-gradient(60rem 30rem at 85% -10%, rgba(127, 184, 178, 0.18), transparent 60%),
        radial-gradient(40rem 26rem at -10% 110%, rgba(201, 130, 91, 0.12), transparent 60%),
        var(--navy);
    color: #FFFFFF;
}
.surface-warm {
    background:
        radial-gradient(50rem 24rem at 100% 0%, rgba(127, 184, 178, 0.18), transparent 60%),
        radial-gradient(40rem 24rem at 0% 100%, rgba(201, 130, 91, 0.10), transparent 60%),
        var(--sand);
}

/* ---------- Cards ---------- */
.card {
    background: #FFFFFF;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.75rem;
    box-shadow: var(--shadow-soft);
}
@media (min-width: 1024px) { .card { padding: 2.1rem; } }
.card-hover { transition: transform 300ms var(--ease), box-shadow 300ms var(--ease), border-color 300ms var(--ease); }
@media (hover: hover) {
    .card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: var(--teal-200); }
    .card-hover:hover .icon-bubble { background: var(--teal); color: #FFFFFF; }
}
.icon-bubble {
    width: 3rem;
    height: 3rem;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    background: var(--mist);
    color: var(--teal);
    font-size: 1.15rem;
    transition: background-color 300ms var(--ease), color 300ms var(--ease);
}
.icon-bubble.is-warm { background: #F6E9DF; color: var(--clay-dk); }
.on-dark .icon-bubble { background: rgba(127, 184, 178, 0.14); color: var(--teal-soft); }

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.95rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 600;
    background: var(--mist);
    color: var(--teal-dk);
}
.on-dark .pill, .pill.is-glass { background: rgba(255, 255, 255, 0.1); color: #FFFFFF; border: 1px solid rgba(255, 255, 255, 0.18); }

/* Image frames */
.frame { border-radius: var(--radius); overflow: hidden; position: relative; background: var(--sand-2); }
.frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease); }
@media (hover: hover) { .frame-zoom:hover img { transform: scale(1.04); } }

/* ---------- Hero (home) ---------- */
.hero { position: relative; overflow: hidden; background: var(--navy); color: #FFFFFF; isolation: isolate; }
.hero-slides { position: absolute; left: 0; right: 0; top: 0; height: 16rem; z-index: -2; overflow: hidden; }
.hero-slide { position: absolute; inset: 0; opacity: 0; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.hero-slide:first-child { opacity: 1; }
.hero-shade {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(10, 25, 47, 0.05) 0%, rgba(10, 25, 47, 0.35) 9rem, #0A192F 16rem);
}
.hero-glow {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(36rem 24rem at 10% 100%, rgba(127, 184, 178, 0.16), transparent 70%),
        radial-gradient(30rem 20rem at 0% 20%, rgba(201, 130, 91, 0.10), transparent 70%);
}
@media (min-width: 640px) {
    .hero-slides { height: 22rem; }
    .hero-shade { background: linear-gradient(180deg, rgba(10, 25, 47, 0.05) 0%, rgba(10, 25, 47, 0.4) 13rem, #0A192F 22rem); }
}
@media (min-width: 1024px) {
    .hero-slides { left: 40%; height: auto; bottom: 0; }
    .hero-shade {
        background:
            linear-gradient(90deg, #0A192F 0%, #0A192F 40%, rgba(10, 25, 47, 0.72) 47%, rgba(10, 25, 47, 0.12) 64%, rgba(10, 25, 47, 0) 100%),
            linear-gradient(0deg, rgba(10, 25, 47, 0.75) 0%, rgba(10, 25, 47, 0) 28%);
    }
}
@media (max-width: 767px) {
    .hero-slide:not(:first-child) { display: none; }
}
/* Slow cross-fade between three scenes; runs only with motion allowed (html.km) */
@keyframes hero-fade { 0% { opacity: 0; } 6% { opacity: 1; } 33% { opacity: 1; } 40% { opacity: 0; } 100% { opacity: 0; } }
@keyframes hero-drift { from { transform: scale(1.06); } to { transform: scale(1); } }
@media (min-width: 768px) {
    .km .hero-slide { animation: hero-fade 21s linear infinite; }
    .km .hero-slide:nth-child(1) { animation-delay: -1.3s; }
    .km .hero-slide:nth-child(2) { animation-delay: 5.7s; }
    .km .hero-slide:nth-child(3) { animation-delay: 12.7s; }
    .km .hero-slide img { animation: hero-drift 9s var(--ease) both; }
    .km .hero-ticks span:nth-child(1)::after { animation: hero-tick-1 21s linear infinite; animation-delay: -1.3s; }
    .km .hero-ticks span:nth-child(2)::after { animation: hero-tick-2 21s linear infinite; animation-delay: -1.3s; }
    .km .hero-ticks span:nth-child(3)::after { animation: hero-tick-3 21s linear infinite; animation-delay: -1.3s; }
}
@keyframes hero-tick-1 { 0% { transform: scaleX(0); } 33.3% { transform: scaleX(1); } 33.4%, 100% { transform: scaleX(0); } }
@keyframes hero-tick-2 { 0%, 33.3% { transform: scaleX(0); } 66.6% { transform: scaleX(1); } 66.7%, 100% { transform: scaleX(0); } }
@keyframes hero-tick-3 { 0%, 66.6% { transform: scaleX(0); } 99.9% { transform: scaleX(1); } 100% { transform: scaleX(0); } }
.hero-ticks { display: flex; gap: 1.25rem; }
.hero-ticks span { position: relative; display: block; padding-top: 0.85rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; color: rgba(255, 255, 255, 0.78); min-width: 7.5rem; }
.hero-ticks span::before, .hero-ticks span::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; border-radius: 2px; }
.hero-ticks span::before { background: rgba(255, 255, 255, 0.22); }
.hero-ticks span::after { background: var(--teal-soft); transform-origin: left; transform: scaleX(0); }
.hero-ticks span:first-child::after { transform: scaleX(1); }
.km-paused .hero-slide, .km-paused .hero-slide img, .km-paused .hero-ticks span::after,
.km-lite .hero-slide, .km-lite .hero-slide img, .km-lite .hero-ticks span::after { animation-play-state: paused !important; }

.glass {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border-radius: 1.5rem;
}

/* Interior page hero */
.page-hero { position: relative; overflow: hidden; }
.page-hero.surface-navy::after {
    content: '';
    position: absolute;
    right: -10rem;
    top: -10rem;
    width: 32rem;
    height: 32rem;
    border-radius: 9999px;
    border: 1px solid rgba(127, 184, 178, 0.2);
    box-shadow: 0 0 0 4.5rem rgba(127, 184, 178, 0.035), 0 0 0 9rem rgba(127, 184, 178, 0.025);
    pointer-events: none;
}
.breadcrumb { font-size: 0.8125rem; color: var(--muted); }
.breadcrumb a:hover { color: var(--teal); text-decoration: underline; }
.on-dark .breadcrumb { color: rgba(255, 255, 255, 0.65); }
.on-dark .breadcrumb a:hover { color: var(--teal-soft); }

/* Floating badge on images */
.float-card {
    position: absolute;
    background: #FFFFFF;
    border-radius: 1.25rem;
    padding: 1rem 1.15rem;
    box-shadow: var(--shadow-lift);
    display: flex;
    gap: 0.85rem;
    align-items: center;
    max-width: 18rem;
}

/* Blob shape behind images */
.blob {
    position: absolute;
    z-index: -1;
    border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%;
    background: linear-gradient(140deg, var(--teal-200), #F3E2D4);
    filter: blur(0.5px);
}
@keyframes blob-morph {
    0%, 100% { border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%; }
    50% { border-radius: 58% 42% 38% 62% / 55% 38% 62% 45%; }
}
.km .blob { animation: blob-morph 18s ease-in-out infinite; }
.km-paused .blob, .km-lite .blob { animation-play-state: paused; }

/* ---------- Steps (numbered, light up while scrolling via motion.js [data-progress]) ---------- */
.steps { counter-reset: step; display: grid; gap: 1rem; }
.step {
    position: relative;
    padding: 1.5rem 1.5rem 1.5rem 4.75rem;
    border-radius: 1.25rem;
    background: #FFFFFF;
    border: 1px solid var(--line);
    transition: border-color 500ms var(--ease), box-shadow 500ms var(--ease), background-color 500ms var(--ease);
}
.step::before {
    counter-increment: step;
    content: counter(step, decimal-leading-zero);
    position: absolute;
    left: 1.25rem;
    top: 1.35rem;
    width: 2.6rem;
    height: 2.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    font-weight: 800;
    font-size: 0.8125rem;
    color: var(--teal);
    background: var(--mist);
    transition: background-color 500ms var(--ease), color 500ms var(--ease);
}
.step h3 { font-weight: 700; color: var(--navy); font-size: 1.05rem; margin-bottom: 0.3rem; }
.step p { font-size: 0.9375rem; color: var(--muted); line-height: 1.6; }
/* Before JS confirms progress tracking, every step shows its finished state */
.step::before { background: var(--teal); color: #FFFFFF; }
.km-reveal [data-progress] > .step:not(.is-on)::before { background: var(--mist); color: var(--teal); }
.km-reveal [data-progress] > .step.is-on { border-color: var(--teal-200); box-shadow: var(--shadow-soft); }
.on-dark .step { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.12); }
.on-dark .step h3 { color: #FFFFFF; }
.on-dark .step p { color: rgba(255, 255, 255, 0.72); }
.on-dark .step::before { background: var(--teal-soft); color: var(--navy); }
.km-reveal .on-dark [data-progress] > .step:not(.is-on)::before { background: rgba(127, 184, 178, 0.14); color: var(--teal-soft); }
.km-reveal .on-dark [data-progress] > .step.is-on { border-color: rgba(127, 184, 178, 0.45); background: rgba(127, 184, 178, 0.08); }
@media (min-width: 1280px) {
    .steps-rail { gap: 0.85rem; }
    .steps-rail .step { padding: 4.75rem 1.25rem 1.5rem; }
    .steps-rail .step::before { left: 1.25rem; top: 1.25rem; }
}

/* ---------- Lists ---------- */
.check-list li, .cross-list li { position: relative; padding-left: 1.85rem; }
.check-list li + li, .cross-list li + li { margin-top: 0.7rem; }
.check-list li::before, .cross-list li::before {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 0.1rem;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
}
.check-list li::before { content: '\f00c'; background: var(--mist); color: var(--teal); }
.on-dark .check-list li::before { background: rgba(127, 184, 178, 0.16); color: var(--teal-soft); }
.cross-list li::before { content: '\f00d'; background: #F1F3F5; color: #8A94A0; }

/* Notice / disclaimer panel */
.note {
    border-radius: 1.1rem;
    background: var(--mist);
    border: 1px solid var(--teal-200);
    padding: 1.1rem 1.35rem;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--ink);
}
.note.is-warm { background: #FBF4EE; border-color: #EED9C9; }
.note strong { color: var(--navy); }

/* ---------- Forms ---------- */
.form-shell {
    background: #FFFFFF;
    border: 1px solid var(--line);
    border-radius: 2rem;
    box-shadow: var(--shadow-lift);
    overflow: hidden;
}
.form-head {
    padding: 2rem 1.5rem;
    background:
        radial-gradient(30rem 14rem at 100% 0%, rgba(127, 184, 178, 0.22), transparent 60%),
        var(--navy);
    color: #FFFFFF;
}
@media (min-width: 640px) { .form-head { padding: 2.25rem 2.5rem; } }
.form-body { padding: 2rem 1.5rem 2.25rem; }
@media (min-width: 640px) { .form-body { padding: 2.5rem; } }
@media (min-width: 1024px) { .form-body { padding: 2.75rem 3rem 3rem; } }
.field {
    width: 100%;
    border: 1.5px solid #D5DCE2;
    background: #FFFFFF;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    border-radius: 0.85rem;
    color: var(--ink);
    transition: border-color 200ms ease, box-shadow 200ms ease, background-color 200ms ease;
}
.field::placeholder { color: #98A2AE; }
.field:hover { border-color: #B8C3CC; }
.field:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(47, 111, 107, 0.16); }
.field[aria-invalid="true"] { border-color: #B42318; background: #FFFBFA; }
select.field {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 2.75rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%232F6F6B'%3E%3Cpath d='M5.3 7.3a1 1 0 0 1 1.4 0L10 10.6l3.3-3.3a1 1 0 1 1 1.4 1.4l-4 4a1 1 0 0 1-1.4 0l-4-4a1 1 0 0 1 0-1.4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.1rem;
}
textarea.field { min-height: 7.5rem; resize: vertical; }
.field-label {
    display: block;
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--navy);
    margin-bottom: 0.45rem;
}
.field-label .opt { font-weight: 500; color: var(--muted); }
.field-hint { display: block; font-size: 0.8125rem; color: var(--muted); margin-top: 0.4rem; line-height: 1.5; }
.field-error { display: flex; gap: 0.4rem; align-items: flex-start; font-size: 0.8125rem; font-weight: 600; color: #B42318; margin-top: 0.45rem; }
.field-error::before { content: '!'; flex-shrink: 0; width: 1rem; height: 1rem; border-radius: 9999px; background: #B42318; color: #FFF; font-size: 0.65rem; display: inline-flex; align-items: center; justify-content: center; margin-top: 0.1rem; }
:where(fieldset.fs) { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.fs > legend { padding: 0; }
.form-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    font-weight: 800;
    font-size: 0.8125rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--teal);
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--line);
    margin-bottom: 1.5rem;
}
.form-section .num {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 9999px;
    background: var(--mist);
    color: var(--teal);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    letter-spacing: 0;
}

/* Checkbox and radio chips */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.6rem 1rem;
    border: 1.5px solid #D5DCE2;
    background: #FFFFFF;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 9999px;
    transition: border-color 200ms ease, background-color 200ms ease, color 200ms ease, transform 200ms var(--ease);
}
.chip span::before {
    content: '';
    width: 1rem;
    height: 1rem;
    border: 1.5px solid #9AA5B1;
    border-radius: 0.3rem;
    flex-shrink: 0;
    transition: all 200ms ease;
}
.chip input[type="radio"] + span::before { border-radius: 9999px; }
.chip span:hover { border-color: var(--teal); }
.chip input:checked + span { border-color: var(--teal); background: var(--mist); color: var(--navy); font-weight: 700; }
.chip input:checked + span::before {
    background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E") center / 0.7rem no-repeat;
    border-color: var(--teal);
}
.chip input[type="radio"]:checked + span::before { background: var(--teal); box-shadow: inset 0 0 0 3px #FFFFFF; }
.chip input:focus-visible + span { outline: 3px solid var(--clay); outline-offset: 2px; }
.chip input:active + span { transform: scale(0.97); }
fieldset[aria-invalid="true"] .chip span, .chips[aria-invalid="true"] .chip span { border-color: #E3A39C; }

/* Option cards (larger radio choices) */
.option-cards { display: grid; gap: 0.75rem; }
@media (min-width: 640px) { .option-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.option-card { position: relative; display: block; cursor: pointer; }
.option-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.option-card > span {
    display: block;
    height: 100%;
    padding: 1.1rem 1.2rem 1.1rem 3.25rem;
    border: 1.5px solid #D5DCE2;
    border-radius: 1.1rem;
    background: #FFFFFF;
    position: relative;
    transition: border-color 200ms ease, background-color 200ms ease, box-shadow 200ms ease;
}
.option-card > span::before {
    content: '';
    position: absolute;
    left: 1.15rem;
    top: 1.25rem;
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 9999px;
    border: 1.5px solid #9AA5B1;
    transition: all 200ms ease;
}
.option-card strong { display: block; color: var(--navy); font-weight: 700; }
.option-card small { display: block; color: var(--muted); font-size: 0.8125rem; margin-top: 0.2rem; line-height: 1.5; }
.option-card:hover > span { border-color: var(--teal); }
.option-card input:checked + span { border-color: var(--teal); background: var(--mist); box-shadow: 0 0 0 3px rgba(47, 111, 107, 0.12); }
.option-card input:checked + span::before { background: var(--teal); border-color: var(--teal); box-shadow: inset 0 0 0 3px #FFFFFF; }
.option-card input:focus-visible + span { outline: 3px solid var(--clay); outline-offset: 2px; }

/* Consent */
.consent {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    padding: 1.05rem 1.15rem;
    border: 1.5px solid var(--line);
    border-radius: 1rem;
    background: #FAFBFC;
    font-size: 0.9rem;
    line-height: 1.6;
    cursor: pointer;
    transition: border-color 200ms ease;
}
.consent:hover { border-color: var(--teal-200); }
.consent input { width: 1.2rem; height: 1.2rem; margin-top: 0.2rem; flex-shrink: 0; accent-color: var(--teal); }
.consent:has(input[aria-invalid="true"]) { border-color: #B42318; }
.consent a { color: var(--teal); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.form-alert {
    margin-top: 1.5rem;
    border-radius: 1rem;
    border: 1px solid #F4C7C3;
    background: #FEF3F2;
    color: #912018;
    font-size: 0.9rem;
    padding: 1rem 1.15rem;
}
.form-alert a { font-weight: 700; text-decoration: underline; }
.form-success { padding: 3.5rem 1.5rem; text-align: center; }
.form-success .tick {
    width: 4.5rem;
    height: 4.5rem;
    margin: 0 auto 1.5rem;
    border-radius: 9999px;
    background: var(--mist);
    color: var(--teal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 0 0 10px rgba(238, 245, 244, 0.6);
}
@keyframes tick-pop { 0% { transform: scale(0.6); opacity: 0; } 60% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
.km .form-success:not(.hidden) .tick { animation: tick-pop 600ms var(--ease) both; }
.form-success:focus { outline: none; }

/* ---------- FAQ (details/summary, works without JS) ---------- */
.faq details {
    border: 1px solid var(--line);
    border-radius: 1.25rem;
    background: #FFFFFF;
    transition: border-color 250ms ease, box-shadow 250ms ease;
}
.faq details + details { margin-top: 0.75rem; }
.faq details[open] { border-color: var(--teal-200); box-shadow: var(--shadow-soft); }
.faq summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 1.35rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.45;
    border-radius: 1.25rem;
}
@media (min-width: 640px) { .faq summary { padding: 1.35rem 1.75rem; } }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: '+';
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    background: var(--mist);
    color: var(--teal);
    font-size: 1.2rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 300ms var(--ease), background-color 300ms var(--ease), color 300ms var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); background: var(--teal); color: #FFFFFF; }
.faq .faq-a { padding: 0 1.35rem 1.4rem; font-size: 0.975rem; line-height: 1.75; color: #3A4654; }
@media (min-width: 640px) { .faq .faq-a { padding: 0 1.75rem 1.5rem; } }
.faq .faq-a p + p { margin-top: 0.75rem; }

/* ---------- Service area map (illustrative) ---------- */
.area-map { width: 100%; height: auto; display: block; }
.area-map .river { fill: none; stroke: #9CC7C2; stroke-width: 14; stroke-linecap: round; opacity: 0.55; }
.area-map .river-core { fill: none; stroke: #FFFFFF; stroke-width: 2; stroke-dasharray: 2 10; stroke-linecap: round; opacity: 0.9; }
.area-map .zone { fill: rgba(47, 111, 107, 0.1); stroke: rgba(47, 111, 107, 0.45); stroke-width: 1.5; stroke-dasharray: 5 6; }
.area-map .pin { fill: var(--teal); }
.area-map .pin-ring { fill: none; stroke: var(--teal); stroke-width: 2; opacity: 0.35; transform-box: fill-box; transform-origin: center; }
.area-map .label { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 17px; fill: var(--navy); }
.area-map .sub { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 600; font-size: 11px; letter-spacing: 0.08em; fill: var(--muted); }
@keyframes pin-pulse { 0% { transform: scale(0.6); opacity: 0.55; } 100% { transform: scale(2.1); opacity: 0; } }
.km .area-map .pin-ring { animation: pin-pulse 2.8s var(--ease) infinite; }
.km .area-map .pin-ring.d2 { animation-delay: 0.9s; }
.km .area-map .pin-ring.d3 { animation-delay: 1.8s; }
.km-paused .area-map .pin-ring, .km-lite .area-map .pin-ring { animation-play-state: paused; }

/* ---------- Role tiles ---------- */
.role-abbr {
    flex-shrink: 0;
    min-width: 3.4rem;
    height: 3.4rem;
    padding: 0 0.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    background: var(--navy);
    color: var(--teal-soft);
    font-weight: 800;
    font-size: 0.875rem;
    letter-spacing: 0.04em;
}
.on-dark .role-abbr { background: rgba(127, 184, 178, 0.14); }

/* Job opportunities empty state */
.empty-state {
    border: 1.5px dashed #B8CFCC;
    border-radius: var(--radius);
    background: repeating-linear-gradient(135deg, #FFFFFF 0 14px, #F7FAFA 14px 28px);
    padding: 2.75rem 1.5rem;
    text-align: center;
}

/* In-page switcher (careers) */
.switcher { display: inline-flex; padding: 0.35rem; gap: 0.3rem; border-radius: 9999px; background: #FFFFFF; border: 1px solid var(--line); box-shadow: var(--shadow-soft); }
.switcher a { padding: 0.6rem 1.1rem; border-radius: 9999px; font-weight: 700; font-size: 0.875rem; color: var(--navy); white-space: nowrap; transition: background-color 200ms var(--ease), color 200ms var(--ease); }
.switcher a:hover { background: var(--mist); }
.switcher a.is-active { background: var(--navy); color: #FFFFFF; }

/* ---------- Legal typography ---------- */
.legal h2 { font-size: 1.6rem; font-weight: 600; color: var(--navy); margin-top: 2.75rem; margin-bottom: 1rem; scroll-margin-top: 6.5rem; }
.legal h3 { font-size: 1.0625rem; font-weight: 700; color: var(--navy); margin-top: 1.75rem; margin-bottom: 0.6rem; }
.legal p, .legal li { line-height: 1.8; }
.legal p + p { margin-top: 0.9rem; }
.legal ul { list-style: disc; padding-left: 1.4rem; margin-top: 0.75rem; }
.legal ol { list-style: decimal; padding-left: 1.4rem; margin-top: 0.75rem; }
.legal li + li { margin-top: 0.4rem; }
.legal a { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: rgba(255, 255, 255, 0.72); }
.site-footer .footer-heading { font-family: 'Plus Jakarta Sans', sans-serif; letter-spacing: 0.14em; }
.site-footer a { transition: color 200ms ease; }
.site-footer a:hover { color: var(--teal-soft); }
.footer-cta {
    background:
        radial-gradient(40rem 18rem at 100% 0%, rgba(127, 184, 178, 0.25), transparent 60%),
        radial-gradient(30rem 16rem at 0% 100%, rgba(201, 130, 91, 0.18), transparent 60%),
        var(--navy-2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 2rem;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .btn, .card-hover, .frame img, .chip span, .faq summary::after, .step, .icon-bubble { transition: none !important; }
    .btn:hover, .card-hover:hover { transform: none !important; }
    .frame-zoom:hover img { transform: none; }
}

/* Narrow phones: slightly smaller header buttons so the brand name stays readable next to the Portal Login icon */
@media (max-width: 430px) {
    .site-nav .nav-icon-btn, .site-nav .kga-toggle { width: 2.4rem; height: 2.4rem; }
    .site-nav nav > .xl\:hidden { gap: 0.375rem; }
    .site-nav nav { gap: 0.625rem; }
}
@media (max-width: 380px) {
    .site-nav .nav-icon-btn, .site-nav .kga-toggle { width: 2.2rem; height: 2.2rem; }
    .site-nav nav > .xl\:hidden { gap: 0.25rem; }
    .site-nav .kg-mark { width: 2.4rem; height: 2.4rem; }
}
