@font-face {
  font-family: "Bakemono";
  src: url("/fonts/bakemono.woff2") format("woff2");
  font-display: block;
}

:root {
  --bg: #070708;
  --ink: #f2eee6;
  --dim: #9c988f;
  --line: rgba(242, 238, 230, 0.28);
  --accent: #e5412f;
  color-scheme: dark;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  text-align: center;
  overflow-x: hidden;
}

/* soft light behind the wordmark */
body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -2;
  background: radial-gradient(closest-side at 50% 46%, rgba(242, 238, 230, 0.13), rgba(242, 238, 230, 0.04) 48%, transparent 72%);
  animation: breathe 9s ease-in-out infinite alternate;
}

/* film grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* corner marks, like a title screen */
.frame {
  --s: clamp(14px, 2.4vw, 30px);
  position: fixed;
  inset: clamp(0.75rem, 2vw, 1.75rem);
  pointer-events: none;
  background:
    linear-gradient(var(--line), var(--line)) left top / var(--s) 1px,
    linear-gradient(var(--line), var(--line)) left top / 1px var(--s),
    linear-gradient(var(--line), var(--line)) right top / var(--s) 1px,
    linear-gradient(var(--line), var(--line)) right top / 1px var(--s),
    linear-gradient(var(--line), var(--line)) left bottom / var(--s) 1px,
    linear-gradient(var(--line), var(--line)) left bottom / 1px var(--s),
    linear-gradient(var(--line), var(--line)) right bottom / var(--s) 1px,
    linear-gradient(var(--line), var(--line)) right bottom / 1px var(--s);
  background-repeat: no-repeat;
}

main {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: clamp(0.9rem, 2.4vh, 1.7rem);
  padding: clamp(3.5rem, 9vh, 6rem) 1.25rem 2rem;
}

.label,
.soon {
  margin: 0;
  font-size: clamp(0.68rem, 1.5vw, 0.8rem);
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  text-transform: uppercase;
  color: var(--dim);
}

h1 {
  margin: 0;
  font-family: "Bakemono", system-ui, sans-serif;
  font-weight: 400;
  font-size: clamp(2.6rem, min(16vw, 26vh), 15rem);
  line-height: 0.84;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

h1 span { display: block; }

.label { margin-bottom: clamp(0.4rem, 1.5vh, 1rem); }

.lede {
  margin: 0;
  font-family: "Bakemono", system-ui, sans-serif;
  font-size: clamp(1.4rem, 3.2vw, 2.1rem);
  line-height: 1.15;
  margin-top: clamp(0.3rem, 1.2vh, 0.8rem);
  animation: rise 0.9s 0.12s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.soon {
  margin-top: clamp(1rem, 4vh, 2.5rem);
  display: inline-flex;
  align-items: center;
  gap: 0.9em;
}

.soon i {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.4s ease-out infinite;
}

.soon a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.4em;
}

.soon a:hover { color: #fff; }

.soon a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}

.lost h1 { font-size: clamp(2.6rem, min(11vw, 20vh), 8rem); }

footer {
  padding: 1.4rem 1.5rem calc(1.6rem + env(safe-area-inset-bottom));
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--dim);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(0.12em); }
}

@keyframes breathe {
  from { opacity: 0.55; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1.04); }
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(229, 65, 47, 0.55); }
  70%, 100% { box-shadow: 0 0 0 0.7rem rgba(229, 65, 47, 0); }
}

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