/* KYCFlow false-color monitor design system */

:root {
  --bg: #0E1416;
  --bg-alt: #101820;
  --surface: #161F22;
  --surface-2: #1B2529;
  --line: #253135;
  --text: #EAF2F0;
  --muted: #7C8F91;
  --green: #8FD14F;
  --green-dim: #5C7A38;
  --pink: #FF6F91;
  --pink-dim: #B04C63;
  --blue: #4FA3D1;
  --radius: 3px;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  --display: 'Space Grotesk', var(--body);
  --body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --maxw: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(143,209,79,0.07), transparent 60%),
    radial-gradient(ellipse 900px 500px at 90% 10%, rgba(255,111,145,0.06), transparent 55%);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 2px solid var(--green); outline-offset: 2px;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow .dot { color: var(--green); }

h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.01em; margin: 0 0 0.4em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.05; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
p { color: var(--muted); margin: 0 0 1em; }
p.lead { color: var(--text); font-size: 1.1rem; }

code, .mono { font-family: var(--mono); }

/* ---- Nav ---- */
header.nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(14,20,22,0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 1.05rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand .sq { width: 9px; height: 9px; background: var(--green); box-shadow: 0 0 8px rgba(143,209,79,0.8); flex: none; }
.tabs { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.tabs a {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); padding: 4px 0; border-bottom: 2px solid transparent;
}
.tabs a:hover { color: var(--text); text-decoration: none; border-bottom-color: var(--line); }
.nav-cta {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text); border: 1px solid var(--line); padding: 8px 14px; border-radius: var(--radius);
  transition: border-color .15s, color .15s;
}
.nav-cta:hover { border-color: var(--green); color: var(--green); text-decoration: none; }
.nav-toggle { display: none; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 13.5px; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 13px 22px; border-radius: var(--radius); border: 1px solid transparent; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--pink); color: #1A0A0E; font-weight: 600; }
.btn-primary:hover { box-shadow: 0 0 0 1px var(--pink), 0 6px 24px rgba(255,111,145,0.35); transform: translateY(-1px); }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--green); color: var(--green); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.btn-block { width: 100%; justify-content: center; }

/* ---- Hero / viewfinder monitor ---- */
.hero { padding: 72px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero-copy .eyebrow { margin-bottom: 18px; }
.hero-actions { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.hero-note { margin-top: 16px; font-family: var(--mono); font-size: 12px; color: var(--muted); }

.monitor {
  position: relative;
  aspect-ratio: 16/10;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.monitor .bracket { position: absolute; width: 22px; height: 22px; border: 2px solid var(--green); opacity: 0.9; }
.monitor .bracket.tl { top: 10px; left: 10px; border-right: none; border-bottom: none; }
.monitor .bracket.tr { top: 10px; right: 10px; border-left: none; border-bottom: none; }
.monitor .bracket.bl { bottom: 10px; left: 10px; border-right: none; border-top: none; }
.monitor .bracket.br { bottom: 10px; right: 10px; border-left: none; border-top: none; }

.falsecolor { position: absolute; inset: 0; display: flex; flex-direction: column; }
.falsecolor .band { flex: 1; }
.falsecolor .band:nth-child(1) { background: #3E5B8A; flex: 0.8; }
.falsecolor .band:nth-child(2) { background: var(--blue); flex: 1.1; }
.falsecolor .band:nth-child(3) { background: var(--green-dim); flex: 1.3; }
.falsecolor .band:nth-child(4) { background: var(--green); flex: 1.6; }
.falsecolor .band:nth-child(5) { background: var(--pink-dim); flex: 1; }
.falsecolor .band:nth-child(6) { background: var(--pink); flex: 0.9; }
.falsecolor { opacity: 0.55; mix-blend-mode: screen; }

.monitor .sweep {
  position: absolute; top: 0; bottom: 0; width: 30%;
  background: linear-gradient(90deg, transparent, rgba(234,242,240,0.08), transparent);
  animation: sweep 6s linear infinite;
}
@keyframes sweep { from { left: -30%; } to { left: 100%; } }

.monitor .reticle { position: absolute; top: 50%; left: 50%; width: 34px; height: 34px; transform: translate(-50%,-50%); opacity: 0.5; }
.monitor .reticle::before, .monitor .reticle::after { content: ''; position: absolute; background: var(--text); }
.monitor .reticle::before { top: 50%; left: 0; right: 0; height: 1px; }
.monitor .reticle::after { left: 50%; top: 0; bottom: 0; width: 1px; }

.monitor .readout {
  position: absolute; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.05em; color: var(--text);
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}
.monitor .readout.top-left { top: 18px; left: 18px; }
.monitor .readout.top-right { top: 18px; right: 18px; text-align: right; }
.monitor .readout.bottom-left { bottom: 18px; left: 18px; }
.monitor .readout.bottom-right { bottom: 18px; right: 18px; text-align: right; }
.monitor .readout .muted { color: rgba(234,242,240,0.6); }
.monitor .readout .rec { color: var(--pink); }
.monitor .readout .rec .dotb { display: inline-block; width: 6px; height: 6px; background: var(--pink); border-radius: 50%; margin-right: 5px; animation: blink 1.4s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0.25; } }

/* ---- Sections ---- */
section { padding: 76px 0; border-top: 1px solid var(--line); }
section.hero { border-top: none; }
.section-head { max-width: 620px; margin-bottom: 44px; }

.chain { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.chain-step { background: var(--surface); padding: 30px 26px; position: relative; }
.chain-step .stage { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.chain-step:nth-child(1) .stage { color: var(--blue); }
.chain-step:nth-child(2) .stage { color: var(--green); }
.chain-step:nth-child(3) .stage { color: var(--pink); }
.chain-step h3 { font-size: 1.05rem; margin-bottom: 8px; }
.chain-step p { font-size: 0.92rem; margin: 0; }
.chain-arrow { display: none; }
@media (min-width: 720px) {
  .chain-step:not(:last-child)::after {
    content: '→'; position: absolute; right: -13px; top: 50%; transform: translateY(-50%);
    width: 24px; height: 24px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line);
    display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--muted); z-index: 2;
  }
}

/* ---- Pricing ---- */
.pricing-card {
  max-width: 460px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 40px 36px;
  position: relative;
}
.pricing-card::before {
  content: ''; position: absolute; inset: 0; border-radius: 8px; padding: 1px;
  background: linear-gradient(135deg, rgba(143,209,79,0.35), transparent 40%, rgba(255,111,145,0.35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}
.price-row { display: flex; align-items: baseline; gap: 10px; margin: 6px 0 4px; }
.price { font-family: var(--display); font-size: 3rem; font-weight: 700; }
.price-period { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.pricing-list { list-style: none; margin: 26px 0 30px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.pricing-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.94rem; color: var(--text); }
.pricing-list li::before { content: '▸'; color: var(--green); flex: none; }
.pricing-note { font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-top: 18px; text-align: center; }

/* ---- FAQ ---- */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  cursor: pointer; padding: 20px 4px; font-family: var(--display); font-weight: 600; font-size: 1.02rem;
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 20px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-family: var(--mono); color: var(--muted); font-size: 1.2rem; flex: none; }
.faq-item[open] summary::after { content: '–'; }
.faq-item p { padding: 0 4px 20px; margin: 0; max-width: 640px; }

/* ---- Legal blurb ---- */
.legal-links { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 6px; }
.legal-links a { font-family: var(--mono); font-size: 13px; }

/* ---- Footer ---- */
footer { border-top: 1px solid var(--line); padding: 36px 0; }
.footer-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-row .mono { color: var(--muted); font-size: 12px; }
.footer-links { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; }
.footer-links a { font-size: 12.5px; color: var(--muted); }
.footer-links a:hover { color: var(--text); }

/* ---- Generic content page (terms/privacy) ---- */
.page-head { padding: 56px 0 20px; }
.page-head .eyebrow { margin-bottom: 14px; }
.prose { padding-bottom: 80px; max-width: 720px; }
.prose h2 { margin-top: 2.2em; font-size: 1.25rem; }
.prose p, .prose li { color: var(--text); font-size: 0.98rem; }
.prose ul { padding-left: 1.2em; }
.callout {
  border: 1px solid var(--pink-dim); background: rgba(255,111,145,0.06); border-radius: 6px;
  padding: 16px 18px; margin: 24px 0; font-size: 0.94rem;
}
.callout strong { color: var(--pink); }

/* ---- Forms (checkout / dashboard) ---- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 34px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.field input {
  width: 100%; background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 13px 14px; color: var(--text); font-family: var(--body); font-size: 15px;
}
.field input:focus { outline: 2px solid var(--green); outline-offset: 0; border-color: var(--green); }
.field input.mono { font-family: var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.form-msg { font-size: 13px; margin-top: 14px; display: none; }
.form-msg.show { display: block; }
.form-msg.error { color: var(--pink); }
.form-msg.ok { color: var(--green); }

.readout-box {
  font-family: var(--mono); font-size: 1.15rem; letter-spacing: 0.05em; text-align: center;
  background: var(--bg-alt); border: 1px dashed var(--line); border-radius: 6px; padding: 18px; margin: 20px 0;
  word-break: break-all;
}

.status-badge { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; padding: 5px 10px; border-radius: 20px; display: inline-flex; align-items: center; gap: 6px; }
.status-badge.active { color: var(--green); background: rgba(143,209,79,0.12); }
.status-badge.disabled { color: var(--pink); background: rgba(255,111,145,0.12); }
.status-badge .dotb { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.kv { display: grid; grid-template-columns: 1fr auto; gap: 10px 20px; margin-top: 22px; }
.kv dt { font-family: var(--mono); font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.kv dd { margin: 0; font-size: 14px; text-align: right; }

.center-page { min-height: calc(100vh - 65px); display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.center-page .inner { width: 100%; max-width: 420px; }
.back-link { font-family: var(--mono); font-size: 12.5px; color: var(--muted); display: inline-block; margin-bottom: 22px; }

/* ---- Dashboard shell ---- */
.dash-shell { max-width: 760px; margin: 0 auto; padding: 40px 24px 80px; }
.dash-head { margin-bottom: 28px; }
.dash-head h1 { font-size: 1.6rem; margin: 6px 0 4px; }
.dash-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 32px; }
.dash-tab-btn {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); background: none; border: none; cursor: pointer;
  padding: 12px 4px; margin-right: 24px; border-bottom: 2px solid transparent; transition: color .15s, border-color .15s;
}
.dash-tab-btn:hover { color: var(--text); }
.dash-tab-btn.active { color: var(--green); border-bottom-color: var(--green); }
.dash-panel { display: none; }
.dash-panel.active { display: block; }

/* ---- Steps (setup guide) ---- */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; }
.steps .num {
  flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 11.5px; color: var(--green);
  margin-top: 1px;
}
.steps p { margin: 0; color: var(--text); font-size: 0.94rem; line-height: 1.55; }
.steps strong { color: var(--text); }

/* ---- Download box ---- */
.download-box { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 26px; margin-bottom: 32px; }
.download-box .filename { font-family: var(--mono); font-size: 13px; color: var(--muted); margin-top: 10px; }
.download-empty { border: 1px dashed var(--line); border-radius: 8px; padding: 22px; color: var(--muted); font-size: 0.92rem; text-align: center; }

/* ---- Status page ---- */
.status-shell { max-width: 640px; margin: 0 auto; padding: 56px 24px 80px; }
.status-overall {
  display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface); margin: 28px 0 8px;
}
.status-overall .big-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); flex: none; box-shadow: 0 0 10px rgba(143,209,79,0.7); }
.status-overall.degraded .big-dot { background: var(--pink); box-shadow: 0 0 10px rgba(255,111,145,0.7); }
.status-overall .label { font-family: var(--display); font-weight: 600; font-size: 1rem; }
.status-list { margin-top: 24px; border-top: 1px solid var(--line); }
.status-row { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid var(--line); }
.status-row .name { font-size: 0.95rem; }
.status-row .name .desc { display: block; font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.status-row .state { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase; }
.status-row .state .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.status-row .state.down .dot { background: var(--pink); }
.status-row .state.down { color: var(--pink); }
.status-row .state.checking .dot { background: var(--muted); }
.status-row .state.checking { color: var(--muted); }
.status-note { font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-top: 24px; text-align: center; }

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .tabs { display: none; }
  .chain { grid-template-columns: 1fr; }
  .chain-step:not(:last-child)::after { display: none; }
  .dash-tabs { overflow-x: auto; }
  .dash-tab-btn { margin-right: 18px; white-space: nowrap; }
}
