/* ===========================
   SITE HEADER + FOOTER in the unified flow style (flow.css tokens: brand #393185,
   12px buttons, 16–18px panels, Gilroy headings). Loaded after main.min.css and
   overrides only what differs; the markup and main.js behaviour stay as they were.
   =========================== */

:root {
    --sc-brand: #393185;
    --sc-brand-dark: #2a2466;
    --sc-tint: #ecebf7;
    --sc-ink: #16143a;
    --sc-text: #3d3a5c;
    --sc-muted: #7b7896;
    --sc-line: #e6e3f3;
    --sc-on-dark: #ffffff;
    --sc-on-dark-muted: #bdb8e3;
    --sc-on-dark-line: rgba(255, 255, 255, 0.12);
}

/* ─── Header ─────────────────────────────────────────────────────────────── */

.header__wrapper {
    box-shadow: 0 1px 0 var(--sc-line), 0 8px 24px -18px rgba(22, 20, 58, 0.35);
}

.header-top {
    border-bottom-color: var(--sc-line);
}

.header-bottom {
    border-bottom: 0;
}

.header-top .header-button,
.header-top .opportunities-opener {
    color: var(--sc-text);
    border-radius: 10px;
    transition: color 0.15s ease;
}

.header-top .header-button:hover,
.header-top .opportunities-opener:hover {
    color: var(--sc-brand);
}

/* Desktop buttons; on phones main.min.css shows them as outlined icons */
@media (min-width: 801px) {
    .header .btn {
        border-radius: 12px;
        border-color: var(--sc-brand) !important;
        background: var(--sc-brand);
        box-shadow: 0 6px 16px -10px rgba(57, 49, 133, 0.8);
        transition: background 0.15s ease, box-shadow 0.15s ease;
    }

    .header-bottom__buttons .btn {
        min-width: 0;
        padding: 12px 18px;
    }

    .header .btn span {
        font: 700 0.9rem/1 Gilroy, sans-serif;
    }

    .header .btn:hover,
    .header .btn:focus-visible {
        background: var(--sc-brand-dark);
        border-color: var(--sc-brand-dark) !important;
    }

    /* The site-wide .btn turns white on hover; in the header it stays filled */
    .header .btn:hover span,
    .header .btn:focus span {
        color: var(--sc-on-dark);
    }

    .header .btn:hover svg,
    .header .btn:focus svg {
        fill: var(--sc-on-dark);
    }
}

.header .lang-opener {
    border: 1px solid var(--sc-line);
    border-radius: 999px;
    padding: 6px 12px;
    color: var(--sc-brand);
    font-weight: 700;
}

.header .search-open {
    border-radius: 10px;
}

/* Main menu: pill hover, dropdowns as flow panels */
.header-bottom .header-logo {
    flex-shrink: 0;
}

.menu-header__list {
    gap: 2px;
}

.menu-header .menu-item-title {
    padding: 10px;
    border-radius: 10px;
    color: var(--sc-ink);
}

.menu-header .menu-item-title span {
    font: 600 0.9rem/1 Gilroy, sans-serif;
    white-space: nowrap;
}

.menu-header .menu-item-title:hover,
.menu-header .menu-item:focus-within > .menu-item-title {
    background: var(--sc-tint);
    color: var(--sc-brand);
}

.menu-header .menu-item__dropdown {
    left: 0;
    padding-top: 10px;
}

.menu-header .menu-item__list {
    border: 1px solid var(--sc-line);
    border-radius: 16px;
    padding: 10px;
    gap: 2px;
}

.menu-header .menu-item__list .menu-item__link {
    padding: 9px 12px;
    border-radius: 10px;
    color: var(--sc-text);
}

.menu-header .menu-item__list .menu-item__link span {
    font-size: 0.88rem;
}

.menu-header .menu-item__list .menu-item__link:hover {
    background: var(--sc-tint);
    color: var(--sc-brand);
}

/* Shadow only while a dropdown is open (a hidden list is only moved up, so its shadow would show) */
.menu-header .menu-item__link:hover ~ .menu-item__dropdown .menu-item__list,
.menu-header .menu-item__dropdown:hover .menu-item__list {
    box-shadow: 0 18px 40px -20px rgba(22, 20, 58, 0.35);
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */

.footer {
    background: linear-gradient(160deg, var(--sc-brand-dark) 0%, #1c1847 100%);
    border-radius: 28px 28px 0 0;
    padding-top: 56px;
}

.footer-menu {
    gap: 12px;
}

.footer-menu__link {
    font: 600 1rem/1.3 Gilroy, sans-serif;
    color: var(--sc-on-dark);
    transition: color 0.15s ease;
}

.footer-menu__link:hover,
.footer-contacts__text:not(p):hover {
    color: var(--sc-on-dark-muted);
}

.footer-contacts {
    gap: 18px;
}

.footer-contacts__title {
    font: 700 0.72rem/1.2 Gilroy, sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sc-on-dark-muted);
    margin-bottom: 6px;
}

.footer-contacts__text {
    font: 500 0.95rem/1.45 Inter, sans-serif;
    color: var(--sc-on-dark);
}

.subscription__title {
    font: 800 1.1rem/1.2 Gilroy, sans-serif;
}

.subscription__description,
.footer-description {
    color: var(--sc-on-dark-muted);
}

.subscription-form {
    border: 1px solid var(--sc-on-dark-line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    padding: 4px 4px 4px 16px;
    margin-top: 8px;
    transition: border-color 0.15s ease;
}

.subscription-form:focus-within {
    border-color: rgba(255, 255, 255, 0.4);
}

.subscription-form__input {
    padding: 10px 0;
    outline: none;
}

.subscription-form__button {
    background: var(--sc-on-dark);
    border-radius: 10px;
    padding: 10px;
}

.subscription-form__button svg {
    fill: var(--sc-brand);
}

.footer-bottom {
    border-top-color: var(--sc-on-dark-line);
    padding: 18px 0 22px;
    gap: 16px;
}

.footer-copyright {
    color: var(--sc-on-dark-muted);
    font: 500 0.82rem/1.3 Inter, sans-serif;
}

@media (max-width: 800px) {
    .footer {
        border-radius: 22px 22px 0 0;
        padding-top: 40px;
    }
}

/* ─── "Developed by DORA" ─────────────────────────────────────────────────
   Like the old studio mark: only the D shows and pulses; on hover / focus the
   word opens letter by letter, and closes in reverse when the pointer leaves. */

.dora-credit {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    color: var(--sc-on-dark);
    text-decoration: none;
}

.dora-credit__label {
    font: 500 0.75rem/1 Inter, sans-serif;
    color: var(--sc-on-dark-muted);
}

.dora-logo {
    display: block;
    width: 20px;           /* the D alone (viewBox 144 × 36 → 80 × 20 when open) */
    height: 20px;
    overflow: hidden;
    fill: currentColor;
    transition: width 0.45s ease 0.35s;
}

.dora-logo path {
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.dora-logo__o,
.dora-logo__r,
.dora-logo__a {
    opacity: 0;
    transform: translateX(-10px);
}

.dora-logo__a { transition-delay: 0s; }
.dora-logo__r { transition-delay: 0.1s; }
.dora-logo__o { transition-delay: 0.2s; }

.dora-logo__d {
    stroke: currentColor;
    stroke-width: 0;
    stroke-linejoin: round;
    animation: dora-pulse 2s linear infinite;
}

.dora-credit:hover .dora-logo,
.dora-credit:focus-visible .dora-logo {
    width: 80px;
    transition-delay: 0s;
}

.dora-credit:hover .dora-logo__o,
.dora-credit:hover .dora-logo__r,
.dora-credit:hover .dora-logo__a,
.dora-credit:focus-visible .dora-logo__o,
.dora-credit:focus-visible .dora-logo__r,
.dora-credit:focus-visible .dora-logo__a {
    opacity: 1;
    transform: none;
}

.dora-credit:hover .dora-logo__o,
.dora-credit:focus-visible .dora-logo__o { transition-delay: 0.15s; }
.dora-credit:hover .dora-logo__r,
.dora-credit:focus-visible .dora-logo__r { transition-delay: 0.25s; }
.dora-credit:hover .dora-logo__a,
.dora-credit:focus-visible .dora-logo__a { transition-delay: 0.35s; }

.dora-credit:hover .dora-logo__d,
.dora-credit:focus-visible .dora-logo__d {
    animation: none;
}

@keyframes dora-pulse {
    0%, 70% { stroke-width: 0; }
    85% { stroke-width: 4; }
    100% { stroke-width: 0; }
}

/* Touch screens have no hover: show the whole word */
@media (hover: none) {
    .dora-logo { width: 80px; }
    .dora-logo__o,
    .dora-logo__r,
    .dora-logo__a { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .dora-logo,
    .dora-logo path { transition: none; }
    .dora-logo__d { animation: none; }
}

/* ─── Header search ───────────────────────────────────────────────────────── */

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

.site-search__form {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    z-index: 20;
    display: flex;
    gap: 6px;
    width: 340px;
    padding: 6px;
    background: #fff;
    border: 1px solid var(--sc-line);
    border-radius: 14px;
    box-shadow: 0 18px 40px -20px rgba(22, 20, 58, 0.45);
}

.site-search__form[hidden] {
    display: none;
}

.site-search__form input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    padding: 8px 10px;
    font: 500 0.92rem/1.3 Inter, sans-serif;
    color: var(--sc-ink);
    background: transparent;
}

.site-search__form button {
    display: grid;
    place-items: center;
    width: 40px;
    border: 0;
    border-radius: 10px;
    background: var(--sc-brand);
    cursor: pointer;
}

.site-search__form button svg {
    fill: #fff;
}

@media (max-width: 800px) {
    .site-search {
        position: static;
    }

    .site-search__form {
        position: fixed;
        top: 72px;
        left: 16px;
        right: 16px;
        width: auto;
    }
}

/* Results on /search */
.xf-search-hit {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 12px;
    border-radius: 12px;
    color: var(--sc-ink);
    text-decoration: none;
}

.xf-search-hit + .xf-search-hit {
    border-top: 1px solid var(--sc-line);
}

.xf-search-hit:hover {
    background: var(--sc-tint);
}

.xf-search-hit strong {
    display: block;
    font: 700 0.95rem/1.3 Gilroy, sans-serif;
}

.xf-search-hit small {
    display: block;
    margin-top: 2px;
    font-size: 0.82rem;
    color: var(--sc-muted);
}

.xf-search-hit__icon {
    flex: 0 0 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--sc-tint);
    color: var(--sc-brand);
}

.xf-search-hit__go {
    margin-left: auto;
    color: var(--sc-muted);
}
