.card-grid--profiles {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(1.5rem, 3vw, 2.5rem);
}

@media (min-width: 960px) {
    .card-grid--profiles {
        flex-wrap: nowrap;
    }
}

.card-grid--profiles.card-grid--profiles--active .card--profile:not(.card--profile--open) {
    opacity: 0.35;
    transform: translateY(18px) scale(0.9);
    filter: grayscale(0.45) saturate(0.65) brightness(0.8);
    box-shadow: none;
}

.card--profile {
    overflow: visible;
    width: clamp(220px, 24vw, 260px);
    min-height: 360px;
    padding: clamp(1.75rem, 2vw + 1rem, 2.25rem);
    border-radius: var(--radius);
    background: rgba(24, 26, 34, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 26px 50px rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(0.75rem, 1.4vw, 1.25rem);
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: transform 0.48s var(--motion-ease), box-shadow 0.35s ease, border-color 0.35s ease, opacity 0.35s ease;
}

.theme-light .card--profile {
    background: rgba(226, 239, 255, 0.9);
    border: 1px solid rgba(112, 146, 210, 0.32);
    box-shadow: 0 28px 52px rgba(112, 146, 210, 0.22);
    color: rgba(24, 30, 46, 0.92);
}

.card--profile:focus-visible {
    outline: 2px solid var(--color-contrast);
    outline-offset: 6px;
}

.card--profile.card--profile--open {
    transform: translateY(-16px) scale(1.08);
    box-shadow: 0 32px 68px rgba(24, 32, 52, 0.55);
    border-color: rgba(255, 255, 255, 0.36);
    background: linear-gradient(160deg, rgba(34, 46, 72, 0.82), rgba(18, 22, 32, 0.92));
    z-index: 4;
    isolation: isolate;
}

.card--profile.card--profile--open::after {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: inherit;
    border: 1px solid rgba(112, 168, 255, 0.5);
    box-shadow: 0 0 42px rgba(112, 168, 255, 0.45);
    opacity: 0.85;
    pointer-events: none;
}

.theme-light .card--profile.card--profile--open {
    border-color: rgba(84, 120, 188, 0.5);
    box-shadow: 0 36px 72px rgba(112, 146, 210, 0.38);
    background: linear-gradient(160deg, rgba(232, 240, 255, 0.95), rgba(212, 226, 248, 0.88));
}

.theme-light .card--profile.card--profile--open::after {
    border-color: rgba(68, 108, 180, 0.5);
    box-shadow: 0 0 46px rgba(68, 108, 180, 0.45);
}

.card--profile img {
    width: clamp(104px, 12vw, 140px);
    height: clamp(104px, 12vw, 140px);
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--profile-border);
    box-shadow: var(--profile-shadow);
}

.card--profile__summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(0.4rem, 0.8vw, 0.65rem);
    flex: 1;
    width: 100%;
}

.card--profile__summary h3 {
    margin: 0;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    min-height: 2.4em;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-wrap: balance;
}

.card--profile__role {
    margin: 0;
    color: var(--color-muted);
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    min-height: 4.8em;
    line-height: 1.35;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-wrap: balance;
}

.theme-light .card--profile__role {
    color: rgba(24, 30, 46, 0.62);
}

.card--profile__prompt {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    margin-top: auto;
}

.theme-light .card--profile__prompt {
    color: rgba(16, 18, 26, 0.45);
}

.card--profile__indicator {
    position: absolute;
    top: clamp(1.5rem, 2.4vw, 1.9rem);
    right: clamp(1.5rem, 2.4vw, 1.9rem);
    width: 16px;
    height: 16px;
    border-right: 2px solid rgba(255, 255, 255, 0.55);
    border-bottom: 2px solid rgba(255, 255, 255, 0.55);
    transform: rotate(45deg);
    transition: transform 0.3s ease, border-color 0.3s ease;
    pointer-events: none;
}

.theme-light .card--profile__indicator {
    border-color: rgba(16, 18, 26, 0.45);
}

.card--profile.card--profile--open .card--profile__indicator {
    transform: rotate(-135deg);
    border-color: var(--color-contrast);
}

.profile-panel {
    display: none;
}

.profile-panel.profile-panel--visible {
    display: block;
    margin-top: clamp(2rem, 5vw, 3.5rem);
}

.profile-panel__inner {
    position: relative;
    max-width: min(920px, 100%);
    margin: 0 auto;
    padding: clamp(2rem, 3vw, 2.75rem);
    border-radius: var(--radius);
    background: rgba(24, 26, 34, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.45);
    animation: profile-panel-fade 420ms var(--motion-ease);
}

.theme-light .profile-panel__inner {
    background: rgba(226, 239, 255, 0.95);
    border: 1px solid rgba(112, 146, 210, 0.32);
    box-shadow: 0 36px 72px rgba(112, 146, 210, 0.28);
    color: rgba(24, 30, 46, 0.92);
}

.profile-panel__header {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1.25rem;
}

.profile-panel__header h3 {
    margin: 0;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.profile-panel__role {
    margin: 0;
    color: var(--color-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.theme-light .profile-panel__role {
    color: rgba(24, 30, 46, 0.58);
}

.profile-panel__body {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.profile-panel__body p {
    margin: 0;
    line-height: 1.8;
}

.profile-panel__close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    width: 34px;
    height: 34px;
    color: var(--color-contrast);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.profile-panel__close:hover,
.profile-panel__close:focus-visible {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.32);
    transform: scale(1.05);
    outline: none;
}

.profile-panel__close span {
    font-size: 1.25rem;
    line-height: 1;
}

.theme-light .profile-panel__close {
    background: rgba(16, 18, 26, 0.08);
    border-color: rgba(16, 18, 26, 0.18);
    color: rgba(24, 30, 46, 0.9);
}

.theme-light .profile-panel__close:hover,
.theme-light .profile-panel__close:focus-visible {
    background: rgba(16, 18, 26, 0.16);
    border-color: rgba(16, 18, 26, 0.26);
}

@keyframes profile-panel-fade {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 639px) {
    .card--profile {
        width: min(100%, 280px);
    }

    .card-grid--profiles.card-grid--profiles--active .card--profile:not(.card--profile--open) {
        transform: translateY(3px) scale(0.96);
    }
}

@media (min-width: 960px) {
    .card--profile.card--profile--open {
        grid-column: span 2;
    }
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background: rgba(15, 18, 28, 0.75);
}

.contact-form__fields {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form__label {
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-muted);
}

.contact-form__input,
.contact-form__textarea {
    width: 100%;
    padding: 0.95rem 1.1rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(12, 14, 22, 0.72);
    color: inherit;
    font: inherit;
}

.contact-form__textarea {
    min-height: 180px;
    resize: vertical;
}

.contact-form__input:focus,
.contact-form__textarea:focus {
    outline: none;
    border-color: var(--color-contrast);
    box-shadow: 0 0 0 2px rgba(84, 120, 188, 0.25);
}

.contact-form__feedback {
    min-height: 1.2rem;
    font-size: 0.85rem;
    color: var(--color-muted);
    transition: color 0.25s ease;
}

.contact-form__feedback[data-state="success"] {
    color: #3ecf8e;
}

.contact-form__feedback[data-state="success"]::before {
    content: "✓ ";
    font-weight: 700;
}

.contact-form__feedback[data-state="error"] {
    color: #e85c5c;
}

.contact-form__feedback[data-state="error"]::before {
    content: "✕ ";
    font-weight: 700;
}

.contact-form--success .contact-form__input,
.contact-form--success .contact-form__textarea {
    border-color: rgba(62, 207, 142, 0.35);
    transition: border-color 0.4s ease;
}

@keyframes form-shake {
    0%   { transform: translateX(0); }
    15%  { transform: translateX(-7px); }
    30%  { transform: translateX(6px); }
    45%  { transform: translateX(-5px); }
    60%  { transform: translateX(4px); }
    75%  { transform: translateX(-2px); }
    100% { transform: translateX(0); }
}

.contact-form--shake {
    animation: form-shake 0.48s var(--motion-ease);
}

.theme-light .contact-form {
    background: rgba(223, 237, 255, 0.92);
}

.theme-light .contact-form__input,
.theme-light .contact-form__textarea {
    background: rgba(240, 246, 255, 0.88);
    border-color: rgba(84, 120, 188, 0.22);
}

.partner-card {
    position: relative;
}

.partner-card__trigger {
    position: relative;
    z-index: 2;
}

.partner-preview {
    position: fixed;
    top: 0;
    left: 0;
    width: min(380px, 48vw);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px) scale(0.94);
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 80;
}

.partner-preview[data-active="true"] {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.partner-preview__frame {
    background: rgba(10, 14, 22, 0.94);
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 32px 60px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    backdrop-filter: blur(14px);
}

.partner-preview__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.68);
}

.partner-preview__title {
    color: rgba(255, 255, 255, 0.88);
}

.partner-preview__body {
    position: relative;
    width: 100%;
    height: min(225px, 32vh);
}

.partner-preview__body iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0 0 1.5rem 1.5rem;
    background: rgb(6, 8, 14);
}

.partner-preview__fallback {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 1.8rem;
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.75);
    background: rgba(6, 8, 14, 0.9);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.partner-preview[data-error="true"] .partner-preview__fallback {
    opacity: 1;
}

.theme-light .partner-preview__frame {
    background: rgba(240, 244, 255, 0.95);
    border-color: rgba(68, 108, 180, 0.2);
    box-shadow: 0 32px 58px rgba(70, 108, 160, 0.28);
}

.theme-light .partner-preview__header {
    border-bottom-color: rgba(68, 108, 180, 0.2);
    color: rgba(36, 48, 72, 0.7);
}

.theme-light .partner-preview__title {
    color: rgba(22, 30, 48, 0.88);
}

.theme-light .partner-preview__fallback {
    color: rgba(36, 48, 72, 0.72);
    background: rgba(228, 236, 255, 0.92);
}

.brand-grid {
    display: grid;
    gap: var(--spacing);
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    align-items: stretch;
    justify-items: center;
}

.brand-card {
    width: 100%;
    padding: 1.5rem;
    border-radius: var(--radius);
    background: var(--card-background);
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-card img {
    max-width: 160px;
}

.timeline-section {
    position: relative;
}

.timeline {
    position: relative;
    display: grid;
    gap: var(--spacing);
    padding-left: clamp(2rem, 4vw, 3rem);
}

.timeline::before {
    content: "";
    position: absolute;
    inset-block: 0;
    left: clamp(0.9rem, 3vw, 1.4rem);
    width: 2px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0));
    pointer-events: none;
}

.theme-light .timeline::before {
    background: linear-gradient(180deg, rgba(16, 18, 26, 0.3), rgba(16, 18, 26, 0));
}

.timeline__item {
    position: relative;
    padding: var(--spacing);
    border-radius: var(--radius);
    background: var(--card-background);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-soft);
}

.timeline__item:hover {
    border-color: var(--color-contrast);
    box-shadow: var(--shadow-hard);
}

.timeline__index {
    position: absolute;
    left: calc(-1 * clamp(2.4rem, 5vw, 3rem));
    top: 50%;
    transform: translateY(-50%);
    width: clamp(2.4rem, 4vw, 2.8rem);
    height: clamp(2.4rem, 4vw, 2.8rem);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: 0.08em;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0));
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.theme-light .timeline__index {
    background: linear-gradient(135deg, rgba(16, 18, 26, 0.08), rgba(16, 18, 26, 0));
    border-color: rgba(16, 18, 26, 0.1);
}

.timeline__content h3 {
    margin-bottom: 0.4rem;
    font-size: 1.05rem;
    text-transform: uppercase;
}

.timeline__content p {
    margin: 0;
    color: var(--color-muted);
}

.testimonials {
    overflow: hidden;
}

.testimonial-grid {
    display: grid;
    gap: var(--spacing);
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.testimonial-card {
    position: relative;
    padding: clamp(1.8rem, 2vw + 1rem, 2.4rem);
    border-radius: var(--radius);
    background: var(--card-background);
    border: 1px solid var(--card-border);
    box-shadow: 0 26px 50px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(12px);
    display: grid;
    gap: 1rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.testimonial-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at 20% 15%, rgba(120, 170, 255, 0.22), transparent 55%),
        radial-gradient(circle at 80% 85%, rgba(255, 120, 200, 0.16), transparent 65%);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    z-index: 0;
}

.testimonial-card:hover,
.testimonial-card:focus-within {
    transform: translateY(-8px);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(24, 28, 38, 0.75);
}

.testimonial-card:hover::before,
.testimonial-card:focus-within::before {
    opacity: 1;
}

.testimonial-card > * {
    position: relative;
    z-index: 1;
}

.theme-light .testimonial-card {
    background: rgba(230, 240, 255, 0.85);
    border-color: rgba(112, 146, 210, 0.28);
    box-shadow: 0 32px 60px rgba(112, 146, 210, 0.18);
}

.theme-light .testimonial-card:hover,
.theme-light .testimonial-card:focus-within {
    background: rgba(230, 240, 255, 0.95);
    border-color: rgba(84, 120, 188, 0.5);
    box-shadow: 0 40px 90px rgba(112, 146, 210, 0.28);
}

.testimonial-card blockquote {
    margin: 0;
    font-size: 1rem;
    line-height: 1.75;
}

.testimonial-card__name {
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.testimonial-card__role {
    display: block;
    margin-top: 0.2rem;
    color: var(--color-muted);
    font-size: 0.85rem;
    letter-spacing: 0.06em;
}
.animate-fade-up {
    opacity: 0;
    transform: translateY(26px);
    transition:
        opacity 0.7s var(--motion-ease),
        transform 0.7s var(--motion-ease);
    transition-delay: calc(var(--stagger-index, 0) * 0.09s + var(--animation-offset, 0s));
}

.animate-fade-up.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.85rem 1.75rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.75rem;
    color: var(--button-text);
    border: 1px solid var(--button-border);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
    background: var(--button-bg);
    box-shadow: var(--button-shadow);
    position: relative;
    overflow: hidden;
}

/* Travelling shimmer streak — only on the primary (non-ghost, non-inverted) button */
.hero__actions .button:not(.button--ghost):not(.button--inverted)::before {
    content: "";
    position: absolute;
    top: 0;
    left: -75%;
    width: 55%;
    height: 100%;
    background: linear-gradient(
        105deg,
        transparent 20%,
        rgba(255, 255, 255, 0.18) 50%,
        transparent 80%
    );
    animation: btn-shimmer 2.8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes btn-shimmer {
    0%   { left: -75%; opacity: 0; }
    10%  { opacity: 1; }
    60%  { left: 120%; opacity: 1; }
    61%  { opacity: 0; }
    100% { left: 120%; opacity: 0; }
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hard);
    background: var(--button-hover-bg);
}

.button--ghost {
    background: transparent;
    border-color: var(--button-border);
}

.button--ghost:hover {
    background: var(--button-bg);
}

.button--inverted {
    background: var(--button-inverted-bg);
    color: var(--button-inverted-text);
    border-color: var(--button-inverted-bg);
    box-shadow: var(--shadow-hard);
}

.button--inverted:hover {
    background: var(--button-inverted-bg);
    filter: brightness(1.05);
}

.link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid var(--link-underline);
    padding-bottom: 0.15rem;
}

.link:hover {
    border-color: var(--color-contrast);
}

.footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--color-line);
    padding: 2rem 0;
    background: var(--footer-bg);
    color: var(--footer-text);
}

.footer__content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
    text-align: center;
    font-size: 0.9rem;
}

.footer__links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer__links a {
    text-decoration: none;
    color: var(--footer-link);
    font-size: 0.85rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
.footer__icon-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.footer__icon-link svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

@media (max-width: 720px) {
    .hero__layout {
        gap: 2.5rem;
    }

    .hero__visual {
        display: grid;
        width: min(240px, 70vw);
        margin-inline: auto;
        margin-top: 1rem;
        z-index: 2;
    }

    .hero-card {
        --orbit-distance: clamp(6rem, 32vw, 7.5rem);
        width: clamp(7.2rem, 48vw, 8.6rem);
        z-index: 5;
    }

    .hero__content {
        position: relative;
        z-index: 3;
    }

    .hero {
        min-height: unset;
        padding: clamp(1.25rem, 4vw, 2rem) 0 clamp(5rem, 14vw, 7rem);
        position: relative;
        z-index: 1;
        overflow: visible;
    }

    .site-header__inner {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
    }

    .timeline {
        padding-left: 0;
    }

    .timeline::before {
        display: none;
    }

    .timeline__item {
        padding-left: var(--spacing);
    }

    .timeline__index {
        position: static;
        transform: none;
        margin-bottom: 0.75rem;
    }

    .hero__actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .list li {
        border-left-width: 2px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition: none !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

    .animate-fade-up,
    .animate-fade-up.is-revealed {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .hero__background {
        animation: none !important;
        transform: none !important;
    }
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(28px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes hero-card-orbit {
    0% {
        transform:
            translate(-50%, -50%)
            rotate(var(--orbit-rotation))
            translateX(calc(var(--orbit-distance) * var(--orbit-ring-radius)))
            translateY(var(--orbit-height-offset))
            rotate(calc(-1 * var(--orbit-rotation)));
    }
    50% {
        transform:
            translate(-50%, -50%)
            rotate(calc(var(--orbit-rotation) + 180deg))
            translateX(calc(var(--orbit-distance) * var(--orbit-ring-radius)))
            translateY(var(--orbit-height-offset))
            rotate(calc(-180deg - var(--orbit-rotation)));
    }
    100% {
        transform:
            translate(-50%, -50%)
            rotate(calc(var(--orbit-rotation) + 360deg))
            translateX(calc(var(--orbit-distance) * var(--orbit-ring-radius)))
            translateY(var(--orbit-height-offset))
            rotate(calc(-360deg - var(--orbit-rotation)));
    }
}

@keyframes hero-matrix-scroll {
    0% {
        transform: rotate(-2deg) translate3d(0, 0, 0);
    }
    50% {
        transform: rotate(-2deg) translate3d(-40px, -20px, 0);
    }
    100% {
        transform: rotate(-2deg) translate3d(-80px, -40px, 0);
    }
}

@keyframes hero-pan {
    from {
        transform: scale(1.05) translateY(-1%);
    }
    to {
        transform: scale(1.1) translateY(2%);
    }
}

.landing-roots {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
    mix-blend-mode: screen;
    z-index: 1;
    opacity: 0.7;
    transition: opacity 0.36s ease;
}

.landing-roots--closing {
    opacity: 0;
}

.landing-ring {
    position: relative;
    width: clamp(260px, 28vw, 340px);
    aspect-ratio: 1;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.65);
    display: grid;
    place-items: center;
    text-transform: none;
    letter-spacing: 0.32em;
    font-size: clamp(1.2rem, 2.8vw, 1.6rem);
    font-weight: 600;
    color: #d8e8ff;
    text-shadow: 0 0 22px rgba(110, 188, 255, 0.75);
    box-shadow: 0 0 24px rgba(100, 160, 255, 0.35);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.landing-ring::before {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #ffffff;
    border-right-color: #ffffff;
    animation: landing-ring-spin 2.4s linear infinite;
}

.landing-ring--expanding {
    box-shadow: 0 0 160px rgba(148, 205, 255, 0.5);
}

.landing-ring--clone {
    position: fixed;
    pointer-events: none;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(148, 205, 255, 0.6) 0%, rgba(20, 32, 48, 0.2) 55%, transparent 80%);
    box-shadow: 0 0 140px rgba(148, 205, 255, 0.42);
    border: 2px solid rgba(148, 205, 255, 0.4);
    mix-blend-mode: screen;
    transform-origin: 50% 50%;
}

.landing-ring__orb {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50%;
    height: 4px;
    transform-origin: left center;
    animation: landing-ring-orbit 2.4s linear infinite;
}

.landing-ring__orb::before {
    content: "";
    position: absolute;
    top: -7px;
    right: -8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.9);
    z-index: 4;
}

.math-section,
.math-forest {
    position: relative;
    padding: clamp(3.5rem, 8vw, 5.5rem) 0;
    background:
        radial-gradient(circle at 40% -10%, rgba(148, 205, 255, 0.08), transparent 60%),
        linear-gradient(180deg, rgba(6, 10, 18, 0.74), rgba(4, 7, 12, 0.82));
    overflow: hidden;
}

.math-section::before,
.math-forest::before {
    content: "";
    position: absolute;
    inset: -25% -35% auto -35%;
    height: 140%;
    background: radial-gradient(circle, rgba(120, 180, 255, 0.06), transparent 70%);
    transform: rotate(6deg);
    opacity: 0.45;
    pointer-events: none;
}

.math-section__inner,
.math-forest__inner {
    position: relative;
    z-index: 1;
    width: min(92%, 1040px);
    margin: 0 auto;
    display: grid;
    gap: clamp(2.2rem, 4vw, 3.4rem);
}

.math-section__header {
    display: grid;
    gap: 0.6rem;
    color: rgba(240, 244, 252, 0.88);
}

.math-section__eyebrow {
    margin: 0;
    font-size: 0.72rem;
    letter-spacing: 0.36em;
    text-transform: uppercase;
    color: rgba(148, 205, 255, 0.65);
}

.math-section__header h2 {
    margin: 0;
    font-size: clamp(1.4rem, 2.8vw, 2rem);
    font-weight: 500;
    letter-spacing: 0.015em;
    max-width: 42ch;
}

.math-timeline {
    display: grid;
    grid-template-columns: minmax(240px, 0.95fr) minmax(280px, 1.05fr);
    gap: clamp(2rem, 6vw, 4rem);
    align-items: center;
}

.math-timeline__diagram {
    position: relative;
    width: min(340px, 64vw);
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(10, 14, 22, 0.8), rgba(4, 6, 10, 0.95));
    border: 1px solid rgba(148, 205, 255, 0.18);
    overflow: hidden;
    display: grid;
    place-items: center;
    box-shadow: 0 0 40px rgba(148, 205, 255, 0.2);
    transition: transform 0.4s var(--motion-ease);
}

.math-timeline__diagram::after {
    content: "";
    position: absolute;
    inset: 12%;
    border-radius: 50%;
    border: 1px solid rgba(148, 205, 255, 0.25);
    opacity: 0.6;
}

.math-timeline__diagram[data-active="01"],
.math-timeline__diagram[data-active="02"],
.math-timeline__diagram[data-active="03"],
.math-timeline__diagram[data-active="04"] {
    transform: scale(1.04);
}

.math-timeline__diagram--active::after {
    box-shadow: 0 0 30px rgba(148, 205, 255, 0.3);
}

.math-timeline__spiral {
    position: absolute;
    inset: 18%;
    border-radius: 50%;
    background: conic-gradient(from 90deg, rgba(148, 205, 255, 0.0) 0 40%, rgba(148, 205, 255, 0.4) 50%, rgba(148, 205, 255, 0.0) 60% 100%);
    filter: blur(2px);
    animation: math-spiral 14s linear infinite;
}

.math-timeline__beam {
    position: absolute;
    inset: 18%;
    border-radius: 50%;
    background: conic-gradient(from 0deg, rgba(148, 205, 255, 0) 0 35%, rgba(148, 205, 255, 0.55) 45%, rgba(148, 205, 255, 0) 55% 100%);
    filter: blur(1.5px);
    opacity: 0;
    transform: rotate(0deg);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.math-timeline__diagram--active .math-timeline__beam {
    opacity: 1;
}

.math-timeline__axis {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, rgba(148, 205, 255, 0.2), rgba(148, 205, 255, 0));
}

.math-timeline__axis--x {
    transform: rotate(90deg);
}

.math-timeline__axis--y {
    background: linear-gradient(180deg, rgba(148, 205, 255, 0.35), rgba(148, 205, 255, 0));
}

.math-timeline__core {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 1px solid rgba(148, 205, 255, 0.6);
    background: radial-gradient(circle, rgba(148, 205, 255, 0.32), rgba(12, 18, 28, 0.86));
    font-size: 1rem;
    letter-spacing: 0.22em;
    color: rgba(230, 242, 255, 0.85);
    text-transform: uppercase;
    transition: transform 0.4s var(--motion-ease);
}

.math-timeline__steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: clamp(1.4rem, 3vw, 2.4rem);
    position: relative;
}


.math-timeline__steps::before {
    content: "";
    position: absolute;
    left: 1.31rem;
    top: 0.1rem;
    bottom: 0.1rem;
    width: 1px;
    background: linear-gradient(180deg, rgba(148, 205, 255, 0.35), rgba(148, 205, 255, 0));
}

.math-step {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: center;
    padding-left: 0.4rem;
}

.math-step__badge {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(148, 205, 255, 0.25), rgba(148, 205, 255, 0.05));
    border: 1px solid rgba(148, 205, 255, 0.4);
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    color: rgba(220, 234, 255, 0.9);
    box-shadow: 0 0 22px rgba(148, 205, 255, 0.32);
    transition: border-color 0.4s var(--motion-ease), box-shadow 0.4s var(--motion-ease), color 0.4s var(--motion-ease);
}

.math-step__body h3 {
    margin: 0 0 0.4rem;
    font-size: 0.96rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(234, 240, 248, 0.95);
    transition: color 0.4s var(--motion-ease);
}

.math-step__body p {
    margin: 0;
    color: rgba(210, 220, 233, 0.8);
    line-height: 1.6;
    transition: color 0.4s var(--motion-ease);
}

.math-step--active .math-step__badge {
    border-color: rgba(148, 205, 255, 0.75);
    box-shadow: 0 0 32px rgba(148, 205, 255, 0.5);
    color: rgba(244, 252, 255, 0.95);
}

.math-step--active .math-step__body h3 {
    color: rgba(244, 250, 255, 0.98);
}

.math-step--active .math-step__body p {
    color: rgba(226, 236, 248, 0.85);
}

.math-timeline__core-label {
    pointer-events: none;
    transition: opacity 0.4s var(--motion-ease);
}

.math-timeline__core-formula {
    position: absolute;
    bottom: -2.2rem;
    left: 50%;
    transform: translate(-50%, 6px);
    font-size: 0.75rem;
    letter-spacing: 0.24em;
    color: rgba(148, 205, 255, 0.6);
    text-transform: uppercase;
    opacity: 0;
    transition: opacity 0.4s var(--motion-ease), transform 0.4s var(--motion-ease);
    white-space: nowrap;
}

.math-timeline__core--active .math-timeline__core-formula {
    opacity: 1;
    transform: translate(-50%, 0);
}

.math-timeline__core--active .math-timeline__core-label {
    opacity: 0.75;
}


.math-forest__grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: clamp(1.6rem, 4vw, 3rem);
    --forest-active: 0;
}

.math-forest__grid::before {
    content: "";
    position: absolute;
    inset: -22% auto -22% 50%;
    width: 1px;
    background: linear-gradient(180deg, rgba(108, 186, 160, 0.08), rgba(108, 186, 160, 0));
    transform: translateX(-50%);
    pointer-events: none;
}

.forest-card {
    position: relative;
    display: grid;
    gap: 1.4rem;
    padding: 2.4rem 1.9rem 2.6rem;
    border-radius: 30px;
    background: rgba(14, 10, 22, 0.82);
    border: 1px solid rgba(190, 155, 255, 0.28);
    box-shadow: 0 34px 64px rgba(0, 0, 0, 0.38);
    overflow: hidden;
    transition: transform 0.45s var(--motion-ease), border-color 0.45s var(--motion-ease), box-shadow 0.45s var(--motion-ease);
    backdrop-filter: blur(18px);
}

.forest-card::before {
    content: "";
    position: absolute;
    inset: auto 42% -18% 42%;
    height: 180px;
    background: linear-gradient(180deg, rgba(190, 155, 255, 0.35), rgba(190, 155, 255, 0));
    filter: blur(2px);
    pointer-events: none;
}

.forest-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(190, 155, 255, 0.10), transparent 65%);
    opacity: 0;
    transition: opacity 0.45s ease;
    pointer-events: none;
}

.forest-card__header {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: rgba(190, 155, 255, 0.72);
    font-size: 0.8rem;
}

.forest-card__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(190, 155, 255, 0.35);
    background: radial-gradient(circle, rgba(190, 155, 255, 0.28), rgba(190, 155, 255, 0.04));
    font-size: 0.78rem;
    letter-spacing: 0.24em;
    color: rgba(230, 220, 255, 0.85);
    box-shadow: 0 0 18px rgba(190, 155, 255, 0.25);
}

.forest-card__client {
    font-weight: 600;
    letter-spacing: 0.32em;
}

.forest-card__problem {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 500;
    line-height: 1.6;
    color: rgba(236, 244, 242, 0.9);
}

.forest-card__vein {
    position: absolute;
    left: 1.4rem;
    top: 6.5rem;
    bottom: 4.5rem;
    width: 2px;
    background: linear-gradient(180deg, rgba(190, 155, 255, 0.55), rgba(190, 155, 255, 0));
}

.forest-card__rings {
    list-style: none;
    margin: 0;
    padding: 0 0 0 2.4rem;
    display: grid;
    gap: 0.65rem;
}

.forest-card__rings li {
    position: relative;
    font-size: 0.92rem;
    color: rgba(210, 224, 220, 0.84);
}

.forest-card__ring-label {
    display: inline-block;
}

.forest-card__rings li::before {
    content: "";
    position: absolute;
    left: -1.6rem;
    top: 0.45rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(190, 155, 255, 0.55);
    background: radial-gradient(circle, rgba(190, 155, 255, 0.40), rgba(190, 155, 255, 0));
    box-shadow: 0 0 12px rgba(190, 155, 255, 0.38);
}

.forest-card__impact {
    position: relative;
    margin-top: 0.6rem;
    padding: 1.2rem 1.1rem;
    border-radius: 20px;
    background: rgba(30, 20, 50, 0.75);
    border: 1px solid rgba(190, 155, 255, 0.38);
    box-shadow: 0 26px 48px rgba(10, 6, 20, 0.45);
}

.forest-card__impact-label {
    display: inline-block;
    margin-bottom: 0.35rem;
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(210, 190, 255, 0.75);
}

.forest-card__impact p {
    margin: 0;
    line-height: 1.6;
    color: rgba(235, 228, 255, 0.92);
}

.forest-card:hover,
.forest-card--active {
    transform: translateY(-10px);
    border-color: rgba(190, 155, 255, 0.55);
    box-shadow: 0 36px 72px rgba(0, 0, 0, 0.45);
}

.forest-card:hover::after,
.forest-card--active::after {
    opacity: 1;
}

.forest-card:hover .forest-card__vein,
.forest-card--active .forest-card__vein {
    background: linear-gradient(180deg, rgba(190, 155, 255, 0.65), rgba(190, 155, 255, 0));
}

.forest-card:hover .forest-card__rings li::before,
.forest-card--active .forest-card__rings li::before {
    border-color: rgba(190, 155, 255, 0.6);
    box-shadow: 0 0 14px rgba(190, 155, 255, 0.45);
}

.forest-card:hover .forest-card__impact,
.forest-card--active .forest-card__impact {
    background: rgba(50, 30, 80, 0.82);
    border-color: rgba(210, 170, 255, 0.5);
}

.theme-light .hero__matrix {
    background:
        radial-gradient(circle at 52% 52%, rgba(218, 228, 255, 0.26), transparent 60%),
        radial-gradient(circle at 18% 28%, rgba(208, 224, 255, 0.18), transparent 48%),
        radial-gradient(circle at 82% 36%, rgba(210, 226, 255, 0.2), transparent 48%),
        repeating-linear-gradient(90deg, rgba(186, 204, 255, 0.12) 0, rgba(186, 204, 255, 0.12) 1px, transparent 1px, transparent 28px),
        repeating-linear-gradient(0deg, rgba(186, 204, 255, 0.12) 0, rgba(186, 204, 255, 0.12) 1px, transparent 1px, transparent 28px);
    opacity: 0.52;
    filter: blur(0);
}

.theme-light .math-section,
.theme-light .math-forest {
    background:
        radial-gradient(circle at 38% -12%, rgba(68, 108, 160, 0.08), transparent 62%),
        linear-gradient(180deg, rgba(244, 248, 255, 0.32), rgba(228, 236, 248, 0.24));
}

.theme-light .math-section::before,
.theme-light .math-forest::before {
    background: radial-gradient(circle, rgba(104, 148, 210, 0.1), transparent 72%);
    opacity: 0.22;
}

.theme-light .math-section__header {
    color: rgba(22, 26, 36, 0.92);
}

.theme-light .math-section__eyebrow {
    color: rgba(46, 72, 120, 0.58);
}

.theme-light .math-section__header h2 {
    color: rgba(22, 26, 36, 0.92);
}

.theme-light .math-timeline__diagram {
    background: radial-gradient(circle, rgba(246, 248, 255, 0.92), rgba(222, 232, 242, 0.96));
    border-color: rgba(46, 72, 120, 0.18);
    box-shadow: 0 0 28px rgba(46, 72, 120, 0.18);
}

.theme-light .math-timeline__diagram::after {
    border-color: rgba(46, 72, 120, 0.24);
}

.theme-light .math-timeline__spiral {
    background: conic-gradient(from 90deg, rgba(46, 72, 120, 0.0) 0 40%, rgba(46, 72, 120, 0.3) 50%, rgba(46, 72, 120, 0.0) 60% 100%);
}

.theme-light .math-timeline__axis {
    background: linear-gradient(180deg, rgba(46, 72, 120, 0.28), rgba(46, 72, 120, 0));
}

.theme-light .math-timeline__core {
    border-color: rgba(46, 72, 120, 0.45);
    background: radial-gradient(circle, rgba(46, 72, 120, 0.24), rgba(246, 248, 255, 0.92));
    color: rgba(22, 26, 36, 0.85);
}

.theme-light .math-timeline__steps::before {
    background: linear-gradient(180deg, rgba(46, 72, 120, 0.35), rgba(46, 72, 120, 0));
}

.theme-light .math-step__badge {
    background: radial-gradient(circle, rgba(46, 72, 120, 0.2), rgba(46, 72, 120, 0.05));
    border-color: rgba(46, 72, 120, 0.35);
    color: rgba(22, 26, 36, 0.78);
    box-shadow: 0 0 18px rgba(46, 72, 120, 0.22);
}

.theme-light .math-step__body h3 {
    color: rgba(22, 26, 36, 0.88);
}

.theme-light .math-step__body p {
    color: rgba(46, 52, 64, 0.78);
}

.theme-light .math-step--active .math-step__badge {
    border-color: rgba(46, 72, 120, 0.58);
    color: rgba(22, 26, 36, 0.88);
}

.theme-light .math-step--active .math-step__body p {
    color: rgba(36, 48, 62, 0.8);
}

.theme-light .math-timeline__core-formula {
    color: rgba(46, 72, 120, 0.55);
}

.theme-light .math-forest__grid {
    gap: clamp(1.4rem, 3.5vw, 2.5rem);
}

.theme-light .forest-card {
    background: rgba(240, 236, 255, 0.92);
    border: 1px solid rgba(140, 100, 220, 0.28);
    box-shadow: 0 34px 64px rgba(30, 20, 55, 0.14);
}

.theme-light .forest-card::before {
    background: linear-gradient(180deg, rgba(160, 120, 240, 0.28), rgba(160, 120, 240, 0));
}

.theme-light .forest-card__header,
.theme-light .forest-card__problem {
    color: rgba(24, 18, 42, 0.9);
}

.theme-light .forest-card__badge {
    border-color: rgba(130, 80, 210, 0.4);
    color: rgba(40, 20, 80, 0.72);
}

.theme-light .forest-card__vein {
    background: linear-gradient(180deg, rgba(160, 120, 240, 0.55), rgba(160, 120, 240, 0));
}

.theme-light .forest-card__rings li {
    color: rgba(50, 36, 80, 0.78);
}

.theme-light .forest-card__rings li::before {
    border-color: rgba(160, 120, 240, 0.45);
    background: radial-gradient(circle, rgba(160, 120, 240, 0.32), rgba(160, 120, 240, 0));
    box-shadow: 0 0 10px rgba(160, 120, 240, 0.28);
}

.theme-light .forest-card__impact {
    background: rgba(220, 210, 255, 0.70);
    border-color: rgba(160, 120, 240, 0.40);
    box-shadow: 0 26px 48px rgba(100, 70, 160, 0.20);
}

.theme-light .forest-card__impact p {
    color: rgba(30, 18, 60, 0.82);
}

.theme-light .forest-card--active .forest-card__vein {
    background: linear-gradient(180deg, rgba(120, 80, 200, 0.65), rgba(120, 80, 200, 0));
}

.theme-light .forest-card--active .forest-card__rings li::before {
    border-color: rgba(120, 80, 200, 0.6);
    box-shadow: 0 0 14px rgba(120, 80, 200, 0.5);
}

.theme-light .case-root {
    background: radial-gradient(circle at top, rgba(68, 108, 160, 0.12), rgba(242, 246, 255, 1) 68%);
    color: rgba(24, 30, 42, 0.9);
}

.theme-light .case-root__node {
    background: linear-gradient(200deg, rgba(250, 252, 255, 0.96), rgba(230, 236, 245, 0.98));
    border-color: rgba(68, 108, 160, 0.28);
    box-shadow: 0 22px 38px rgba(30, 40, 55, 0.18);
}

.theme-light .case-root__badge {
    border-color: rgba(68, 108, 160, 0.4);
    color: rgba(24, 30, 42, 0.78);
}

.theme-light .case-root__node p {
    color: rgba(40, 52, 70, 0.78);
}

.theme-light .case-root__node:hover,
.theme-light .case-root__node:focus-within {
    border-color: rgba(68, 108, 160, 0.5);
    box-shadow: 0 32px 58px rgba(40, 56, 78, 0.22);
}

@keyframes math-spiral {
    0% {
        transform: rotate(0deg) scale(0.98);
        opacity: 0.9;
    }
    100% {
        transform: rotate(360deg) scale(1.02);
        opacity: 0.6;
    }
}

@media (max-width: 960px) {
    .math-timeline {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .math-timeline__steps::before {
        left: 0.75rem;
    }
}

@media (max-width: 640px) {
    .math-section__eyebrow {
        letter-spacing: 0.28em;
    }

    .math-timeline__diagram {
        width: min(280px, 80vw);
    }

    .math-step {
        grid-template-columns: auto 1fr;
    }

    .forest-card {
        padding: 2rem 1.4rem 2.2rem;
    }

    .forest-card__rings {
        padding-left: 0.9rem;
    }
}

@keyframes landing-ring-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes landing-ring-orbit {
    0% { transform: rotate(45deg); }
    100% { transform: rotate(405deg); }
}

/* ── Root-page hero: compact, palette-tinted ── */
.page-hero--root {
    padding: 14px 0 10px;
    position: relative;
    z-index: 5;
}

.page-hero--root .eyebrow {
    font-size: 0.60rem;
    letter-spacing: 0.20em;
    margin-bottom: 0.25rem;
    opacity: 0.55;
}

.page-hero--root h1 {
    font-size: clamp(0.85rem, 1.4vw, 1.05rem);
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin: 0;
    line-height: 1.2;
}

/* per-page tint colours */
.page-hero--root.hero-amber  h1 { color: rgba(220,155,35,0.88); }
.page-hero--root.hero-teal   h1 { color: rgba(30,210,170,0.88); }
.page-hero--root.hero-orange h1 { color: rgba(255,130,40,0.88); }
.page-hero--root.hero-purple h1 { color: rgba(190,150,255,0.88); }
/* Home's arm colour on the landing root — every page wears the hue of the arm that
   leads to it, and Home had no hero (and so no rule) until now. */
.page-hero--root.hero-blue   h1 { color: rgba(180,230,255,0.90); }

/* LIGHT-THEME HEADLINES, darkened to carry on a near-white page.
   Each page's headline wears its own root's hue, and a hue that glows on near-black is
   not the same colour that reads on #f5f7fa. Measured before: Team 3.25, Contact 3.58,
   About 4.13 — all under the 4.5 this 17px bold text needs, and Team's teal was the
   worst because mid-teal sits high in luminance. Measured after: 4.6 to 5.6. The hue is
   preserved; only its lightness moved. */
.theme-light .page-hero--root.hero-amber  h1 { color: rgba(116,68,4,0.94);    }
.theme-light .page-hero--root.hero-teal   h1 { color: rgba(10,94,80,0.96);    }
.theme-light .page-hero--root.hero-orange h1 { color: rgba(154,58,6,0.94);    }
.theme-light .page-hero--root.hero-purple h1 { color: rgba(84,46,172,0.94);   }
.theme-light .page-hero--root.hero-blue   h1 { color: rgba(16,72,110,0.94);   }


.about-stage {
    position: relative;
    width: 100%;
    /* pre-JS fallback only — fit-viewport.js sets the exact height. Reserves more
       than the hero needs (real gap is ~246px) so the first paint is slightly
       short instead of overflowing and flashing a scrollbar. */
    height: calc(100vh - var(--header-height, 60px) - 250px);
    overflow: hidden;
    margin-bottom: 0;
}

.about-stage__canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* ── liquid-glass layer (glass-cards.js) ──
   One canvas for all three cards, sitting between the root and the cards. It
   only appears once the WebGL2 context is live: the class is added by JS, so a
   browser without WebGL2 keeps the original painted cards untouched. */
.glass-cards__canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* With the glass live, the card stops painting its own pane — the canvas below
   is the pane now. The amber border and the shadow stay: they are what define
   the card's edge against the refraction. */
.has-glass-cards .about-card {
    background: transparent;
    backdrop-filter: none;
}

/* ── shared card base ── */
.about-card {
    position: absolute;
    z-index: 2;
    width: clamp(200px, 24vw, 270px);
    background: rgba(14, 10, 22, 0.86);
    border: 1px solid rgba(220, 155, 35, 0.32);
    border-radius: 14px;
    padding: 1.1rem 1.3rem 1.2rem;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 36px rgba(0,0,0,0.55), 0 0 24px rgba(220,155,35,0.05);
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px);
    cursor: pointer;
    transition: opacity 0.7s ease, transform 0.7s ease, visibility 0s linear 0.7s,
                border-color 0.3s ease, box-shadow 0.3s ease, width 0.4s ease;
}

.about-card--visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease, visibility 0s linear 0s,
                border-color 0.3s ease, box-shadow 0.3s ease, width 0.4s ease;
}

/* hover: glow border */
.about-card--visible:hover,
.about-card--visible:focus-visible {
    border-color: rgba(220, 155, 35, 0.70);
    box-shadow: 0 8px 36px rgba(0,0,0,0.55), 0 0 28px rgba(220,155,35,0.22);
}

/* open: wider, stronger glow */
.about-card--open {
    width: clamp(260px, 30vw, 340px);
    border-color: rgba(220, 155, 35, 0.75);
    box-shadow: 0 12px 48px rgba(0,0,0,0.65), 0 0 40px rgba(220,155,35,0.28);
    z-index: 4;
}

/* dim other cards when one is open */
.about-stage--has-open .about-card--visible:not(.about-card--open) {
    opacity: 0.30;
}

/* ── positions ── */
.about-card--left   { left: 3%;  top: 30%; }
.about-card--right  { right: 3%; top: 46%; }
.about-card--center { left: 50%; top: 4%;  transform: translateX(-50%) translateY(14px); }
.about-card--center.about-card--visible { transform: translateX(-50%) translateY(0); }
.about-card--center.about-card--open    { transform: translateX(-50%) translateY(0); }

/* ── preview (always visible) ── */
.about-card__preview { }

.about-card__hint {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.68rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(220, 155, 35, 0.45);
    transition: color 0.2s ease, opacity 0.2s ease;
}

.about-card--open .about-card__hint { opacity: 0; height: 0; margin: 0; overflow: hidden; }

/* ── detail (hidden until open) ── */
.about-card__detail {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s ease, opacity 0.4s ease;
    margin-top: 0;
}

.about-card--open .about-card__detail {
    max-height: 600px;
    opacity: 1;
    margin-top: 0.7rem;
}

/* ── typography ── */
.about-card__eyebrow {
    font-size: 0.68rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(220, 155, 35, 0.60);
    margin: 0 0 0.35rem;
}

.about-card h2 {
    font-size: 0.92rem;
    font-weight: 600;
    margin: 0;
    color: rgba(255, 228, 150, 0.92);
    line-height: 1.3;
}

.about-card p {
    margin: 0 0 0.5rem;
    line-height: 1.6;
    color: rgba(215, 205, 182, 0.78);
    font-size: 0.80rem;
}

.about-card__list {
    margin: 0.4rem 0 0;
    padding-left: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: rgba(210, 200, 175, 0.75);
    line-height: 1.5;
}

.about-card__values {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.about-card__value {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.about-card__value strong {
    font-size: 0.80rem;
    color: rgba(255, 222, 140, 0.86);
}

.about-card__value span {
    font-size: 0.74rem;
    color: rgba(205, 195, 168, 0.68);
    line-height: 1.45;
}

.about-card__steps {
    margin: 0;
    padding-left: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.38rem;
    font-size: 0.78rem;
    color: rgba(210, 200, 175, 0.75);
    line-height: 1.5;
}

.about-card__steps strong { color: rgba(255, 222, 140, 0.85); }

/* ── light theme ── */
.theme-light .about-card {
    background: rgba(255, 250, 232, 0.92);
    border-color: rgba(160, 100, 10, 0.28);
    box-shadow: 0 8px 36px rgba(80, 50, 0, 0.14);
}

.theme-light .about-card--visible:hover {
    border-color: rgba(160, 100, 10, 0.65);
    box-shadow: 0 8px 36px rgba(80,50,0,0.18), 0 0 22px rgba(160,100,10,0.18);
}

.theme-light .about-card--open {
    border-color: rgba(160, 100, 10, 0.75);
    box-shadow: 0 12px 48px rgba(80,50,0,0.22), 0 0 36px rgba(160,100,10,0.24);
}

.theme-light .about-card__eyebrow      { color: rgba(150, 88, 8, 0.65); }
.theme-light .about-card h2            { color: rgba(88, 52, 6, 0.92); }
.theme-light .about-card p             { color: rgba(68, 46, 14, 0.76); }
/* .82 and darker, not .45: at 45% this 11px bold hint measured 1.95 — a dark page can
   carry a low alpha because the ink is bright against black, a light page cannot. */
.theme-light .about-card__hint         { color: rgba(120, 68, 4, 0.82); }
.theme-light .about-card__list         { color: rgba(75, 50, 14, 0.72); }
.theme-light .about-card__value strong { color: rgba(100, 60, 8, 0.88); }
.theme-light .about-card__value span   { color: rgba(80, 55, 14, 0.68); }
.theme-light .about-card__steps        { color: rgba(75, 50, 14, 0.72); }
.theme-light .about-card__steps strong { color: rgba(100, 60, 8, 0.86); }

/* ── mobile: stack vertically ── */
/* Stacked when the window is too NARROW *or* too SHORT. The three cards are placed
   at 30% / 46% / 4% of the stage height, which only works while the stage is tall
   enough to hold them: in a landscape phone (812x375) card 02 ran 58px below the fold
   — measured. Below the threshold About uses the same stacked list it uses on a
   narrow phone. */
@media (max-width: 767px), (max-height: 520px) {
    .about-stage {
        height: auto;
        flex: none;
        /* 160, not 80. This subtracts the header but has to clear the page hero
           above the stage as well: header 66 + hero 69 = 135, so at -80 the stage
           was 914px inside a 994px window and About overflowed by exactly 55px —
           the only page in the site that did, and it flashed a scrollbar a phone
           never needed. Errs short by ~25px on purpose; the stage is `height: auto`
           in this layout, so content decides the real height and a short floor
           costs nothing. */
        min-height: calc(100vh - 160px);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 1rem;
        padding: 2rem 1rem 3rem;
    }

    .about-card {
        position: relative;
        width: min(100%, 380px) !important;
        left: auto; right: auto; top: auto;
        transform: translateY(14px);
    }

    .about-card--center,
    .about-card--center.about-card--visible,
    .about-card--center.about-card--open {
        transform: translateY(0);
        left: auto;
    }

    .about-card--visible { transform: translateY(0); }
}
