:root {
  color-scheme: light;
  --paper: #f6f6f2;
  --ink: #202527;
  --accent: #7319cc;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 100px 1fr 112px;
  background: radial-gradient(ellipse at 52% 45%, #ffffff 0%, #f6f6f200 65%);
}

.header { padding: 32px 48px; }

.brand {
  display: inline-block;
  font-size: 32px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -2.5px;
}

.brand span { color: var(--accent); }

main { position: relative; min-width: 0; display: grid; }

.field {
  position: relative;
  width: min(1320px, calc(100% - 96px));
  height: max(360px, calc(100svh - 212px));
  max-height: 960px;
  margin: auto;
  isolation: isolate;
}

.field::before, .field::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  opacity: .35;
  pointer-events: none;
}

.field::before { top: 12px; left: 0; border-top: 1px solid #91a3a3; border-left: 1px solid #91a3a3; }
.field::after { bottom: 12px; right: 0; border-bottom: 1px solid #91a3a3; border-right: 1px solid #91a3a3; }

.words { list-style: none; padding: 0; margin: 0; position: absolute; inset: 0; }

.word {
  position: absolute;
  left: 0;
  top: 0;
  user-select: none;
  will-change: transform, opacity;
  transform-origin: top left;
}

.word__text {
  display: block;
  width: max-content;
  white-space: nowrap;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -.045em;
  transform-origin: top left;
  transition: color .5s;
}

.word--display .word__text {
  font-family: Impact, "Arial Narrow", "Helvetica Neue", sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: -.018em;
}

.word:hover .word__text { color: var(--accent); }

.flights {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}

.word--flight { transform-origin: center; }

footer { display: flex; align-items: center; justify-content: center; padding: 24px; }

.contact {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  color: var(--ink);
  font-size: 14px;
  text-decoration: none;
  letter-spacing: .025em;
  border-bottom: 1px solid #b7c1c0;
  transition: color .2s, border-color .2s;
}

.contact svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 1.4; transition: transform .2s; }
.contact:hover { color: var(--accent); border-color: var(--accent); }
.contact:hover svg { transform: translate(2px, -2px); }
.contact:focus-visible { outline: 2px solid var(--accent); outline-offset: 8px; }
.fallback { align-self: center; text-align: center; padding: 24px; }

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

@media (max-width: 600px) {
  body { grid-template-rows: 80px 1fr 96px; }
  .header { padding: 25px 24px; }
  .brand { font-size: 28px; }
  .field { width: calc(100% - 40px); height: max(380px, calc(100svh - 176px)); }
  .contact { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .word { will-change: auto; }
  .word__text, .contact, .contact svg { transition: none; }
}
