/* AI Vaerk — Shared Design System
   Loaded by all three sites: ai-vaerk.de, ki-schleswig.de, ki-brandenburg.de.
   Contains tokens, reset, base styles, nav, buttons, FAQ, contact, footer,
   grid entrance, draw-border, reveals, sparkle trail, and responsive rules.
   Site-specific files override or extend as needed. */

:root {
    --bg: #0D1117;
    --bg-elevated: rgba(230, 232, 235, 0.03);
    --text: #E6E8EB;
    --text-muted: #E6E8EB;
    --accent: #1E7A8A;
    --accent-rgb: 30, 122, 138;
    --accent-hover: #166571;
    --accent-soft: rgba(30, 122, 138, 0.15);
    --warm: #B87350;
    --grid-line: rgba(230, 232, 235, 0.1);
    --font-display: 'Sora', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-draw: cubic-bezier(0.4, 0, 0.2, 1);
    --accent-line-opacity: 0.8;
    --pad: 2.5rem;
    --max-w: 1120px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text-muted);
    background: var(--bg);
    overflow-x: clip;
}

/* Aurora accent line + scroll progress */
body::before,
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 1001;
}

body::before {
    background: linear-gradient(90deg, #12313A 0%, #1B3B3A 35%, #2E374A 65%, #12313A 100%);
    background-size: 200% 100%;
    animation: aurora 8s linear infinite;
}

body::after {
    background: linear-gradient(90deg, #1E7A8A 0%, #3A9E8B 35%, #7B8EC0 65%, #1E7A8A 100%);
    background-size: 200% 100%;
    animation: aurora 8s linear infinite;
    transform-origin: left;
    transform: scaleX(var(--scroll-progress, 0));
    transition: transform 0.15s linear;
    opacity: var(--accent-line-opacity);
}

@keyframes aurora {
    0%   { background-position: 0% 0; }
    100% { background-position: 200% 0; }
}

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

h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--text);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

h1 { font-size: clamp(2.5rem, 5vw + 0.5rem, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw + 0.25rem, 2.25rem); font-weight: 700; line-height: 1.2; }
h3 { font-size: 1.125rem; font-weight: 600; }

a { color: inherit; text-decoration: none; }
p { max-width: 60ch; }

/* ── Grid Shell ── */

.grid {
    max-width: var(--max-w);
    margin: 3px auto 0;
    border: 1px solid transparent;
    position: relative;
    overflow-anchor: none;
}

/* ── Grid Entrance Animation ── */

.grid__entrance {
    position: absolute;
    inset: -1px;
    pointer-events: none;
    z-index: 50;
}

.grid__entrance span {
    position: absolute;
    background: var(--grid-line);
}

.grid__entrance span:nth-child(1) {
    top: 0; left: 0; height: 1px; width: 0;
    animation: drawH 0.7s var(--ease-draw) 0.05s forwards;
}

.grid__entrance span:nth-child(2) {
    top: 0; right: 0; width: 1px; height: 0;
    animation: drawV 0.7s var(--ease-draw) 0.4s forwards;
}

.grid__entrance span:nth-child(3) {
    bottom: 0; right: 0; height: 1px; width: 0;
    animation: drawH 0.7s var(--ease-draw) 0.8s forwards;
}

.grid__entrance span:nth-child(4) {
    bottom: 0; left: 0; width: 1px; height: 0;
    animation: drawV 0.7s var(--ease-draw) 1.2s forwards;
}

@keyframes drawH { to { width: calc(100% + 2px); } }
@keyframes drawV { to { height: calc(100% + 2px); } }

/* ── Draw Border (section highlights) ── */

.draw-border {
    position: absolute;
    inset: -1px;
    pointer-events: none;
    z-index: 2;
}

.reveal--stagger > .draw-border {
    opacity: 1;
    transform: none;
    transition: none;
}

.draw-border span {
    position: absolute;
    background: var(--draw-color, var(--accent));
    opacity: var(--accent-line-opacity);
}

.draw-border span:nth-child(1) {
    top: 0; left: 0; height: 1px; width: 0;
    transition: width 0.3s var(--ease) 0.36s;
}
.draw-border span:nth-child(2) {
    top: 0; right: 0; width: 1px; height: 0;
    transition: height 0.3s var(--ease) 0.24s;
}
.draw-border span:nth-child(3) {
    bottom: 0; right: 0; height: 1px; width: 0;
    transition: width 0.3s var(--ease) 0.12s;
}
.draw-border span:nth-child(4) {
    bottom: 0; left: 0; width: 1px; height: 0;
    transition: height 0.3s var(--ease) 0s;
}

.draw-border--active span:nth-child(1) { width: calc(100% + 2px); transition-delay: 0s; }
.draw-border--active span:nth-child(2) { height: calc(100% + 2px); transition-delay: 0.1s; }
.draw-border--active span:nth-child(3) { width: calc(100% + 2px); transition-delay: 0.2s; }
.draw-border--active span:nth-child(4) { height: calc(100% + 2px); transition-delay: 0.3s; }

/* ── Nav ── */

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem var(--pad);
    position: sticky;
    top: 3px;
    background: var(--bg);
    z-index: 100;
}

.nav__wordmark {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--text);
}

.nav__wordmark span {
    color: var(--accent);
}

.nav__links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav__link {
    font-family: var(--font-display);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    transition: color 0.2s ease;
    position: relative;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    height: 2px;
    width: 0;
    background: linear-gradient(90deg, #1E7A8A, #3A9E8B, #7B8EC0);
    transition: width 0.3s var(--ease);
}

.nav__link:hover {
    color: var(--text);
}

.nav__link--active {
    color: var(--text);
}

.nav__link--active::after {
    width: 100%;
}

.nav__cta {
    font-family: var(--font-display);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text);
    border: 1px solid var(--grid-line);
    padding: 0.5rem 1.25rem;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.nav__cta:hover {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}

/* Hamburger — hidden on desktop */
.nav__burger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 102;
}

.nav__burger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav__burger span + span {
    margin-top: 5px;
}

.nav__burger[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav__burger[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.nav__burger[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── Nav Structure ── */

.nav__main-items {
    display: contents;
}

.nav__subnav {
    display: none;
}

/* ── Nav Dropdown ── */

.nav__dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.nav__dropdown-toggle {
    font: inherit;
    font-family: var(--font-display);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0;
    transition: color 0.2s ease;
    position: relative;
}

.nav__dropdown-toggle:hover {
    color: var(--text);
}

.nav__dropdown-arrow {
    display: inline-block;
    width: 5px;
    height: 5px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    margin-top: -2px;
    transition: transform 0.2s ease;
}

.nav__dropdown--open .nav__dropdown-arrow {
    transform: rotate(-135deg);
    margin-top: 1px;
}

.nav__dropdown-toggle--active {
    color: var(--text);
}

.nav__dropdown-toggle--active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    height: 2px;
    width: 100%;
    background: linear-gradient(90deg, #1E7A8A, #3A9E8B, #7B8EC0);
}

.nav__dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg);
    border: 1px solid var(--grid-line);
    padding: 0.75rem 0;
    min-width: 160px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 200;
}

.nav__dropdown--open .nav__dropdown-menu {
    opacity: 1;
    pointer-events: auto;
}

.nav__dropdown-menu a {
    display: block;
    padding: 0.5rem 1.25rem;
    font-family: var(--font-display);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    transition: color 0.2s ease, background 0.2s ease;
}

.nav__dropdown-menu a:hover {
    color: var(--text);
    background: rgba(var(--accent-rgb), 0.06);
}

/* ── Button ── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-display);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.875rem 2rem;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: var(--text);
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease;
}

.btn:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.btn:active { filter: brightness(0.85); }

.btn--outline {
    background: transparent;
    color: var(--text);
}

.btn--outline:hover {
    background: rgba(var(--accent-rgb), 0.08);
}

.btn--glow {
    background: transparent;
    border: none;
    position: relative;
    z-index: 0;
    overflow: visible;
}

.btn--glow::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 1px;
    background: linear-gradient(90deg, #1E7A8A 0%, #3A9E8B 35%, #7B8EC0 65%, #1E7A8A 100%);
    background-size: 200% 100%;
    animation: shimmer 4s ease-in-out infinite;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    z-index: -1;
    pointer-events: none;
}

.btn--glow::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #1E7A8A 0%, #3A9E8B 35%, #7B8EC0 65%, #1E7A8A 100%);
    background-size: 200% 100%;
    animation: shimmer 4s ease-in-out infinite;
    filter: blur(6px);
    opacity: 0;
    z-index: -2;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.btn--glow:hover::after {
    opacity: 0.2;
}

.btn--glow:hover {
    background: rgba(30, 122, 138, 0.05);
}

.btn--glow:active {
    filter: none;
    background: rgba(30, 122, 138, 0.1);
}

.btn--glow .btn__sparkle {
    display: inline-block;
    font-size: 0.875rem;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.btn--glow:hover .btn__sparkle {
    opacity: 1;
    background: linear-gradient(90deg, #1E7A8A 0%, #3A9E8B 35%, #7B8EC0 65%, #1E7A8A 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s ease-in-out infinite, sparklePulse 1.6s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes sparklePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.75); }
}

.btn--lg {
    padding: 1.1rem 2.5rem;
    font-size: 0.9375rem;
}

/* Scroll-margin for anchors */
#leistungen, #team, #kontakt, #faq { scroll-margin-top: 4rem; }

/* ── CTA Bar ── */

.cta-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 2rem var(--pad);
}

.cta-bar span {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

/* ── Section Bar ── */

.section-bar {
    padding: 1rem var(--pad);
    font-family: var(--font-display);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
}

/* ── FAQ ── */

.faq {
    padding: 2.5rem var(--pad);
    counter-reset: faq;
}

.faq__item {
    border-bottom: 1px solid var(--grid-line);
}

.faq__item:first-child {
    border-top: 1px solid var(--grid-line);
}

.faq__item {
    counter-increment: faq;
    position: relative;
}

/* Aurora underline — draws on open */
.faq__item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 1px;
    width: 0;
    background: linear-gradient(90deg, #1E7A8A, #3A9E8B, #7B8EC0);
    transition: width 0.4s var(--ease);
}

.faq__item.faq__item--open::after {
    width: 100%;
}

.faq__q {
    font-family: var(--font-display);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 0;
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    transition: color 0.25s ease;
}

.faq__q::before {
    content: counter(faq, decimal-leading-zero);
    font-family: var(--font-display);
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    opacity: 0.4;
    flex-shrink: 0;
    min-width: 1.5rem;
    transition: color 0.25s ease, opacity 0.25s ease;
}

.faq__q::after {
    content: '+';
    font-size: 1.125rem;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-left: auto;
    transition: color 0.25s ease, transform 0.35s var(--ease);
}

.faq__item--open .faq__q::after {
    content: '\2212';
    color: var(--accent);
    transform: rotate(180deg);
}

.faq__item--open .faq__q::before {
    color: var(--accent);
    opacity: 1;
}

/* Answer slide + blur reveal */
.faq__body {
    overflow: hidden;
    height: 0;
    transition: height 0.45s var(--ease);
}

.faq__a {
    font-size: 0.9375rem;
    line-height: 1.7;
    padding: 0 0 1.25rem 2.5rem;
    max-width: 56ch;
    opacity: 0;
    filter: blur(6px);
    transform: translateY(-8px);
    transition: opacity 0.35s ease 0.1s, filter 0.35s ease 0.1s, transform 0.35s ease 0.1s;
}

.faq__item--open .faq__a {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

/* ── Contact (CTA Showstopper) ── */

.contact {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    position: relative;
}

@keyframes auroraGlow {
    0%, 100% { background-position: 0% 50%; }
    33% { background-position: 100% 0%; }
    66% { background-position: 50% 100%; }
}

.contact__text {
    padding: 3.5rem var(--pad);
    border-right: 1px solid var(--grid-line);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

/* Aurora glow contained within the text column */
.contact__text::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 50%, rgba(30,122,138,0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 30%, rgba(123,142,192,0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(58,158,139,0.05) 0%, transparent 50%);
    background-size: 200% 200%;
    animation: auroraGlow 12s ease-in-out infinite;
    pointer-events: none;
}

.contact__text h2 {
    font-size: clamp(1.75rem, 3vw + 0.5rem, 2.5rem);
    margin-bottom: 1rem;
}

.contact__text h2 em {
    font-style: italic;
    background: linear-gradient(90deg, var(--accent) 0%, #3A9E8B 40%, #7B8EC0 60%, var(--accent) 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s ease-in-out infinite;
}

.contact__text p {
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.contact__pills {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.contact__pill {
    font-family: var(--font-display);
    font-size: 0.5625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
    border: 1px solid rgba(var(--accent-rgb), 0.3);
    padding: 0.3rem 0.75rem;
}

.contact__embed {
    padding: 1.5rem 1.5rem 0;
    min-height: 560px;
    display: flex;
    flex-direction: column;
}

.contact__embed iframe {
    width: 100%;
    flex: 1;
    border: none;
}

/* ── Footer ── */

.footer {
    position: relative;
    padding: 0 var(--pad) 2.5rem;
    font-size: 0.75rem;
    margin-top: 4rem;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: var(--pad);
    right: var(--pad);
    height: 2px;
    background: linear-gradient(90deg, #1E7A8A 0%, #3A9E8B 35%, #7B8EC0 65%, #1E7A8A 100%);
    border-radius: 1px;
}

.footer a {
    color: var(--text-muted);
    transition: color 0.2s ease;
}

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

/* ── Footer Top Tier ── */

.footer__top {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 2rem;
    padding: 2.5rem 0 0;
}

.footer__wordmark {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
    display: block;
}

.footer__wordmark span {
    color: var(--accent);
}

.footer__blurb {
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-top: 0.75rem;
    max-width: 280px;
}

.footer__col {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.footer__col-title {
    font-family: var(--font-display);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
    margin-bottom: 0.25rem;
}

.footer__col a {
    font-size: 0.8125rem;
}

/* ── Footer Divider ── */

.footer__divider {
    height: 1px;
    margin: 2rem 0;
    background: linear-gradient(90deg,
        rgba(30, 122, 138, 0.25) 0%,
        rgba(58, 158, 139, 0.2) 35%,
        rgba(123, 142, 192, 0.2) 65%,
        rgba(30, 122, 138, 0.25) 100%);
}

/* ── Footer Bottom Tier ── */

.footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.footer__contact {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer__email {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8125rem;
    color: var(--text) !important;
    font-weight: 500;
}

.footer__email svg {
    opacity: 0.8;
    flex-shrink: 0;
}

.footer__email:hover svg {
    opacity: 1;
}

.footer__social {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.footer__linkedin-company {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8125rem;
    color: var(--accent) !important;
    font-weight: 500;
}

.footer__linkedin-company svg {
    opacity: 0.8;
    flex-shrink: 0;
}

.footer__linkedin-company:hover svg {
    opacity: 1;
}

.footer__social-people {
    font-size: 0.75rem;
    color: var(--text-muted);
    padding-left: calc(14px + 0.4rem);
}

.footer__social-people a {
    font-size: 0.75rem;
}

.footer__cta {
    font-size: 0.75rem;
    padding: 0.625rem 1.25rem;
    margin-top: 0.25rem;
    align-self: flex-start;
}

.footer__meta {
    text-align: right;
}

.footer__legal {
    margin-top: 0.35rem;
    opacity: 0.6;
}

.footer__legal a:hover {
    opacity: 1;
}

/* ── Reveal Animations ── */

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal--stagger > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.reveal--stagger.visible > * {
    opacity: 1;
    transform: translateY(0);
}

.reveal--stagger.visible > *:nth-child(1) { transition-delay: 0s; }
.reveal--stagger.visible > *:nth-child(2) { transition-delay: 0.08s; }
.reveal--stagger.visible > *:nth-child(3) { transition-delay: 0.12s; }
.reveal--stagger.visible > *:nth-child(4) { transition-delay: 0.18s; }
.reveal--stagger.visible > *:nth-child(5) { transition-delay: 0.24s; }
.reveal--stagger.visible > *:nth-child(6) { transition-delay: 0.3s; }
.reveal--stagger.visible > *:nth-child(7) { transition-delay: 0.36s; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Word Reveal ── */

.word-reveal {
    overflow: visible;
}

.word-reveal .word {
    display: inline-block;
    opacity: 0;
    transform: translateY(1.1em);
    transition: opacity 0.4s ease, transform 0.45s var(--ease);
    transition-delay: calc(0.4s + var(--word-i, 0) * 0.07s);
}

.visible .word-reveal .word,
.word-reveal.word-reveal--visible .word {
    opacity: 1;
    transform: translateY(0);
}

/* ── Sparkle Trail ── */

.sparkle {
    position: fixed;
    pointer-events: none;
    z-index: 51;
    opacity: 0;
    will-change: transform, opacity;
    width: var(--sparkle-size, 6px);
    height: var(--sparkle-size, 6px);
    background: currentColor;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 74 74' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M73.32 36.66C73.32 36.91 73.14 37.12 72.89 37.15C44.68 41.34 41.34 44.69 37.15 72.89C37.11 73.13 36.9 73.32 36.66 73.32C36.42 73.32 36.2 73.14 36.17 72.89C31.98 44.68 28.63 41.34 0.43 37.15C0.19 37.11 0 36.9 0 36.66C0 36.42 0.18 36.2 0.43 36.17C28.64 31.98 31.98 28.63 36.17 0.43C36.21 0.19 36.42 0 36.66 0C36.9 0 37.12 0.18 37.15 0.43C41.34 28.64 44.69 31.98 72.89 36.17C73.13 36.21 73.32 36.42 73.32 36.66Z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 74 74' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M73.32 36.66C73.32 36.91 73.14 37.12 72.89 37.15C44.68 41.34 41.34 44.69 37.15 72.89C37.11 73.13 36.9 73.32 36.66 73.32C36.42 73.32 36.2 73.14 36.17 72.89C31.98 44.68 28.63 41.34 0.43 37.15C0.19 37.11 0 36.9 0 36.66C0 36.42 0.18 36.2 0.43 36.17C28.64 31.98 31.98 28.63 36.17 0.43C36.21 0.19 36.42 0 36.66 0C36.9 0 37.12 0.18 37.15 0.43C41.34 28.64 44.69 31.98 72.89 36.17C73.13 36.21 73.32 36.42 73.32 36.66Z'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    margin-left: calc(var(--sparkle-size, 6px) / -2);
    margin-top: calc(var(--sparkle-size, 6px) / -2);
}

.sparkle--active {
    animation: sparkleFlash 0.6s ease-out forwards;
}

@keyframes sparkleFlash {
    0% {
        opacity: 0.25;
        transform: scale(1.2) rotate(0deg);
    }
    40% {
        opacity: 0.15;
        transform: scale(1) rotate(20deg);
    }
    100% {
        opacity: 0;
        transform: scale(0) rotate(45deg) translateY(-8px);
    }
}

/* Focus-visible */
*:focus-visible {
    outline: 1px solid rgba(var(--accent-rgb), 0.8);
    outline-offset: 2px;
}

/* ── Reduced Motion ── */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .reveal,
    .reveal--stagger > *,
    .section-bar {
        opacity: 1 !important;
        transform: none !important;
    }
    .grid__entrance { display: none; }
    .draw-border { display: none; }
    .sparkle { display: none; }
    body::before { animation: none; }
}

/* ── Nav mobile (hamburger) ── */

@media (max-width: 900px) {
    .nav__burger {
        display: block;
    }

    .nav__links {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        z-index: 101;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    .nav__links--open {
        opacity: 1;
        pointer-events: auto;
    }

    .nav__link {
        display: block;
        font-size: 1rem;
        letter-spacing: 0.05em;
    }

    .nav__cta {
        margin-top: 1rem;
        font-size: 0.8125rem;
        padding: 0.75rem 2rem;
    }

    /* Nav mobile: sub-nav screen */
    .nav__main-items {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    .nav__links--subnav .nav__main-items {
        display: none;
    }

    .nav__links--subnav .nav__subnav {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    .nav__subnav-back {
        position: absolute;
        top: 2rem;
        left: var(--pad);
        font-family: var(--font-display);
        font-size: 0.8125rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        color: var(--text-muted);
        background: none;
        border: none;
        cursor: pointer;
        transition: color 0.2s ease;
    }

    .nav__subnav-back:hover {
        color: var(--text);
    }

    .nav__dropdown {
        display: contents;
    }

    .nav__dropdown-toggle {
        font-size: 1rem;
        letter-spacing: 0.05em;
    }

    .nav__dropdown-menu {
        display: none;
    }
}

/* ── Tablet ── */

@media (max-width: 1023px) and (min-width: 901px) {
    .nav__links {
        gap: 1.25rem;
    }

    .nav__link,
    .nav__dropdown-toggle {
        font-size: 0.625rem;
        letter-spacing: 0.06em;
    }

    .nav__cta {
        font-size: 0.625rem;
        padding: 0.4rem 0.9rem;
    }
}

/* ── Mobile ── */

@media (max-width: 639px) {
    :root {
        --pad: 1.5rem;
    }

    .draw-border {
        inset: 3px;
    }

    .cta-bar {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

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

    .contact__text {
        border-right: none;
        border-bottom: 1px solid var(--grid-line);
        padding: 2.5rem var(--pad);
    }

    .contact__pills {
        flex-wrap: wrap;
    }

    .contact__embed {
        min-height: 540px;
    }

    .faq__q {
        font-size: 0.875rem;
    }

    .footer {
        text-align: center;
    }

    .footer__top {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer__blurb {
        max-width: none;
    }

    .footer__col {
        gap: 0.5rem;
    }

    .footer__bottom {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    .footer__contact {
        align-items: center;
    }

    .footer__social-people {
        padding-left: 0;
    }

    .footer__cta {
        align-self: center;
    }

    .footer__meta {
        text-align: center;
    }
}
