/*
 * noiseedge.com coming-soon page. Colours and fonts come from tokens.css (a copy of
 * packages/design-tokens/tokens.css, CGP). Glows and tints use color-mix() on those tokens,
 * never fixed colours. Fonts are self-hosted (latin subset, @fontsource 5.3.0, OFL-1.1:
 * fonts/LICENSE-*.txt): no third-party font requests.
 */

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

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/inter-latin-600-normal.woff2") format("woff2");
}

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

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

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/fonts/montserrat-latin-800-normal.woff2") format("woff2");
}

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

:root {
  /* Overlays as light as on the original page: glow = brand at alpha 0.075 fading out by 30 %,
     grid = white at alpha 0.025. */
  --glow: color-mix(in srgb, var(--color-brand) 7.5%, transparent);
  --grid: color-mix(in srgb, var(--color-text) 2.5%, transparent);
  --line: var(--color-border);
}

html,
body {
  width: 100%;
  min-height: 100%;
}

/* Same as apps/web: dark scrollbars, form controls and canvas. Without it the browser draws a
   light grey scrollbar next to the page and a white canvas before the stylesheets arrive, which
   made the page look lighter than the app although the background is the same #0B0F12. */
html {
  color-scheme: dark;
  background: var(--color-bg);
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  /* Vertical scrolling stays possible (form, footer on small screens); only the wide
     decorative graphic is clipped sideways. */
  overflow-x: hidden;
  /* The glow is sized from the viewport (fixed), as on the original page, which was exactly one
     screen tall. Sized from the body it grew with the taller page (form) and lightened more of
     the screen than the original. */
  background:
    radial-gradient(circle at 50% 42%, var(--glow), transparent 30%) fixed,
    var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-ui);
}

a {
  color: var(--color-brand);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--color-brand-strong);
}

:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* =========================
   BACKGROUND GRID
========================= */

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black 0%, black 50%, transparent 95%);
}

/* =========================
   PAGE
========================= */

.page {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* =========================
   HEADER
========================= */

.site-header {
  min-height: 88px;
  padding: 0 6vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 10;
}

.logo-link {
  display: block;
}

.logo {
  width: 155px;
  height: auto;
  display: block;
}

.status {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-align: right;
}

.status-dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-brand);
  box-shadow:
    0 0 8px color-mix(in srgb, var(--color-brand) 80%, transparent),
    0 0 20px color-mix(in srgb, var(--color-brand) 35%, transparent);
  animation: pulse 2s infinite ease-in-out;
}

/* =========================
   MAIN
========================= */

.hero {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 25px 120px;
  /* The decorative line is wider than the screen; clip it here so phones never get a wider
     layout viewport (overflow-x on body alone does not stop that on mobile). */
  overflow-x: clip;
}

.content {
  width: min(1100px, 100%);
  text-align: center;
  position: relative;
  z-index: 3;
  animation: reveal 1s ease-out both;
}

/* =========================
   EYEBROW
========================= */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 26px;
  color: var(--color-brand);
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.eyebrow::before,
.eyebrow::after {
  content: "";
  width: 35px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-brand));
}

.eyebrow::after {
  background: linear-gradient(90deg, var(--color-brand), transparent);
}

/* =========================
   MAIN TITLE
========================= */

h1 {
  max-width: 1050px;
  margin: 0 auto;
  font-family: var(--font-heading);
  font-size: clamp(44px, 6.4vw, 92px);
  line-height: 0.95;
  letter-spacing: -0.045em;
  font-weight: 800;
  text-transform: uppercase;
}

h1 .green {
  color: var(--color-brand);
  text-shadow: 0 0 35px color-mix(in srgb, var(--color-brand) 12%, transparent);
}

/* =========================
   DESCRIPTION
========================= */

.tagline {
  margin-top: 30px;
  color: var(--color-text-muted);
  font-size: clamp(15px, 1.5vw, 20px);
  line-height: 1.65;
  letter-spacing: 0.01em;
}

.tagline strong {
  color: var(--color-text);
  font-weight: 600;
}

/* =========================
   DIVIDER
========================= */

.divider {
  width: 75px;
  height: 1px;
  margin: 28px auto 24px;
  background: linear-gradient(90deg, transparent, var(--color-brand), transparent);
  box-shadow: 0 0 18px color-mix(in srgb, var(--color-brand) 30%, transparent);
}

/* =========================
   STATEMENT
========================= */

.statement {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 34px;
  margin-bottom: 32px;
  text-transform: uppercase;
  font-family: var(--font-heading);
  font-size: clamp(12px, 1.25vw, 16px);
  font-weight: 800;
  letter-spacing: 0.16em;
}

.statement span {
  color: var(--color-text);
}

.statement span + span::before {
  content: "•";
  color: var(--color-brand);
  margin-right: 34px;
}

/* =========================
   WAITLIST FORM (was the CTA)
========================= */

.notify {
  width: min(520px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.notify-title {
  color: var(--color-text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.notify-title::after {
  content: " →";
  color: var(--color-brand);
}

.notify-row {
  width: 100%;
  display: flex;
  gap: 10px;
}

.notify-input {
  flex: 1;
  min-width: 0;
  min-height: 50px;
  padding: 0 16px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--color-surface) 45%, var(--color-bg));
  color: var(--color-text);
  font: inherit;
  font-size: 16px;
}

.notify-input::placeholder {
  color: var(--color-text-muted);
  opacity: 1;
}

.notify-input:hover {
  border-color: color-mix(in srgb, var(--color-brand) 45%, var(--color-border));
}

.notify-input:focus-visible {
  outline-offset: 1px;
  border-color: var(--color-brand);
}

.notify-input[aria-invalid="true"] {
  border-color: var(--color-loss);
}

.button,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 24px;
  border: 0;
  border-radius: 8px;
  background: var(--color-brand);
  color: var(--color-on-brand);
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 0 30px color-mix(in srgb, var(--color-brand) 12%, transparent);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.button:hover,
.button-link:hover {
  background: var(--color-brand-strong);
  color: var(--color-on-brand);
}

.button:disabled {
  cursor: progress;
  opacity: 0.7;
}

.cf-turnstile {
  min-height: 65px;
}

.notify-note {
  color: var(--color-text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.notify-status {
  min-height: 1.5em;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}

.notify-status[data-state="ok"] {
  color: var(--color-brand);
}

.notify-status[data-state="error"] {
  color: var(--color-loss);
}

/* =========================
   MARKET LINE (decorative)
========================= */

.market-line {
  position: absolute;
  left: -8vw;
  right: -8vw;
  bottom: 2%;
  height: 180px;
  opacity: 0.16;
  pointer-events: none;
}

.market-line svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.market-line path {
  fill: none;
  stroke: var(--color-brand);
  stroke-width: 1.25;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 8 11;
  animation: dash 13s linear infinite;
}

.market-line .glow {
  filter: blur(7px);
  opacity: 0.35;
  stroke-width: 2;
}

/* =========================
   FOOTER
========================= */

.site-footer {
  position: relative;
  z-index: 5;
  padding: 0 6vw 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: var(--color-text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.site-footer a {
  color: var(--color-text-muted);
  margin-right: 14px;
}

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

.site-footer .brand {
  color: var(--color-brand);
}

/* =========================
   MESSAGE PAGES (/api/subscribe without JS, /confirm, 404)
========================= */

.message-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
}

.message-card {
  width: min(560px, 100%);
  padding: 36px 28px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--color-surface) 30%, var(--color-bg));
  text-align: center;
}

.message-title {
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-transform: none;
}

.message-text {
  margin-top: 18px;
  color: var(--color-text-muted);
  font-size: 16px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.message-text strong {
  color: var(--color-text);
}

.message-actions,
.confirm-form {
  margin-top: 26px;
}

.message-note {
  margin-top: 20px;
  color: var(--color-text-muted);
  font-size: 13px;
  line-height: 1.5;
}

/* =========================
   PRIVACY (long text)
========================= */

.prose {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 48px 24px 72px;
  line-height: 1.7;
}

.prose h1 {
  font-size: clamp(30px, 5vw, 44px);
  text-transform: none;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.prose h2 {
  margin-top: 36px;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
}

.prose p,
.prose ul {
  margin-top: 14px;
  color: var(--color-text-muted);
}

.prose ul {
  padding-left: 22px;
}

.prose strong {
  color: var(--color-text);
}

/* =========================
   ANIMATIONS
========================= */

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(0.9);
  }

  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

@keyframes dash {
  to {
    stroke-dashoffset: -380;
  }
}

@media (prefers-reduced-motion: reduce) {
  .content,
  .status-dot,
  .market-line path {
    animation: none;
  }

  .button,
  .button-link {
    transition: none;
  }
}

/* =========================
   MOBILE
========================= */

@media (max-width: 700px) {
  .site-header {
    min-height: 76px;
    padding: 14px 20px;
  }

  .logo {
    width: 125px;
  }

  .status {
    font-size: 9px;
    letter-spacing: 0.12em;
    max-width: 150px;
    line-height: 1.4;
  }

  .hero {
    padding: 42px 20px 110px;
  }

  .eyebrow {
    margin-bottom: 23px;
    font-size: 10px;
  }

  h1 {
    font-size: clamp(34px, 11vw, 64px);
  }

  .tagline {
    margin-top: 26px;
    font-size: 15px;
  }

  .divider {
    margin: 29px auto 23px;
  }

  .statement {
    gap: 9px;
    margin-bottom: 32px;
    font-size: 11px;
    letter-spacing: 0.11em;
  }

  .statement span + span::before {
    margin-right: 9px;
  }

  .notify-row {
    flex-direction: column;
  }

  .market-line {
    bottom: 6%;
    height: 130px;
  }

  .site-footer {
    padding: 0 20px 18px;
    font-size: 10px;
    letter-spacing: 0.1em;
  }
}

/* =========================
   LANDING PAGE (W2): header, sections, cards, FAQ, footer
========================= */

html {
  scroll-behavior: smooth;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--color-brand);
  color: var(--color-on-brand);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.wrap {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 0 24px;
}

.wrap--narrow {
  width: min(820px, 100%);
}

.top {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--color-bg) 82%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.top-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.top-nav {
  display: flex;
  gap: 28px;
  margin-right: auto;
  margin-left: 24px;
}

.top-nav a {
  color: var(--color-text-muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

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

.top-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.top .status {
  white-space: nowrap;
}

.button--small {
  min-height: 40px;
  padding: 0 18px;
  font-size: 12px;
  white-space: nowrap;
}

/* Hero */

.landing .hero {
  display: block;
  padding: 88px 0 72px;
}

.hero-inner {
  text-align: center;
}

.landing .eyebrow {
  margin-bottom: 24px;
}

.hero-title {
  max-width: 980px;
  text-transform: none;
  font-size: clamp(40px, 6vw, 80px);
  line-height: 1;
}

.hero-title .green {
  display: inline-block;
}

.landing .tagline {
  max-width: 680px;
  margin: 28px auto 36px;
}

.checks {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 32px;
  margin-top: 36px;
  list-style: none;
  color: var(--color-text-muted);
  font-size: 14px;
  font-weight: 600;
}

.checks li::before {
  content: "✓";
  margin-right: 8px;
  color: var(--color-brand);
  font-weight: 800;
}

/* Sections */

.section {
  padding: 72px 0;
}

.kicker {
  margin-bottom: 12px;
  color: var(--color-brand);
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.section h2 {
  max-width: 760px;
  font-family: var(--font-heading);
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 40px;
  list-style: none;
}

.card {
  padding: 28px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--color-surface) 40%, var(--color-bg));
}

.card h3 {
  margin-top: 14px;
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
}

.card p:not(.step-label):not(.feature-meta) {
  margin-top: 10px;
  color: var(--color-text-muted);
  font-size: 15px;
  line-height: 1.6;
}

.step-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-brand);
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.step-num {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--color-brand);
  border-radius: 50%;
  letter-spacing: 0;
}

.feature-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.feature-num {
  color: var(--color-text-muted);
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.tag {
  padding: 3px 10px;
  border: 1px solid color-mix(in srgb, var(--color-brand) 55%, transparent);
  border-radius: 999px;
  color: var(--color-brand);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tag--later {
  border-color: var(--color-border);
  color: var(--color-text-muted);
}

.feature--later {
  background: transparent;
  border-style: dashed;
}

/* FAQ */

.faq {
  margin-top: 36px;
  border-top: 1px solid var(--color-border);
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 4px;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  flex: none;
  color: var(--color-brand);
  font-size: 24px;
  line-height: 1;
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item p {
  padding: 0 4px 22px;
  color: var(--color-text-muted);
  font-size: 15px;
  line-height: 1.65;
}

/* Closing call */

.cta {
  padding: 56px 28px;
  border: 1px solid color-mix(in srgb, var(--color-brand) 55%, var(--color-border));
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--color-brand) 10%, transparent), transparent 70%),
    color-mix(in srgb, var(--color-surface) 40%, var(--color-bg));
  text-align: center;
}

.cta h2 {
  margin: 0 auto;
}

.cta p {
  margin: 14px 0 28px;
  color: var(--color-text-muted);
  font-size: 17px;
}

/* Footer */

.foot {
  position: relative;
  z-index: 5;
  margin-top: 24px;
  padding: 40px 0 32px;
  border-top: 1px solid var(--line);
}

.disclaimer {
  max-width: 760px;
  color: var(--color-text-muted);
  font-size: 13px;
  line-height: 1.6;
}

.foot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 32px;
  margin-top: 28px;
}

.foot-tag,
.foot-links {
  color: var(--color-text-muted);
  font-size: 13px;
}

.foot-links a {
  margin-right: 16px;
  color: var(--color-text-muted);
}

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

@media (max-width: 960px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .top-nav {
    gap: 18px;
    margin-left: 8px;
  }
}

@media (max-width: 700px) {
  .wrap {
    padding: 0 20px;
  }

  .top-inner {
    min-height: 64px;
  }

  .top-nav,
  .top .status {
    display: none;
  }

  .landing .hero {
    padding: 56px 0 48px;
  }

  .hero-title {
    font-size: clamp(34px, 10.5vw, 52px);
  }

  .section {
    padding: 48px 0;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 28px;
  }

  .card {
    padding: 22px;
  }

  .checks {
    flex-direction: column;
    align-items: center;
  }

  .foot-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

#notify {
  scroll-margin-top: 110px;
}

#how-it-works,
#features,
#faq {
  scroll-margin-top: 72px;
}
