/* Nepsion: coming soon */

@font-face {
  font-family: "Inter";
  src: url("/fonts/Inter-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/fonts/Inter-Medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --black: #000000;
  --white: #ffffff;
  --text-strong: #e6e6e6;
  --text-muted: #8c8c8c;
  --text-quiet: #5e5e5e;
  --text-body: #c4c4c4;
  --rule: #333333;
  --ease-scan: cubic-bezier(0.7, 0, 0.2, 1);
  color-scheme: dark;
}

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

html {
  height: 100%;
  background: var(--black);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  overflow-x: hidden;
  background: var(--black);
  color: var(--white);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Live signal trace, drawn by signal.js */
.signal {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Film grain, static and barely there */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background-image: url("/assets/grain.png");
  background-size: 160px 160px;
  opacity: 0.3;
}

.stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(80px, 15vh, 140px);
  padding: 48px 16px 0;
  text-align: center;
}

.logo {
  position: relative;
  margin: 0;
  width: min(640px, 76vw);
  line-height: 0;
  color: var(--white);
}

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

.status {
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: var(--text-muted);
}

.contact {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 8px 32px;
  padding: 32px 16px max(32px, env(safe-area-inset-bottom));
  font-size: 14px;
  line-height: 1.4;
}

.contact-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 4px 12px;
  margin: 0;
}

.contact-label {
  color: var(--text-quiet);
}

.legal-links {
  display: flex;
  gap: 24px;
}

.contact a {
  color: var(--text-strong);
  font-weight: 500;
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0% 1px;
  padding-bottom: 2px;
  transition: color 200ms ease, background-size 300ms var(--ease-scan);
}

.contact a.contact-privacy {
  color: var(--text-quiet);
  font-weight: 400;
}

.contact a:hover {
  color: var(--white);
  background-size: 100% 1px;
}

.contact a:focus-visible {
  outline: 1px solid var(--white);
  outline-offset: 6px;
  border-radius: 2px;
}

/* Privacy notice and other text pages */
body.doc {
  grid-template-rows: auto 1fr auto;
}

.doc-header,
.doc-body {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: calc(40rem + 32px);
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

.doc-header {
  padding-top: 40px;
}

.doc-home {
  display: inline-block;
  width: 116px;
  color: var(--white);
  line-height: 0;
}

.doc-home svg {
  display: block;
  width: 100%;
  height: auto;
}

.doc-home:focus-visible {
  outline: 1px solid var(--white);
  outline-offset: 8px;
  border-radius: 2px;
}

.doc-body {
  padding-top: 64px;
  padding-bottom: 32px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-body);
}

.doc-body h1 {
  margin: 0 0 8px;
  font-size: 32px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--white);
  text-wrap: balance;
}

.doc-body h2 {
  margin: 40px 0 8px;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--white);
  text-wrap: balance;
}

.doc-body p,
.doc-body ul,
.doc-body address {
  margin: 0 0 12px;
}

.doc-body .doc-meta {
  margin-bottom: 32px;
  font-size: 14px;
  color: var(--text-muted);
}

.doc-body ul {
  padding-left: 20px;
}

.doc-body li + li {
  margin-top: 4px;
}

.doc-body address {
  font-style: normal;
  padding-left: 16px;
  border-left: 1px solid var(--rule);
}

.doc-body strong {
  font-weight: 500;
  color: var(--white);
}

.doc-body a {
  color: var(--white);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.doc-body a:focus-visible {
  outline: 1px solid var(--white);
  outline-offset: 4px;
  border-radius: 2px;
}

.doc-body .doc-emphasis {
  padding-left: 16px;
  border-left: 1px solid var(--white);
  color: var(--white);
}

/* 404 page */
.notfound-link {
  color: var(--text-strong);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

.notfound-link:hover {
  color: var(--white);
}

.notfound-link:focus-visible {
  outline: 1px solid var(--white);
  outline-offset: 6px;
  border-radius: 2px;
}

/* One orchestrated entrance: a scan line resolves the wordmark, then the rest settles in */
@media (prefers-reduced-motion: no-preference) {
  .logo svg {
    animation: reveal 1300ms var(--ease-scan) 250ms both;
  }

  .logo::after {
    content: "";
    position: absolute;
    left: -6%;
    right: -6%;
    top: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--white) 18%, var(--white) 82%, transparent);
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.9));
    opacity: 0;
    animation: scan 1300ms var(--ease-scan) 250ms both;
  }

  .status {
    animation: fade-in 900ms ease 1450ms both;
  }

  body:not(.doc) .contact {
    animation: fade-in 900ms ease 1650ms both;
  }
}

@keyframes reveal {
  from {
    clip-path: inset(0 0 100% 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

@keyframes scan {
  0% {
    top: 0;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  100% {
    top: 100%;
    opacity: 0;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
