@font-face {
  font-family: 'Fixel';
  src: url('/fonts/FixelText-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Fixel';
  src: url('/fonts/FixelText-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('/fonts/source-serif-4-latin-400-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Plex Mono';
  src: url('/fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F;
}
@font-face {
  font-family: 'Plex Mono';
  src: url('/fonts/ibm-plex-mono-cyrillic-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  --blue: #153892;
  --blue-deep: #0e2c73;
  --gold: #e0a82e;
  --white: #ffffff;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --band-h: 28px;
}

* {
  box-sizing: border-box;
  margin: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: 'Fixel', system-ui, -apple-system, sans-serif;
  background-color: var(--blue);
  background-image: radial-gradient(120% 90% at 80% 100%, color-mix(in srgb, var(--blue-deep) 55%, transparent), transparent 60%);
  color: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* static top/bottom pattern bands, unfurl in from opposite corners */
.band {
  position: fixed;
  left: 0;
  right: 0;
  height: var(--band-h);
  z-index: 1;
  background-color: var(--gold);
  -webkit-mask: url('/vyshyvanka.svg') repeat-x left center / auto 100%;
  mask: url('/vyshyvanka.svg') repeat-x left center / auto 100%;
  transform: scaleX(0);
}
.band--top {
  top: 0;
  transform-origin: left;
  animation: unfurl 0.95s var(--ease) 0.1s forwards;
}
.band--bottom {
  bottom: 0;
  transform-origin: right;
  animation: unfurl 0.95s var(--ease) 0.25s forwards;
}

/* language toggle, top left: flat two-segment control, no pills */
.langtoggle {
  position: fixed;
  top: calc(var(--band-h) + 0.9rem);
  left: 1rem;
  z-index: 3;
  display: flex;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 3px;
  overflow: hidden;
  opacity: 0;
  animation: fade-in 0.7s var(--ease) 0.5s forwards;
}
.langtoggle__opt {
  font-family: 'Plex Mono', ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.85);
  padding: 0.4rem 0.65rem;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.langtoggle__opt + .langtoggle__opt {
  border-left: 1px solid rgba(255, 255, 255, 0.4);
}
.langtoggle__opt.is-active {
  background: var(--gold);
  color: var(--blue-deep);
  font-weight: 500;
}
.langtoggle__opt:not(.is-active):hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.stage {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: calc(var(--band-h) + 3.5rem) 1.5rem;
}

.stage__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 26rem;
}

.logo {
  display: block;
  width: clamp(170px, 42vw, 300px);
  height: auto;
  opacity: 0;
  transform: translateY(14px);
  animation: reveal-up 0.7s var(--ease) 0.15s forwards;
}

.kicker {
  margin-top: 1.6rem;
  font-family: 'Plex Mono', ui-monospace, monospace;
  font-size: 0.76rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0;
  transform: translateY(14px);
  animation: reveal-up 0.7s var(--ease) 0.35s forwards;
  transition: opacity 0.25s var(--ease);
}

.lede {
  margin-top: 0.9rem;
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  font-size: clamp(0.95rem, 0.88rem + 0.4vw, 1.1rem);
  color: rgba(255, 255, 255, 0.7);
  opacity: 0;
  transform: translateY(14px);
  animation: reveal-up 0.7s var(--ease) 0.5s forwards;
  transition: opacity 0.25s var(--ease);
}

.kicker.is-swapping,
.lede.is-swapping {
  opacity: 0 !important;
}

@keyframes unfurl {
  to {
    transform: scaleX(1);
  }
}
@keyframes fade-in {
  to {
    opacity: 1;
  }
}
@keyframes reveal-up {
  to {
    opacity: 1;
    transform: none;
  }
}

@media (min-width: 640px) {
  :root {
    --band-h: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .band,
  .langtoggle,
  .logo,
  .kicker,
  .lede {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .band {
    transform: scaleX(1) !important;
  }
}
