@font-face {
  font-family: "Brygada 1918";
  src: url("/fonts/brygada-1918-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Brygada 1918";
  src: url("/fonts/brygada-1918-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --creek: #2a3139;      /* slate */
  --bank: #1f252c;       /* shadowed edge */
  --limestone: #e4e6e8;  /* primary text */
  --lichen: #9eaab7;     /* secondary text */
  --current: rgba(200, 212, 226, 0.13);
  --serif: "Brygada 1918", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

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

html, body { height: 100%; margin: 0; }

body {
  background: radial-gradient(120% 90% at 70% 30%, var(--creek) 0%, var(--bank) 100%) var(--bank);
  color: var(--limestone);
  font-family: var(--serif);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

.current {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 35%, #000 100%);
          mask-image: linear-gradient(to right, transparent 0%, #000 35%, #000 100%);
}

.current path {
  fill: none;
  stroke: var(--current);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

main {
  position: relative;
  min-height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: clamp(1.75rem, 5vw, 4.5rem);
}

.mark {
  align-self: end;
  padding-bottom: clamp(3rem, 9vh, 6.5rem);
}

h1 {
  margin: 0;
  font-weight: 500;
  font-size: clamp(3.1rem, 9.5vw, 8.25rem);
  line-height: 0.92;
  letter-spacing: -0.012em;
}

h1 span { display: block; white-space: nowrap; }

.lede {
  margin: clamp(1.5rem, 3.5vw, 2.5rem) 0 0;
  max-width: 30em;
  color: var(--lichen);
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
  line-height: 1.6;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(200, 212, 226, 0.16);
  color: var(--lichen);
  font-size: 0.875rem;
  letter-spacing: 0.01em;
}

footer p { margin: 0; }

/* Load sequence: the current draws across, then the name settles in. */
@media (prefers-reduced-motion: no-preference) {
  .current path {
    stroke-dashoffset: 1;
    animation: draw 2.8s cubic-bezier(.45, .05, .25, 1) forwards;
    animation-delay: calc(var(--i) * 55ms);
  }
  .mark, footer {
    opacity: 0;
    animation: settle 1.4s ease-out 0.9s forwards;
  }
  footer { animation-delay: 1.5s; }
}

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes settle {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

@media (max-width: 34rem) {
  footer { flex-direction: column; gap: 0.35rem; }
  .current {
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 45%, transparent 80%);
            mask-image: linear-gradient(to bottom, #000 0%, #000 45%, transparent 80%);
  }
}
