:root {
  color-scheme: dark;
  --base: #020d12;
  --cyan: #48d7e7;
  --cream: #fff2d5;
  --gold: #f4d084;
  --muted: #c5ced0;
  --line: #876f45;
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

body {
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--base);
  color: var(--cream);
  font: 1rem/1.55 var(--sans);
}

h1, h2, p, dl, dd { margin: 0; }

[hidden] { display: none !important; }

.page { flex: 1; }

.container {
  width: min(100% - 3rem, 76rem);
  margin-inline: auto;
}

.hero {
  isolation: isolate;
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(43rem, 82vh);
  padding-block: 2.1rem clamp(3.5rem, 8vw, 7rem);
  background:
    linear-gradient(90deg, #000a0ff5 0%, #000e148f 49%, #000b10d4 100%),
    linear-gradient(0deg, #020d12 0%, #020d1200 44%),
    url("images/age-of-nations.webp") center 43% / cover no-repeat,
    #0c1b25;
  border-bottom: 1px solid #51432d;
}

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  padding-bottom: 1.65rem;
  border-bottom: 1px solid #d0aa6154;
}

.masthead-controls {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.65rem 1.25rem;
}

.language-picker {
  max-width: 100%;
  min-height: 2.75rem;
  padding: 0.4rem 0.55rem;
  color: var(--cream);
  border: 1px solid var(--line);
  border-radius: 0.3rem;
  background: #0d1822;
  font: 600 0.82rem/1.3 var(--sans);
}

.language-picker:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.brand {
  display: block;
  width: clamp(11rem, 29vw, 18.5rem);
  height: auto;
  filter: drop-shadow(0 0.4rem 0.9rem #000b);
}

.edition, .eyebrow, .timezone, .clock-unit dt, .footer {
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.edition { color: var(--muted); text-align: right; }
.edition [aria-hidden="true"] { margin-inline: 0.45rem; color: var(--gold); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2.8rem, 6vw, 5.5rem);
  align-items: center;
  padding-top: clamp(2.8rem, 7vw, 5.5rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.62rem;
  padding: 0.4rem 0.72rem;
  color: var(--cyan);
  border: 1px solid #389ba5;
  background: #0e1b24df;
}

.eyebrow [aria-hidden="true"] {
  width: 0.36rem;
  height: 0.36rem;
  background: var(--gold);
  transform: rotate(45deg);
  box-shadow: 0 0 0.8rem #edbb65a3;
}

h1 {
  margin-top: 1.35rem;
  font: 400 clamp(3rem, 5.1vw, 5.15rem)/0.99 var(--serif);
  letter-spacing: -0.048em;
  text-wrap: balance;
  text-shadow: 0 0.25rem 1.8rem #000a;
}

h1 em { display: block; color: var(--gold); font-weight: 400; }

.intro-copy {
  margin-top: 1.5rem;
  max-width: 34rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.19rem);
  line-height: 1.65;
  text-wrap: pretty;
}

.countdown {
  position: relative;
  padding: clamp(1.3rem, 3.35vw, 2.6rem);
  text-align: center;
  border: 1px solid var(--line);
  background: radial-gradient(ellipse at 50% 0%, #21313a 0%, #0d1822 72%);
  box-shadow: inset 0 0 0 0.28rem #06101980, 0 1.5rem 4rem #0008;
}

.countdown::before, .countdown::after {
  position: absolute;
  width: 1.25rem;
  height: 1.25rem;
  content: "";
  pointer-events: none;
}

.countdown::before {
  inset: -1px auto auto -1px;
  border-top: 2px solid var(--gold);
  border-left: 2px solid var(--gold);
}

.countdown::after {
  inset: auto -1px -1px auto;
  border-right: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
}

.countdown-mark { color: var(--gold); font-size: 2rem; line-height: 1; }

.countdown h2 {
  margin-top: 0.78rem;
  font: 700 0.72rem/1.4 var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
}

.launch-date {
  margin-top: 0.36rem;
  color: var(--gold);
  font: 400 clamp(1.85rem, 3.25vw, 2.9rem)/1.16 var(--serif);
}

.timezone { margin-top: 0.56rem; color: var(--muted); letter-spacing: 0.09em; }

.clock {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.28rem, 0.9vw, 0.72rem);
  margin-top: 1.65rem;
}

.clock-unit {
  min-width: 0;
  display: flex;
  flex-direction: column-reverse;
  gap: 0.25rem;
  padding: 0.65rem 0.14rem 0.52rem;
  border: 1px solid #5c503d;
  background: linear-gradient(180deg, #20303a, #0f1921);
}

.clock-unit dd {
  color: var(--cream);
  font: 400 clamp(1.7rem, 4vw, 3.35rem)/1 var(--serif);
  font-variant-numeric: tabular-nums lining-nums;
}

.clock-unit dt {
  color: var(--muted);
  font-size: clamp(0.48rem, 0.9vw, 0.66rem);
  letter-spacing: 0.07em;
}

.clock-status { margin-top: 1.25rem; color: var(--muted); }

.themes { background: linear-gradient(180deg, #101c25, #0b151e); }

.theme-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 0;
  list-style: none;
}

.theme-grid li {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  padding: clamp(1.25rem, 3vw, 2rem) clamp(0.9rem, 2.3vw, 1.8rem);
  border-right: 1px solid #514631;
}

.theme-grid li:first-child { padding-left: 0; }
.theme-grid li:last-child { border-right: 0; padding-right: 0; }

.theme-grid svg {
  flex: 0 0 auto;
  width: 1.8rem;
  height: 1.8rem;
  color: var(--gold);
}

.theme-grid strong {
  display: block;
  color: var(--cream);
  font: 400 1.2rem/1.2 var(--serif);
}

.theme-grid span {
  display: block;
  margin-top: 0.23rem;
  font-size: 0.76rem;
  color: var(--muted);
}

.footer {
  padding-block: 1.3rem;
  border-top: 1px solid #3a3931;
  color: #adbabc;
  text-align: center;
  letter-spacing: 0.12em;
}

.footer span { color: var(--gold); }

@media (max-width: 50rem) {
  .hero {
    min-height: 0;
    background:
      linear-gradient(180deg, #000a0fcb, #000e14cc 55%, #020d12 100%),
      url("images/age-of-nations.webp") center 40% / cover no-repeat,
      #0c1b25;
  }

  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .countdown { width: min(100%, 31rem); }
  .clock-unit dt { font-size: clamp(0.6rem, 1.6vw, 0.69rem); }
  .theme-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .theme-grid li:nth-child(2) { border-right: 0; }
  .theme-grid li:nth-child(3) { padding-left: 0; }
  .theme-grid li:nth-child(-n+2) { border-bottom: 1px solid #514631; }
}

@media (max-width: 27rem) {
  .container { width: calc(100% - 2rem); }
  .masthead { gap: 0.65rem; padding-bottom: 1.1rem; }
  .brand { width: min(49%, 11rem); }
  .edition { display: none; }
  h1 { font-size: clamp(2.55rem, 13vw, 3.6rem); }
  .countdown { padding-inline: 0.9rem; }
  .clock-unit dt { letter-spacing: 0.03em; overflow-wrap: anywhere; }
  .theme-grid li { gap: 0.5rem; }
  .theme-grid svg { width: 1.4rem; height: 1.4rem; }
  .theme-grid strong { font-size: 1.02rem; }
  .theme-grid span { font-size: 0.7rem; }
}
