/* Maintenance page: shown over the whole site when the team lead switches maintenance mode on.
   Black, one hairline frame, a drifting LED grid, a dotted trajectory, quiet type. */
html.maint-on { overflow: hidden !important; background: #050506; }
html.maint-on body > *:not(#maint):not(.mt-pill) { visibility: hidden !important; }

.maint {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: grid;
    grid-template-rows: auto 1fr auto;
    padding: clamp(20px, 3.4vw, 44px);
    background: #050506;
    color: #f2f2f2;
    font: 400 16px/1.55 "Barlow", system-ui, sans-serif;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    animation: mt-in 0.9s ease both;
}

.maint--inline { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; }
.maint *, .maint *::before, .maint *::after { box-sizing: border-box; }

/* hairline frame inset from the edge */
.maint::before {
    content: "";
    position: absolute;
    inset: clamp(10px, 1.6vw, 22px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

/* dotted LED grid, drifting very slowly, fading to black at the edges */
.mt-grid {
    position: absolute;
    inset: -40px;
    background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1.4px);
    background-size: 28px 28px;
    -webkit-mask-image: radial-gradient(ellipse at 50% 46%, #000 0%, transparent 70%);
    mask-image: radial-gradient(ellipse at 50% 46%, #000 0%, transparent 70%);
    animation: mt-drift 38s linear infinite, mt-breathe 7s ease-in-out infinite;
    pointer-events: none;
}

.mt-arc { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0.9; }
.mt-arc path { fill: none; stroke: rgba(255, 255, 255, 0.3); stroke-width: 1.2; stroke-dasharray: 2 9; stroke-linecap: round; vector-effect: non-scaling-stroke; animation: mt-trace 9s linear infinite; }
/* the travelling dot is a zero-length stroke, so it stays round however the arc is stretched */
.mt-arc .mt-dot { stroke: #f5d90a; stroke-width: 9; stroke-linecap: round; stroke-dasharray: none; animation: none; filter: drop-shadow(0 0 6px rgba(245, 217, 10, 0.8)); }

.mt-top, .mt-foot, .mt-c { position: relative; z-index: 1; }

.mt-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: clamp(8px, 1.6vw, 20px) clamp(8px, 1.6vw, 20px) 0; animation: mt-fade 1s 0.1s ease both; }
.mt-top img { height: clamp(31px, 4.3vw, 56px); width: auto; max-width: 62vw; display: block; }
.mt-status { display: inline-flex; align-items: center; gap: 12px; font: 400 clamp(8px, 0.9vw, 10px)/1 "Michroma", sans-serif; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(242, 242, 242, 0.7); white-space: nowrap; }
.mt-status i { width: 7px; height: 7px; background: #f5d90a; transform: rotate(45deg); animation: mt-pulse 1.8s ease-in-out infinite; }

.mt-c { align-self: center; justify-self: start; width: min(920px, 100%); padding: 0 clamp(8px, 4vw, 70px); }

.mt-label { display: flex; align-items: center; gap: 14px; margin: 0 0 clamp(18px, 3vw, 34px); font: 400 clamp(8px, 0.9vw, 10px)/1 "Michroma", sans-serif; letter-spacing: 0.24em; text-transform: uppercase; color: rgba(242, 242, 242, 0.6); animation: mt-up 0.9s 0.25s cubic-bezier(.2, .8, .2, 1) both; }
.mt-label::before { content: ""; width: 6px; height: 6px; border: 1px solid #fff; transform: rotate(45deg); }
.mt-label::after { content: ""; flex: 0 1 120px; height: 1px; background: rgba(255, 255, 255, 0.25); transform-origin: left; animation: mt-line 1.2s 0.5s cubic-bezier(.2, .8, .2, 1) both; }

.mt-title { margin: 0; font: 400 clamp(30px, 6.4vw, 88px)/1.08 "Michroma", sans-serif; letter-spacing: 0.01em; text-transform: uppercase; }
.mt-title .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0.04em 0.08em 0.1em 0; margin-right: 0.12em; }
.mt-title .w > span { display: inline-block; animation: mt-rise 1s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(0.35s + var(--i, 0) * 0.13s); }
.mt-title .o > span { color: transparent; -webkit-text-stroke: 1.5px #f2f2f2; }

.mt-msg { max-width: 52ch; margin: clamp(18px, 3vw, 34px) 0 0; color: rgba(242, 242, 242, 0.66); font-size: clamp(15px, 1.4vw, 18px); animation: mt-up 1s 0.85s cubic-bezier(.2, .8, .2, 1) both; }

.mt-count { display: flex; gap: clamp(14px, 2.4vw, 34px); margin-top: clamp(26px, 4vw, 52px); animation: mt-up 1s 1.05s cubic-bezier(.2, .8, .2, 1) both; }
.mt-count > div { display: grid; gap: 10px; min-width: 2ch; }
.mt-count b { font: 400 clamp(22px, 3.4vw, 46px)/1 "Michroma", sans-serif; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.mt-count small { font: 400 clamp(7px, 0.75vw, 9px)/1 "Michroma", sans-serif; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(242, 242, 242, 0.45); }
.mt-count--soon { font: 400 11px/1 "Michroma", sans-serif; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(242, 242, 242, 0.7); }
.mt-when { margin-top: 14px; font-size: 13px; color: rgba(242, 242, 242, 0.45); animation: mt-fade 1s 1.3s ease both; }

.mt-bar { position: relative; height: 1px; max-width: 420px; margin-top: clamp(28px, 4vw, 52px); background: rgba(255, 255, 255, 0.14); overflow: hidden; animation: mt-fade 1s 1.3s ease both; }
.mt-bar i { position: absolute; top: 0; bottom: 0; left: 0; width: 28%; background: linear-gradient(90deg, transparent, #fff, transparent); animation: mt-sweep 2.6s ease-in-out infinite; }

.mt-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 24px; padding: 0 clamp(8px, 1.6vw, 20px) clamp(8px, 1.6vw, 20px); font: 400 clamp(8px, 0.85vw, 10px)/1.4 "Michroma", sans-serif; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(242, 242, 242, 0.5); animation: mt-fade 1s 1.5s ease both; }
.mt-foot a { color: rgba(242, 242, 242, 0.85); text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, 0.3); padding-bottom: 4px; letter-spacing: 0.08em; text-transform: none; font-family: "Barlow", sans-serif; font-size: 14px; transition: border-color 0.3s, color 0.3s; }
.mt-foot a:hover { color: #fff; border-color: #fff; }

/* a small pill for signed-in team members, who still see the real site */
.mt-pill { position: fixed; z-index: 2147483000; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 10px; padding: 9px 14px; background: rgba(5, 5, 6, 0.92); border: 1px solid rgba(245, 217, 10, 0.5); color: #f2f2f2; font: 400 9px/1 "Michroma", sans-serif; letter-spacing: 0.16em; text-transform: uppercase; text-decoration: none; backdrop-filter: blur(8px); }
.mt-pill i { width: 6px; height: 6px; background: #f5d90a; transform: rotate(45deg); }

@keyframes mt-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes mt-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes mt-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes mt-rise { from { transform: translateY(110%); } to { transform: none; } }
@keyframes mt-line { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes mt-drift { to { transform: translate(28px, 28px); } }
@keyframes mt-breathe { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
@keyframes mt-pulse { 0%, 100% { opacity: 1; transform: rotate(45deg) scale(1); } 50% { opacity: 0.35; transform: rotate(45deg) scale(0.7); } }
@keyframes mt-sweep { 0% { left: -30%; } 100% { left: 102%; } }
@keyframes mt-trace { to { stroke-dashoffset: -110; } }

@media (max-width: 600px) {
    .mt-status span { display: none; }            /* the pulsing diamond is enough on a phone */
    .mt-c { padding-inline: 4px; }
    .mt-count { gap: 14px; }
    .mt-foot { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
    .maint, .maint * { animation-duration: 0.01ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; }
    .mt-arc .mt-dot { display: none; }
}
