/* ==========================================================================
   Meezan Team — landing page
   Brand: Deep Blue #161E54 · Sky Blue #BBE0EF · Vibrant Orange #F16D34 · Ivory #F7F5EE
   Type:  IBM Plex Sans Arabic (OFL), self-hosted subset
   Logical properties are used throughout so the layout is RTL-native.
   ========================================================================== */

@font-face {
    font-family: "IBM Plex Sans Arabic";
    src: url("../fonts/ibm-plex-sans-arabic-400.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "IBM Plex Sans Arabic";
    src: url("../fonts/ibm-plex-sans-arabic-500.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "IBM Plex Sans Arabic";
    src: url("../fonts/ibm-plex-sans-arabic-600.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "IBM Plex Sans Arabic";
    src: url("../fonts/ibm-plex-sans-arabic-700.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* --------------------------------------------------------------------------
   Tokens
   -------------------------------------------------------------------------- */
:root {
    --navy: #161e54;
    --navy-deep: #0f1540;
    --navy-soft: #212a62;
    --sky: #bbe0ef;
    --orange: #f16d34;
    --orange-soft: #ff986a;
    --ivory: #f7f5ee;

    --ivory-70: rgba(247, 245, 238, 0.74);
    --ink-70: rgba(22, 30, 84, 0.74);
    --line-light: rgba(247, 245, 238, 0.14);
    --line-dark: rgba(22, 30, 84, 0.14);
    --error: #b3261e;

    --font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
    --max: 1200px;
    --gutter: 24px;
    --radius: 24px;
    --header-h: 76px;
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (max-width: 640px) {
    :root {
        --gutter: 16px;
        --header-h: 68px;
    }
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 8px);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 1.0625rem;
    line-height: 1.9;
    color: var(--navy);
    background: var(--ivory);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.menu-open {
    overflow: hidden;
}

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

h1,
h2,
h3 {
    margin: 0;
    font-weight: 700;
}

p {
    margin: 0 0 1em;
}

a {
    color: inherit;
}

[hidden] {
    display: none !important;
}

:focus-visible {
    outline: 3px solid var(--orange);
    outline-offset: 3px;
    border-radius: 6px;
}

::selection {
    background: var(--orange);
    color: var(--navy);
}

.container {
    width: min(100% - 2 * var(--gutter), var(--max));
    margin-inline: auto;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    z-index: 100;
    inset-block-start: 12px;
    inset-inline-start: 12px;
    padding: 10px 20px;
    border-radius: 999px;
    background: var(--orange);
    color: var(--navy);
    font-weight: 600;
    text-decoration: none;
    transform: translateY(-200%);
    transition: transform 0.2s var(--ease);
}
.skip-link:focus {
    transform: none;
}

/* --------------------------------------------------------------------------
   Buttons, pills, shared section parts
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 54px;
    padding: 0 30px;
    border: 1.5px solid transparent;
    border-radius: 999px;
    font: inherit;
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.25s var(--ease), background-color 0.25s, color 0.25s, border-color 0.25s,
        box-shadow 0.25s;
}
.btn--primary {
    background: var(--orange);
    color: var(--navy);
}
.btn--primary:hover {
    background: var(--orange-soft);
    transform: translateY(-2px);
    box-shadow: 0 14px 30px -12px rgba(241, 109, 52, 0.75);
}
.btn--ghost {
    border-color: rgba(247, 245, 238, 0.4);
    color: var(--ivory);
}
.btn--ghost:hover {
    background: rgba(247, 245, 238, 0.1);
    border-color: var(--ivory);
}
.btn--outline {
    border-color: var(--navy);
    color: var(--navy);
}
.btn--outline:hover {
    background: var(--navy);
    color: var(--ivory);
}
.btn--sm {
    min-height: 44px;
    padding: 0 22px;
    font-size: 0.98rem;
}
.btn--block {
    width: 100%;
}
.btn[disabled] {
    opacity: 0.65;
    cursor: progress;
    transform: none;
}
.btn__icon,
.card__link svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.25s var(--ease);
}
.btn:hover .btn__icon,
.card__link:hover svg {
    transform: translateX(-4px);
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 6px 18px;
    border: 1px solid var(--line-light);
    border-radius: 999px;
    background: rgba(187, 224, 239, 0.08);
    color: var(--sky);
    font-size: 0.92rem;
    font-weight: 500;
}
.pill::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--orange);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}
.eyebrow::before {
    content: "";
    width: 28px;
    height: 3px;
    border-radius: 3px;
    background: var(--orange);
}
.programs .eyebrow,
.contact .eyebrow {
    color: var(--sky);
}

.section {
    padding-block: clamp(72px, 10vw, 136px);
}

.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px 48px;
    margin-bottom: clamp(36px, 5vw, 60px);
}

.section-title {
    margin: 0.3em 0 0.35em;
    font-size: clamp(1.95rem, 4.2vw, 3.2rem);
    line-height: 1.3;
    text-wrap: balance;
}

.section-lead {
    max-width: 34em;
    margin: 0;
    color: var(--ink-70);
    font-size: 1.1rem;
}
.programs .section-lead,
.contact .section-lead {
    color: var(--ivory-70);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    height: var(--header-h);
    color: var(--ivory);
    transition: background-color 0.3s, box-shadow 0.3s;
}
.site-header.is-scrolled,
.site-header.nav-open {
    background: rgba(22, 30, 84, 0.92);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    backdrop-filter: saturate(1.4) blur(14px);
    box-shadow: 0 1px 0 var(--line-light);
}

.site-header__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: 100%;
}

.site-header__brand {
    position: relative;
    z-index: 2;
    display: block;
    border-radius: 8px;
}
.site-header__brand img {
    width: auto;
    height: 48px;
}
@media (max-width: 640px) {
    .site-header__brand img {
        height: 38px;
    }
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}
.site-nav__list {
    display: flex;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.site-nav__list a {
    position: relative;
    display: block;
    padding: 10px 14px;
    font-weight: 500;
    text-decoration: none;
}
.site-nav__list a::after {
    content: "";
    position: absolute;
    inset-inline: 14px;
    inset-block-end: 4px;
    height: 2px;
    border-radius: 2px;
    background: var(--orange);
    transform: scaleX(0);
    transition: transform 0.3s var(--ease);
}
.site-nav__list a:hover::after,
.site-nav__list a.is-active::after {
    transform: scaleX(1);
}

.nav-toggle {
    position: relative;
    z-index: 2;
    display: none;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid var(--line-light);
    border-radius: 50%;
    background: transparent;
    color: inherit;
    cursor: pointer;
}
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
    position: absolute;
    inset-inline-start: 50%;
    width: 20px;
    height: 2px;
    margin-inline-start: -10px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 0.3s var(--ease), opacity 0.2s;
}
.nav-toggle__bars {
    inset-block-start: 50%;
    margin-block-start: -1px;
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
    content: "";
    inset-inline-start: 0;
    margin: 0;
}
.nav-toggle__bars::before {
    inset-block-start: -7px;
}
.nav-toggle__bars::after {
    inset-block-start: 7px;
}
.nav-open .nav-toggle__bars {
    background: transparent;
}
.nav-open .nav-toggle__bars::before {
    transform: translateY(7px) rotate(45deg);
}
.nav-open .nav-toggle__bars::after {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 900px) {
    .js .nav-toggle {
        display: block;
    }
    .js .site-nav {
        position: fixed;
        inset: 0;
        z-index: 1;
        flex-direction: column;
        justify-content: center;
        gap: 36px;
        padding: calc(var(--header-h) + 24px) var(--gutter) 48px;
        background: var(--navy);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s, visibility 0.3s;
    }
    .js .nav-open .site-nav {
        opacity: 1;
        visibility: visible;
    }
    .js .site-nav__list {
        flex-direction: column;
        align-items: center;
        gap: 6px;
    }
    .js .site-nav__list a {
        padding: 8px 20px;
        font-size: 1.9rem;
        font-weight: 700;
    }
    .js .site-nav__list a::after {
        inset-inline: 20px;
        inset-block-end: 2px;
    }

    /* Without JS the menu simply wraps under the logo. */
    html:not(.js) .site-header {
        position: absolute;
        height: auto;
        padding-block: 12px;
    }
    html:not(.js) .site-header__bar {
        flex-wrap: wrap;
    }
    html:not(.js) .site-nav {
        flex-wrap: wrap;
    }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    min-height: 100svh;
    padding: calc(var(--header-h) + 40px) 0 104px;
    overflow: hidden;
    background: var(--navy);
    color: var(--ivory);
}

/* Soft pebble shapes peeking from the edges, as on the brand banners. */
.hero__ghost {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}
.hero__ghost::before,
.hero__ghost::after {
    content: "";
    position: absolute;
    background: var(--navy-soft);
}
.hero__ghost::before {
    inset-block-start: -22vw;
    inset-inline-end: -14vw;
    width: 52vw;
    aspect-ratio: 1;
    border-radius: 50%;
}
.hero__ghost::after {
    inset-block-end: -5vw;
    inset-inline-end: -30vw;
    width: 66vw;
    height: 15vw;
    border-radius: 999px;
    transform: rotate(-2.5deg);
}

.hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
    align-items: center;
    gap: clamp(32px, 6vw, 80px);
}

.hero__title {
    margin: 26px 0 24px;
    font-size: clamp(2.6rem, 6.4vw, 5.4rem);
    line-height: 1.2;
    text-wrap: balance;
}
.hero__accent {
    display: block;
    color: var(--orange);
}

.hero__lead {
    max-width: 36em;
    margin: 0;
    color: var(--ivory-70);
    font-size: clamp(1.05rem, 1.6vw, 1.3rem);
    line-height: 2;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 40px;
}

/* The balance sculpture: the circle and both stones drift independently. */
.balance {
    position: relative;
    width: min(100%, 420px);
    margin-inline: auto;
    aspect-ratio: 1000 / 1051;
}
.balance__ring {
    position: absolute;
    inset: -14%;
    border: 1px solid var(--line-light);
    border-radius: 50%;
}
.balance__ring::after {
    content: "";
    position: absolute;
    inset: 11%;
    border: 1px dashed var(--line-light);
    border-radius: 50%;
}
.balance__icon {
    position: relative;
    width: 100%;
    height: 100%;
    fill: var(--ivory);
    overflow: visible;
}

.par,
.float {
    transform-box: fill-box;
    transform-origin: center;
}
.par {
    transition: transform 0.35s var(--ease);
}
.par--sun {
    transform: translate(calc(var(--px, 0) * 30px), calc(var(--py, 0) * 22px));
}
.par--top {
    transform: translate(calc(var(--px, 0) * -24px), calc(var(--py, 0) * 10px));
}
.par--bottom {
    transform: translate(calc(var(--px, 0) * 36px), calc(var(--py, 0) * -8px));
}
.float--sun {
    animation: bob 7s ease-in-out infinite;
}
.float--top {
    animation: sway-a 9s ease-in-out infinite;
}
.float--bottom {
    animation: sway-b 8s ease-in-out infinite;
}
@keyframes bob {
    50% {
        transform: translateY(-22px);
    }
}
@keyframes sway-a {
    50% {
        transform: translateX(22px) rotate(-1deg);
    }
}
@keyframes sway-b {
    50% {
        transform: translateX(-26px) rotate(1deg);
    }
}

.hero__cue {
    position: absolute;
    inset-block-end: 24px;
    inset-inline-start: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-inline-start: -24px;
    padding: 4px 8px;
    color: var(--ivory-70);
    font-size: 0.85rem;
    text-decoration: none;
}
.hero__cue i {
    position: relative;
    width: 1px;
    height: 40px;
    background: var(--line-light);
    overflow: hidden;
}
.hero__cue i::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    height: 14px;
    background: var(--orange);
    animation: cue 2.2s var(--ease) infinite;
}
@keyframes cue {
    from {
        transform: translateY(-14px);
    }
    to {
        transform: translateY(40px);
    }
}

@media (max-width: 520px) {
    .hero__actions .btn {
        flex: 1 1 100%;
    }
    .card__logo {
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 900px) {
    .hero {
        min-height: auto;
        padding-bottom: 80px;
    }
    .hero__grid {
        grid-template-columns: 1fr;
    }
    .balance {
        width: min(62%, 260px);
        margin-block-start: 12px;
    }
    .hero__cue {
        display: none;
    }
}

/* --------------------------------------------------------------------------
   Topics ticker
   -------------------------------------------------------------------------- */
.ticker {
    overflow: hidden;
    background: var(--sky);
    color: var(--navy);
    white-space: nowrap;
}
.ticker__track {
    display: flex;
    width: max-content;
    animation: ticker 70s linear infinite;
}
.ticker:hover .ticker__track {
    animation-play-state: paused;
}
.ticker__group {
    display: flex;
    flex: none;
    margin: 0;
    padding: 18px 0;
    list-style: none;
}
.ticker__group li {
    display: flex;
    align-items: center;
    gap: 44px;
    padding-inline-end: 44px;
    font-size: 1.12rem;
    font-weight: 600;
}
.ticker__group li::after {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--orange);
}
@keyframes ticker {
    to {
        transform: translateX(25%);
    }
}

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */
.about {
    background: var(--ivory);
}
.about__grid {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(32px, 7vw, 96px);
}
.about__body {
    order: -1;
}
.about__body p:not(.eyebrow) {
    max-width: 36em;
    color: var(--ink-70);
    font-size: 1.12rem;
}
.about__body .btn {
    margin-top: 16px;
}

.about__media {
    position: relative;
    aspect-ratio: 1 / 1.1;
    margin: 0;
    border-radius: 140px 28px 140px 28px;
    overflow: hidden;
    background: var(--navy);
    box-shadow: 0 40px 80px -40px rgba(22, 30, 84, 0.55);
}
.about__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.about__media figcaption {
    position: absolute;
    inset-block-end: 20px;
    inset-inline-end: 20px;
    padding: 6px 16px;
    border-radius: 999px;
    background: rgba(22, 30, 84, 0.72);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: var(--ivory);
    font-size: 0.88rem;
    font-weight: 500;
}

.values {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin: clamp(56px, 8vw, 104px) 0 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--line-dark);
}
.values li {
    padding: 28px 24px 4px;
    border-inline-start: 1px solid var(--line-dark);
}
.values li:first-child {
    padding-inline-start: 0;
    border-inline-start: 0;
}
.values__index {
    display: block;
    margin-bottom: 14px;
    color: var(--orange);
    font-size: 0.95rem;
    font-weight: 700;
}
.values h3 {
    margin-bottom: 6px;
    font-size: 1.4rem;
}
.values p {
    margin: 0;
    color: var(--ink-70);
    font-size: 1rem;
    line-height: 1.85;
}

@media (max-width: 999px) {
    .values {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 0 32px;
        border-top: 0;
    }
    .values li {
        grid-column: span 2;
        padding-inline: 0;
        padding-block: 24px 20px;
        border-inline-start: 0;
        border-top: 1px solid var(--line-dark);
    }
    .values li:nth-child(n + 4) {
        grid-column: span 3;
    }
}
@media (max-width: 760px) {
    .about__grid {
        grid-template-columns: 1fr;
    }
    .about__media {
        max-width: 420px;
        border-radius: 110px 24px 110px 24px;
    }
    .values {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .values li,
    .values li:nth-child(n + 4) {
        grid-column: auto;
    }
}

/* --------------------------------------------------------------------------
   Programs
   -------------------------------------------------------------------------- */
.programs {
    background: var(--navy);
    color: var(--ivory);
}

.filters {
    display: none;
    flex-wrap: wrap;
    gap: 10px;
}
.js .filters {
    display: flex;
}
.chip {
    min-height: 44px;
    padding: 0 20px;
    border: 1px solid var(--line-light);
    border-radius: 999px;
    background: transparent;
    color: var(--ivory);
    font: inherit;
    font-size: 0.98rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}
.chip:hover {
    border-color: var(--sky);
}
.chip[aria-pressed="true"] {
    border-color: var(--ivory);
    background: var(--ivory);
    color: var(--navy);
}

.programs__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.card {
    display: flex;
}
.card > article {
    display: flex;
    flex-direction: column;
    width: 100%;
    border: 1px solid var(--line-light);
    border-radius: var(--radius);
    background: rgba(247, 245, 238, 0.045);
    overflow: hidden;
    transition: transform 0.35s var(--ease), border-color 0.35s, background-color 0.35s;
}
.card:hover > article {
    transform: translateY(-6px);
    border-color: rgba(241, 109, 52, 0.75);
    background: rgba(247, 245, 238, 0.075);
}

.card__logo {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 10;
    padding: clamp(24px, 3vw, 38px);
    overflow: hidden;
    background: var(--navy-soft);
}
.card__logo::before {
    content: "";
    position: absolute;
    inset-block-start: -32%;
    inset-inline-end: -12%;
    width: 54%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: rgba(247, 245, 238, 0.045);
}
.card__logo img {
    position: relative;
    width: min(100%, 300px);
    height: 100%;
    object-fit: contain;
}

.card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 24px 26px 28px;
}
.card__kind {
    align-self: flex-start;
    margin-bottom: 12px;
    padding: 2px 14px;
    border-radius: 999px;
    background: var(--sky);
    color: var(--navy);
    font-size: 0.8rem;
    font-weight: 600;
}
.card h3 {
    font-size: 1.55rem;
    line-height: 1.4;
}
.card__tagline {
    margin: 2px 0 10px !important;
    color: var(--orange-soft) !important;
    font-weight: 600;
}
.card__body p {
    margin: 0;
    color: var(--ivory-70);
    font-size: 1rem;
    line-height: 1.85;
}
.card__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 18px;
    color: var(--sky);
    font-weight: 600;
    text-decoration: none;
}

.programs__empty {
    margin: 32px 0 0;
    color: var(--ivory-70);
    text-align: center;
}

@media (max-width: 999px) {
    .programs__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 640px) {
    .programs__grid {
        grid-template-columns: 1fr;
    }
}

/* --------------------------------------------------------------------------
   Services
   -------------------------------------------------------------------------- */
.services {
    background: var(--ivory);
}
.services__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
    padding: 0;
    list-style: none;
    border-block-end: 1px solid var(--line-dark);
}
.services__grid li {
    padding: 36px 32px 40px;
    border-block-start: 1px solid var(--line-dark);
    transition: background-color 0.3s;
}
.services__grid li:not(:nth-child(3n + 1)) {
    border-inline-start: 1px solid var(--line-dark);
}
.services__grid li:hover {
    background: rgba(187, 224, 239, 0.3);
}
.services__num {
    display: block;
    margin-bottom: 20px;
    color: transparent;
    font-size: 3.1rem;
    font-weight: 700;
    line-height: 1;
    -webkit-text-stroke: 1.5px var(--orange);
    transition: color 0.3s;
}
.services__grid li:hover .services__num {
    color: var(--orange);
}
.services__grid h3 {
    margin-bottom: 8px;
    font-size: 1.4rem;
}
.services__grid p {
    margin: 0;
    color: var(--ink-70);
    font-size: 1rem;
    line-height: 1.85;
}

@media (max-width: 900px) {
    .services__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
        border-block-end: 0;
    }
    .services__grid li,
    .services__grid li:not(:nth-child(3n + 1)) {
        padding: 28px 24px 30px;
        border: 1px solid var(--line-dark);
        border-radius: 20px;
    }
}
@media (max-width: 600px) {
    .services__grid {
        grid-template-columns: 1fr;
    }
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */
.contact {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: var(--navy);
    color: var(--ivory);
}
.contact__ghost {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}
.contact__ghost::before,
.contact__ghost::after {
    content: "";
    position: absolute;
    background: var(--navy-soft);
}
.contact__ghost::before {
    inset-block-start: -18vw;
    inset-inline-start: -16vw;
    width: 40vw;
    aspect-ratio: 1;
    border-radius: 50%;
}
.contact__ghost::after {
    inset-block-end: -4vw;
    inset-inline-start: -22vw;
    width: 52vw;
    height: 11vw;
    border-radius: 999px;
    transform: rotate(2deg);
}

.contact__grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: start;
    gap: clamp(36px, 6vw, 88px);
}

.socials {
    display: grid;
    gap: 14px;
    margin: 40px 0 0;
    padding: 0;
    list-style: none;
}
.socials a {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    border: 1px solid var(--line-light);
    border-radius: 18px;
    text-decoration: none;
    transition: border-color 0.25s, background-color 0.25s, transform 0.25s var(--ease);
}
.socials a:hover {
    border-color: var(--orange);
    background: rgba(247, 245, 238, 0.05);
    transform: translateX(-4px);
}
.socials svg {
    flex: none;
    width: 28px;
    height: 28px;
    color: var(--sky);
}
.socials span {
    font-weight: 600;
    line-height: 1.5;
}
.socials small {
    display: block;
    color: var(--ivory-70);
    font-size: 0.9rem;
    font-weight: 400;
}

.form-card {
    padding: clamp(24px, 4vw, 44px);
    border-radius: 28px;
    background: var(--ivory);
    color: var(--navy);
    box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.6);
}

.field {
    margin-bottom: 20px;
}
.field label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.98rem;
    font-weight: 600;
}
.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 52px;
    padding: 13px 16px;
    border: 1.5px solid rgba(22, 30, 84, 0.24);
    border-radius: 14px;
    background: #fff;
    color: var(--navy);
    font: inherit;
    line-height: 1.6;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea {
    min-height: 140px;
    resize: vertical;
}
.field select {
    padding-inline-end: 44px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23161E54' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 14px center;
    background-size: 20px;
    cursor: pointer;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 4px rgba(187, 224, 239, 0.95);
}
.field [aria-invalid="true"] {
    border-color: var(--error);
}
.field__error {
    margin: 6px 0 0;
    color: var(--error);
    font-size: 0.92rem;
    line-height: 1.6;
}
.field__error:empty {
    display: none;
}

.hp {
    position: absolute;
    inset-inline-start: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form__error {
    margin: 14px 0 0;
    color: var(--error);
    font-weight: 500;
}

.form__done {
    display: none;
    padding: 28px 8px;
    text-align: center;
}
.form__done:focus {
    outline: none;
}
.form__done svg {
    width: 68px;
    height: 68px;
    margin: 0 auto 14px;
    color: var(--orange);
}
.form__done h3 {
    margin-bottom: 8px;
    font-size: 1.8rem;
}
.form__done p {
    margin: 0;
    color: var(--ink-70);
}
.form-card.is-sent form {
    display: none;
}
.form-card.is-sent .form__done {
    display: block;
}

@media (max-width: 860px) {
    .contact__grid {
        grid-template-columns: 1fr;
    }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
    position: relative;
    overflow: hidden;
    padding-top: 72px;
    background: var(--navy-deep);
    color: var(--ivory);
}
.site-footer__grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.5fr 0.7fr 0.8fr;
    gap: 40px;
    padding-bottom: 64px;
}
.site-footer__about img {
    width: auto;
    height: 57px;
}
.site-footer__about p {
    max-width: 24em;
    margin: 18px 0 0;
    color: var(--ivory-70);
}
.site-footer__col h2 {
    margin-bottom: 14px;
    color: var(--sky);
    font-size: 1rem;
    font-weight: 600;
}
.site-footer__col ul {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.site-footer__col a {
    color: var(--ivory-70);
    text-decoration: none;
    transition: color 0.2s;
}
.site-footer__col a:hover {
    color: var(--ivory);
}
.site-footer__handle {
    display: block;
    direction: ltr;
    font-size: 0.86rem;
    line-height: 1.5;
    opacity: 0.75;
    text-align: end;
}
.site-footer__wordmark {
    display: block;
    width: min(380px, 62%);
    height: auto;
    margin: 0 auto 48px;
    opacity: 0.07;
    pointer-events: none;
}
.site-footer__bottom {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 24px;
    padding-block: 22px;
    border-top: 1px solid var(--line-light);
    color: var(--ivory-70);
    font-size: 0.92rem;
}
.site-footer__bottom p {
    margin: 0;
}

@media (max-width: 760px) {
    .site-footer__grid {
        grid-template-columns: 1fr 1fr;
    }
    .site-footer__about {
        grid-column: 1 / -1;
    }
}

/* --------------------------------------------------------------------------
   Scroll reveal (only when JavaScript is running) and reduced motion
   -------------------------------------------------------------------------- */
.js [data-reveal] {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
    transition-delay: var(--delay, 0ms);
}
.js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0ms !important;
    }
    .js [data-reveal] {
        opacity: 1;
        transform: none;
    }
    .ticker__track {
        width: auto;
        animation: none;
    }
    .ticker__group {
        flex-wrap: wrap;
        padding-inline: var(--gutter);
    }
    .ticker__group[aria-hidden="true"] {
        display: none;
    }
}
