@font-face {
  font-family: "Instrument Serif";
  src: url("fonts/instrument-serif.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("fonts/instrument-serif-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("fonts/schibsted-grotesk.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --bg: #f6f5f1;
  --ink: #141416;
  --ink-2: #5a574f;
  --accent: #e8471c;
  --town-back: #c9c5ba;
  --town: #141416;
  --win-off: rgba(246, 245, 241, 0.07);
  --lit: #ff6a3d;
  --lit-warm: #ffc65c;
  --foot-ink: #b9b5aa;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0d0f;
    --ink: #f1efe9;
    --ink-2: #a19d93;
    --accent: #ff6a3d;
    --town-back: #17171a;
    --town: #1f1f23;
    --win-off: rgba(241, 239, 233, 0.05);
    --foot-ink: #8c887f;
    color-scheme: dark;
  }
}

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

html,
body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- top bar */

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px clamp(16px, 5vw, 64px) 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 26px;
  line-height: 1;
  text-decoration: none;
}

.logo-mark {
  width: 22px;
  height: 22px;
}

.logo-block {
  fill: var(--ink);
}

.logo-window {
  fill: var(--accent);
}

.login {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 20px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}

.login:hover {
  background: var(--ink);
  color: var(--bg);
}

/* ---------- hero */

.hero {
  flex: 1 0 auto;
  padding: clamp(40px, 8vh, 120px) clamp(16px, 5vw, 64px) 32px;
}

h1 {
  margin: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(64px, 12.5vw, 216px);
  font-weight: 400;
  line-height: 0.88;
  letter-spacing: -0.025em;
}

.line {
  display: block;
  animation: rise 1s cubic-bezier(0.2, 0.7, 0.1, 1) both;
}

.line + .line {
  animation-delay: 0.12s;
}

h1 em {
  font-style: italic;
}

.dot {
  color: var(--accent);
}

.lede {
  max-width: 34ch;
  margin: clamp(24px, 4vh, 40px) 0 0;
  color: var(--ink-2);
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.5;
  animation: rise 1s 0.25s cubic-bezier(0.2, 0.7, 0.1, 1) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

/* ---------- town */

.town {
  position: relative;
  height: clamp(180px, 31vh, 400px);
  margin-top: -90px;
  pointer-events: none;
}

.town svg {
  display: block;
  width: 100%;
  height: 100%;
}

.town .back {
  fill: var(--town-back);
}

.town .bldg {
  pointer-events: auto;
}

.town .wall {
  fill: var(--town);
}

.town .win {
  fill: var(--win-off);
  transition: fill 0.7s ease;
}

.town .win.on {
  fill: var(--lit);
}

.town .win.on.warm {
  fill: var(--lit-warm);
}

.town .bldg.is-hover .win {
  fill: var(--lit-warm);
}

.town .antenna {
  stroke: var(--town);
  stroke-width: 2;
}

.town .beacon {
  fill: var(--accent);
  animation: blink 2.4s ease-in-out infinite;
}

@keyframes blink {
  50% {
    opacity: 0.15;
  }
}

/* ---------- footer: the ground the town stands on */

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 18px clamp(16px, 5vw, 64px) 22px;
  background: var(--town);
  color: var(--foot-ink);
  font-size: 13px;
}

@media (max-width: 560px) {
  .bar {
    padding-top: 20px;
  }

  .logo {
    font-size: 23px;
  }

  .login {
    min-height: 38px;
    padding: 0 16px;
  }

  .town {
    height: 30vh;
    min-height: 180px;
    margin-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .line,
  .lede,
  .town .beacon {
    animation: none;
  }

  .town .win {
    transition: none;
  }
}
