/* =============================================================================
   Watchman splash — single-page stylesheet.
   Design tokens mirror watchman-demo/src/index.css so the marketing surface
   reads as the same product.
   ========================================================================== */

:root {
  /* Surfaces */
  --wm-bg:      #000;
  --wm-surface: #0A0A0A;
  --wm-card:    #111;
  --wm-border:  #1E1E1E;

  /* Text */
  --wm-text: #F0F0F0;
  --wm-ts:   #A0A0A0;
  --wm-tm:   #5A5A5A;

  /* Brand */
  --wm-accent: #FF8400;
  --wm-ag:     rgba(255, 132, 0, 0.12);
  --wm-ab:     rgba(255, 132, 0, 0.30);

  /* Semantic */
  --wm-ok:   #00D2A0;
  --wm-crit: #FF4D4D;

  /* Layout */
  --max-width: 1320px;
  --section-pad-y: clamp(56px, 8vw, 88px);
  --side-pad: clamp(16px, 3vw, 32px);

  /* Type */
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--wm-bg);
  color: var(--wm-text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ── Shared primitives ──────────────────────────────────────────────────── */

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--wm-accent);
  margin-bottom: 16px;
}

.accent { color: var(--wm-accent); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease,
              color 120ms ease, transform 120ms ease;
  font-family: inherit;
}

.btn-primary {
  background: var(--wm-accent);
  color: #000;
}
.btn-primary:hover { background: #FF9624; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--wm-text);
  border-color: var(--wm-border);
}
.btn-ghost:hover { border-color: var(--wm-ab); color: var(--wm-accent); }

.link {
  color: var(--wm-accent);
  text-decoration: underline;
  text-decoration-color: var(--wm-ab);
  text-underline-offset: 3px;
}
.link:hover { text-decoration-color: var(--wm-accent); }

/* ── Header / Hero ──────────────────────────────────────────────────────── */

.hero {
  position: relative;
  overflow: hidden;
  padding: 24px var(--side-pad) clamp(56px, 9vw, 96px);
  background:
    linear-gradient(180deg,
                    rgba(0, 0, 0, 0.55) 0%,
                    rgba(0, 0, 0, 0.62) 55%,
                    rgba(0, 0, 0, 0.95) 100%),
    radial-gradient(ellipse 80% 60% at 50% 0%,
                    rgba(255, 132, 0, 0.18) 0%,
                    rgba(255, 132, 0, 0.00) 60%),
    url("images/hero-camera.jpg") center / cover no-repeat,
    var(--wm-bg);
  border-bottom: 1px solid var(--wm-border);
}

.nav {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 32px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--wm-text);
}
.wordmark-glyph {
  width: 26px;
  height: 26px;
  color: var(--wm-accent);
}
.wordmark-text {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.nav-cta {
  font-size: 14px;
  font-weight: 600;
  color: var(--wm-ts);
  border: 1px solid var(--wm-border);
  padding: 8px 14px;
  border-radius: 6px;
  transition: color 120ms ease, border-color 120ms ease;
}
.nav-cta:hover { color: var(--wm-accent); border-color: var(--wm-ab); }

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin: clamp(28px, 5vw, 56px) auto 0;
  text-align: left;
}

.hero-headline {
  font-size: clamp(34px, 5.5vw, 60px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  color: var(--wm-text);
}

.hero-sub {
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.55;
  color: var(--wm-ts);
  max-width: 580px;
  margin: 0 0 28px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Subtle grid backdrop — echoes the demo's UI surface feel without being loud */
.hero-grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 50% at 50% 30%,
                              #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 50% at 50% 30%,
                                      #000 30%, transparent 75%);
}

/* ── Generic section ────────────────────────────────────────────────────── */

.section {
  padding: var(--section-pad-y) var(--side-pad);
  border-bottom: 1px solid var(--wm-border);
}
.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-what    { background: var(--wm-bg); }
.section-who     { background: var(--wm-surface); }
.section-how     { background: var(--wm-bg); }
.section-search  { background: var(--wm-surface); }
.section-contact { background: var(--wm-bg); }

.section-headline {
  font-size: clamp(22px, 2.8vw, 32px);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 14px;
  color: var(--wm-text);
  max-width: 700px;
}

.section-body {
  font-size: clamp(15px, 1.2vw, 16px);
  line-height: 1.6;
  color: var(--wm-ts);
  max-width: 640px;
  margin: 0;
}

/* ── How it works steps ─────────────────────────────────────────────────── */

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

.step {
  background: var(--wm-card);
  border: 1px solid var(--wm-border);
  border-radius: 12px;
  padding: 22px 20px;
  position: relative;
  transition: border-color 160ms ease, transform 160ms ease;
}
.step:hover {
  border-color: var(--wm-ab);
  transform: translateY(-2px);
}

.step-icon {
  width: 36px;
  height: 36px;
  color: var(--wm-accent);
  margin-bottom: 14px;
}
.step-icon svg { width: 100%; height: 100%; display: block; }

.step-num {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--wm-tm);
  margin-bottom: 10px;
}

.step-title {
  font-size: 19px;
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--wm-text);
}

.step-body {
  font-size: 15px;
  line-height: 1.6;
  color: var(--wm-ts);
  margin: 0;
}

/* ── "What it is" two-column ──────────────────────────────────────────── */

.what-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}
.what-image {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--wm-border);
  aspect-ratio: 4 / 3;
  background: var(--wm-card);
}
.what-image img,
.what-image svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.what-image svg {
  /* SVG already fits the 4:3 container via viewBox; keep font stack consistent
     with the rest of the page since some <text> elements rely on it. */
  font-family: var(--font-sans);
}

/* ── "Who it's for" image grid ─────────────────────────────────────────── */

.who-grid {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.who-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--wm-border);
  aspect-ratio: 4 / 3;
  background: var(--wm-card);
}
.who-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 320ms ease;
}
.who-card:hover img { transform: scale(1.04); }
.who-label {
  position: absolute;
  bottom: 12px;
  left: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--wm-text);
  background: rgba(0, 0, 0, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--wm-border);
}

/* ── Forensic search section ────────────────────────────────────────────── */

.search-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}

.search-copy { max-width: 540px; }

.terminal {
  background: var(--wm-card);
  border: 1px solid var(--wm-border);
  border-radius: 12px;
  overflow: hidden;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
               "Liberation Mono", monospace;
  box-shadow: 0 24px 60px -32px rgba(255, 132, 0, 0.20),
              0 8px 24px -16px rgba(0, 0, 0, 0.6);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--wm-bg);
  border-bottom: 1px solid var(--wm-border);
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--wm-tm);
  display: inline-block;
  flex: 0 0 auto;
}
.terminal-dot:nth-child(1) { background: #FF5F57; }
.terminal-dot:nth-child(2) { background: #FEBC2E; }
.terminal-dot:nth-child(3) { background: #28C840; }

.terminal-title {
  margin-left: 8px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--wm-tm);
}

.terminal-body {
  padding: 18px 18px 22px;
}

.terminal-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 14px;
  line-height: 1.5;
}

.terminal-caret {
  color: var(--wm-accent);
  font-weight: 700;
}

.terminal-query {
  color: var(--wm-text);
  border-right: 1.5px solid var(--wm-accent);
  padding-right: 2px;
  animation: terminal-caret-blink 1.05s steps(1, end) infinite;
}

@keyframes terminal-caret-blink {
  0%, 50%   { border-right-color: var(--wm-accent); }
  51%, 100% { border-right-color: transparent; }
}

.terminal-meta {
  margin-top: 10px;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--wm-ts);
}

.terminal-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.terminal-tile {
  aspect-ratio: 16 / 10;
  background:
    linear-gradient(135deg,
                    rgba(255, 132, 0, 0.10) 0%,
                    rgba(255, 132, 0, 0.02) 100%),
    var(--wm-bg);
  border: 1px solid var(--wm-border);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}
.terminal-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 40%,
                    rgba(255, 132, 0, 0.18) 0%, transparent 40%),
    radial-gradient(circle at 70% 65%,
                    rgba(255, 255, 255, 0.06) 0%, transparent 35%);
}

/* ── Contact ────────────────────────────────────────────────────────────── */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.contact-form {
  background: var(--wm-card);
  border: 1px solid var(--wm-border);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--wm-ts);
  text-transform: uppercase;
}
.field .req { color: var(--wm-accent); }

.field input,
.field textarea {
  background: var(--wm-bg);
  border: 1px solid var(--wm-border);
  color: var(--wm-text);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
  padding: 11px 14px;
  border-radius: 8px;
  transition: border-color 120ms ease, background 120ms ease;
  resize: vertical;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--wm-accent);
  background: #000;
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--wm-crit);
}

.turnstile-mount {
  min-height: 0;
}
.turnstile-mount:not(:empty) {
  min-height: 72px;
}

.form-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.form-status {
  margin: 0;
  font-size: 14px;
  color: var(--wm-ts);
  min-height: 1.4em;
}
.form-status.is-ok    { color: var(--wm-ok); }
.form-status.is-error { color: var(--wm-crit); }

/* ── Footer ─────────────────────────────────────────────────────────────── */

.footer {
  padding: 36px var(--side-pad);
  background: var(--wm-bg);
  border-top: 1px solid var(--wm-border);
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-mark { color: var(--wm-tm); }
.footer-meta { font-size: 13px; color: var(--wm-tm); }

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 820px) {
  .steps { grid-template-columns: 1fr; }
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .what-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .who-grid { grid-template-columns: 1fr; }
  .search-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
  .nav-cta { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .terminal-query {
    animation: none;
    border-right-color: transparent;
  }
}
