/* knoQ's own tokens (src/theme/colors.ts): graphite night, porcelain day, the Negroni accent. */
@font-face {
  font-family: 'Archivo';
  src: url('/fonts/archivo-regular.woff') format('woff');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('/fonts/archivo-bold.woff') format('woff');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/fonts/plexmono-medium.woff') format('woff');
  font-weight: 500;
  font-display: swap;
}

:root {
  --night: #0c0e11;
  --night-2: #16181c;
  --porcelain: #f4f4f2;
  --paper: #fdfdfc;
  --ink: #17181b;
  --on-night: #f2f3f5;
  --muted-night: rgba(242, 243, 245, 0.56);
  --muted-day: rgba(23, 24, 27, 0.56);
  --accent: #e5523d;
  --accent-day: #be4231;
  --on-accent: #fff6f2;
  --wine: #5c1f1a;
  --radius: 28px;
  --pad: clamp(20px, 5vw, 64px);
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}

* {
  margin: 0;
  box-sizing: border-box;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  background: var(--night);
  color: var(--on-night);
  font-family:
    'Archivo',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a {
  color: inherit;
}

.defs {
  position: absolute;
}

/* ── The wordmark (Lockup.tsx): Archivo 700, -0.028em; the Q 1em square, tucked 3/56em under the
      "o", dropped 0.06em; its line is the Q's 12.5 of 110. ────────────────────────────────── */
.wm {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
}
.wq {
  width: 1em;
  height: 1em;
  margin-left: calc(-3em / 56);
  transform: translateY(0.06em);
  fill: none;
  stroke: var(--accent);
  stroke-width: 12.5;
  stroke-linecap: round;
  overflow: visible;
}

/* The Q pin: an outline in the page's colour under the accent Q, tail down. */
.pin {
  width: 0.8em;
  height: 1em;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pin-edge {
  stroke: var(--pin-edge, var(--paper));
  stroke-width: 22.5;
}
.pin-q {
  stroke: var(--pin-q, var(--accent));
  stroke-width: 12.5;
}

/* ── Navigation: the wordmark, and a frosted pill. ─────────────────────────────────────────── */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(16px, env(safe-area-inset-top)) var(--pad) 16px;
  pointer-events: none;
}
.nav > * {
  pointer-events: auto;
}
.nav-mark {
  /* Its own frosted pill, as the menu's: legible over the night and the porcelain alike. */
  padding: 9px 16px 9px 15px;
  border-radius: 999px;
  font-size: 24px;
  color: var(--on-night);
  background: rgba(22, 24, 28, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}
.nav-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(22, 24, 28, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}
.nav-pill a {
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 14px;
  text-decoration: none;
  color: var(--on-night);
  transition: background 0.2s;
}
.nav-pill a:hover {
  background: rgba(255, 255, 255, 0.08);
}
.nav-pill .nav-soon {
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
}
.nav-pill .nav-soon:hover {
  background: #ef6450;
}
@media (max-width: 560px) {
  .nav-pill a:not(.nav-soon) {
    display: none;
  }
}

/* ── Hero: a night map's mood, the wordmark across it, Spots over it. ─────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 110px var(--pad) 72px;
  overflow: hidden;
  isolation: isolate;
}
.hero-glow {
  position: absolute;
  inset: -20%;
  z-index: -2;
  background:
    radial-gradient(40% 35% at 70% 30%, rgba(229, 82, 61, 0.42), transparent 70%),
    radial-gradient(45% 40% at 22% 78%, rgba(92, 31, 26, 0.75), transparent 70%),
    radial-gradient(30% 30% at 50% 55%, rgba(253, 161, 142, 0.12), transparent 70%);
  filter: blur(30px);
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift {
  to {
    transform: translate3d(-4%, 3%, 0) scale(1.08);
  }
}
.hero-streets {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  fill: none;
  stroke: rgba(242, 243, 245, 0.055);
  stroke-width: 9;
  stroke-linecap: round;
  -webkit-mask-image: radial-gradient(70% 70% at 50% 50%, #000 30%, transparent 90%);
  mask-image: radial-gradient(70% 70% at 50% 50%, #000 30%, transparent 90%);
}
.hero-streets .minor {
  stroke-width: 4;
  stroke: rgba(242, 243, 245, 0.05);
}

.hero-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  /* The wordmark's size: the cards tuck under its lower quarter, so the word still reads. */
  --mark: min(28vw, 340px);
}
.hero-mark {
  font-size: var(--mark);
  color: var(--on-night);
  animation: rise 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

/* The Spots, fanned over the wordmark (tilted in depth, as cards held in a hand). */
.cards {
  position: relative;
  width: clamp(112px, 13vw, 180px);
  aspect-ratio: 3 / 4;
  margin-top: calc(var(--mark) * -0.3);
  perspective: 1100px;
}
.card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 14%;
  border-radius: clamp(16px, 2vw, 24px);
  box-shadow:
    0 30px 60px -20px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  font-size: clamp(11px, 1.25vw, 16px);
  animation: deal 1s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.card-left {
  background: var(--porcelain);
  color: var(--ink);
  --pin-edge: var(--porcelain);
  --to: translateX(-92%) translateY(8%) rotateY(24deg) rotateZ(-9deg);
  animation-delay: 0.35s;
}
.card-mid {
  background: var(--accent);
  color: var(--on-accent);
  --pin-edge: var(--on-accent);
  z-index: 2;
  --to: translateY(-4%) scale(1.06);
  animation-delay: 0.5s;
}
.card-right {
  background: rgba(30, 33, 38, 0.82);
  color: var(--on-night);
  --pin-edge: var(--on-night);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  --to: translateX(92%) translateY(8%) rotateY(-24deg) rotateZ(9deg);
  animation-delay: 0.65s;
}
.card {
  transform: var(--to);
}
@keyframes deal {
  from {
    opacity: 0;
    transform: translateY(40%) scale(0.9);
  }
  to {
    opacity: 1;
    transform: var(--to);
  }
}
.card-glyph {
  display: grid;
  place-items: center;
  width: 2.9em;
  height: 2.9em;
  border-radius: 50%;
  background: rgba(23, 24, 27, 0.08);
}
.card-mid .card-glyph {
  background: rgba(255, 246, 242, 0.2);
}
.card-right .card-glyph {
  background: rgba(255, 255, 255, 0.08);
}
.card-glyph svg {
  width: 1.5em;
  height: 1.5em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.card-body {
  margin-top: auto;
}
.card-title {
  font-weight: 700;
  font-size: 1.15em;
  line-height: 1.15;
}
.card-meta,
.card-dist {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.72em;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
}
.card-meta {
  margin-top: 0.5em;
}
.card-dist {
  display: flex;
  align-items: center;
  gap: 0.45em;
  margin-top: 0.9em;
  opacity: 0.9;
}
.card-dist .pin {
  height: 1.35em;
  width: 1.1em;
}
.card-mid .card-dist {
  --pin-q: var(--on-accent);
  --pin-edge: var(--accent);
}

/* The line, word by word, out of a blur. */
.hero-line {
  margin-top: clamp(30px, 4.5vw, 52px);
  font-size: clamp(34px, 6.4vw, 84px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-align: center;
}
.hero-line span {
  display: inline-block;
  animation: word 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.hero-line span:nth-child(1) {
  animation-delay: 0.9s;
}
.hero-line span:nth-child(2) {
  animation-delay: 1.15s;
}
.hero-line span:nth-child(3) {
  animation-delay: 1.4s;
}
.hero-line span:nth-child(4) {
  animation-delay: 1.65s;
  color: var(--accent);
}
@keyframes word {
  from {
    opacity: 0;
    filter: blur(12px);
    transform: translateY(0.25em);
  }
}
.hero-soon {
  margin-top: 18px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-night);
  animation: fade 1s 2.1s both;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8%);
  }
}
@keyframes fade {
  from {
    opacity: 0;
  }
}

/* ── Intro: porcelain, the headline, and the map it happens on. ───────────────────────────── */
.intro {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: clamp(32px, 6vw, 96px);
  padding: clamp(72px, 10vw, 140px) var(--pad);
  background: var(--porcelain);
  color: var(--ink);
}
.intro h2 {
  font-size: clamp(40px, 6vw, 76px);
  letter-spacing: -0.035em;
  line-height: 1;
}
.intro-text p {
  max-width: 34em;
  margin-top: 22px;
  font-size: clamp(17px, 1.5vw, 19px);
  line-height: 1.5;
  color: var(--muted-day);
}
.button {
  display: inline-block;
  margin-top: 30px;
  padding: 15px 26px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--porcelain);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: transform 0.2s;
}
.button:hover {
  transform: translateY(-2px);
}

.intro-map {
  position: relative;
  max-width: 460px;
  width: 100%;
  justify-self: center;
  --pin-edge: var(--paper);
}
.map {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: 0 40px 80px -40px rgba(23, 24, 27, 0.35);
}
.map-land {
  fill: #ebeae6;
}
.map-park {
  fill: #cfe3c4;
}
.map-water {
  fill: #bcd3e6;
}
.map-roads path,
.map-lanes path {
  fill: none;
  stroke: var(--paper);
  stroke-linecap: round;
}
.map-roads path {
  stroke-width: 12;
}
.map-lanes path {
  stroke-width: 5;
}
.map-pin {
  position: absolute;
  width: 34px;
  height: 43px;
  filter: drop-shadow(0 6px 8px rgba(23, 24, 27, 0.25));
}
.pin-a {
  left: 22%;
  top: 30%;
}
.pin-b {
  left: 60%;
  top: 48%;
}
.pin-c {
  left: 38%;
  top: 66%;
}
.chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 10px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  box-shadow: 0 14px 30px -14px rgba(23, 24, 27, 0.45);
}
.chip svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.chip-a {
  left: -6%;
  top: 10%;
  background: var(--accent-day);
  color: var(--on-accent);
  transform: rotate(-6deg);
}
.chip-b {
  right: -5%;
  top: 34%;
  background: var(--ink);
  color: var(--porcelain);
  transform: rotate(5deg);
}
.chip-c {
  left: 8%;
  bottom: 8%;
  background: var(--paper);
  color: var(--ink);
  transform: rotate(-3deg);
}

/* ── How it works: three steps, in cards. ─────────────────────────────────────────────────── */
.how {
  padding: 0 var(--pad) clamp(72px, 10vw, 140px);
  background: var(--porcelain);
  color: var(--ink);
}
.eyebrow {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-day);
  margin-bottom: 22px;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.step {
  display: flex;
  flex-direction: column;
  min-height: 360px;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 1px 0 rgba(23, 24, 27, 0.04);
}
.step-accent {
  background: var(--accent-day);
  color: var(--on-accent);
}
.step-n {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.14em;
  opacity: 0.6;
}
.step-art {
  margin: 34px 0 auto;
}
.step-art.pin {
  width: 60px;
  height: 76px;
  --pin-edge: var(--paper);
}
.wq-big {
  width: 76px;
  height: 76px;
  fill: none;
  stroke: var(--on-accent);
  stroke-width: 12.5;
  stroke-linecap: round;
}
.step-glyph {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(190, 66, 49, 0.1);
  color: var(--accent-day);
}
.step-glyph svg {
  width: 38px;
  height: 38px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.step h3 {
  margin-top: 28px;
  font-size: clamp(26px, 2.4vw, 32px);
  letter-spacing: -0.03em;
}
.step h3 .wm {
  vertical-align: bottom;
}
.step-accent .wq {
  stroke: var(--on-accent);
}
.step p:last-child {
  margin-top: 10px;
  font-size: 16px;
  line-height: 1.5;
  opacity: 0.75;
}

/* ── Safety: a statement on the night, then what's behind it. ─────────────────────────────── */
.safety {
  padding: clamp(80px, 12vw, 160px) var(--pad);
  background: var(--night);
}
.statement {
  max-width: 14em;
  font-size: clamp(40px, 6.4vw, 88px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.02;
}
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 4vw, 56px);
  margin-top: clamp(48px, 7vw, 96px);
  padding-top: 28px;
  border-top: 1px solid rgba(242, 243, 245, 0.12);
}
.pillar h3 {
  font-size: 20px;
  letter-spacing: -0.01em;
}
.pillar p {
  margin-top: 10px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--muted-night);
}

/* ── The close: the brand colour, the wordmark, the stores. ───────────────────────────────── */
.soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(80px, 11vw, 150px) var(--pad) clamp(64px, 8vw, 110px);
  background: var(--accent);
  color: var(--ink);
  text-align: center;
  overflow: hidden;
}
.soon-mark {
  font-size: min(26vw, 300px);
}
.soon-mark .wq {
  stroke: var(--on-accent);
}
.soon-line {
  margin-top: 14px;
  font-size: clamp(22px, 3vw, 36px);
  letter-spacing: -0.02em;
}
.stores {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 36px;
}
.store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 14px 22px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--porcelain);
  font-weight: 700;
  font-size: 16px;
}
.store-tag {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(244, 244, 242, 0.14);
  font-family: var(--mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px var(--pad) max(22px, env(safe-area-inset-bottom));
  background: var(--night);
  color: var(--muted-night);
  font-size: 14px;
}
.foot a {
  text-decoration: none;
}
.foot a:hover {
  color: var(--accent);
}

/* ── Scroll reveals (only with the script, so nothing stays hidden without it). ───────────── */
.js-reveal .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.8s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.js-reveal .reveal.in {
  opacity: 1;
  transform: none;
}
.steps .reveal:nth-child(2),
.pillars .reveal:nth-child(2) {
  transition-delay: 0.1s;
}
.steps .reveal:nth-child(3),
.pillars .reveal:nth-child(3) {
  transition-delay: 0.2s;
}

/* ── Phones. ──────────────────────────────────────────────────────────────────────────────── */
@media (max-width: 820px) {
  .intro {
    grid-template-columns: 1fr;
  }
  .intro-map {
    max-width: 380px;
  }
  .steps,
  .pillars {
    grid-template-columns: 1fr;
  }
  .step {
    min-height: 0;
  }
  .step-art {
    margin-bottom: 0;
  }
  .hero-stage {
    --mark: 33vw;
  }
  .cards {
    width: clamp(92px, 23vw, 150px);
    margin-top: calc(var(--mark) * -0.16);
  }
  .card {
    font-size: clamp(10px, 2.6vw, 14px);
  }
  .chip-a {
    left: -2%;
  }
  .chip-b {
    right: -2%;
  }
}

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

/* The 404: the hero's night, a smaller wordmark. */
.lost-mark {
  font-size: min(24vw, 220px);
}
