.weather-section {
    display: grid;
    grid-template-columns: 36% minmax(0, 1fr);
    align-items: stretch;
    gap: 32px;
    padding-top: 120px;
    padding-bottom: 120px;
    background: var(--ground);
}

.weather-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 28px 0 0;
}

.weather-copy > p:not(.weather-example-note) {
    max-width: 390px;
    margin-top: 28px;
}

.weather-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 44px;
}

.weather-option {
    min-width: 76px;
    min-height: 48px;
    padding: 12px 17px;
    border: 0;
    background: var(--paper);
    color: var(--ink);
    font-size: var(--small);
    font-weight: 600;
    transition: transform 140ms var(--ease-out);
}

.weather-option[aria-pressed="true"] {
    background: var(--ink);
    color: var(--paper);
}

.weather-motion-control {
    padding: 8px 0;
    margin-top: 20px;
    background: none;
    border: 0;
    font-size: var(--small);
    text-decoration: underline;
    text-underline-offset: 5px;
}

.weather-copy .weather-example-note {
    margin-top: auto;
    padding-top: 32px;
    color: var(--secondary);
    font-size: var(--small);
}

.weather-stage {
    position: relative;
    min-height: 525px;
    overflow: hidden;
    background: var(--soft);
    isolation: isolate;
}

.weather-stage[data-weather="clear"] { background: #E8EAF0; }
.weather-stage[data-weather="cloudy"] { background: #E4E6EA; }
.weather-stage[data-weather="rain"] { background: #DCE3F0; }
.weather-stage[data-weather="snow"] { background: #D8E2F2; }

.weather-reading {
    position: absolute;
    z-index: 1;
    top: 42px;
    left: 42px;
    width: 40%;
}

.weather-date {
    font-size: clamp(32px, 3.5vw, 54px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.055em;
    white-space: nowrap;
}

.weather-date span { color: var(--blue); }
.weather-place { margin-top: 12px; color: var(--secondary); font-size: var(--small); }

.weather-temperature {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-top: 48px;
    font-size: clamp(68px, 7.5vw, 112px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.07em;
    font-variant-numeric: tabular-nums;
}

.weather-temperature span:last-child {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 0;
}

.weather-caption {
    position: absolute;
    z-index: 1;
    left: 42px;
    bottom: 34px;
    max-width: 42%;
    font-size: var(--small);
}

.weather-art {
    position: absolute;
    inset: 0 0 0 43%;
    overflow: hidden;
    pointer-events: none;
}

.weather-sun {
    position: absolute;
    top: -110px;
    right: -40px;
    width: 340px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--yellow);
    animation: weather-sun-breathe 7s var(--ease-in-out) infinite;
}

.weather-cloud {
    position: absolute;
    width: 48%;
    fill: var(--paper);
    animation: weather-cloud-drift 15s var(--ease-in-out) infinite alternate;
}

.weather-cloud-one { top: 32%; left: 3%; }
.weather-cloud-two { top: 52%; right: -12%; width: 55%; animation-duration: 19s; animation-direction: alternate-reverse; }
.weather-cloud-three { top: 16%; right: 20%; width: 28%; animation-duration: 22s; }
.weather-stage[data-weather="clear"] .weather-cloud-two,
.weather-stage[data-weather="clear"] .weather-cloud-three { display: none; }
.weather-stage[data-weather="cloudy"] .weather-sun { top: -138px; right: -84px; }
.weather-stage[data-weather="rain"] .weather-sun,
.weather-stage[data-weather="snow"] .weather-sun { display: none; }
.weather-stage[data-weather="rain"] .weather-cloud,
.weather-stage[data-weather="snow"] .weather-cloud { fill: #F3F6FA; }

.weather-rain,
.weather-snow { position: absolute; inset: 0; display: none; }
.weather-stage[data-weather="rain"] .weather-rain,
.weather-stage[data-weather="snow"] .weather-snow { display: block; }
.weather-rain i,
.weather-snow i { position: absolute; top: -35px; left: var(--weather-x); display: block; animation-delay: var(--weather-delay); animation-timing-function: linear; animation-iteration-count: infinite; }
.weather-rain i { width: 3px; height: 27px; border-radius: 4px; background: var(--blue); opacity: 0.4; animation-name: weather-rainfall; animation-duration: 1.6s; }
.weather-snow i { width: 8px; height: 8px; border-radius: 50%; background: var(--paper); opacity: 0.9; animation-name: weather-snowfall; animation-duration: 6s; }
.weather-snow i:nth-child(3n) { width: 5px; height: 5px; animation-duration: 7s; }
.weather-snow i:nth-child(4n) { width: 11px; height: 11px; animation-duration: 5s; }
.weather-art * { animation-play-state: paused; }
.weather-stage[data-animate="true"] .weather-art * { animation-play-state: running; }

@keyframes weather-sun-breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}

@keyframes weather-cloud-drift {
    from { transform: translateX(-12px); }
    to { transform: translateX(16px); }
}

@keyframes weather-rainfall {
    from { transform: translateY(0); }
    to { transform: translateY(600px); }
}

@keyframes weather-snowfall {
    from { transform: translate(0, 0); }
    to { transform: translate(28px, 600px); }
}

@media (hover: hover) and (pointer: fine) {
    .weather-option:hover { transform: translateY(-2px); }
    .weather-motion-control:hover { opacity: 0.65; }
}

.weather-option:active { transform: scale(0.97); }
body.is-keyboard .weather-option { transition: none; }
body.is-keyboard .weather-option:hover,
body.is-keyboard .weather-option:active { transform: none; }

@media (max-width: 1050px) {
    .weather-section { grid-template-columns: 38% minmax(0, 1fr); }
    .weather-copy { padding-right: 0; }
    .weather-reading { left: 28px; }
    .weather-caption { left: 28px; max-width: 49%; }
    .weather-art { left: 42%; }
    .weather-sun { width: 270px; }
}

@media (max-width: 700px) {
    .weather-section { display: flex; flex-direction: column; padding-top: 64px; padding-bottom: 64px; }
    .weather-copy { padding-top: 0; }
    .weather-copy > p:not(.weather-example-note) { margin-top: 20px; }
    .weather-options { margin-top: 28px; }
    .weather-copy .weather-example-note { padding-top: 20px; }
    .weather-stage { min-height: 400px; }
    .weather-reading { top: 28px; left: 24px; }
    .weather-date { font-size: 30px; }
    .weather-temperature { font-size: 72px; margin-top: 38px; }
    .weather-temperature span:last-child { font-size: 20px; }
    .weather-caption { left: 24px; bottom: 24px; }
    .weather-art { left: 42%; }
    .weather-sun { width: 220px; top: -80px; }
}

@media (prefers-reduced-motion: reduce) {
    .weather-art * { animation: none !important; }
    .weather-rain i:nth-child(4n), .weather-snow i:nth-child(4n) { top: 18%; }
    .weather-rain i:nth-child(4n + 1), .weather-snow i:nth-child(4n + 1) { top: 35%; }
    .weather-rain i:nth-child(4n + 2), .weather-snow i:nth-child(4n + 2) { top: 56%; }
    .weather-rain i:nth-child(4n + 3), .weather-snow i:nth-child(4n + 3) { top: 77%; }
    .weather-option { transition: none; }
    .weather-option:hover,
    .weather-option:active { transform: none; }
}
