/* ===========================
   Solis — site operations
   =========================== */
:root {
    --ink: #111111;
    --ink-soft: #3d3d3d;
    --muted: #6b6b6b;
    --paper: #ffffff;
    --paper-deep: #f2efec;
    --brick: #ed6631;
    --brick-deep: #c94e1f;
    --on-brick: #111111;
    --slate: #111111;
    --card: rgba(255, 255, 255, 0.72);
    --card-strong: rgba(0, 0, 0, 0.66);
    --line: rgba(17, 17, 17, 0.12);
    --sage: #111111;
    --sage-soft: #f2efec;
    --wood: #111111;
    --shadow: 0 18px 40px rgba(17, 17, 17, 0.08);
    --radius: 22px;
    --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-display: "Instrument Serif", Georgia, "Times New Roman", serif;
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4.5rem;
    --nav-h: 92px;
    --pill-bar-height: 40px;
    --nav-clearance: calc(18px + var(--pill-bar-height));
    --hero-stack-gap: 32px;
    --hero-copy-space: calc(var(--nav-clearance) + 11rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    color: var(--ink);
    background: var(--paper);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

button, input, textarea { font-family: inherit; }

::selection { background: #fbd8c9; }

/* ===========================
   Top bar
   =========================== */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 18px 28px 0;
    pointer-events: none;
}

.topbar.scrolled {
    padding-top: 12px;
}

.logo, .pill-nav, .topbar-aside, .nav-toggle { pointer-events: auto; }

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    width: max-content;
    color: var(--ink);
}

.logo-mark {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    color: var(--brick);
}

.logo-text {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.03em;
}

.pill-nav {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 2px;
    list-style: none;
    height: var(--pill-bar-height);
    padding: 3px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: 0 10px 28px rgba(29, 33, 37, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.pill-nav li { position: relative; z-index: 1; }
.pill-nav li:not(.pill-indicator) { display: flex; }

.pill-nav li.pill-indicator {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    border-radius: 999px;
    background: var(--slate);
    pointer-events: none;
    transition:
        transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        width 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        height 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.pill-nav a {
    display: flex;
    align-items: center;
    position: relative;
    height: 100%;
    padding: 0 14px;
    border-radius: 999px;
    color: var(--ink-soft);
    font-size: 0.84rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1;
    transition: color 0.2s ease;
}

.pill-nav a:hover { color: var(--ink); }

.pill-nav li.pill-contact { display: none; }

.pill-nav a.active,
.pill-nav a.active:hover {
    color: var(--paper);
}

.topbar-aside {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-contact {
    position: relative;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    height: var(--pill-bar-height, 40px);
    padding: 0 14px;
    border-radius: 999px;
    border: 1.5px solid var(--brick);
    background: rgba(255, 255, 255, 0.9);
    color: var(--brick-deep);
    font-size: 0.84rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1;
    box-shadow: 0 10px 28px rgba(17, 17, 17, 0.06);
    transition: background 0.2s ease, color 0.2s ease;
}

.topbar-contact:hover,
.topbar-contact.active { background: var(--brick); color: var(--on-brick); }

.pill-nav.is-contact a.active { color: var(--ink-soft); }

.pill-nav.is-contact .pill-indicator {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 999px;
    background: var(--slate);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 16px;
    height: 1.5px;
    background: #fff;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ===========================
   Stage
   =========================== */
.stage {
    position: relative;
    background: var(--paper);
}

.stage-intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
    /* Fill space above the image so it starts at the bottom of the first screen */
    min-height: calc(100svh - 100vw * 644 / 2048);
    padding: var(--nav-clearance) 28px 28px;
}

.stage-lead {
    margin: 0;
    max-width: 13em;
    font-family: var(--font-display);
    font-size: clamp(2.3rem, 5vw, 3.8rem);
    font-weight: 400;
    letter-spacing: -0.015em;
    line-height: 1.02;
    color: var(--ink);
}

.stage-sub {
    margin: 14px 0 0;
    max-width: 28em;
    font-size: clamp(1rem, 1.35vw, 1.15rem);
    font-weight: 500;
    letter-spacing: -0.015em;
    line-height: 1.4;
    color: var(--ink-soft);
}

.stage-scene {
    position: relative;
    width: 100%;
    aspect-ratio: 2048 / 644;
    display: grid;
    overflow: clip;
    background: var(--paper);
}

.stage-scene img {
    grid-area: 1 / 1;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    margin: 0;
    object-fit: fill;
    image-rendering: auto;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.scene-finished {
    --paint: 0%;
    opacity: 0;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 var(--paint), transparent calc(var(--paint) + 7%));
    mask-image: linear-gradient(90deg, #000 0, #000 var(--paint), transparent calc(var(--paint) + 7%));
}

/* ===========================
   Page sections
   =========================== */
.container {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
}

.section {
    padding: var(--space-2xl) 0;
    scroll-margin-top: 84px;
}

.section-header { margin-bottom: var(--space-xl); }

.section-header.centered { text-align: center; }

.section-tag {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brick-deep);
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: clamp(2.3rem, 4vw, 3.3rem);
    font-weight: 400;
    letter-spacing: -0.015em;
    line-height: 1.05;
}

.section-header p,
.lead {
    color: var(--ink-soft);
}

.section-header p {
    max-width: 560px;
    margin-top: 8px;
}

.section-header.centered p,
.section-header.centered h2 { margin-left: auto; margin-right: auto; }

.stage-lead,
.section-header h2,
.contact-intro h2 { text-wrap: balance; }

.about {
    background: var(--paper);
    padding-top: 1.5rem;
}
.values, .projects, .contact { background: var(--paper-deep); }
.services { background: var(--paper); }

.about-grid,
.contact-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
}

.about-content p { color: var(--ink-soft); margin-bottom: 14px; }

.about-visual {
    background: #fff;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 28px;
}

.about-visual p.about-visual-kicker {
    margin: 0 0 8px;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}

.about-visual h3 {
    margin: 0;
    color: var(--ink);
    font-size: 2rem;
    letter-spacing: -0.04em;
    font-weight: 550;
}

.about-visual p { color: var(--ink-soft); margin: 8px 0 18px; }

.about-visual ul { list-style: none; display: grid; gap: 8px; margin: 0; }

.about-visual li {
    display: flex;
    gap: 10px;
    align-items: baseline;
    font-size: 0.92rem;
    color: var(--ink-soft);
}

.about-visual li span {
    font-weight: 650;
    color: var(--ink);
}



/* Projects: listing-style cards, three per row, centered while there are few */
.projects-grid {
    --gap: 28px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px var(--gap);
}

.listing {
    flex: 0 1 calc((100% - 2 * var(--gap)) / 3);
    min-width: 0;
    color: inherit;
}

.listing-photo {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
}

.listing-photo img {
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: 46% 62%;
}

.listing-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 11px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    font-size: 0.76rem;
    font-weight: 600;
}

.listing-text { padding-top: 12px; }

.listing-text h3 {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.35;
}

.listing-loc,
.listing-desc {
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.45;
}

.listing-loc { display: flex; align-items: center; gap: 4px; }

.listing-meta {
    margin-top: 6px;
    font-size: 0.9rem;
    color: var(--ink-soft);
}

.listing-meta strong { color: var(--ink); font-weight: 600; }

.listing svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Partners: slim "Trusted by" logo strip.
   Static and centered with a few logos; main.js turns it into a
   scrolling marquee once there are enough to fill the row. */
.logo-band {
    padding: 44px 0;
    background: var(--paper);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.logo-band-label {
    margin-bottom: 20px;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

.logo-marquee {
    display: flex;
    justify-content: center;
    overflow: hidden;
}

.logo-set {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 28px 64px;
}

.logo-item img {
    display: block;
    height: 22px;
    width: auto;
    filter: brightness(0);
    opacity: 0.45;
    transition: opacity 0.3s ease;
}

.logo-item:hover img { opacity: 0.85; }

.logo-marquee.is-scrolling {
    justify-content: flex-start;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.logo-marquee.is-scrolling .logo-set {
    flex: none;
    flex-wrap: nowrap;
    padding-right: 64px;
    animation: logo-scroll var(--marquee-duration, 30s) linear infinite;
}

.logo-marquee.is-scrolling:hover .logo-set { animation-play-state: paused; }

@keyframes logo-scroll { to { transform: translateX(-100%); } }

/* Contact */
.contact-grid {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 64px;
    align-items: start;
}

.contact-intro { padding-top: 12px; }

.contact-intro h2 {
    margin: 4px 0 14px;
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 5vw, 4rem);
    font-weight: 400;
    letter-spacing: -0.015em;
    line-height: 1;
}

.contact-intro > p {
    max-width: 26em;
    color: var(--ink-soft);
}

.contact-form .btn svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.contact-form {
    padding: 32px;
    border-radius: 28px;
    background: #fff;
    box-shadow: var(--shadow);
}

.role-picker { border: 0; margin: 0 0 22px; padding: 0; min-width: 0; }

.role-picker legend,
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.8rem;
    font-weight: 600;
}

.role-pills { display: flex; flex-wrap: wrap; gap: 8px; }

.role-pill input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.role-pill span {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    font-size: 0.85rem;
    font-weight: 550;
    color: var(--ink-soft);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.role-pill span:hover { border-color: rgba(0, 0, 0, 0.3); }

.role-pill input:checked + span {
    background: var(--slate);
    border-color: var(--slate);
    color: #fff;
}

.role-pill input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.form-group { margin-bottom: 16px; }

.optional {
    margin-left: 4px;
    font-weight: 500;
    color: var(--muted);
}

.form-group input,
.form-group textarea {
    width: 100%;
    border: 1px solid transparent;
    background: var(--paper-deep);
    border-radius: 14px;
    padding: 13px 14px;
    font-size: 0.95rem;
    color: var(--ink);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.form-group textarea { resize: vertical; }

.form-group input::placeholder,
.form-group textarea::placeholder { color: #9a9a9a; }

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    background: #fff;
    border-color: var(--ink);
}

.contact-form .btn { gap: 8px; margin-top: 6px; padding: 13px 22px; }

.contact-form .btn svg { transition: transform 0.2s ease; }
.contact-form .btn:hover svg { transform: translateX(3px); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    padding: 12px 18px;
    font-weight: 600;
    font-size: 0.92rem;
}

.form-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.form-error {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fbeee8;
    color: var(--brick-deep);
    font-size: 0.86rem;
    line-height: 1.5;
}
.form-error a { color: inherit; font-weight: 600; }

.contact-form .btn:disabled { opacity: 0.7; cursor: progress; }
.contact-form.is-sending .btn svg { animation: send-nudge 0.9s ease-in-out infinite; }
@keyframes send-nudge { 50% { transform: translateX(4px); } }

.form-actions {
    display: flex;
    align-items: center;
    min-height: 64px;
    margin-top: 2px;
}
.contact-form .form-actions .btn { margin-top: 0; }
.contact-form .form-actions .btn[hidden] { display: none; }

.form-sent {
    display: flex;
    align-items: center;
    gap: 14px;
    animation: success-in 0.4s ease both;
}
.form-sent[hidden] { display: none; }

.form-sent-icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--brick);
}
.form-sent-icon svg {
    width: 20px;
    height: 20px;
    margin: 2px 2px 0 0;
    fill: none;
    stroke: var(--ink);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    animation: plane-in 0.7s 0.1s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}
.form-sent p { margin: 0; font-size: 0.88rem; line-height: 1.45; color: var(--muted); }
.form-sent strong { display: block; color: var(--ink); font-weight: 600; }

@keyframes success-in { from { opacity: 0; transform: translateX(-6px); } }
@keyframes plane-in {
    from { opacity: 0; transform: translate(-16px, 16px) rotate(-12deg) scale(0.7); }
    60% { opacity: 1; transform: translate(2px, -2px) rotate(2deg) scale(1.04); }
}

@media (prefers-reduced-motion: reduce) {
    .form-sent, .form-sent-icon svg, .contact-form.is-sending .btn svg { animation: none; }
}

.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--brick-deep); }

.footer {
    background: var(--slate);
    color: rgba(255, 255, 255, 0.72);
    padding: 48px 0 20px;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    gap: 32px;
    padding-bottom: 28px;
}

.footer .logo { color: var(--paper); }
.footer .logo-mark { color: var(--brick); }

.footer .logo { margin-bottom: 10px; }

.footer-brand p { max-width: 360px; }

.footer-nav ul {
    list-style: none;
    display: flex;
    gap: 16px;
}

.footer-nav a:hover { color: var(--paper); }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 16px;
}

.footer-bottom p {
    text-align: center;
    font-size: 0.82rem;
}

.animate-scroll {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-scroll.visible {
    opacity: 1;
    transform: none;
}

/* ===========================
   Services (two tracks)
   =========================== */
.service-tracks {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.track-card {
    padding: 30px;
    border-radius: 28px;
    background: var(--paper-deep);
}

.track-head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding-bottom: 18px;
}

.track-num {
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0.12em;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.track-head h3 {
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.svc-list { list-style: none; }

.svc-list li {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 16px;
    align-items: start;
    padding: 18px 0;
    border-top: 1px solid var(--line);
}

.svc-list li:last-child { padding-bottom: 0; }

.svc-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--ink);
}

.svc-icon svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.svc-list h4 {
    font-size: 0.98rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin-top: 1px;
}

.svc-list p {
    margin-top: 3px;
    font-size: 0.88rem;
    color: var(--ink-soft);
    line-height: 1.5;
}

/* ===========================
   Core competencies (tabbed)
   =========================== */
.competency {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 48px;
    align-items: center;
    --comp-duration: 7s;
}

.competency-list { display: grid; gap: 12px; }

.competency-tab {
    position: relative;
    display: grid;
    gap: 0;
    width: 100%;
    text-align: left;
    padding: 16px 22px;
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.16);
    border-radius: 28px;
    color: var(--ink);
    cursor: pointer;
    overflow: hidden;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.competency-tab:hover { border-color: rgba(0, 0, 0, 0.32); }

.competency-tab:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.competency-title {
    font-size: 1.08rem;
    font-weight: 600;
    letter-spacing: -0.03em;
}

.competency-desc {
    display: block;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    color: var(--ink-soft);
    font-size: 0.95rem;
    line-height: 1.55;
    transition: max-height 0.45s ease, opacity 0.35s ease, margin 0.45s ease;
}

.competency-tab.is-active {
    background: #fff;
    border-color: transparent;
    box-shadow: var(--shadow);
}

.competency-tab.is-active .competency-desc {
    max-height: 12em;
    opacity: 1;
    margin-top: 8px;
}

.competency-progress {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 100%;
    background: var(--brick);
    transform: scaleX(0);
    transform-origin: left;
}

.competency-tab.is-active .competency-progress {
    animation: comp-progress var(--comp-duration) linear forwards;
}

.competency.is-paused .competency-tab.is-active .competency-progress,
.competency.is-offscreen .competency-tab.is-active .competency-progress,
.competency.is-static .competency-progress { animation-play-state: paused; }

.competency.is-static .competency-progress { display: none; }

@keyframes comp-progress { to { transform: scaleX(1); } }

.competency-stage {
    position: relative;
    display: grid;
}

.competency-panel {
    grid-area: 1 / 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 340px;
    padding: 32px;
    border-radius: 28px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.competency-panel[hidden] { display: none; }

.competency-panel.is-active { animation: comp-panel-in 0.5s ease both; }

@keyframes comp-panel-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

/* Accent palette (used only inside the illustrative cards) */
:root {
    --c-clay: #ed6631;  --c-clay-soft: #fde6dc;
    --c-sage: #3f9468;  --c-sage-soft: #e1f2e8;
    --c-ochre: #dc9f1f; --c-ochre-soft: #fcf1d6;
    --c-slate: #4569ad; --c-slate-soft: #e3eaf7;
}

.tone-clay  { color: var(--c-clay);  background: var(--c-clay-soft); }
.tone-sage  { color: var(--c-sage);  background: var(--c-sage-soft); }
.tone-ochre { color: var(--c-ochre); background: var(--c-ochre-soft); }
.tone-slate { color: var(--c-slate); background: var(--c-slate-soft); }
.tone-bg-clay  { background: var(--c-clay); }
.tone-bg-sage  { background: var(--c-sage); }
.tone-bg-ochre { background: var(--c-ochre); }
.tone-bg-slate { background: var(--c-slate); }

.competency-panel svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.competency-panel { justify-content: flex-start; gap: 22px; height: 440px; min-height: 0; }

/* The main visual in each card fills the space under the header */
.competency-panel > :not(.card-head):not(.funders):not(.kpis) { flex: 1; }

.card-head { display: flex; align-items: center; gap: 14px; }

.card-head h4 { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.03em; line-height: 1.2; }

.card-head p { font-size: 0.82rem; color: var(--muted); margin-top: 1px; }

.card-icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    color: var(--ink) !important;
    background: var(--paper-deep) !important;
    border: 1px solid var(--line);
}

.card-icon svg { width: 17px; height: 17px; }

/* Card 1: partner hub */
.hub {
    position: relative;
    flex: 1;
    min-height: 260px;
    border-radius: 20px;
    background:
        radial-gradient(circle at 50% 50%, var(--c-slate-soft) 0, transparent 55%),
        radial-gradient(circle, rgba(0,0,0,0.07) 1px, transparent 1.2px) 0 0 / 16px 16px;
}

.hub-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.competency-panel .hub-lines path {
    stroke: rgba(0, 0, 0, 0.22);
    stroke-width: 1.4;
    stroke-dasharray: 4 6;
    animation: hub-flow 1.6s linear infinite;
    vector-effect: non-scaling-stroke;
}

@keyframes hub-flow { to { stroke-dashoffset: -20; } }

.hub-core {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: grid;
    place-items: center;
    width: 112px;
    height: 112px;
    border-radius: 50%;
    background: var(--slate);
    color: #fff;
    text-align: center;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
    align-content: center;
}

.hub-core strong { font-size: 0.88rem; font-weight: 550; letter-spacing: -0.02em; }
.hub-core small { font-size: 0.7rem; opacity: 0.65; }

.hub-ring {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 1.5px solid rgba(0, 0, 0, 0.12);
    animation: hub-pulse 2.8s ease-out infinite;
}

@keyframes hub-pulse {
    0% { transform: scale(0.92); opacity: 1; }
    100% { transform: scale(1.25); opacity: 0; }
}

.hub-node {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 5px 14px 5px 5px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
    font-size: 0.8rem;
    font-weight: 550;
    line-height: 1.2;
    white-space: nowrap;
}

.hub-node small { display: block; font-size: 0.68rem; font-weight: 500; color: var(--muted); }

.hub-node i {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: var(--ink);
    background: var(--paper-deep);
}

.hub-node i svg { width: 15px; height: 15px; }

.hub-node.n1 { left: 4%;  top: 8%; }
.hub-node.n2 { right: 4%; top: 8%; }
.hub-node.n3 { left: 4%;  bottom: 8%; }
.hub-node.n4 { right: 4%; bottom: 8%; }

.competency-panel.is-active .hub-node { animation: hub-pop 0.6s cubic-bezier(.2,.8,.2,1.2) both; }
.competency-panel.is-active .hub-node.n2 { animation-delay: 0.08s; }
.competency-panel.is-active .hub-node.n3 { animation-delay: 0.16s; }
.competency-panel.is-active .hub-node.n4 { animation-delay: 0.24s; }

@keyframes hub-pop { from { opacity: 0; transform: scale(0.85); } }

/* Card 2: phased budget */
.budget {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 22px;
    padding: 22px;
    border-radius: 18px;
    border: 1px solid var(--line);
}

.phase-note { font-size: 0.78rem; color: var(--muted); margin: -2px 0 10px; line-height: 1.4; }

.budget-bar {
    position: relative;
    display: flex;
    flex: none;
    gap: 3px;
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
}

.bar-sweep {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 30%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.75), transparent);
    transform: translateX(-110%);
    z-index: 1;
}

.competency-panel.is-active .bar-sweep { animation: bar-sweep 1.4s ease-in-out 0.9s; }

@keyframes bar-sweep { to { transform: translateX(380%); } }

.budget-bar .seg {
    width: var(--w);
    border-radius: 999px;
    transform-origin: left;
}

.seg-hatch, .dot-hatch {
    background: repeating-linear-gradient(-45deg, var(--c-sage) 0 2px, var(--c-sage-soft) 2px 4px);
}

.competency-panel.is-active .budget-bar .seg { animation: comp-slide 0.7s cubic-bezier(.2,.7,.2,1) both; }
.competency-panel.is-active .budget-bar .seg:nth-child(2) { animation-delay: 0.1s; }
.competency-panel.is-active .budget-bar .seg:nth-child(3) { animation-delay: 0.2s; }
.competency-panel.is-active .budget-bar .seg:nth-child(4) { animation-delay: 0.3s; }

.budget-phases { display: grid; grid-template-columns: 38fr 62fr; gap: 12px; }

.phase-tag {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.budget-phases ul { list-style: none; display: grid; gap: 6px; }

.budget-phases li { display: flex; align-items: center; gap: 8px; font-size: 0.84rem; font-weight: 500; color: var(--ink-soft); }

.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }

.funders { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.funders::before {
    content: "Ready for";
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-right: 4px;
}

.funders > div {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px 6px 8px;
    border-radius: 999px;
    border: 1px solid var(--line);
    font-size: 0.8rem;
    font-weight: 550;
}

.funders i { display: none; }

.funders b {
    order: -1;
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.35s cubic-bezier(.2,.8,.2,1.4);
}

.funders > div { transition: border-color 0.3s ease, background 0.3s ease; }
.funders > div.is-on { border-color: rgba(63, 148, 104, 0.35); background: var(--c-sage-soft); }
.funders > div.is-on b { transform: scale(1); }

.funders b svg { width: 11px; height: 11px; stroke-width: 2.2; }

/* Card 3: approval stepper */
.stepper { list-style: none; position: relative; display: flex; flex-direction: column; justify-content: space-between; }

/* The connector runs from the first dot to the last; main.js measures
   the dot centers into --step-x, --step-y and --step-1..3 */
.stepper::before,
.stepper-fill {
    content: "";
    position: absolute;
    z-index: 0;
    left: calc(var(--step-x, 21px) - 0.5px);
    top: var(--step-y, 29px);
    width: 1px;
}

.stepper::before {
    height: var(--step-3, 0px);
    background: var(--line);
}

.stepper-fill {
    height: 0;
    background: var(--c-sage);
    transition: height 0.6s ease;
}

.stepper.s1 .stepper-fill { height: var(--step-1, 0px); }
.stepper.s2 .stepper-fill { height: var(--step-2, 0px); }
.stepper.s3 .stepper-fill { height: var(--step-3, 0px); }

.stepper li {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 10px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 9px 14px 9px 15px;
    border-radius: 16px;
    border: 1px solid transparent;
    transition: background 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.stepper li.is-now { background: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06); border-color: var(--line); }
.stepper li.is-done { background: transparent; box-shadow: none; border-color: transparent; }

.stepper i {
    position: relative;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    z-index: 1;
    background: #d6d6d4 !important;
    box-shadow: 0 0 0 4px #fff;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.stepper i svg { display: none; }

.stepper li.is-now i { background: var(--c-ochre) !important; box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--c-ochre-soft); }
.stepper li.is-done i { background: var(--c-sage) !important; box-shadow: 0 0 0 4px #fff; }

/* Status pills that swap as a step moves along */
.status-stack { display: grid; justify-items: end; }
.status-stack > .status {
    grid-area: 1 / 1;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.status-stack > .st-next { opacity: 1; transform: none; }
.is-now > .status-stack > .st-next,
.is-done > .status-stack > .st-next,
.status-stack.is-done > .st-next { opacity: 0; }
.is-now > .status-stack > .st-now { opacity: 1; transform: none; }
.is-done > .status-stack > .st-now { opacity: 0; }
.is-done > .status-stack > .st-done,
.status-stack.is-done > .st-done { opacity: 1; transform: none; }

.stepper strong { display: block; font-size: 0.9rem; font-weight: 550; }
.stepper small { font-size: 0.78rem; color: var(--muted); }

.status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--muted);
    background: var(--paper-deep);
    white-space: nowrap;
}

.tone-pill-sage  { color: var(--c-sage);  background: var(--c-sage-soft); }
.tone-pill-ochre { color: #a7720a; background: var(--c-ochre-soft); }

.status em {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    animation: dot-blink 1.4s ease-in-out infinite;
}

@keyframes dot-blink { 50% { opacity: 0.3; } }

.competency-panel.is-active .stepper li { animation: comp-panel-in 0.5s ease both; }
.competency-panel.is-active .stepper li:nth-child(2) { animation-delay: 0.08s; }
.competency-panel.is-active .stepper li:nth-child(3) { animation-delay: 0.16s; }
.competency-panel.is-active .stepper li:nth-child(4) { animation-delay: 0.24s; }

/* Card 4: tracking board */
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

.kpi {
    display: grid;
    align-content: space-between;
    gap: 10px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid var(--line);
    min-height: 80px;
}

.kpi small { font-size: 0.74rem; color: var(--muted); font-weight: 550; }
.kpi .status,
.kpi .status-stack { justify-self: start; }
.kpi .status-stack { justify-items: start; }

.kpi-ring { grid-template-columns: 34px 1fr; align-items: center; align-content: center; gap: 10px; }
.kpi-ring strong { display: block; font-size: 0.8rem; font-weight: 550; }

.kpi-ring svg { width: 34px; height: 34px; transform: rotate(-90deg); }

.competency-panel .kpi-ring circle { stroke: rgba(0, 0, 0, 0.08); stroke-width: 2.5; }

.competency-panel .kpi-ring .ring-fill {
    stroke: var(--c-slate);
    stroke-dasharray: 72 100;
}

.competency-panel.is-active .ring-fill { animation: ring-in 1s cubic-bezier(.2,.7,.2,1) both; }

@keyframes ring-in { from { stroke-dasharray: 0 100; } }

.mini-bars { display: flex; align-items: flex-end; gap: 5px; height: 22px; }

.mini-bars i {
    width: 4px;
    height: var(--h);
    border-radius: 999px;
    background: var(--c-clay);
}

.mini-bars i:nth-child(even) { background: var(--c-ochre); }

.board {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    padding: 22px 18px 18px 0;
    border-radius: 18px;
    border: 1px solid var(--line);
    background:
        linear-gradient(90deg, transparent calc(86px - 1px), var(--line) 86px, transparent calc(86px + 1px)),
        repeating-linear-gradient(90deg, transparent 0 calc((100% - 86px) / 6 - 1px), rgba(0,0,0,0.04) 0 calc((100% - 86px) / 6)) 86px 0 / calc(100% - 86px) 100% no-repeat;
}

.board-row { display: grid; grid-template-columns: 86px 1fr; align-items: center; }

.board-row small { padding-left: 16px; font-size: 0.74rem; color: var(--muted); font-weight: 500; }

.track { position: relative; height: 8px; }

.track span {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--s);
    width: var(--w);
    border-radius: 999px;
    transform-origin: left;
}

.competency-panel.is-active .track span { animation: comp-slide 0.8s cubic-bezier(.2,.7,.2,1) both; }
.competency-panel.is-active .board-row:nth-child(3) .track span { animation-delay: 0.08s; }
.competency-panel.is-active .board-row:nth-child(4) .track span { animation-delay: 0.16s; }
.competency-panel.is-active .board-row:nth-child(5) .track span { animation-delay: 0.24s; }

.board-today {
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: calc(86px + (100% - 104px) * 0.12);
    width: 1px;
    transition: left 3.2s cubic-bezier(.4, 0, .2, 1);
    background: var(--ink);
    z-index: 1;
}

.board-today.is-on { left: calc(86px + (100% - 104px) * 0.58); }

.board-today span {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translate(-50%, 2px);
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 600;
}

@keyframes comp-slide { from { transform: scaleX(0); } }


/* ===========================
   Competency card scenes: toasts, pulses, pings
   =========================== */
.competency-panel { position: relative; }

/* Partner card: messages travel along the lines into Solis */
.competency-panel .hub-lines path.pulse {
    stroke: var(--brick);
    stroke-width: 2;
    stroke-dasharray: 10 100;
    stroke-dashoffset: -90;
    animation: hub-pulse-in 2.6s ease-in infinite;
}

.competency-panel .hub-lines path.p2 { animation-delay: 0.65s; }
.competency-panel .hub-lines path.p3 { animation-delay: 1.3s; }
.competency-panel .hub-lines path.p4 { animation-delay: 1.95s; }

@keyframes hub-pulse-in {
    0% { stroke-dashoffset: -90; opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { stroke-dashoffset: 10; opacity: 0; }
}

.hub-node { transition: border-color 0.3s ease, box-shadow 0.3s ease; }

.hub-node.is-ping {
    border-color: rgba(237, 102, 49, 0.5);
    box-shadow: 0 0 0 4px rgba(237, 102, 49, 0.12), 0 6px 16px rgba(0, 0, 0, 0.05);
}

.hub-node.is-ping i { background: var(--brick); color: #fff; transition: background 0.3s ease, color 0.3s ease; }

/* Tracker: change-order bars rise in turn */
.competency-panel.is-active .mini-bars i { animation: comp-grow 0.6s cubic-bezier(.2,.7,.2,1) both; transform-origin: bottom; }
.competency-panel.is-active .mini-bars i:nth-child(2) { animation-delay: 0.1s; }
.competency-panel.is-active .mini-bars i:nth-child(3) { animation-delay: 0.2s; }
.competency-panel.is-active .mini-bars i:nth-child(4) { animation-delay: 0.3s; }
.competency-panel.is-active .mini-bars i:nth-child(5) { animation-delay: 2.3s; }

/* ===========================
   Responsive
   =========================== */
@media (max-width: 860px) {
    .competency { grid-template-columns: 1fr; gap: 28px; }

    .topbar {
        grid-template-columns: 1fr auto;
        padding-inline: 16px;
    }

    .nav-toggle { display: flex; justify-self: end; }

    .topbar-aside { display: none; }

    .pill-nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 16px;
        right: 16px;
        height: auto;
        flex-direction: column;
        align-items: stretch;
        padding: 8px;
        border-radius: 18px;
    }

    .pill-nav.active { display: flex; }

    .pill-nav li.pill-contact { display: flex; }

    .pill-nav a {
        height: auto;
        padding: 12px 14px;
        line-height: 1.4;
    }

    .stage-intro {
        padding-inline: 20px;
        min-height: calc(100svh - 100vw * 644 / 2048);
    }

    .stage-lead { max-width: 12em; }

    .form-row { grid-template-columns: 1fr; gap: 0; }
    .contact-form { padding: 22px; }

    .listing { flex-basis: calc((100% - var(--gap)) / 2); }

    .about-grid,
    .contact-grid,
    .service-tracks,
    .footer-container {
        grid-template-columns: 1fr;
        display: grid;
    }

    .footer-container, .footer-nav ul { display: flex; flex-direction: column; }
}

/* Phones: the open card holds its visual right under the title */
.competency.is-stacked .competency-tab.is-active {
    border-radius: 28px 28px 0 0;
    padding-bottom: 6px;
    clip-path: inset(-40px -40px 0 -40px);
}
.competency.is-stacked .competency-stage { margin-top: -13px; } /* covers the tab's transparent bottom border */
.competency.is-stacked .competency-desc { transition: none; }
.competency.is-stacked .competency-panel {
    border: 0;
    border-radius: 0 0 28px 28px;
    padding-top: 16px;
    clip-path: inset(0 -40px -40px -40px);
}
.competency.is-stacked .competency-panel.is-active { animation: comp-stack-in 0.4s ease both; }
@keyframes comp-stack-in { from { opacity: 0; } }

@media (max-width: 720px) {
    .competency-panel { padding: 22px; height: auto; }
    .competency-panel > :not(.card-head):not(.funders):not(.kpis) { flex: none; }
    .stepper { gap: 8px; }
    .board { gap: 14px; }
    .hub { min-height: 300px; }
    .hub-core { width: 108px; height: 108px; }
    .hub-node { padding: 4px 10px 4px 4px; font-size: 0.76rem; }
    .hub-node i { width: 26px; height: 26px; }
    .hub-node.n1, .hub-node.n3 { left: 2%; }
    .hub-node.n2, .hub-node.n4 { right: 2%; }
    .kpis { grid-template-columns: 1fr; }
    .kpi { min-height: 0; grid-template-columns: 1fr auto; align-items: center; }
    .kpi-ring { grid-template-columns: 34px 1fr; }
    .stepper li { grid-template-columns: 10px 1fr; }
    .stepper .status-stack { grid-column: 2; justify-self: start; justify-items: start; }

    .listing { flex-basis: 100%; }
    .track-card { padding: 22px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .animate-scroll { transition: none; }
    .competency-panel.is-active,
    .competency-panel.is-active *,
}
