/* NIGHTFRONT — playnightfront.com
   One stylesheet, no framework. Type and spacing follow the DRO Apps studio site (droapps.dk: Schibsted Grotesk
   for display and body, IBM Plex Mono for labels, +0.10em label tracking, hairline rules). Colours come from the
   store icon: the night ink of the gear, the cyan sky and the amber dusk. */

/* Fonts: self-hosted (Fontsource builds, SIL Open Font License 1.1, see assets/fonts/OFL-*.txt). No CDN. */
@font-face {
  font-family: "Schibsted Grotesk Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url("../fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2-variations"),
    url("../fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url("../fonts/ibm-plex-mono-latin-600-normal.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --night: #06080f;
  --night-2: #0b1020;
  --night-3: #121a30;
  --text: #eef2f8;
  --text-dim: #b4bdcc; /* 10.6:1 on --night */
  --text-mute: #8f9aae; /* 6.9:1 on --night */
  --cyan: #38c8ff;
  --cyan-deep: #0a7fd6;
  --amber: #ffa526;
  --amber-hot: #ff7a12;
  --line: rgba(238, 242, 248, 0.14);
  --line-strong: rgba(238, 242, 248, 0.28);

  --font-sans: "Schibsted Grotesk Variable", "Schibsted Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --gutter: clamp(1rem, 4vw, 3.5rem);
  --max: 1200px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  background: var(--night);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--night);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection {
  background: var(--amber);
  color: var(--night);
}

h1,
h2,
h3,
p {
  margin: 0;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--amber);
  color: var(--night);
  font-weight: 700;
  text-decoration: none;
  border-radius: 4px;
}

.skip:focus {
  top: 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: min(100% - var(--gutter) * 2, var(--max));
  margin-inline: auto;
}

.label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

.bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.14em;
  font-size: 0.95rem;
}

.brand img {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.55rem;
  box-shadow: 0 0 0 1px var(--line-strong);
}

.bar__note {
  color: var(--text-mute);
}

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

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(120% 80% at 50% 0%, var(--night-3) 0%, var(--night) 60%);
}

/* Two slow light pools, the icon's cyan sky and amber dusk. */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  z-index: -2;
  width: 70vmax;
  height: 70vmax;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.45;
  will-change: transform;
}

.hero::before {
  left: -30vmax;
  top: -18vmax;
  background: radial-gradient(circle, var(--cyan-deep) 0%, rgba(10, 127, 214, 0) 65%);
  animation: drift-a 18s var(--ease) infinite alternate;
}

.hero::after {
  right: -32vmax;
  bottom: -26vmax;
  background: radial-gradient(circle, var(--amber-hot) 0%, rgba(255, 122, 18, 0) 65%);
  animation: drift-b 22s var(--ease) infinite alternate;
}

/* A faint tactical grid, fading out towards the bottom. */
.hero__grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.35;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
}

.hero__body {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  align-content: center;
  gap: clamp(1.75rem, 4vw, 4rem);
  padding-block: clamp(1rem, 4vw, 3rem) clamp(3rem, 7vw, 5rem);
}

.hero__art {
  position: relative;
  justify-self: center;
  width: min(68vw, 22rem);
}

/* The glow ring behind the logo: a turning cyan-to-amber halo. */
.hero__art::before {
  content: "";
  position: absolute;
  inset: -10%;
  z-index: -1;
  border-radius: 30%;
  background: conic-gradient(from 0deg, var(--cyan), var(--cyan-deep), var(--amber-hot), var(--amber), var(--cyan));
  filter: blur(34px);
  opacity: 0.7;
  animation: spin 14s linear infinite;
}

.hero__art img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 22%;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18), 0 30px 80px -20px rgba(0, 0, 0, 0.8);
  animation: float 7s ease-in-out infinite;
}

.hero__copy {
  text-align: center;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text-dim);
  background: rgba(6, 8, 15, 0.5);
}

.hero__eyebrow::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 10px var(--amber);
  animation: pulse 2.4s ease-in-out infinite;
}

.hero__title {
  margin-top: 1.1rem;
  font-size: clamp(2.25rem, 11vw, 4.5rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: 0.02em;
  text-shadow: 0 0 28px rgba(56, 200, 255, 0.35), 0 0 60px rgba(255, 122, 18, 0.25);
}

/* The name's underline, cyan into amber. */
.hero__title::after {
  content: "";
  display: block;
  width: min(14rem, 60%);
  height: 4px;
  margin: 1rem auto 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--amber));
  box-shadow: 0 0 16px rgba(56, 200, 255, 0.6);
}

.hero__pitch {
  max-width: 34rem;
  margin: 1.25rem auto 0;
  font-size: clamp(1.15rem, 2.6vw, 1.45rem);
  line-height: 1.4;
  color: var(--text);
}

.hero__sub {
  margin: 0.6rem auto 0;
  color: var(--text-dim);
}

.cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 3.5rem;
  padding: 0.9rem 1.75rem;
  border-radius: 999px;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: #120a02; /* 10:1 on the amber, 7.5:1 on the deep orange */
  background: linear-gradient(180deg, #ffbb4d 0%, var(--amber) 55%, var(--amber-hot) 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25) inset, 0 10px 34px -6px rgba(255, 122, 18, 0.65),
    0 0 50px -10px rgba(255, 165, 38, 0.7);
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35) inset, 0 14px 40px -6px rgba(255, 122, 18, 0.8),
    0 0 70px -8px rgba(255, 165, 38, 0.85);
}

.btn:active {
  transform: translateY(0);
}

.btn__arrow {
  transition: transform 180ms var(--ease);
}

.btn:hover .btn__arrow {
  transform: translateX(3px);
}

.cta__note {
  max-width: 30rem;
  color: var(--text-mute);
  font-size: 0.9rem;
}

.cta__note a,
.text-link {
  color: var(--text);
  text-decoration-color: var(--cyan);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.cta__note a:hover,
.text-link:hover {
  color: var(--cyan);
}

/* ---------------------------------------------------------------- features */

.features {
  padding-block: clamp(3.5rem, 8vw, 6rem);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%);
}

.features__list {
  display: grid;
  gap: 1rem;
  margin-block: 0;
  padding: 0;
  list-style: none;
}

.feature {
  position: relative;
  padding: 1.5rem 1.4rem 1.6rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: linear-gradient(160deg, rgba(56, 200, 255, 0.07) 0%, rgba(6, 8, 15, 0) 45%),
    rgba(18, 26, 48, 0.55);
  overflow: hidden;
}

.feature::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), transparent 70%);
}

.feature:nth-child(2)::before {
  background: linear-gradient(90deg, var(--amber), transparent 70%);
}

.feature:nth-child(3)::before {
  background: linear-gradient(90deg, var(--cyan), var(--amber) 60%, transparent);
}

.feature .label {
  color: var(--cyan);
}

.feature:nth-child(2) .label {
  color: var(--amber);
}

.feature h2 {
  margin-top: 0.6rem;
  font-size: 1.5rem;
  line-height: 1.15;
  font-weight: 800;
}

.feature p {
  margin-top: 0.6rem;
  color: var(--text-dim);
}

/* ---------------------------------------------------------------- beta strip */

.beta {
  padding-block: clamp(3rem, 7vw, 5rem);
  background: var(--night-2);
  border-top: 1px solid var(--line);
}

.beta__inner {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

.beta h2 {
  font-size: clamp(1.75rem, 4.5vw, 2.5rem);
  line-height: 1.05;
  font-weight: 900;
}

.beta ol {
  margin: 0.9rem 0 0;
  padding-left: 1.25rem;
  color: var(--text-dim);
}

.beta li + li {
  margin-top: 0.35rem;
}

.beta__action {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.8rem;
}

/* ---------------------------------------------------------------- footer */

.footer {
  padding-block: 2.5rem 2rem;
  border-top: 1px solid var(--line);
  background: var(--night);
  color: var(--text-mute);
  font-size: 0.9rem;
}

.footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.footer__line {
  color: var(--text-dim);
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem; /* a thumb-sized target */
  color: var(--text-dim);
  text-decoration: none;
}

.footer a:hover {
  color: var(--amber);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.footer__bottom a {
  min-height: auto;
}

/* ---------------------------------------------------------------- legal and text pages */

.page-head {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(90% 140% at 0% 0%, rgba(10, 127, 214, 0.35) 0%, rgba(6, 8, 15, 0) 60%),
    radial-gradient(80% 140% at 100% 100%, rgba(255, 122, 18, 0.22) 0%, rgba(6, 8, 15, 0) 60%), var(--night);
}

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.1rem;
  margin: 0;
  padding: 0 0 1.1rem;
  list-style: none;
}

.legal-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--text-dim);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
}

.legal-nav a:hover,
.legal-nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--amber);
  text-underline-offset: 5px;
  text-decoration-thickness: 2px;
}

.doc {
  max-width: 46rem;
  margin-inline: auto;
  padding: clamp(1.75rem, 5vw, 3.5rem) var(--gutter) clamp(3rem, 7vw, 5rem);
  overflow-wrap: break-word;
}

.doc h1 {
  font-size: clamp(1.9rem, 6vw, 2.75rem);
  line-height: 1.08;
  font-weight: 900;
  margin: 0 0 1.25rem;
}

.doc h2 {
  margin: 2.5rem 0 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: clamp(1.3rem, 3.5vw, 1.6rem);
  line-height: 1.2;
  font-weight: 800;
}

.doc h3 {
  margin: 1.75rem 0 0.5rem;
  font-size: 1.15rem;
  line-height: 1.3;
  font-weight: 700;
}

.doc h4,
.doc h5,
.doc h6 {
  margin: 1.4rem 0 0.4rem;
  font-size: 1rem;
}

.doc p,
.doc ul,
.doc ol {
  margin: 0.85rem 0 0;
  color: var(--text-dim);
  line-height: 1.65;
}

.doc ul,
.doc ol {
  padding-left: 1.3rem;
}

.doc li + li {
  margin-top: 0.35rem;
}

.doc strong {
  color: var(--text);
  font-weight: 700;
}

.doc a {
  color: var(--cyan);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.doc a:hover {
  color: var(--amber);
}

.doc code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

.doc blockquote {
  margin: 1rem 0;
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--amber);
  border-radius: 0 0.5rem 0.5rem 0;
  background: rgba(255, 165, 38, 0.08);
}

.doc blockquote p {
  margin: 0;
  color: var(--text);
}

.doc .table {
  margin: 1rem 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.doc th,
.doc td {
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--line-strong);
  text-align: left;
  vertical-align: top;
  color: var(--text-dim);
}

.doc th {
  background: rgba(56, 200, 255, 0.08);
  color: var(--text);
}

.doc__source {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-mute);
}

/* ---------------------------------------------------------------- 404 */

.lost {
  min-height: 70svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding-block: 3rem;
}

.lost .lost__code {
  margin: 0;
  font-family: var(--font-mono);
  font-size: clamp(4rem, 22vw, 9rem);
  font-weight: 600;
  line-height: 1;
  background: linear-gradient(90deg, var(--cyan), var(--amber));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lost h1 {
  margin-top: 0.75rem;
  font-size: clamp(1.5rem, 5vw, 2.25rem);
  font-weight: 900;
}

.lost p {
  margin: 0.75rem auto 1.75rem;
  max-width: 28rem;
  color: var(--text-dim);
}

/* ---------------------------------------------------------------- motion */

@keyframes drift-a {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(12vmax, 8vmax, 0) scale(1.15);
  }
}

@keyframes drift-b {
  from {
    transform: translate3d(0, 0, 0) scale(1.1);
  }
  to {
    transform: translate3d(-14vmax, -6vmax, 0) scale(0.95);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

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

/* ---------------------------------------------------------------- wider screens */

@media (min-width: 720px) {
  .features__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
  }

  .beta__inner {
    grid-template-columns: 1.4fr 1fr;
    gap: 3rem;
  }

  .beta__action {
    align-items: flex-end;
    text-align: right;
  }
}

@media (min-width: 960px) {
  .hero__body {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  }

  .hero__art {
    width: min(100%, 27rem);
  }

  .hero__title {
    font-size: min(5vw, 5.25rem);
  }

  .hero__copy {
    text-align: left;
  }

  .hero__title::after,
  .hero__pitch,
  .hero__sub {
    margin-left: 0;
  }

  .cta {
    align-items: flex-start;
  }
}
