/* neonworms.studio: the one stylesheet for every page. */

@font-face {
  font-family: "Hanken Grotesk";
  src: url("../fonts/HankenGrotesk-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Tilt Neon";
  src: url("../fonts/TiltNeon-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --night: #0E1424;
  --night-2: #131B2E;
  --rule: #24304A;
  --text: #EEF1F7;
  --muted: #A3ADC2;
  --dim: #8A93A8;
  --soft: #C3CADA;
  --pink: #FF5BD7;
  --cyan: #4DF3FF;
  --accent: var(--pink);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--night);
}

body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font: 400 17px/1.6 "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

a {
  color: inherit;
  text-decoration-color: #56617F;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: var(--cyan);
}

a:focus-visible {
  outline-style: solid;
  outline-width: 2px;
  outline-color: var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

img {
  max-width: 100%;
}

.w {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 48px;
}

/* Header */

.hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 28px;
  padding-block: 22px;
}

.logo {
  font-family: "Tilt Neon", system-ui, sans-serif;
  font-size: 23px;
  line-height: 1;
  color: #FFE6F9;
  text-decoration: none;
  text-shadow: 0 0 5px var(--pink), 0 0 14px #FF2FC6;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  font-size: 15px;
  font-weight: 500;
}

.nav a {
  color: #C9D0DE;
  text-decoration: none;
  padding-block: 4px;
}

.nav a:hover {
  color: var(--text);
}

.nav a[aria-current="page"] {
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--accent);
}

/* Homepage hero: the neon sign */

.hero {
  text-align: center;
  padding-block: 64px 72px;
}

.sign {
  font-family: "Tilt Neon", system-ui, sans-serif;
  font-weight: 400;
  font-size: clamp(52px, 10vw, 108px);
  line-height: 1;
  letter-spacing: 0;
  color: #FFE6F9;
  text-shadow: 0 0 2px #fff, 0 0 8px #FF7FE0, 0 0 18px #FF4FD3, 0 0 40px #FF2FC6, 0 0 76px #FF2FC6;
  animation: flicker 1.8s linear 0.3s both;
}

@keyframes flicker {
  0% { opacity: 0.12; }
  6% { opacity: 1; }
  9% { opacity: 0.25; }
  13% { opacity: 1; }
  17% { opacity: 0.55; }
  21%, 100% { opacity: 1; }
}

.worm {
  display: block;
  margin: 16px auto 30px;
  width: clamp(120px, 18vw, 200px);
  height: auto;
  filter: drop-shadow(0 0 3px #B8FBFF) drop-shadow(0 0 9px var(--cyan)) drop-shadow(0 0 22px #12C8FF);
}

.lede {
  font-size: 21px;
  line-height: 1.5;
  color: var(--soft);
  max-width: 30em;
  margin-inline: auto;
  text-wrap: balance;
}

/* App panels (homepage) */

.apps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding-block: 0 56px;
}

.panel {
  position: relative;
  overflow: hidden;
  background: var(--night-2);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 28px 26px 24px;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--accent);
}

.app-id {
  display: flex;
  gap: 16px;
  align-items: center;
}

.icon {
  width: 64px;
  height: 64px;
  border-radius: 22.5%;
  flex: none;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.panel h2 {
  font-size: 23px;
}

.panel h2 a {
  text-decoration: none;
}

.panel h2 a:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
}

.panel p {
  color: var(--muted);
  font-size: 16px;
  margin-top: 3px;
  text-wrap: pretty;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 24px;
  font-size: 15px;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin-top: 16px;
  font-size: 15px;
}

.badge {
  display: inline-block;
  flex: none;
  line-height: 0;
  border-radius: 9px;
}

.badge img {
  display: block;
  width: auto;
  height: 44px;
}

.soon {
  font-size: 14px;
  color: var(--muted);
  border: 1px solid #36415E;
  border-radius: 9px;
  padding: 10px 14px;
}

.meta {
  color: var(--dim);
  font-size: 15px;
}

.about {
  padding-block: 0 56px;
  text-align: center;
  color: var(--muted);
}

.about p {
  border-top: 1px solid var(--rule);
  padding-top: 36px;
  text-wrap: balance;
}

/* App pages */

.app-hero {
  display: flex;
  gap: 32px;
  align-items: center;
  padding-block: 48px 52px;
}

.app-hero .icon {
  width: 120px;
  height: 120px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 14px 48px -10px var(--accent);
}

.app-hero h1 {
  font-size: 48px;
  letter-spacing: -0.02em;
}

.pitch {
  font-size: 21px;
  line-height: 1.45;
  color: var(--soft);
  margin-top: 8px;
  max-width: 30em;
  text-wrap: pretty;
}

.app-hero .actions {
  margin-top: 22px;
}

.shots {
  background: var(--night-2);
  background: color-mix(in srgb, var(--accent) 11%, var(--night));
  border-block: 1px solid var(--rule);
  border-block: 1px solid color-mix(in srgb, var(--accent) 28%, var(--night));
}

.shot-row {
  display: flex;
  gap: 28px;
  padding-block: 40px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

/* Auto margins center the row when it fits and keep its start reachable when it doesn't. */
.shot-row > :first-child {
  margin-left: auto;
}

.shot-row > :last-child {
  margin-right: auto;
}

.shot-row img {
  width: 236px;
  height: auto;
  flex: none;
  border-radius: 20px;
  scroll-snap-align: center;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
}

/* A row of five shots is narrower, so all five fit across a wide screen. */
@media (min-width: 641px) {
  .shot-row img:first-child:nth-last-child(5),
  .shot-row img:first-child:nth-last-child(5) ~ img {
    width: 182px;
  }
}

.features {
  padding-block: 56px 16px;
}

.features h2,
.support h2 {
  font-size: 28px;
  margin-bottom: 22px;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 56px;
  max-width: 920px;
}

.grid2 h3 {
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 6px;
}

.grid2 p {
  color: var(--muted);
  text-wrap: pretty;
}

.fine {
  color: var(--dim);
  font-size: 15px;
  margin-top: 32px;
  max-width: 68ch;
}

.support {
  padding-block: 40px 64px;
}

.support-box {
  border: 1px solid var(--rule);
  border-radius: 16px;
  background: var(--night-2);
  padding: 28px;
  max-width: 720px;
}

.support-box h2 {
  margin-bottom: 12px;
}

.support-box p {
  color: var(--soft);
}

.support-box p + p {
  margin-top: 10px;
}

/* Policy pages */

.doc {
  max-width: 800px;
  padding-block: 44px 72px;
}

.doc h1 {
  font-size: 40px;
  letter-spacing: -0.02em;
}

.doc .updated {
  color: var(--dim);
  font-size: 15px;
  margin-top: 10px;
}

.doc h2 {
  font-size: 22px;
  margin: 40px 0 10px;
}

.doc p,
.doc li {
  color: #D3D9E5;
  line-height: 1.7;
  max-width: 68ch;
}

.doc p + p {
  margin-top: 14px;
}

.doc .updated + p {
  margin-top: 28px;
}

.doc ul {
  padding-left: 22px;
  margin: 12px 0 0;
}

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

/* Footer */

.ft {
  border-top: 1px solid var(--rule);
}

.ftw {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 28px;
  padding-block: 24px 30px;
  font-size: 14px;
  color: var(--dim);
}

.ftnav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}

.ftnav a {
  color: #B7BFD0;
}

/* Narrow screens */

@media (max-width: 760px) {
  .apps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .w {
    padding-inline: 20px;
  }

  .hd {
    padding-block: 18px;
  }

  .hero {
    padding-block: 44px 52px;
  }

  .lede,
  .pitch {
    font-size: 19px;
  }

  .panel {
    padding: 24px 20px 20px;
  }

  .app-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding-block: 32px 40px;
  }

  .app-hero .icon {
    width: 96px;
    height: 96px;
  }

  .app-hero h1 {
    font-size: 36px;
  }

  .shot-row {
    gap: 16px;
  }

  .shot-row img {
    width: 70%;
  }

  .grid2 {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .features h2,
  .support h2 {
    font-size: 24px;
  }

  .support-box {
    padding: 22px 20px;
  }

  .doc h1 {
    font-size: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sign {
    animation: none;
  }
}

/* Paper: black on white, whether or not the browser prints backgrounds */

@media print {
  :root {
    color-scheme: light;
  }

  *,
  *::before,
  *::after {
    background: #fff !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  .worm {
    display: none;
  }
}
