:root {
  --bg: #171a1d;
  --surface: #1f2327;
  --surface-2: #282d32;
  --line: #33383e;
  --text: #e9ebed;
  --muted: #a3abb2;
  --accent: #7fd1ae;
  --accent-ink: #0e2620;
  --warn: #e9b949;
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  position: relative;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans", "Noto Sans Armenian", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: max(18px, env(safe-area-inset-top)) var(--gutter) 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
  white-space: nowrap;
}

.brand__mark {
  width: 32px;
  height: 32px;
  flex: none;
}

.langs {
  display: flex;
  gap: 6px;
}

.langs button {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font: 600 13px/1 inherit;
  font-family: inherit;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.langs button:hover {
  color: var(--text);
}

.langs button[aria-pressed="true"] {
  background: var(--surface-2);
  border-color: #4a525a;
  color: var(--text);
}

.langs button:focus-visible,
.cta:focus-visible,
.brand:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.hero {
  position: relative;
  z-index: 2;
  align-self: center;
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: clamp(20px, 4vh, 48px) var(--gutter) clamp(16px, 3vh, 32px);
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(31, 35, 39, 0.72);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.badge__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--warn);
  box-shadow: 0 0 0 0 rgba(233, 185, 73, 0.6);
  animation: pulse 2s ease-out infinite;
}

h1 {
  margin: 20px 0 14px;
  font-size: clamp(30px, 5.2vw, 54px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.lead {
  max-width: 560px;
  margin: 0 auto 30px;
  color: var(--muted);
  font-size: clamp(16px, 2.1vw, 19px);
  line-height: 1.55;
  text-wrap: pretty;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 26px;
  border-radius: 14px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
  box-shadow: 0 12px 32px -12px rgba(127, 209, 174, 0.65);
  transition: transform 0.15s, background-color 0.15s;
}

.cta:hover {
  background: #93dbbc;
  transform: translateY(-1px);
}

.cta svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
  flex: none;
}

/*
 * The picture is 1440 × 560 and is cut to fill the box: from the top when the
 * box is wide and short, from the sides when it is narrow. The box takes what
 * is left of the screen under the text, within two limits:
 * - no taller than width × 560 / 840: the tower, the moon and the cones span
 *   840 units across, and a taller box would cut them off at the sides;
 * - no shorter than width × 330 / 1440: the top of Ararat and the moon lie in
 *   the lower 330 units, and on a short laptop screen the page scrolls a
 *   little rather than lose them.
 */
.scene {
  margin: 0;
  height: clamp(
    200px,
    min(calc(100vw * 560 / 840), max(calc(100svh - 500px), calc(100vw * 330 / 1440))),
    720px
  );
}

.scene svg {
  display: block;
  width: 100%;
  height: 100%;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 22%);
  mask-image: linear-gradient(to bottom, transparent, #000 22%);
}

.foot {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 10px var(--gutter) max(14px, env(safe-area-inset-bottom));
  background: #121417;
  color: #7d858c;
  font-size: 13px;
}

.tw {
  animation: twinkle 4s ease-in-out infinite;
}

.fl {
  animation: flicker 9s steps(1) infinite;
}

.tower__light {
  animation: blink 2.4s ease-in-out infinite;
}

.barrier__lamp {
  animation: blink 1.2s steps(1) infinite;
}

.barrier__lamp--b {
  animation-delay: 0.6s;
}

.car {
  animation: arrive 2.4s cubic-bezier(0.16, 0.84, 0.3, 1) both;
}

.car__body {
  animation: idle 1.6s ease-in-out 2.4s infinite;
}

.wheel {
  transform-box: fill-box;
  transform-origin: center;
  animation: roll 2.4s cubic-bezier(0.16, 0.84, 0.3, 1) both;
}

.beam {
  animation: shimmer 5s ease-in-out 2.4s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(233, 185, 73, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(233, 185, 73, 0); }
  100% { box-shadow: 0 0 0 0 rgba(233, 185, 73, 0); }
}

@keyframes twinkle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

@keyframes flicker {
  0% { opacity: 1; }
  45% { opacity: 0.12; }
  75% { opacity: 1; }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

/* 760 px of road and wheels 21 px in radius: about 5.8 turns. */
@keyframes arrive {
  from { transform: translateX(-760px); }
  to { transform: none; }
}

@keyframes roll {
  from { transform: rotate(-2075deg); }
  to { transform: none; }
}

@keyframes idle {
  0%, 100% { transform: none; }
  50% { transform: translateY(-1.2px); }
}

@keyframes shimmer {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.78; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 420px) {
  .brand__name {
    font-size: 15px;
  }

  .langs button {
    padding: 7px 8px;
  }
}
