@font-face {
  font-family: Anton;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/anton-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: Oswald;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/oswald-cyrillic-700.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: Oswald;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/oswald-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("fonts/inter-cyrillic-300.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("fonts/inter-latin-300.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/inter-cyrillic-500.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/inter-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #050807;
  --panel: rgb(10 17 15 / 0.8);
  --ink: #f4fbf8;
  --muted: #90a49e;
  --past: #25312e;
  --glow: #3ef7c8;
  --glow-hot: #a2ffeb;
  --line: rgb(149 255 226 / 0.15);
  --pad-x: max(clamp(1rem, 3.2vw, 3.5rem), env(safe-area-inset-left), env(safe-area-inset-right));
  --pad-y: max(clamp(1rem, 3.2vw, 3rem), env(safe-area-inset-top));
  --pad-b: max(clamp(1rem, 3.2vw, 3rem), env(safe-area-inset-bottom));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  min-width: 20rem;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 17% 44%, rgb(62 247 200 / 0.1), transparent 30rem),
    radial-gradient(circle at 86% 18%, rgb(62 247 200 / 0.06), transparent 25rem),
    var(--bg);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 3;
  opacity: 0.09;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px;
  mix-blend-mode: soft-light;
}

.frame {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: var(--pad-y) var(--pad-x) var(--pad-b);
}

.poster {
  display: grid;
  grid-template-columns: minmax(17rem, 0.78fr) minmax(31rem, 1.22fr);
  width: min(100%, 72rem);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: clamp(1.35rem, 3vw, 2.25rem);
  background:
    linear-gradient(118deg, rgb(255 255 255 / 0.035), transparent 37%),
    var(--panel);
  box-shadow:
    0 2rem 8rem rgb(0 0 0 / 0.62),
    inset 0 1px rgb(255 255 255 / 0.035);
  backdrop-filter: blur(0.7rem);
}

.countdown,
.map-panel {
  min-width: 0;
  padding: clamp(1.5rem, 4.2vw, 4rem);
}

.countdown {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 36rem;
  border-right: 1px solid var(--line);
}

.eyebrow,
.map-panel__title,
.map-panel__percent,
.countdown__summary,
.legend,
.month-row__label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 clamp(1.2rem, 3vh, 2.25rem);
  color: var(--glow-hot);
  letter-spacing: 0.18em;
  text-shadow: 0 0 1rem rgb(62 247 200 / 0.35);
  animation: intro-in 560ms 60ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.countdown__value {
  position: relative;
  isolation: isolate;
  display: block;
  width: fit-content;
  max-width: 100%;
  animation: intro-in 620ms 110ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.countdown__number {
  position: relative;
  z-index: 1;
  display: inline-block;
  isolation: isolate;
  font-family: Anton, Impact, "Arial Black", sans-serif;
  font-size: clamp(8.6rem, 16vw, 14.5rem);
  font-variant-numeric: tabular-nums;
  line-height: 0.76;
  letter-spacing: -0.012em;
  color: #e8f2ee;
}

.countdown__purpose {
  position: relative;
  z-index: 2;
  margin: clamp(1.15rem, 2.6vh, 1.7rem) 0 0;
  font-family: Oswald, Impact, sans-serif;
  font-size: clamp(1.35rem, 2.15vw, 1.85rem);
  font-weight: 700;
  letter-spacing: 0.055em;
  max-width: 25ch;
  min-height: 2.16em;
  line-height: 1.08;
  text-transform: uppercase;
  color: var(--ink);
  text-wrap: balance;
  animation: intro-in 560ms 170ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.countdown__phrase {
  max-width: 27ch;
  min-height: 4.5em;
  margin: clamp(1.2rem, 3vh, 2.2rem) 0 0;
  font-size: clamp(0.95rem, 1.3vw, 1.08rem);
  font-weight: 300;
  line-height: 1.5;
  color: rgb(244 251 248 / 0.78);
  text-wrap: pretty;
  animation: intro-in 560ms 230ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.countdown__summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: clamp(1.5rem, 4vh, 3rem);
  color: var(--muted);
  letter-spacing: 0.08em;
  animation: intro-in 560ms 290ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.countdown__summary-mark {
  width: 0.24rem;
  height: 0.24rem;
  border-radius: 50%;
  background: var(--glow);
  box-shadow: 0 0 0.65rem var(--glow);
}

.map-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 36rem;
}

.map-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: clamp(1.25rem, 3vh, 2rem);
  animation: intro-in 520ms 170ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.map-panel__title {
  margin: 0;
  color: var(--muted);
}

.map-panel__percent {
  color: var(--glow-hot);
  font-variant-numeric: tabular-nums;
}

.year-map {
  display: grid;
  gap: clamp(0.48rem, 1.2vh, 0.78rem);
  width: 100%;
}

.month-row {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  align-items: center;
  gap: clamp(0.55rem, 1.5vw, 0.9rem);
  animation: map-row-in 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(220ms + var(--row-index, 0) * 28ms);
}

.month-row__label {
  color: rgb(144 164 158 / 0.72);
  font-size: 0.57rem;
  letter-spacing: 0.08em;
}

.month-row__days {
  display: grid;
  grid-template-columns: repeat(31, minmax(0, 1fr));
  gap: clamp(0.16rem, 0.42vw, 0.34rem);
}

.day-dot,
.legend__dot {
  display: block;
  aspect-ratio: 1;
  border-radius: 50%;
}

.day-dot {
  width: 100%;
  max-width: 0.6rem;
}

.day-dot[data-state="past"] {
  background: var(--past);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.025);
}

.day-dot[data-state="today"] {
  position: relative;
  z-index: 1;
  background: #fff;
  box-shadow:
    0 0 0 0.14rem rgb(62 247 200 / 0.36),
    0 0 0.65rem var(--glow-hot),
    0 0 1.1rem var(--glow);
  animation: today-pulse 2.4s ease-in-out infinite;
}

.day-dot[data-state="future"] {
  background: var(--glow);
  box-shadow: 0 0 0.38rem rgb(62 247 200 / 0.48);
}

.day-dot[data-state="empty"] {
  visibility: hidden;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  margin-top: clamp(1.35rem, 3.5vh, 2.4rem);
  color: var(--muted);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  animation: intro-in 520ms 560ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.countdown--refreshing .countdown__purpose,
.countdown--refreshing .countdown__phrase,
.countdown--refreshing .countdown__summary {
  animation: copy-refresh 480ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.legend__item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.legend__dot {
  width: 0.42rem;
}

.legend__dot--past {
  background: var(--past);
}

.legend__dot--today {
  background: #fff;
  box-shadow: 0 0 0.45rem var(--glow);
}

.legend__dot--future {
  background: var(--glow);
  box-shadow: 0 0 0.32rem rgb(62 247 200 / 0.5);
}

@keyframes intro-in {
  from {
    opacity: 0;
    transform: translateY(0.55rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes map-row-in {
  from {
    opacity: 0;
    transform: translateX(0.5rem);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes copy-refresh {
  0% {
    opacity: 0.35;
    transform: translateY(0.3rem);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes today-pulse {
  0%,
  100% {
    transform: scale(0.82);
    box-shadow:
      0 0 0 0.08rem rgb(62 247 200 / 0.32),
      0 0 0.42rem var(--glow-hot),
      0 0 0.8rem var(--glow);
  }

  50% {
    transform: scale(1.15);
    box-shadow:
      0 0 0 0.2rem rgb(62 247 200 / 0.28),
      0 0 0.8rem var(--glow-hot),
      0 0 1.4rem var(--glow);
  }
}

@media (max-width: 860px) {
  .poster {
    grid-template-columns: 1fr;
    width: min(100%, 38rem);
  }

  .countdown,
  .map-panel {
    min-height: 0;
  }

  .countdown {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .countdown__number {
    font-size: clamp(8rem, 31vw, 12rem);
  }

  .countdown__phrase {
    min-height: 0;
  }
}

@media (max-width: 480px) {
  .frame {
    align-items: start;
    padding: 0;
  }

  .poster {
    min-height: 100vh;
    min-height: 100dvh;
    align-content: center;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .countdown,
  .map-panel {
    padding:
      max(1.25rem, env(safe-area-inset-top))
      max(1rem, env(safe-area-inset-left), env(safe-area-inset-right));
  }

  .countdown {
    justify-content: flex-start;
    padding-top: max(1.75rem, env(safe-area-inset-top));
    padding-bottom: 1.5rem;
  }

  .map-panel {
    justify-content: flex-start;
    padding-top: 1.5rem;
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
  }

  .eyebrow {
    margin-bottom: 1.1rem;
    font-size: 0.64rem;
    letter-spacing: 0.16em;
  }

  .countdown__number {
    font-size: clamp(7.15rem, 38vw, 9.5rem);
  }

  .countdown__purpose {
    margin-top: 0.9rem;
    font-size: clamp(1.08rem, 5.4vw, 1.3rem);
    letter-spacing: 0.04em;
  }

  .countdown__phrase {
    margin-top: 1rem;
    font-size: 0.92rem;
    line-height: 1.42;
  }

  .countdown__summary {
    gap: 0.6rem;
    margin-top: 1rem;
    font-size: 0.59rem;
  }

  .map-panel__header {
    margin-bottom: 1rem;
  }

  .year-map {
    gap: 0.42rem;
  }

  .month-row {
    grid-template-columns: 1.75rem minmax(0, 1fr);
    gap: 0.42rem;
  }

  .month-row__days {
    gap: clamp(0.12rem, 0.78vw, 0.22rem);
  }

  .legend {
    margin-top: 1.1rem;
  }
}

@media (max-width: 340px) {
  .countdown,
  .map-panel {
    padding-right: 0.75rem;
    padding-left: 0.75rem;
  }

  .countdown__number {
    font-size: 6.8rem;
  }

  .month-row {
    grid-template-columns: 1.55rem minmax(0, 1fr);
    gap: 0.28rem;
  }

  .month-row__days {
    gap: 0.1rem;
  }
}

@media (max-height: 540px) and (orientation: landscape) {
  .frame {
    place-items: start center;
    padding: 0;
  }

  .poster {
    grid-template-columns: minmax(14rem, 0.72fr) minmax(28rem, 1.28fr);
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .countdown,
  .map-panel {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 1rem 1.4rem;
  }

  .eyebrow,
  .map-panel__header {
    margin-bottom: 0.75rem;
  }

  .countdown__number {
    font-size: min(29vh, 7.4rem);
  }

  .countdown__purpose {
    margin-top: 0.55rem;
    font-size: 1.25rem;
  }

  .countdown__phrase {
    min-height: 0;
    margin-top: 0.7rem;
    font-size: 0.82rem;
  }

  .countdown__summary {
    margin-top: 0.75rem;
    font-size: 0.56rem;
  }

  .year-map {
    gap: 0.24rem;
  }

  .legend {
    margin-top: 0.65rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .eyebrow,
  .countdown__value,
  .countdown__purpose,
  .countdown__phrase,
  .countdown__summary,
  .map-panel__header,
  .month-row,
  .legend,
  .countdown--refreshing .countdown__purpose,
  .countdown--refreshing .countdown__phrase,
  .countdown--refreshing .countdown__summary,
  .day-dot[data-state="today"] {
    animation: none !important;
  }
}
