:root {
    color-scheme: light;

    --ink: #f5f4ee;
    --gold: #d7b77b;
    --gold-light: #87672c;
    --stone: #5f625d;
    --line: rgb(135 103 44 / 24%);
    --text: #242521;
    --heading: #22231f;
    --strong: #383a34;
    --muted: #74766f;
    --card: linear-gradient(145deg, rgb(255 255 255 / 96%), rgb(247 245 238 / 98%));
    --shadow: 0 28px 80px rgb(48 40 23 / 12%), inset 0 1px rgb(255 255 255 / 85%);
    --unit: rgb(255 255 255 / 54%);
}

:root[data-theme="dark"] {
    color-scheme: dark;

    --ink: #111311;
    --gold-light: #f5dba8;
    --stone: #a9aaa7;
    --line: rgb(215 183 123 / 24%);
    --text: #f8f7f3;
    --heading: #fffdf8;
    --strong: #e9e7df;
    --muted: #777b75;
    --card: linear-gradient(145deg, rgb(34 38 34 / 91%), rgb(18 20 18 / 94%));
    --shadow: 0 28px 80px rgb(0 0 0 / 36%), inset 0 1px rgb(255 255 255 / 4%);
    --unit: rgb(0 0 0 / 16%);
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    min-width: 320px;
    background: var(--ink);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.page {
    display: grid;
    place-items: center;
    min-height: 100svh;
    overflow: hidden;
    padding: 24px;
    position: relative;
    isolation: isolate;
}

.page::before,
.page::after {
    content: "";
    pointer-events: none;
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    filter: blur(4px);
}

.page::before {
    width: min(76vw, 780px);
    aspect-ratio: 1;
    left: -29%;
    top: -36%;
    background: radial-gradient(circle, rgb(215 183 123 / 20%), transparent 67%);
}

.page::after {
    width: min(67vw, 680px);
    aspect-ratio: 1;
    right: -31%;
    bottom: -42%;
    background: radial-gradient(circle, rgb(215 183 123 / 13%), transparent 66%);
}

.card {
    width: min(100%, 760px);
    padding: clamp(28px, 5vw, 56px) clamp(22px, 6vw, 72px);
    text-align: center;
    border: 1px solid var(--line);
    border-radius: clamp(22px, 4vw, 36px);
    background: var(--card);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.brand {
    display: block;
    width: min(202px, 68vw);
    height: auto;
    margin: 0 auto clamp(28px, 5vw, 40px);
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 16px;
    color: var(--gold-light);
    font-size: .72rem;
    font-weight: 750;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.status::before {
    width: 8px;
    height: 8px;
    content: "";
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 0 5px rgb(215 183 123 / 12%), 0 0 18px var(--gold);
}

h1 {
    max-width: 21ch;
    margin: 0 auto;
    color: var(--heading);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.9rem, 5.25vw, 3.3rem);
    font-weight: 600;
    letter-spacing: -.038em;
    line-height: 1.08;
}

#page-subtitle {
    margin: 13px 0 0;
    color: var(--gold-light);
    font-size: clamp(1.1rem, 2.2vw, 1.4rem);
    font-weight: 750;
    letter-spacing: .12em;
    line-height: 1.25;
    text-transform: uppercase;
    font-variant-caps: all-small-caps;
}

.message {
    max-width: 44ch;
    margin: 18px auto 0;
    color: var(--stone);
    font-size: clamp(.98rem, 2.8vw, 1.125rem);
    line-height: 1.65;
}

.message strong {
    color: var(--strong);
    font-weight: 650;
}

.timer-wrap {
    margin-top: clamp(30px, 5vw, 42px);
    padding-top: clamp(25px, 4vw, 34px);
    border-top: 1px solid var(--line);
}

.timer-label {
    display: flex;
    gap: .5rem;
    align-items: center;
    justify-content: center;

    >p {
        margin: 0 0 16px;
        color: var(--gold-light);
        font-size: .75rem;
        font-weight: 700;
        letter-spacing: .13em;
        text-transform: uppercase;
    }
}

.timer {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(8px, 2.5vw, 18px);
}

.time-unit {
    min-width: 0;
    padding: clamp(9px, 2vw, 15px) 4px;
    border: 1px solid rgb(215 183 123 / 16%);
    border-radius: 13px;
    background: var(--unit);
}

.time-value {
    display: block;
    color: var(--gold-light);
    font-variant-numeric: tabular-nums;
    font-size: clamp(1.45rem, 5.8vw, 2.55rem);
    font-weight: 700;
    letter-spacing: -.055em;
    line-height: 1.05;
}

.time-label {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: clamp(.58rem, 1.7vw, .7rem);
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.footer {
    margin: clamp(28px, 4vw, 38px) 0 0;
    color: var(--muted);
    font-size: .82rem;
}

[hidden] {
    display: none !important;
}

@media (width <= 390px) {
    .page {
        padding: 16px;
    }

    .card {
        padding: 30px 20px;
    }

    .brand {
        margin-bottom: 30px;
    }

    h1 {
        max-width: 18ch;
        font-size: 1.9rem;
    }

    .timer {
        gap: 6px;
    }

    .time-unit {
        border-radius: 10px;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .status::before {
        animation: glow 2s ease-in-out infinite;
    }

    @keyframes glow {
        50% {
            opacity: .58;
            transform: scale(.84);
        }
    }
}