/* ════════════════════════════════════════════════════════════════════
   SOTTLER — sottler.com temporary landing page
   Direction: quiet industrial confidence. Dark canvas, one amber accent,
   the brand gradient exactly once (hero em), mono only where data lives.
   The atmosphere is a canvas-drawn PCB trace field with slow signal
   pulses that drifts with scroll (main.js). Spec: docs/superpowers/
   specs/2026-07-31-sottler-com-redesign-design.md
   ════════════════════════════════════════════════════════════════════ */

/* ── Fonts ─────────────────────────────────────────────────────────── */

@font-face {
  font-family: "Geist";
  src: url("fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* ── Tokens ────────────────────────────────────────────────────────── */

:root {
  /* Surfaces — nearly black, tinted blue, never grey */
  --ink:        #08080E;
  --ink-raise:  #0D0D16;
  --ink-hover:  #12121D;

  /* Text */
  --paper:      #F2F2F7;
  /* Both tiers are held above 4.5:1 on the canvas. --faint reads as dim but
     still clears WCAG AA at small sizes; don't lower it. */
  --mute:       rgba(242, 242, 247, 0.62);
  --faint:      rgba(242, 242, 247, 0.56);

  /* Hairlines */
  --line:       rgba(242, 242, 247, 0.11);
  --line-soft:  rgba(242, 242, 247, 0.06);

  /* THE accent. Amber = market signal (price ticks, fee marker, sample
     label). 9.7:1 on the canvas — safe at any size. Nothing else on the
     page carries saturated color except the hero gradient. */
  --amber:      #FF9F0A;

  /* The app's dark-theme brand blue — used only inside the hero sweep. */
  --brand-primary: #3B9BFF;

  /* Type */
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Rhythm — 8px base */
  --s1: 0.5rem;  --s2: 1rem;    --s3: 1.5rem;  --s4: 2rem;
  --s5: 3rem;    --s6: 4.5rem;  --s7: 7rem;

  --shell:      1160px;
  --gutter:     clamp(1.25rem, 5vw, 4rem);

  --ease:       cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Reset ─────────────────────────────────────────────────────────── */

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

/* The UA's [hidden] rule is a plain `display: none` and loses to any author
   rule that sets display — `.form { display: grid }` silently defeated it and
   left the form on screen after a successful submit. Enforce it globally. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--paper);
  font-family: "Geist", ui-sans-serif, system-ui, -apple-system,
               "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }

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

/* ── Utilities ─────────────────────────────────────────────────────── */

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

.skip {
  position: absolute; top: -100px; left: var(--gutter); z-index: 100;
  background: var(--paper); color: var(--ink);
  padding: 0.7rem 1.1rem; border-radius: 8px;
  font-size: 0.9rem; font-weight: 600;
  transition: top 0.2s var(--ease);
}
.skip:focus { top: 1rem; }

/* Honeypot — off-screen rather than display:none, which some bots skip */
.hp {
  position: absolute; left: -9999px;
  width: 1px; height: 1px; overflow: hidden;
}

/* ════════════════════════════════════════════════════════════════════
   ATMOSPHERE
   Two quiet layers: a fine blueprint dot grid strongest behind the hero,
   and a full-page canvas where main.js routes PCB-style traces and sends
   slow amber signal pulses along them. The canvas drifts at a fraction
   of scroll speed. No glows, no grain.
   ════════════════════════════════════════════════════════════════════ */

.grid-field {
  position: fixed; inset: 0; z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(242, 242, 247, 0.07) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,0.5) 45%, transparent 78%);
          mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,0.5) 45%, transparent 78%);
}

.circuit {
  position: fixed; inset: 0; z-index: -1;
  width: 100%; height: 100%;
  pointer-events: none;
}

/* ════════════════════════════════════════════════════════════════════
   NAV
   ════════════════════════════════════════════════════════════════════ */

.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s3);
  max-width: var(--shell); margin: 0 auto;
  padding: var(--s4) var(--gutter) 0;
}

.brand { display: inline-flex; align-items: center; gap: 0.7rem; }
.brand__mark { width: 30px; height: 30px; flex: none; }
.brand__word {
  font-size: 1.16rem; font-weight: 600;
  letter-spacing: 0.09em; text-transform: uppercase;
}

.nav__link {
  font-size: 0.92rem; color: var(--mute);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.nav__link:hover { color: var(--paper); border-color: var(--amber); }

/* ════════════════════════════════════════════════════════════════════
   HERO
   Headline and two CTAs over the trace field. Nothing else competes.
   ════════════════════════════════════════════════════════════════════ */

.hero {
  max-width: var(--shell); margin: 0 auto;
  padding: clamp(3.5rem, 10vh, 7rem) var(--gutter) var(--s7);
}

/* Capped at 4.4rem so "The open B2B marketplace for" clears the shell width
   on one line — the <br> sets the break, so the type must not outgrow it. */
.hero__h {
  font-size: clamp(2.15rem, 5.7vw, 4.4rem);
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.035em;
  margin-bottom: var(--s3);
}

/* ── Hero gradient sweep ───────────────────────────────────────────────
   Ported from the app's .gradient-hero / .gradient-sweep-active
   (apps/web/src/styles/globals.css) so the two surfaces read as one brand.
   Stops are verbatim; --brand-primary uses the app's dark-theme value.
   This is the ONLY place the brand gradient appears on this page.

   One stop is changed: the app's #6B45D0 violet measures 2.88:1 against this
   page's backdrop, just under the 3.0 WCAG minimum for display text. It is
   lifted 8% in lightness to #7957D4 (3.51:1), hue held at 256deg.

   The app gates the sweep behind a 1s React timer to avoid animating
   through first paint. A CSS animation-delay does the same job here with no
   JS: .hero__h em paints at 200% center from the start, then begins moving.

   background-size:200% + default repeat makes 200%→0% exactly one tile, so
   the loop is seamless with no visible snap. */

@keyframes gradient-sweep {
  0%   { background-position: 200% center; }
  100% { background-position: 0% center; }
}

.hero__h em {
  font-style: normal;
  background-image: linear-gradient(
    to right,
    var(--brand-primary) 0%,
    var(--brand-primary) 25%,
    #7957D4 35%,
    #B14A8C 43%,
    #F18A4F 50%,
    #B14A8C 57%,
    #7957D4 65%,
    var(--brand-primary) 75%,
    var(--brand-primary) 100%
  );
  background-size: 200%;
  background-position: 200% center;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  animation: gradient-sweep 4s linear 1s infinite;
}

.hero__sub {
  font-size: clamp(1.03rem, 1.55vw, 1.22rem);
  color: var(--mute);
  max-width: 54ch;
  margin-bottom: var(--s4);
  text-wrap: pretty;
}

.hero__cta { display: flex; flex-wrap: wrap; gap: var(--s2); }

/* ── Buttons ───────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.82rem 1.5rem;
  border: 1px solid transparent; border-radius: 10px;
  font-size: 0.95rem; font-weight: 500; letter-spacing: -0.005em;
  cursor: pointer; white-space: nowrap;
  transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease),
              background 0.2s var(--ease), border-color 0.2s var(--ease);
}

/* Solid paper. Confident, no gradient, unmistakably clickable. */
.btn--primary {
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.btn--primary:hover {
  transform: translateY(-2px);
  background: #FFFFFF;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.55);
}

.btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--paper);
}
.btn--ghost:hover {
  background: rgba(242, 242, 247, 0.05);
  border-color: rgba(242, 242, 247, 0.28);
  transform: translateY(-2px);
}

.btn--full { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }

/* ════════════════════════════════════════════════════════════════════
   SHARED SECTION TYPE
   ════════════════════════════════════════════════════════════════════ */

.h2 {
  font-size: clamp(1.6rem, 3.1vw, 2.3rem);
  font-weight: 600; letter-spacing: -0.028em; line-height: 1.12;
  margin-bottom: var(--s5);
}
.h2--tight { margin-bottom: var(--s2); }

/* ════════════════════════════════════════════════════════════════════
   HOW IT WORKS — two hairline columns, then the escrow rail
   ════════════════════════════════════════════════════════════════════ */

.how {
  max-width: var(--shell); margin: 0 auto;
  padding: 0 var(--gutter) var(--s7);
}

.how__grid {
  display: grid; gap: var(--s5);
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: var(--s6);
}

@media (max-width: 860px) {
  .how__grid { grid-template-columns: 1fr; gap: var(--s4); }
}

.lane {
  border-left: 1px solid var(--line);
  padding-left: var(--s3);
}

.lane__h {
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  font-weight: 600; letter-spacing: -0.022em; line-height: 1.25;
  margin-bottom: var(--s2);
}

.lane__list { display: grid; }

.lane__list li {
  font-size: 0.96rem; color: var(--mute);
  padding: 0.65rem 0;
  border-top: 1px solid var(--line-soft);
  max-width: 52ch;
}
.lane__list li:first-child { border-top: 0; }

/* ── Escrow rail ───────────────────────────────────────────────────────
   The pipeline drawn as a pipeline. Four nodes on one line, square
   markers, the fee marked where it is actually charged. */

.rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s3);
  position: relative;
  counter-reset: none;
}

/* The connecting line runs behind the markers. */
.rail::before {
  content: "";
  position: absolute;
  top: 4px; left: 0; right: 0;
  height: 1px;
  background: var(--line);
}

.rail__node { position: relative; padding-top: var(--s3); }

.rail__node::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 9px; height: 9px;
  background: var(--ink);
  border: 1px solid var(--mute);
}

/* The payout node — where the fee happens — gets the lamp. */
.rail__node:last-child::before {
  background: var(--amber);
  border-color: var(--amber);
}

.rail__step {
  font-size: 0.95rem; font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.3rem;
}

.rail__fee {
  font-family: var(--mono);
  font-size: 0.8em; font-weight: 500;
  color: var(--amber);
  margin-left: 0.3rem;
}

.rail__desc {
  font-size: 0.85rem; color: var(--faint);
  line-height: 1.5; max-width: 24ch;
}

@media (max-width: 760px) {
  .rail { grid-template-columns: 1fr; gap: var(--s3); }

  /* Vertical rail: the line runs down the marker column. */
  .rail::before {
    top: 0; bottom: 0; left: 4px; right: auto;
    width: 1px; height: auto;
  }

  .rail__node { padding-top: 0; padding-left: var(--s4); }
  .rail__node::before { top: 5px; }
}

/* ════════════════════════════════════════════════════════════════════
   PRINCIPLES — hairline rows, term + description, no numbering
   ════════════════════════════════════════════════════════════════════ */

.principles {
  max-width: var(--shell); margin: 0 auto;
  padding: 0 var(--gutter) var(--s7);
}

.prin { border-top: 1px solid var(--line); }

.prin__item {
  display: grid;
  grid-template-columns: minmax(0, 16rem) minmax(0, 1fr);
  gap: var(--s3);
  align-items: baseline;
  padding: var(--s3) 0;
  border-bottom: 1px solid var(--line);
}

.prin__h {
  font-size: clamp(1.06rem, 1.7vw, 1.24rem);
  font-weight: 600; letter-spacing: -0.022em;
}

.prin__p { font-size: 0.97rem; color: var(--mute); max-width: 60ch; }

@media (max-width: 800px) {
  .prin__item {
    grid-template-columns: 1fr;
    gap: 0.35rem;
    padding: var(--s3) 0;
  }
}

/* ════════════════════════════════════════════════════════════════════
   NOTIFY PANEL — a solid raised surface, no glass, no glow
   ════════════════════════════════════════════════════════════════════ */

.notify {
  max-width: var(--shell); margin: 0 auto;
  padding: 0 var(--gutter) var(--s7);
}

.panel {
  position: relative;
  max-width: 560px; margin: 0 auto;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  border: 1px solid var(--line); border-radius: 16px;
  background: var(--ink-raise);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9);
}

/* One amber seam along the top edge — the panel is switched on. */
.panel::before {
  content: ""; position: absolute; top: -1px; left: 24px; right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
  opacity: 0.6;
}

.panel__intro { text-align: center; margin-bottom: var(--s4); }
.panel__p { color: var(--mute); font-size: 0.98rem; max-width: 42ch; margin: 0 auto; }

.form { display: grid; gap: var(--s3); }

/* Role selector — segmented control, selected = solid paper */
.roles { border: 0; }

.roles__legend {
  font-size: 0.88rem; font-weight: 500;
  color: var(--mute);
  margin-bottom: 0.6rem;
}

.roles__opts {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 6px; padding: 5px;
  border: 1px solid var(--line); border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
}

.role { display: block; }

/* Input stays in the layout for hit-testing but is visually replaced */
.role input {
  position: absolute; opacity: 0;
  width: 1px; height: 1px; margin: -1px;
}

.role__box {
  display: block; padding: 0.6rem 0.4rem;
  border-radius: 8px; text-align: center;
  font-size: 0.9rem; color: var(--mute);
  cursor: pointer; user-select: none;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.role__box:hover { color: var(--paper); background: rgba(242, 242, 247, 0.05); }

.role input:checked + .role__box {
  background: var(--paper);
  color: var(--ink); font-weight: 600;
}

.role input:focus-visible + .role__box {
  outline: 2px solid var(--amber); outline-offset: 2px;
}

/* Fields */
.field { display: grid; gap: 0.45rem; }

.field__label {
  font-size: 0.88rem; font-weight: 500;
  color: var(--mute);
}
.field__opt { font-weight: 400; opacity: 0.72; }

.field__input {
  width: 100%; padding: 0.82rem 0.95rem;
  border: 1px solid var(--line); border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
  font-size: 0.98rem;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease),
              box-shadow 0.2s var(--ease);
}
.field__input::placeholder { color: rgba(242, 242, 247, 0.42); }
.field__input:hover { border-color: rgba(242, 242, 247, 0.2); }
.field__input:focus {
  outline: none;
  border-color: rgba(242, 242, 247, 0.45);
  background: rgba(0, 0, 0, 0.42);
  box-shadow: 0 0 0 3px rgba(242, 242, 247, 0.08);
}
.field__input[aria-invalid="true"] { border-color: #FF5A4E; }

.form__err {
  font-size: 0.88rem; color: #FF8A80;
  padding: 0.6rem 0.8rem;
  border: 1px solid rgba(255, 90, 78, 0.3); border-radius: 8px;
  background: rgba(255, 90, 78, 0.09);
}
.form__err a { text-decoration: underline; }

.form__fine {
  font-size: 0.8rem; color: var(--faint);
  line-height: 1.5; text-align: center;
}

.form__ok {
  padding: var(--s3);
  border: 1px solid rgba(52, 199, 89, 0.3); border-radius: 12px;
  background: rgba(52, 199, 89, 0.09);
  text-align: center; font-size: 0.98rem; color: var(--paper);
}

/* ════════════════════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════════════════════ */

.foot {
  max-width: var(--shell); margin: 0 auto;
  padding: var(--s5) var(--gutter) var(--s5);
  border-top: 1px solid var(--line);
}

.foot__row {
  display: flex; flex-wrap: wrap; justify-content: space-between;
  gap: var(--s3); margin-bottom: var(--s4);
}

.foot__name {
  font-size: 0.95rem; font-weight: 600;
  letter-spacing: 0.06em; margin-bottom: 0.25rem;
}

.foot__meta { font-size: 0.87rem; color: var(--faint); max-width: 46ch; }

.foot__links a {
  font-size: 0.92rem; color: var(--mute);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.foot__links a:hover { color: var(--paper); border-color: var(--amber); }

.foot__copy { font-size: 0.8rem; color: var(--faint); }

/* ── Reduced motion ────────────────────────────────────────────────── */

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

  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .btn:hover { transform: none; }

  /* Stop the sweep outright rather than letting the blanket 0.001ms duration
     race it to a frame. The parked position still shows the full
     blue → violet → magenta → amber run, so the gradient survives. */
  .hero__h em { animation: none; background-position: 0% center; }

  /* main.js also checks this query: the trace field renders once,
     statically — no pulses, no scroll drift. */
}

/* ── Forced colors (Windows high contrast) ─────────────────────────── */

@media (forced-colors: active) {
  .grid-field, .circuit { display: none; }
  .btn, .panel, .field__input { border: 1px solid CanvasText; }
  .hero__h em { color: CanvasText; -webkit-text-fill-color: CanvasText; }
  .rail__node::before { background: CanvasText; }
}
