@import url("./fonts.css");

:root {
  --bg: #000000;
  --fg: #ffffff;
  --clock-border: #c9ccd1;
  --clock-digit-bg-top: #2e3339;
  --clock-digit-bg-mid: #23272d;
  --clock-digit-bg-bottom: #1a1e23;
  --canvas-width: 1920;
  --canvas-height: 1080;
  --clock-scale: 0.6;
  --hero-offset-y: 34px;
  --clock-top: 68px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  background: var(--bg);
}

body {
  color: var(--fg);
  overflow: hidden;
  position: relative;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -100px;
  z-index: 1000;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 10px;
  background: #000000;
  color: #ffffff;
  text-decoration: none;
}

.skip-link:focus-visible {
  top: 16px;
}

.countdown-page {
  position: fixed;
  top: 0;
  left: 0;
  width: calc(var(--canvas-width) * 1px);
  height: calc(var(--canvas-height) * 1px);
  transform-origin: top left;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 22px;
  padding: 34px 62px 30px;
}

.stage {
  width: 100%;
  min-height: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.clock {
  position: absolute;
  left: 50%;
  top: var(--clock-top);
  transform: translateX(-50%) scale(var(--clock-scale));
  transform-origin: top center;
  width: max-content;
  display: flex;
  justify-content: center;
  z-index: 2;
}

.clock-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
}

.time-item {
  display: grid;
  justify-items: center;
  gap: 11px;
}

.time-item + .time-item {
  position: relative;
  margin-left: 14px;
}

.time-item + .time-item::before,
.time-item + .time-item::after {
  content: "";
  position: absolute;
  left: -17px;
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: #3d4249;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 0 0 1px rgba(0, 0, 0, 0.6);
}

.time-item + .time-item::before {
  top: 38px;
}

.time-item + .time-item::after {
  top: 67px;
}

.digits {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  padding: 4px;
  border: 4px solid var(--clock-border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(0, 0, 0, 0.32) 100%),
    linear-gradient(180deg, #2a2f35 0%, #181c21 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.18),
    0 8px 24px rgba(0, 0, 0, 0.48);
  overflow: visible;
}

.digits::before,
.digits::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 12px;
  height: 24px;
  border-radius: 2px;
  border: 1px solid rgba(0, 0, 0, 0.95);
  background: linear-gradient(180deg, #8f949d 0%, #32363d 48%, #a6abb4 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 1px 2px rgba(0, 0, 0, 0.75);
  z-index: 4;
}

.digits::before {
  left: 0;
  transform: translate(-52%, -50%);
}

.digits::after {
  right: 0;
  transform: translate(52%, -50%);
}

.digit {
  position: relative;
  width: 78px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-size: 96px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.03em;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.75),
    0 0 9px rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(
      164deg,
      rgba(255, 255, 255, 0.1) 0%,
      rgba(255, 255, 255, 0.02) 39%,
      rgba(0, 0, 0, 0.22) 40%,
      rgba(0, 0, 0, 0.38) 100%
    ),
    linear-gradient(
      180deg,
      var(--clock-digit-bg-top) 0%,
      var(--clock-digit-bg-mid) 50%,
      var(--clock-digit-bg-bottom) 100%
    );
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  border-right: 1px solid rgba(0, 0, 0, 0.85);
}

.digit:not(:last-child)::before {
  content: "";
  position: absolute;
  right: -1px;
  top: 50%;
  transform: translate(50%, -50%);
  width: 12px;
  height: 24px;
  border-radius: 2px;
  border: 1px solid rgba(0, 0, 0, 0.9);
  background: linear-gradient(180deg, #8f949d 0%, #2d3238 52%, #a4a9b2 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    0 1px 2px rgba(0, 0, 0, 0.72);
  z-index: 5;
}

.time-item:not([data-unit="days"]) .digits {
  min-width: 164px;
}

.time-item[data-unit="days"] .digits {
  min-width: 244px;
}

.label {
  color: #ffffff;
  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-size: 42px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
}

.hero {
  width: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transform: translateY(var(--hero-offset-y));
}

.logo-video {
  width: 1120px;
  aspect-ratio: 2048 / 512;
  max-width: none;
  max-height: none;
  height: auto;
  object-fit: contain;
  display: block;
}

.subtitle {
  margin: 0;
  text-align: center;
  text-transform: uppercase;
  color: #ffffff;
  font-family: "Cardo", Georgia, serif;
  font-size: 30px;
  font-weight: 400;
  letter-spacing: 0.26em;
  text-wrap: balance;
}

.bottom-nav {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  gap: 34px;
  flex-shrink: 0;
}

.bottom-nav a {
  color: #ffffff;
  text-decoration: none;
  text-transform: uppercase;
  font-family: "Cardo", Georgia, serif;
  font-size: 34px;
  letter-spacing: 0.11em;
  line-height: 1;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.bottom-nav a:hover,
.bottom-nav a:focus-visible {
  opacity: 0.72;
  outline: none;
}

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

@media (orientation: portrait) {
  :root {
    --canvas-width: 1080;
    --canvas-height: 1920;
    --clock-scale: 0.95;
    --clock-top: 152px;
    --hero-offset-y: 124px;
  }

  .countdown-page {
    gap: 52px;
    padding: 84px 52px 86px;
  }

  .hero {
    gap: 20px;
  }

  .logo-video {
    width: 960px;
  }

  .subtitle {
    font-size: 34px;
    letter-spacing: 0.2em;
  }

  .bottom-nav {
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
    flex-wrap: wrap;
    gap: 24px 54px;
  }
}
