.ex-site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    margin: 0 0px 18px;
    background: transparent;
    border: 0;
}

.ex-site-header__inner {
    width: min(100%, 760px);
    margin: 0 auto;
    padding: 12px 12px 15px;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 72%, #f3f6f9 100%);
    border: 1px solid rgba(24,42,62,.10);
    border-radius: 0 0 30px 30px;
    box-shadow:
        0 8px 0 #c9d0d9,
        0 15px 26px rgba(10,28,47,.24),
        inset 0 2px 0 rgba(255,255,255,.96);
}

/* Controls are deliberately position-based so the camera/island is always
   mathematically centered in the entire header, not centered in a grid cell. */
.ex-site-header__controls {
    position: relative;
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 11px;
}

.ex-site-header__island {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 88px;
    height: 22px;
    transform: translate(-50%, -50%);
    border-radius: 999px;
    background: linear-gradient(180deg,#151d24,#10171d);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.08),
        inset 0 -1px 0 rgba(0,0,0,.28),
        0 2px 4px rgba(0,0,0,.15);
}

.ex-site-header__island i {
    position: absolute;
    right: 9px;
    top: 7px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #226bd0;
    box-shadow: 0 0 0 2px rgba(69,139,230,.16), inset 0 0 2px rgba(255,255,255,.55);
}

.ex-header-actions {
    display: grid;
    grid-template-columns: 50px 50px;
    gap: 9px;
    margin-left: auto;
}

.ex-site-header button,
.ex-site-header .ex-header-icon-button {
    width: 50px;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(28,46,67,.09);
    border-radius: 17px;
    background: linear-gradient(180deg,#fff 0%,#f8f9fb 58%,#edf0f4 100%);
    color: #152d49;
    box-shadow:
        inset 0 2px 0 rgba(255,255,255,.95),
        inset 0 -2px 0 rgba(20,40,60,.06),
        0 5px 0 #d4d9e0,
        0 8px 14px rgba(16,33,51,.16);
    transition: transform .12s ease, box-shadow .12s ease;
}

.ex-site-header button:active,
.ex-site-header .ex-header-icon-button:active {
    transform: translateY(3px);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.9),
        0 2px 0 #d4d9e0,
        0 4px 8px rgba(16,33,51,.14);
}

.ex-site-header button:focus-visible,
.ex-brand-banner:focus-visible {
    outline: 3px solid rgba(38,111,224,.34);
    outline-offset: 3px;
}

.ex-site-header button svg,
.ex-site-header .ex-header-icon-button svg {
    width: 26px;
    height: 26px;
    stroke-width: 2.2;
}

/* ================================================================
   BRAND BANNER — tuned to match the approved mockup more closely
   ================================================================ */
.ex-brand-banner {
    position: relative;
    display: block;
    height: 164px;
    overflow: hidden;
    isolation: isolate;
    border: 1px solid rgba(82,136,190,.16);
    border-radius: 25px;
    background:
        radial-gradient(ellipse 58% 62% at 50% 98%, rgba(69,143,220,.18) 0%, rgba(69,143,220,.08) 38%, transparent 72%),
        linear-gradient(180deg,#ffffff 0%,#f8fbff 36%,#edf5fc 100%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.98),
        inset 0 0 0 1px rgba(255,255,255,.42),
        0 5px 13px rgba(21,58,96,.07);
    color: #152d49;
    text-decoration: none;
}

.ex-brand-banner::before,
.ex-brand-banner::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.ex-brand-banner::before {
    left: 18%;
    right: 18%;
    bottom: -52px;
    height: 104px;
    border-radius: 50%;
    background: rgba(73,145,221,.13);
    filter: blur(16px);
}

.ex-brand-banner::after {
    inset: 0;
    background: linear-gradient(90deg, rgba(255,255,255,.08), transparent 24%, transparent 76%, rgba(255,255,255,.08));
    z-index: 8;
    pointer-events: none;
}

.ex-brand-phone {
    position: absolute;
    z-index: 3;
    top: 2px;
    width: 108px;
    height: 172px;
    padding: 4px;
    border-radius: 22px;
    background: linear-gradient(145deg,#234f77 0%,#112c45 58%,#3b739e 100%);
    box-shadow:
        0 8px 17px rgba(13,38,63,.19),
        inset 0 0 0 1px rgba(255,255,255,.28);
}

.ex-brand-phone--send {
    left: -16px;
    transform: rotate(-5.2deg);
    transform-origin: 58% 20%;
}

.ex-brand-phone--receive {
    right: -16px;
    transform: rotate(5.2deg);
    transform-origin: 42% 20%;
}

.ex-brand-phone__screen {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 18px;
    background: linear-gradient(180deg,#fff 0%,#f8fafc 100%);
}

.ex-brand-phone__screen--receive {
    background:
        radial-gradient(circle at 50% 72%, rgba(255,255,255,.56), transparent 42%),
        linear-gradient(160deg,#eef6fd 0%,#dceaf8 56%,#cbdff2 100%);
}

.ex-brand-phone__island {
    position: absolute;
    z-index: 5;
    top: 7px;
    left: 50%;
    width: 43px;
    height: 8px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: #102033;
}

.ex-brand-compose-head {
    height: 30px;
    padding: 17px 7px 0;
    display: grid;
    grid-template-columns: 12px 1fr 12px;
    align-items: center;
    color: #1b2b3c;
    font-size: 6px;
    line-height: 1;
}

.ex-brand-compose-title { text-align: center; font-weight: 800; white-space: nowrap; }
.ex-brand-back,.ex-brand-plus { color: #277be5; font-size: 12px; font-weight: 600; }
.ex-brand-plus { text-align: right; }

.ex-brand-phone__to {
    display: block;
    margin: 2px 6px 0;
    padding: 4px 1px 5px;
    border-top: 1px solid #edf0f3;
    border-bottom: 1px solid #e4e8ed;
    color: #7b8898;
    font-size: 5.4px;
    white-space: nowrap;
}

.ex-brand-phone__bubble {
    position: absolute;
    right: 6px;
    top: 58px;
    max-width: 82px;
    padding: 6px 7px;
    border-radius: 12px 12px 4px 12px;
    font-size: 6.9px;
    line-height: 1.1;
    white-space: nowrap;
}

.ex-brand-phone__bubble--send {
    color: #fff;
    background: linear-gradient(180deg,#3f91f3,#287be6);
    box-shadow: 0 2px 5px rgba(46,123,232,.22);
}

.ex-brand-compose {
    position: absolute;
    left: 6px;
    right: 6px;
    bottom: 43px;
    height: 18px;
    display: grid;
    grid-template-columns: 1fr 16px;
    align-items: center;
    gap: 4px;
}

.ex-brand-compose__field {
    height: 16px;
    display: flex;
    align-items: center;
    padding: 0 6px;
    border: 1px solid #dce2ea;
    border-radius: 999px;
    color: #a0a9b5;
    font-size: 5px;
    background: #fff;
}

.ex-brand-compose__send {
    width: 16px;
    height: 16px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #2e7be8;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
}

.ex-brand-keyboard {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 40px;
    display: grid;
    grid-template-columns: repeat(6,1fr);
    gap: 2px;
    padding: 6px 4px;
    background: linear-gradient(180deg,#e3e6eb,#d2d7de);
}

.ex-brand-keyboard i {
    display: block;
    min-width: 0;
    border-radius: 3px;
    background: #fff;
    box-shadow: 0 1px 0 rgba(58,75,94,.16);
}

.ex-brand-today {
    display: block;
    padding-top: 22px;
    text-align: center;
    color: rgba(22,54,83,.72);
    font-size: 6px;
    font-weight: 700;
}

.ex-brand-locktime {
    display: block;
    margin-top: 4px;
    color: #233a54;
    font-size: 20px;
    line-height: 1;
    text-align: center;
    font-weight: 500;
    letter-spacing: -1px;
}

.ex-brand-notification {
    position: absolute;
    left: 7px;
    right: 7px;
    top: 74px;
    min-height: 42px;
    display: grid;
    grid-template-columns: 12px 1fr;
    gap: 5px;
    align-items: start;
    padding: 8px 7px;
    border: 1px solid rgba(25,58,89,.07);
    border-radius: 13px;
    background: rgba(255,255,255,.93);
    box-shadow: 0 5px 10px rgba(25,55,86,.09);
}

.ex-brand-notification__app {
    width: 11px;
    height: 11px;
    display: grid;
    place-items: center;
    border-radius: 4px;
    color: #fff;
    background: #347fe7;
    font-size: 4px;
}

.ex-brand-notification__from,
.ex-brand-notification__text {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ex-brand-notification__from { margin-bottom: 4px; color: #5b6c7f; font-size: 5.3px; font-weight: 800; }
.ex-brand-notification__text { color: #1b2b3d; font-size: 6.7px; }

/* The path lives high in the banner, leaving a clean visual lane for the logo. */
.ex-brand-flight {
    position: absolute;
    z-index: 2;
    top: 14px;
    left: 82px;
    right: 82px;
    height: 68px;
    pointer-events: none;
}

.ex-brand-flight__path {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.ex-brand-flight__path path {
    fill: none;
    stroke: #82b4e6;
    stroke-width: 1.3;
    stroke-linecap: round;
    stroke-dasharray: 4 9;
    opacity: .58;
}

.ex-brand-flight__typing {
    position: absolute;
    left: 28%;
    top: 2px;
    width: 43px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border-radius: 14px 14px 14px 6px;
    background: linear-gradient(180deg,#68aff2,#478fdf);
    box-shadow: 0 4px 8px rgba(49,126,207,.14);
    animation: exBrandFloat 4.6s ease-in-out infinite;
}

.ex-brand-flight__typing i { width: 4px; height: 4px; border-radius: 50%; background: #fff; opacity: .92; }

.ex-brand-flight__plane {
    position: absolute;
    right: 15%;
    top: 2px;
    width: 29px;
    height: 29px;
    color: #2f7fdc;
    transform: rotate(7deg);
    filter: drop-shadow(0 3px 4px rgba(46,123,232,.10));
    transition: transform .25s ease;
}

/* Logo is the focal point and sits clearly between the two phones. */
.ex-brand-wordmark {
    position: absolute;
    z-index: 6;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    display: flex;
    align-items: baseline;
    justify-content: center;
    white-space: nowrap;
    color: #173655;
    font-size: clamp(24px,6.35vw,32px);
    font-weight: 850;
    line-height: .95;
    letter-spacing: -1.45px;
    text-shadow: 0 1px 0 rgba(255,255,255,.95), 0 2px 8px rgba(36,91,144,.06);
}

.ex-brand-wordmark strong {
    margin: 0 .012em;
    color: #2474df;
    font-size: 1.12em;
    font-weight: 950;
}

@keyframes exBrandFloat {
    0%,100% { transform: translate3d(0,0,0); }
    50% { transform: translate3d(3px,-2px,0); }
}

@media (hover:hover) and (pointer:fine) {
    .ex-site-header button:hover { transform: translateY(-1px); }
    .ex-brand-banner:hover .ex-brand-flight__plane { transform: translate(4px,-2px) rotate(7deg); }
}

@media (max-width:430px) {
    .ex-site-header__inner { padding-inline: 11px; }
}

@media (max-width:389px) {
    .ex-site-header { margin-inline: 4px; }
    .ex-site-header__inner { padding: 10px 9px 13px; border-radius: 0 0 25px 25px; }
    .ex-site-header__controls { min-height: 52px; margin-bottom: 9px; }
    .ex-site-header__island { width: 72px; height: 19px; }
    .ex-site-header__island i { width: 6px; height: 6px; top: 6.5px; }
    .ex-header-actions { grid-template-columns: 44px 44px; gap: 7px; }
    .ex-site-header button,.ex-site-header .ex-header-icon-button { width: 44px; height: 44px; border-radius: 15px; }
    .ex-site-header button svg,.ex-site-header .ex-header-icon-button svg { width: 23px; height: 23px; }
    .ex-brand-banner { height: 150px; border-radius: 22px; }
    .ex-brand-phone { width: 96px; height: 158px; border-radius: 20px; }
    .ex-brand-phone--send { left: -15px; }
    .ex-brand-phone--receive { right: -15px; }
    .ex-brand-flight { left: 70px; right: 70px; top: 12px; height: 62px; }
    .ex-brand-flight__typing { width: 39px; height: 23px; left: 27%; }
    .ex-brand-flight__plane { width: 26px; height: 26px; right: 13%; }
    .ex-brand-wordmark { bottom: 21px; font-size: clamp(22px,6.5vw,25px); letter-spacing: -1.15px; }
}

@media (min-width:431px) {
    .ex-brand-banner { height: 174px; }
    .ex-brand-phone { width: 116px; height: 184px; }
    .ex-brand-phone--send { left: -14px; }
    .ex-brand-phone--receive { right: -14px; }
    .ex-brand-wordmark { bottom: 25px; }
}

@media (prefers-reduced-motion:reduce) {
    .ex-brand-flight__typing { animation: none; }
    .ex-site-header button,.ex-brand-flight__plane { transition: none; }
}

/* ================================================================
   RIGHT PHONE WALLPAPER — subtle portrait behind the lock screen
   ================================================================ */
.ex-brand-phone__screen--receive {
    background: #d7e6f5;
}

.ex-brand-wallpaper {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
    object-position: 50% 22%;
    transform: scale(1.035);
    transform-origin: 50% 42%;
    user-select: none;
    pointer-events: none;
}


.ex-brand-phone__screen--receive::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(220,236,250,.08) 0%, rgba(205,225,244,.03) 42%, rgba(20,50,79,.17) 100%),
        radial-gradient(circle at 50% 12%, rgba(255,255,255,.08), transparent 35%);
    pointer-events: none;
}

.ex-brand-phone__screen--receive > .ex-brand-phone__island,
.ex-brand-phone__screen--receive > .ex-brand-today,
.ex-brand-phone__screen--receive > .ex-brand-locktime,
.ex-brand-phone__screen--receive > .ex-brand-notification {
    z-index: 3;
}

.ex-brand-phone__screen--receive .ex-brand-today {
    position: relative;
    color: rgba(255,255,255,.92);
    text-shadow: 0 1px 4px rgba(20,44,67,.34);
}

.ex-brand-phone__screen--receive .ex-brand-locktime {
    position: relative;
    color: #fff;
    text-shadow: 0 2px 8px rgba(15,42,68,.32);
}

.ex-brand-phone__screen--receive .ex-brand-notification {
    background: rgba(255,255,255,.84);
    border-color: rgba(255,255,255,.48);
    box-shadow:
        0 5px 12px rgba(25,55,86,.12),
        inset 0 1px 0 rgba(255,255,255,.72);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}


/* ================================================================
   AUTO-HIDE HEADER
   Scroll down  -> header slides away
   Scroll up    -> header returns
   ================================================================ */
.ex-site-header {
    transform: translateY(0);
    opacity: 1;
    transition:
        transform .28s cubic-bezier(.22,.61,.36,1),
        opacity .20s ease;
    will-change: transform;
}

.ex-site-header.ex-site-header--hidden {
    transform: translateY(calc(-100% - 24px));
    opacity: 0;
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .ex-site-header {
        transition: none;
    }
}
