:root {
    color-scheme: light dark;
    --text: #15172b;
    --muted: #5d6280;
    --background: #f6f5ff;
    --surface: #ffffff;
    --line: #e4e2f5;
    --blue: #3966ff;
    --violet: #7f3bff;
    --lilac: #bd91ff;
    --link: #4b4ff0;
}

@media (prefers-color-scheme: dark) {
    :root {
        --text: #eceaff;
        --muted: #a3a6c4;
        --background: #0d0e1c;
        --surface: #17192e;
        --line: #272a45;
        --link: #a9a5ff;
    }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a {
    color: var(--link);
}

.page {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 16px;
}

header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 0;
}

header a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 700;
    font-size: 19px;
    text-decoration: none;
}

header img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.hero {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
    gap: 48px;
    padding: 48px 0 80px;
}

.hero h1 {
    margin: 0 0 20px;
    font-size: clamp(40px, 6vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.hero h1 span {
    background: linear-gradient(90deg, var(--blue), var(--violet));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p {
    margin: 0 0 28px;
    color: var(--muted);
    font-size: 20px;
}

.badge {
    display: inline-block;
    padding: 12px 22px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--blue), var(--violet));
    color: #fff;
    font-weight: 600;
}

.requires {
    margin-top: 14px;
    color: var(--muted);
    font-size: 15px;
}

.stack {
    --secondary: #dee0f9;
    --on-secondary: #161b2c;
    --secondary-accent: #595d72;
    --tertiary: #fdd7fa;
    --on-tertiary: #2f0f30;
    --tertiary-accent: #7a5279;
    --tertiary-accent2: #4a5bb5;
    position: relative;
    width: min(100%, 400px);
    aspect-ratio: 350 / 170;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 24px 60px -12px rgba(57, 102, 255, 0.35);
    font-family: Roboto, system-ui, sans-serif;
    container-type: inline-size;
}

@media (prefers-color-scheme: dark) {
    .stack {
        --secondary: #424659;
        --on-secondary: #dee0f9;
        --secondary-accent: #c1c5dd;
        --tertiary: #603b5f;
        --on-tertiary: #ffd7f6;
        --tertiary-accent: #eab6e3;
        --tertiary-accent2: #b9c3ff;
    }
}

.card {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: flip 9s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes flip {
    0%,
    30% {
        transform: none;
    }
    33.3% {
        transform: translateY(-100%);
        animation-timing-function: step-end;
    }
    33.4%,
    96.6% {
        transform: translateY(100%);
    }
    100% {
        transform: none;
    }
}

.card .value {
    font-weight: 500;
    line-height: 1.1;
}

.card .caption {
    font-size: 3.7cqw;
    line-height: 1.3;
}

.card.calendar {
    padding: 2.3cqw;
    background: var(--secondary);
    color: var(--on-secondary);
}

.card.calendar .month {
    margin: 0 0 0.6cqw 2.3cqw;
    font-size: 4cqw;
    font-weight: 500;
    line-height: 1.3;
}

.card.calendar .weekdays,
.card.calendar .days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
}

.card.calendar .weekdays {
    font-size: 2.9cqw;
    font-weight: 500;
    line-height: 1.5;
}

.card.calendar .days {
    flex: 1;
    grid-auto-rows: 1fr;
    align-items: center;
    justify-items: center;
    font-size: 3.4cqw;
    font-weight: 500;
}

.card.calendar .today {
    display: grid;
    place-items: center;
    width: 5.8cqw;
    height: 5.8cqw;
    border-radius: 50%;
    background: var(--secondary-accent);
    color: var(--secondary);
}

.card.status {
    flex-direction: row;
    gap: 2.3cqw;
    padding: 2.3cqw;
    background: var(--tertiary);
    color: var(--on-tertiary);
    animation-delay: -6s;
}

.gauge {
    --accent: var(--tertiary-accent);
    position: relative;
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 3.4cqw;
}

.gauge:nth-child(2) {
    --accent: var(--tertiary-accent2);
}

.gauge::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--accent);
    opacity: 0.14;
}

.gauge .ring {
    position: relative;
    width: 24cqw;
    height: 24cqw;
}

.gauge svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    fill: none;
    stroke-linecap: round;
    stroke-width: 11.1;
}

.gauge .track {
    stroke: currentColor;
    opacity: 0.25;
}

.gauge .level {
    stroke: var(--accent);
}

.gauge .icon {
    inset: 30%;
    width: 40%;
    height: 40%;
    fill: currentColor;
}

.gauge .value {
    position: relative;
    margin-top: 1.1cqw;
    font-size: 4.6cqw;
}

.gauge .caption {
    position: relative;
    font-size: 3.4cqw;
}

.card.sky {
    justify-content: flex-end;
    padding: 4.6cqw;
    background: linear-gradient(#4f9be8, #c4e6ff);
    color: var(--on-tertiary);
    animation-delay: -3s;
}

.sky .sun {
    position: absolute;
    top: 11.3cqw;
    left: 29%;
    width: 13.6cqw;
    height: 13.6cqw;
    border-radius: 50%;
    background: radial-gradient(closest-side, #ffd54a 59%, rgba(255, 224, 130, 0.3) 60%);
}

.sky .hill {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
}

.sky .hill.back {
    height: 75%;
    fill: var(--tertiary-accent);
}

.sky .hill.front {
    height: 60%;
    fill: var(--tertiary);
}

.sky .text {
    position: relative;
    display: flex;
    flex-direction: column;
}

.sky .value {
    font-size: 4.3cqw;
}

.dots {
    position: absolute;
    top: 50%;
    right: 3.4cqw;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 1.4cqw;
    transform: translateY(-50%);
}

.dots i {
    width: 1.8cqw;
    height: 1.8cqw;
    border: 0.5px solid rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.18);
    opacity: 0.4;
    animation: dot 9s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.dots i:nth-child(2) {
    animation-delay: -6s;
}

.dots i:nth-child(3) {
    animation-delay: -3s;
}

@keyframes dot {
    0%,
    30%,
    100% {
        opacity: 1;
    }
    33.3%,
    96.6% {
        opacity: 0.4;
    }
}

.features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding-bottom: 80px;
}

.feature {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--surface);
}

.feature h2 {
    margin: 0 0 8px;
    font-size: 21px;
}

.feature p {
    margin: 0;
    color: var(--muted);
}

footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    padding: 28px 0 48px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 15px;
}

footer a {
    color: var(--muted);
}

footer .by {
    margin-left: auto;
}

.doc {
    max-width: 720px;
    padding-bottom: 64px;
}

.doc h1 {
    margin: 16px 0 4px;
    font-size: 36px;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.doc h2 {
    margin-top: 2em;
    font-size: 21px;
}

.doc .updated {
    color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
    .card,
    .dots i {
        animation: none;
    }

    .card:not(.calendar) {
        display: none;
    }

    .dots i:first-child {
        opacity: 1;
    }
}

@media (max-width: 760px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 56px;
        padding-top: 24px;
    }

    .features {
        grid-template-columns: 1fr;
    }

    footer .by {
        margin-left: 0;
    }
}
