/* ─── Contact page (ctx) ─── */
.ctx-hero {
    position: relative;
    padding: calc(var(--nav-height, 80px) + 56px) 0 clamp(64px, 7vw, 96px);
    background:
        radial-gradient(circle at 18% 40%, var(--spatial-glow), transparent 44%),
        linear-gradient(var(--spatial-grid) 1px, transparent 1px) 0 0 / 56px 56px,
        linear-gradient(90deg, var(--spatial-grid) 1px, transparent 1px) 0 0 / 56px 56px;
    border-bottom: 1px solid var(--spatial-line);
    overflow: hidden;
}

.ctx-hero::before {
    content: "";
    position: absolute;
    width: 620px;
    height: 620px;
    inset-inline-end: -200px;
    top: -120px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--spatial-glow), transparent 65%);
    pointer-events: none;
}

.ctx-hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    gap: clamp(36px, 5vw, 84px);
    align-items: center;
}

.ctx-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 34px;
    font-size: 12px;
    color: var(--text-muted);
}

.ctx-breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
}

.ctx-breadcrumb a:hover {
    color: var(--cyan);
}

.ctx-kicker,
.ctx-chapter-no {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin: 0 0 22px;
}

.ctx-kicker span,
.ctx-chapter-no span {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font: 10px monospace;
    letter-spacing: .2em;
    color: var(--text-muted);
    direction: ltr;
}

.ctx-kicker span::before,
.ctx-chapter-no span::before {
    content: "";
    width: 38px;
    height: 1px;
    background: var(--cyan);
}

.ctx-chapter-no span::before {
    background: var(--spatial-line);
}

.ctx-kicker b {
    padding-inline-start: 14px;
    border-inline-start: 1px solid var(--spatial-line);
    font-size: 13px;
    font-weight: 700;
    color: var(--cyan);
}

.ctx-title {
    margin: 0 0 20px;
    font-size: clamp(34px, 4.2vw, 62px);
    line-height: 1.25;
    font-weight: 800;
    color: var(--text-primary);
    text-shadow: 0 0 45px var(--spatial-glow);
}

.ctx-lede {
    margin: 0 0 38px;
    max-width: 580px;
    font-size: 16px;
    line-height: 1.95;
    color: var(--text-secondary);
}

/* Direct channels */
.ctx-channels {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--spatial-line);
}

.ctx-channel {
    position: relative;
    display: grid;
    grid-template-columns: 34px minmax(90px, auto) minmax(0, 1fr) 28px;
    align-items: center;
    gap: 16px;
    padding: 20px 4px;
    border-bottom: 1px solid var(--spatial-line);
    color: var(--text-primary);
    text-decoration: none;
    overflow: hidden;
    isolation: isolate;
}

.ctx-channel::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, transparent, var(--spatial-glow));
    opacity: 0;
    transition: opacity .35s ease;
}

[dir="rtl"] .ctx-channel::before {
    background: linear-gradient(270deg, transparent, var(--spatial-glow));
}

.ctx-channel-no {
    font: 11px monospace;
    letter-spacing: .14em;
    color: var(--cyan);
}

.ctx-channel-label {
    font-size: 13px;
    color: var(--text-muted);
}

.ctx-channel strong {
    justify-self: end;
    font-size: clamp(17px, 1.6vw, 22px);
    font-weight: 700;
    letter-spacing: .02em;
    transition: color .3s ease, translate .35s cubic-bezier(.2, .7, .2, 1);
}

.ctx-channel-go {
    justify-self: end;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--spatial-line);
    font-size: 13px;
    color: var(--text-muted);
    transition: border-color .3s ease, color .3s ease, background .3s ease;
}

.ctx-channel:hover::before,
.ctx-channel:focus-visible::before {
    opacity: 1;
}

.ctx-channel:hover strong,
.ctx-channel:focus-visible strong {
    color: var(--cyan);
    translate: -6px 0;
}

[dir="ltr"] .ctx-channel:hover strong,
[dir="ltr"] .ctx-channel:focus-visible strong {
    translate: 6px 0;
}

.ctx-channel:hover .ctx-channel-go,
.ctx-channel:focus-visible .ctx-channel-go,
.ctx-channel.is-primary .ctx-channel-go {
    border-color: var(--cyan);
    background: var(--cyan);
    color: var(--bg-primary);
}

.ctx-channel.is-primary .ctx-channel-label {
    color: var(--cyan);
    font-weight: 700;
}

/* Office console */
.ctx-bar {
    height: 32px;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0 14px;
    border-bottom: 1px solid var(--spatial-line);
    background: var(--bg-secondary);
    direction: ltr;
}

.ctx-bar i {
    width: 6px;
    height: 6px;
    border: 1px solid var(--text-muted);
    border-radius: 50%;
}

.ctx-bar > span {
    margin-left: auto;
    font: 9px monospace;
    letter-spacing: .16em;
    color: var(--text-muted);
}

.ctx-console {
    position: relative;
    border: 1px solid var(--spatial-line);
    background: color-mix(in srgb, var(--bg-secondary) 82%, transparent);
    box-shadow: 0 40px 90px rgba(0, 0, 0, .3), 0 0 0 1px var(--spatial-glow);
    transform: perspective(1500px) rotateX(var(--ctx-rx, 0deg)) rotateY(var(--ctx-ry, 0deg));
    transition: transform .45s cubic-bezier(.2, .7, .2, 1);
}

.ctx-console::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    top: 32px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    opacity: 0;
    pointer-events: none;
}

.ctx-console-body {
    padding: clamp(22px, 2.6vw, 34px);
}

.ctx-status {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 28px;
    padding: 8px 14px;
    border: 1px solid var(--spatial-line);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
}

.ctx-status i {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}

.ctx-status.is-open {
    border-color: rgba(16, 185, 129, .45);
    color: var(--text-primary);
}

.ctx-status.is-open i {
    background: #10b981;
    box-shadow: 0 0 12px #10b981;
}

.ctx-status.is-open i::after {
    content: "";
    position: absolute;
    inset: -5px;
    border: 1px solid #10b981;
    border-radius: 50%;
    opacity: 0;
}

.ctx-clock {
    display: grid;
    gap: 6px;
    padding-bottom: 26px;
    border-bottom: 1px solid var(--spatial-line);
}

.ctx-clock-label {
    font-size: 12px;
    color: var(--text-muted);
}

.ctx-clock-time {
    font: 700 clamp(54px, 6vw, 86px) / 1 monospace;
    letter-spacing: -.02em;
    color: var(--text-primary);
    text-shadow: 0 0 40px var(--spatial-glow);
    justify-self: start;
}

.ctx-console-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
    border-bottom: 1px solid var(--spatial-line);
}

.ctx-console-facts > div {
    padding: 18px 0;
    padding-inline-end: 12px;
}

.ctx-console-facts > div + div {
    padding-inline-start: 14px;
    border-inline-start: 1px solid var(--spatial-line);
}

.ctx-console-facts dt {
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.ctx-console-facts dd {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.ctx-console-facts dd[dir="ltr"] {
    font-family: monospace;
    text-align: end;
}

[dir="rtl"] .ctx-console-facts dd[dir="ltr"] {
    text-align: right;
}

.ctx-console-address {
    display: grid;
    gap: 6px;
    padding-top: 20px;
    color: var(--text-primary);
    text-decoration: none;
}

.ctx-console-address span {
    font-size: 12px;
    color: var(--text-muted);
}

.ctx-console-address strong {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.8;
}

.ctx-console-address:hover strong {
    color: var(--cyan);
}

/* Message section */
.ctx-message,
.ctx-map {
    padding: clamp(64px, 8vw, 110px) 0;
    border-bottom: 1px solid var(--spatial-line);
}

.ctx-message-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(260px, .75fr);
    gap: clamp(32px, 5vw, 72px);
    align-items: start;
}

.ctx-heading {
    margin: 0 0 30px;
    font-size: clamp(26px, 2.8vw, 40px);
    line-height: 1.35;
    font-weight: 800;
    color: var(--text-primary);
}

.ctx-form-frame {
    border: 1px solid var(--spatial-line);
    border-top: 2px solid var(--cyan);
    background: var(--bg-secondary);
}

.ctx-form-frame > .ctx-bar {
    background: transparent;
}

.ctx-form-body {
    padding: clamp(22px, 3vw, 38px);
}

.ctx-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 20px;
}

.ctx-field {
    display: grid;
    gap: 9px;
    margin: 0;
}

.ctx-field--full {
    grid-column: 1 / -1;
}

.ctx-field > span {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
}

.ctx-field em {
    font-style: normal;
    color: var(--cyan);
}

.ctx-form .ctx-field :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) {
    width: 100%;
    min-height: 50px;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid var(--spatial-line);
    border-radius: 0;
    background: var(--bg-primary);
    color: var(--text-primary);
    font: inherit;
    font-size: 15px;
    box-shadow: none;
    transition: border-color .25s ease, box-shadow .25s ease;
}

.ctx-field textarea {
    min-height: 150px;
    resize: vertical;
    line-height: 1.8;
}

.ctx-field input::placeholder,
.ctx-field textarea::placeholder {
    color: var(--text-muted);
}

.ctx-form .ctx-field :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px var(--spatial-glow);
}

.ctx-field input[dir="ltr"] {
    text-align: left;
}

[dir="rtl"] .ctx-field input[type="tel"]::placeholder,
[dir="rtl"] .ctx-field input[type="email"]::placeholder {
    text-align: right;
}

.ctx-submit {
    grid-column: 1 / -1;
    justify-content: center;
    width: 100%;
    min-height: 54px;
    border: 0;
    cursor: pointer;
    font: inherit;
    font-size: 15px;
    font-weight: 800;
}

.ctx-form-error {
    margin-bottom: 22px;
    padding: 14px 16px;
    border: 1px solid rgba(239, 68, 68, .45);
    border-inline-start: 3px solid #ef4444;
    background: rgba(239, 68, 68, .08);
    font-weight: 700;
    color: #fca5a5;
}

.ctx-form-body .form-thank-you {
    border-radius: 0;
}

/* What happens next */
.ctx-next {
    position: sticky;
    top: calc(var(--nav-height, 80px) + 30px);
    display: grid;
    gap: 26px;
    padding-top: 8px;
}

.ctx-aside-label {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--cyan);
}

.ctx-steps {
    position: relative;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ctx-steps::before {
    content: "";
    position: absolute;
    top: 14px;
    bottom: 14px;
    inset-inline-start: 15px;
    width: 1px;
    background: var(--spatial-line);
}

.ctx-steps li {
    position: relative;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 18px;
    padding: 0 0 26px;
}

.ctx-steps li:last-child {
    padding-bottom: 0;
}

.ctx-step-no {
    position: relative;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--spatial-line);
    background: var(--bg-primary);
    font: 11px monospace;
    color: var(--cyan);
}

.ctx-steps strong {
    display: block;
    margin: 4px 0 6px;
    font-size: 16px;
    color: var(--text-primary);
}

.ctx-steps p {
    margin: 0;
    font-size: 14px;
    line-height: 1.85;
    color: var(--text-secondary);
}

.ctx-quick {
    display: grid;
    gap: 6px;
    padding: 20px 22px;
    border: 1px solid var(--spatial-line);
    border-inline-start: 2px solid #25d366;
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-decoration: none;
    transition: border-color .3s ease, translate .3s ease;
}

.ctx-quick span {
    font-size: 12px;
    color: var(--text-muted);
}

.ctx-quick strong {
    font-size: 16px;
}

.ctx-quick b {
    color: #25d366;
}

.ctx-quick:hover {
    border-color: #25d366;
    translate: 0 -2px;
}

.ctx-hours {
    display: grid;
    gap: 6px;
    margin: 0;
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.ctx-hours span {
    font-size: 12px;
    color: var(--text-muted);
}

/* Map */
.ctx-map-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px 40px;
    margin-bottom: 34px;
}

.ctx-map-head .ctx-heading {
    margin-bottom: 12px;
}

.ctx-map-address {
    margin: 0;
    font-size: 15px;
    color: var(--text-secondary);
}

.ctx-map-link {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--cyan);
    text-decoration: none;
}

.ctx-map-frame {
    margin: 0;
    border: 1px solid var(--spatial-line);
    background: var(--bg-secondary);
}

.ctx-map-frame iframe {
    display: block;
    width: 100%;
    height: clamp(320px, 38vw, 460px);
    border: 0;
    filter: grayscale(.35) contrast(1.05);
    transition: filter .5s ease;
}

.ctx-map-frame:hover iframe {
    filter: none;
}

/* Responsive */
@media (max-width: 1024px) {
    .ctx-hero-grid,
    .ctx-message-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .ctx-console {
        transform: none;
    }

    .ctx-next {
        position: static;
    }
}

@media (max-width: 640px) {
    .ctx-hero {
        padding-top: calc(var(--nav-height, 70px) + 30px);
    }

    .ctx-breadcrumb {
        margin-bottom: 24px;
    }

    .ctx-channel {
        grid-template-columns: 28px minmax(0, 1fr) 28px;
        grid-template-areas:
            "no label go"
            "no value go";
        gap: 4px 12px;
        padding: 16px 2px;
    }

    .ctx-channel-no { grid-area: no; }
    .ctx-channel-label { grid-area: label; }
    .ctx-channel-go { grid-area: go; }

    .ctx-channel strong {
        grid-area: value;
        justify-self: start;
        font-size: 18px;
    }

    .ctx-console-facts {
        grid-template-columns: 1fr;
    }

    .ctx-console-facts > div + div {
        padding-inline-start: 0;
        border-inline-start: 0;
        border-top: 1px solid var(--spatial-line);
    }

    .ctx-console-facts > div {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        padding: 14px 0;
    }

    .ctx-console-facts dt {
        margin: 0;
    }

    .ctx-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .ctx-form-body {
        padding: 20px 16px;
    }

    .ctx-form .ctx-field :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) {
        font-size: 16px;
    }

    .ctx-map-frame iframe {
        height: 320px;
    }
}

/* Motion: !important is needed to override the blanket animation kill in mobile.css. */
@keyframes ctx-rise {
    from { opacity: 0; translate: 0 26px; }
    to { opacity: 1; translate: 0 0; }
}

@keyframes ctx-console-in {
    from { opacity: 0; translate: 0 40px; scale: .96; }
    to { opacity: 1; translate: 0 0; scale: 1; }
}

@keyframes ctx-scan {
    0% { transform: translateY(0); opacity: 0; }
    10% { opacity: 1; }
    100% { transform: translateY(420px); opacity: 0; }
}

@keyframes ctx-ping {
    0% { scale: .6; opacity: .9; }
    100% { scale: 2.2; opacity: 0; }
}

@keyframes ctx-grid-drift {
    to { background-position: 0 0, 56px 56px, 56px 56px; }
}

@keyframes ctx-tick {
    0%, 100% { opacity: 1; }
    50% { opacity: .35; }
}

@media (prefers-reduced-motion: no-preference) {
    .ctx-hero {
        animation: ctx-grid-drift 24s linear infinite !important;
    }

    .ctx-hero-copy > * {
        animation: ctx-rise .8s cubic-bezier(.2, .7, .2, 1) both !important;
    }

    .ctx-hero-copy > :nth-child(2) { animation-delay: .08s !important; }
    .ctx-hero-copy > :nth-child(3) { animation-delay: .16s !important; }
    .ctx-hero-copy > :nth-child(4) { animation-delay: .24s !important; }

    .ctx-channels li {
        animation: ctx-rise .7s cubic-bezier(.2, .7, .2, 1) both !important;
    }

    .ctx-channels li:nth-child(1) { animation-delay: .32s !important; }
    .ctx-channels li:nth-child(2) { animation-delay: .4s !important; }
    .ctx-channels li:nth-child(3) { animation-delay: .48s !important; }
    .ctx-channels li:nth-child(4) { animation-delay: .56s !important; }

    .ctx-console {
        animation: ctx-console-in 1s .2s cubic-bezier(.2, .7, .2, 1) both !important;
        transition: transform .45s cubic-bezier(.2, .7, .2, 1) !important;
    }

    .ctx-console::after {
        animation: ctx-scan 5s 1.2s ease-in-out infinite !important;
    }

    .ctx-status.is-open i::after {
        animation: ctx-ping 1.8s ease-out infinite !important;
    }

    .ctx-clock-time .ctx-colon {
        animation: ctx-tick 1s steps(1) infinite !important;
    }

    .ctx-channel::before,
    .ctx-channel strong,
    .ctx-channel-go,
    .ctx-quick,
    .ctx-field input,
    .ctx-field select,
    .ctx-field textarea,
    .ctx-map-frame iframe {
        transition-duration: .3s !important;
    }

    .ctx-motion .ctx-chapter-no,
    .ctx-motion .ctx-heading,
    .ctx-motion .ctx-form-frame,
    .ctx-motion .ctx-steps li,
    .ctx-motion .ctx-quick,
    .ctx-motion .ctx-hours,
    .ctx-motion .ctx-map-frame,
    .ctx-motion .ctx-map-link,
    .ctx-motion .ctx-map-address {
        opacity: 0;
        translate: 0 28px;
        transition:
            opacity .8s cubic-bezier(.2, .7, .2, 1) var(--ctx-d, 0ms),
            translate .8s cubic-bezier(.2, .7, .2, 1) var(--ctx-d, 0ms) !important;
    }

    .ctx-motion .is-in.ctx-chapter-no,
    .ctx-motion .is-in.ctx-heading,
    .ctx-motion .is-in.ctx-form-frame,
    .ctx-motion .ctx-steps li.is-in,
    .ctx-motion .is-in.ctx-quick,
    .ctx-motion .is-in.ctx-hours,
    .ctx-motion .is-in.ctx-map-frame,
    .ctx-motion .is-in.ctx-map-link,
    .ctx-motion .is-in.ctx-map-address {
        opacity: 1;
        translate: 0 0;
    }

    .ctx-motion .is-in.ctx-quick:hover {
        translate: 0 -2px;
    }

    .ctx-motion .ctx-steps::before {
        scale: 1 0;
        transform-origin: top;
        transition: scale 1.2s .3s cubic-bezier(.2, .7, .2, 1) !important;
    }

    .ctx-motion .ctx-steps.is-in::before {
        scale: 1 1;
    }
}
