:root {
    --blue: #18a8e1;
    --blue-dark: #087aa7;
    --yellow: #fbdc00;
    --ink: #373733;
    --muted: #656660;
    --surface: #f4f7f8;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--surface);
    font-family: Montserrat, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.maintenance-shell {
    position: relative;
    display: grid;
    min-height: 100svh;
    grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
    grid-template-rows: auto 1fr auto;
    gap: 1.5rem 5vw;
    overflow: hidden;
    padding: clamp(1.5rem, 4vw, 4rem) clamp(1.25rem, 7vw, 7rem) clamp(1.5rem, 3vw, 2.5rem);
    background:
        linear-gradient(90deg, transparent 0 67%, rgb(24 168 225 / 5%) 67% 100%),
        var(--surface);
}

.brand {
    z-index: 2;
    grid-column: 1 / -1;
}

.brand img {
    display: block;
    width: clamp(210px, 27vw, 330px);
    height: auto;
}

.message {
    z-index: 2;
    align-self: center;
    max-width: 680px;
    padding-block: clamp(2rem, 8vh, 5rem);
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0 0 1.5rem;
    color: var(--blue-dark);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.status span {
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 50%;
    background: var(--yellow);
    box-shadow: 0 0 0 5px rgb(251 220 0 / 20%);
}

h1 {
    max-width: 9ch;
    margin: 0 0 1.5rem;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: clamp(3rem, 7vw, 6rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 0.94;
    text-wrap: balance;
}

.summary {
    max-width: 60ch;
    margin: 0;
    color: var(--muted);
    font-size: clamp(1.05rem, 1.7vw, 1.3rem);
    line-height: 1.65;
}

.assurance {
    max-width: 60ch;
    margin: 1rem 0 0;
    color: var(--ink);
    font-size: 0.94rem;
    font-weight: 600;
    line-height: 1.55;
}

.retry {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    margin-top: 2.25rem;
    padding: 0.95rem 1.25rem;
    border-radius: 12px;
    color: var(--white);
    background: var(--blue-dark);
    box-shadow: 0 10px 24px rgb(8 122 167 / 20%);
    font-size: 0.94rem;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.retry svg {
    width: 1.15rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.retry:hover {
    background: #066889;
    box-shadow: 0 14px 30px rgb(8 122 167 / 26%);
    transform: translateY(-2px);
}

.retry:focus-visible {
    outline: 3px solid var(--yellow);
    outline-offset: 4px;
}

.timepiece {
    position: relative;
    align-self: center;
    justify-self: center;
    width: min(36vw, 480px);
    aspect-ratio: 1;
}

.dial {
    position: absolute;
    inset: 13%;
    z-index: 2;
    border-radius: 50%;
    background: var(--white);
    box-shadow: 0 30px 65px rgb(55 55 51 / 14%);
}

.dial::before {
    position: absolute;
    inset: 7%;
    border: 1px solid rgb(77 77 71 / 13%);
    border-radius: inherit;
    content: "";
}

.marker {
    position: absolute;
    z-index: 2;
    width: 4px;
    height: 15px;
    border-radius: 3px;
    background: var(--blue);
}

.marker-12,
.marker-6 {
    left: calc(50% - 2px);
}

.marker-12 {
    top: 10%;
}

.marker-6 {
    bottom: 10%;
}

.marker-3,
.marker-9 {
    top: calc(50% - 7px);
    transform: rotate(90deg);
}

.marker-3 {
    right: 11%;
}

.marker-9 {
    left: 11%;
}

.hand {
    position: absolute;
    left: calc(50% - 3px);
    bottom: 50%;
    z-index: 3;
    width: 6px;
    border-radius: 6px;
    background: var(--ink);
    transform-origin: 50% 100%;
}

.hand-hour {
    height: 24%;
    transform: rotate(305deg);
}

.hand-minute {
    height: 34%;
    background: var(--blue);
    animation: keep-time 12s linear infinite;
}

.pin {
    position: absolute;
    top: calc(50% - 8px);
    left: calc(50% - 8px);
    z-index: 4;
    width: 16px;
    height: 16px;
    border: 4px solid var(--white);
    border-radius: 50%;
    background: var(--yellow);
    box-shadow: 0 2px 8px rgb(55 55 51 / 24%);
}

.orbit {
    position: absolute;
    border: 1px solid rgb(24 168 225 / 22%);
    border-radius: 50%;
}

.orbit-one {
    inset: 2%;
}

.orbit-two {
    inset: -8%;
    border-color: rgb(251 220 0 / 38%);
}

footer {
    z-index: 2;
    display: flex;
    grid-column: 1 / -1;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-top: 1px solid rgb(77 77 71 / 12%);
    padding-top: 1.25rem;
    color: var(--muted);
    font-size: 0.78rem;
}

footer span:first-child {
    color: var(--ink);
    font-weight: 700;
}

@keyframes keep-time {
    from {
        transform: rotate(38deg);
    }
    to {
        transform: rotate(398deg);
    }
}

@media (max-width: 760px) {
    .maintenance-shell {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto;
        gap: 0;
        overflow: visible;
        padding: 1.5rem 1.25rem;
        background: var(--surface);
    }

    .message {
        padding-block: 3.5rem 2rem;
    }

    h1 {
        max-width: 10ch;
        font-size: clamp(3rem, 16vw, 4.6rem);
    }

    .timepiece {
        grid-row: 3;
        width: min(78vw, 350px);
        margin: 1.5rem auto 4rem;
    }

    footer {
        grid-row: 4;
    }
}

@media (max-width: 430px) {
    .brand img {
        width: 220px;
    }

    .summary {
        font-size: 1rem;
    }

    footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hand-minute {
        animation: none;
        transform: rotate(38deg);
    }

    .retry {
        transition: none;
    }
}
