@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&family=EB+Garamond:ital,wght@0,400;1,400&display=swap");

:root {
  --blue: #0000ff;
  --ink: #050505;
  --paper: #f3f5ff;
  --line: rgba(243, 245, 255, 0.3);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--blue);
}

body {
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  color: var(--paper);
  background:
    linear-gradient(rgba(243, 245, 255, 0.065) 1px, transparent 1px),
    linear-gradient(90deg, rgba(243, 245, 255, 0.065) 1px, transparent 1px),
    var(--blue);
  background-size: clamp(52px, 6vw, 92px) clamp(52px, 6vw, 92px);
  font-family: "DM Sans", Arial, sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(
    circle at 50% 20%,
    rgba(243, 245, 255, 0.1),
    transparent 40%
  );
  content: "";
  pointer-events: none;
}

.page-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: min(100%, 1680px);
  min-height: 100svh;
  margin: 0 auto;
  padding: clamp(24px, 3.2vw, 56px);
}

.hero-copy,
.countdown-wrap {
  min-width: 0;
}

.site-header,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header {
  padding-bottom: clamp(24px, 4vh, 50px);
  border-bottom: 1px solid var(--line);
}

.brand {
  width: clamp(160px, 15vw, 250px);
  height: auto;
}

.edition,
.footer-mark,
.date,
.countdown-label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: clamp(0.69rem, 0.75vw, 0.82rem);
  font-weight: 500;
}

.edition {
  display: grid;
  width: 48px;
  height: 48px;
  border: 1px solid var(--paper);
  border-radius: 50%;
  place-items: center;
  letter-spacing: 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(56px, 8vh, 100px);
  align-items: start;
  padding: clamp(55px, 9vh, 140px) 0;
}

h1 {
  max-width: 720px;
  margin: 0;
  font-family: "EB Garamond", Georgia, serif;
  font-size: clamp(4.8rem, 8.2vw, 9.5rem);
  font-weight: 400;
  line-height: 0.79;
  letter-spacing: -0.055em;
}

h1 span {
  font-style: italic;
  white-space: nowrap;
}

.countdown-wrap {
  width: 100%;
  min-width: 0;
}

.countdown-label {
  margin-bottom: 18px;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--paper);
  border-bottom: 1px solid var(--paper);
}

.time-unit {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  min-height: clamp(170px, 19vw, 300px);
  padding: clamp(18px, 2vw, 34px) clamp(14px, 2vw, 34px);
}

.time-unit:first-child {
  padding-left: 0;
}

.time-unit:last-child {
  padding-right: 0;
}

.time-unit + .time-unit {
  border-left: 1px solid var(--line);
}

.time-value {
  font-family: "EB Garamond", Georgia, serif;
  font-size: clamp(4.4rem, 8.4vw, 10rem);
  line-height: 0.8;
  letter-spacing: -0.06em;
  font-variant-numeric: tabular-nums;
}

.time-label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: clamp(0.68rem, 0.75vw, 0.82rem);
  font-weight: 500;
}

.event-status {
  margin: 0;
  padding: 32px 0;
  border-block: 1px solid var(--paper);
  font-family: "EB Garamond", Georgia, serif;
  font-size: clamp(2.4rem, 5vw, 5.5rem);
  line-height: 1;
}

.site-footer {
  padding-top: clamp(22px, 3.2vh, 36px);
  border-top: 1px solid var(--line);
}

.footer-actions {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 48px);
}

.contact-link {
  position: relative;
  color: var(--paper);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: clamp(0.69rem, 0.75vw, 0.82rem);
  font-weight: 500;
}

.contact-link::after {
  position: absolute;
  right: 0;
  bottom: -5px;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 220ms ease;
}

.contact-link:hover::after,
.contact-link:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.contact-link:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 7px;
}

.date {
  display: flex;
  align-items: center;
  gap: 14px;
}

.separator {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--paper);
}

.ambient {
  position: fixed;
  z-index: 0;
  border: 1px solid rgba(243, 245, 255, 0.13);
  border-radius: 50%;
  pointer-events: none;
}

.ambient-one {
  top: 22%;
  right: -13vw;
  width: 34vw;
  height: 34vw;
}

.ambient-two {
  bottom: -21vw;
  left: -14vw;
  width: 42vw;
  height: 42vw;
}

@media (max-width: 980px) {
  .hero {
    gap: 64px;
  }

  h1 {
    font-size: clamp(4.6rem, 14vw, 8rem);
  }

  .time-value {
    font-size: clamp(4.3rem, 17vw, 9rem);
  }
}

@media (max-width: 560px) {
  .page-shell {
    min-height: 100svh;
    padding:
      max(18px, env(safe-area-inset-top))
      max(18px, env(safe-area-inset-right))
      max(18px, env(safe-area-inset-bottom))
      max(18px, env(safe-area-inset-left));
  }

  .site-header {
    padding-bottom: 18px;
  }

  .brand {
    width: clamp(128px, 42vw, 160px);
  }

  .edition {
    width: 38px;
    height: 38px;
    font-size: 0.62rem;
  }

  .hero {
    gap: clamp(38px, 11vw, 52px);
    padding: clamp(38px, 10vh, 64px) 0 clamp(36px, 8vh, 54px);
  }

  h1 {
    max-width: 100%;
    font-size: clamp(3.65rem, 19vw, 5.4rem);
    line-height: 0.84;
  }

  h1 span {
    white-space: normal;
  }

  .countdown-label {
    margin-bottom: 14px;
  }

  .countdown {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .time-unit {
    min-height: 116px;
    padding: 16px;
  }

  .time-unit:first-child {
    min-height: 116px;
    padding: 16px 16px 16px 0;
    border-bottom: 1px solid var(--line);
  }

  .time-unit:nth-child(2) {
    padding-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .time-value {
    font-size: clamp(4rem, 20vw, 5.4rem);
  }

  .time-unit:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .time-unit:last-child {
    padding-right: 0;
  }

  .time-label {
    font-size: 0.62rem;
    letter-spacing: 0.12em;
  }

  .site-footer {
    align-items: flex-end;
    gap: 16px;
    padding-top: 18px;
  }

  .date {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .date,
  .footer-mark {
    font-size: 0.62rem;
    line-height: 1.4;
  }

  .footer-mark {
    flex: 0 0 auto;
  }

  .footer-actions {
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
  }

  .contact-link {
    font-size: 0.62rem;
  }

  .date .separator {
    display: none;
  }

  .ambient-one {
    top: 14%;
    right: -45vw;
    width: 90vw;
    height: 90vw;
  }

  .ambient-two {
    bottom: -25vw;
    left: -35vw;
    width: 80vw;
    height: 80vw;
  }
}

@media (max-width: 360px) {
  .page-shell {
    padding-inline: 15px;
  }

  .hero {
    padding-top: 34px;
  }

  h1 {
    font-size: clamp(3.25rem, 18.5vw, 4.15rem);
  }

}

@media (max-height: 700px) and (max-width: 560px) {
  .hero {
    gap: 30px;
    padding-block: 28px;
  }

  .time-unit {
    min-height: 100px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .brand,
  .hero-copy,
  .countdown-wrap,
  .site-footer {
    animation: reveal 800ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .hero-copy {
    animation-delay: 100ms;
  }

  .countdown-wrap {
    animation-delay: 200ms;
  }

  .site-footer {
    animation-delay: 300ms;
  }

  @keyframes reveal {
    from {
      opacity: 0;
      transform: translateY(18px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
