/* Fonts are self-hosted (latin subset) so the site makes no third-party requests. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/inter-latin.woff2") format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-latin.woff2") format("woff2");
}

:root {
  --bg: #030e19;          /* brand night, matches the hex pattern */
  --bg-alt: #061624;
  --surface: #0c1e2c;
  --border: #1d3445;
  --text: #e8eef4;
  --muted: #a9b4c1;       /* body copy on dark: ~8.9:1 on --bg */
  --subtle: #8b98a8;      /* small labels: ~6.5:1 on --bg */
  --brand: #00abbf;       /* brand teal (see brand/README.md) */
  --brand-navy: #132632;  /* brand navy */
  --accent: #00abbf;      /* ~6.9:1 on --bg */
  --accent-rgb: 0, 171, 191;
  --accent-ink: #021318;
  --warn: #f2b84b;
  --warn-ink: #1f1603;
  --danger: #ff9b91;
  --ok: #67d8ad;
  --radius: 14px;
  --wrap: 1120px;
  --section-y: 64px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
}

@media (max-width: 640px) {
  :root { --section-y: 48px; }
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: #3dc6d6; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 720px) {
  .wrap { padding: 0 32px; }
}

.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.hidden { display: none; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 20;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

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

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(3, 14, 25, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.brand:hover { color: var(--text); }

/* Header logo = inlined brand artwork (traced SVGs), never live text */
.brand-logo { width: 26px; height: 32px; flex: none; }
.brand-wordmark { width: 171px; height: 13px; flex: none; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 15px;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
}

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

@media (max-width: 720px) {
  .nav {
    flex-wrap: wrap;
    gap: 6px 16px;
    min-height: 0;
    padding-top: 10px;
    padding-bottom: 0;
  }
  .site-header nav { width: 100%; }
  .nav-links { gap: 22px; font-size: 15px; }
  .nav-links a { display: inline-block; padding: 10px 0; }
  .brand-logo { width: 24px; height: 30px; }
  .brand-wordmark { width: 158px; height: 12px; }
}

/* Preview-only banner (never rendered in production builds) */
.preview-banner {
  padding: 8px 16px;
  background: var(--warn);
  color: var(--warn-ink);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}

.preview-banner .mono {
  margin-right: 8px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.12);
  font-size: 12px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 10px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  font: 600 15px/1.2 var(--font);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  color: var(--accent-ink);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(var(--accent-rgb), 0.3);
}

.btn:disabled { opacity: 0.6; cursor: progress; transform: none; box-shadow: none; }

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

.btn-ghost:hover { color: var(--text); border-color: var(--accent); box-shadow: none; }

.btn-large { padding: 15px 26px; font-size: 17px; }

/* Hero */
.hero {
  position: relative;
  padding: 88px 0 72px;
  overflow: hidden;
  /* Brand hex pattern (brand/backgrounds/), anchored right so the outlines frame the mark */
  background:
    radial-gradient(560px 380px at 80% 45%, rgba(var(--accent-rgb), 0.12), transparent 70%),
    url("/images/brand-pattern.webp") right center / cover no-repeat;
  background-color: var(--bg);
  border-bottom: 1px solid var(--border);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--bg) 0%, rgba(3, 14, 25, 0.7) 45%, rgba(3, 14, 25, 0) 75%);
  pointer-events: none;
}

@media (max-width: 960px) {
  /* On narrow screens the outlines would sit behind the text, so keep them faint */
  .hero::after { background: rgba(3, 14, 25, 0.78); }
}

.hero .wrap { position: relative; z-index: 1; }

.hero-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

.hero-mark {
  display: none;
  width: 100%;
  max-width: 280px;
  height: auto;
  justify-self: end;
  filter: drop-shadow(0 0 48px rgba(var(--accent-rgb), 0.28));
}

.hero-shot {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(var(--accent-rgb), 0.08);
}

.hero-shot-img { width: 100%; height: auto; }

@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1fr 280px; }
  .hero-grid:has(.hero-shot) { grid-template-columns: 1fr 1fr; }
  .hero-mark { display: block; }
  .hero h1 { font-size: clamp(44px, 4.6vw, 58px); }
}

@media (max-width: 640px) {
  .hero { padding: 56px 0 48px; }
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--accent);
}

h1, h2, h3 { line-height: 1.15; margin: 0 0 14px; letter-spacing: -0.02em; text-wrap: balance; }

h1 { font-size: clamp(36px, 6vw, 64px); font-weight: 700; }
.h1-line { display: block; }
h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 700; }
h3 { font-size: 19px; font-weight: 600; }

p { margin: 0 0 14px; }

.lede {
  max-width: 620px;
  font-size: 18px;
  color: var(--muted);
  margin: 0 0 28px;
}

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

/* Sections */
.section { padding: var(--section-y) 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
.section-alt + .section-alt { border-top: 0; }

.grid-3, .grid-2 {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

@media (min-width: 760px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
}

.card, .panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.card p, .panel p { color: var(--muted); margin: 0; }
.panel p + * { margin-top: 14px; }

.card-icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  border-radius: 10px;
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent);
  font-size: 14px;
}

/* Product */
.product-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 32px;
}

.product-name { font-size: clamp(36px, 5vw, 52px); margin-bottom: 4px; }

.product-tagline {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 500;
  color: var(--text);
}

.product-badge {
  display: inline-block;
  margin: 0;
  padding: 4px 10px;
  border: 1px solid rgba(var(--accent-rgb), 0.45);
  border-radius: 999px;
  color: var(--accent);
  font-size: 12px;
}

.product-intro {
  max-width: 760px;
  margin: 24px 0 0;
  font-size: 18px;
  color: var(--muted);
}

.product-details {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

@media (min-width: 860px) {
  .product-details { grid-template-columns: 1.25fr 1fr; }
}

.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  color: var(--muted);
}

.check-list li {
  position: relative;
  padding-left: 24px;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.55em;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--accent);
  transform: rotate(45deg);
}

.panel-notice { border-color: rgba(var(--accent-rgb), 0.35); }

.legal-links {
  list-style: none;
  margin: 16px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 6px;
  font-size: 15px;
  color: var(--muted);
}

/* Screenshots */
.gallery-block { margin-top: 40px; }

.gallery-title { margin-bottom: 16px; }

.gallery {
  display: grid;
  gap: 20px;
}

@media (min-width: 860px) {
  .gallery { grid-template-columns: repeat(3, 1fr); }
}

.shot { margin: 0; }

.shot-frame {
  aspect-ratio: 16 / 10;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}

.shot-img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }

.shot figcaption {
  margin-top: 10px;
  font-size: 15px;
  color: var(--muted);
}

.shot figcaption strong { display: block; color: var(--text); font-weight: 600; }

.shot-placeholder .shot-frame {
  border: 2px dashed var(--warn);
  background: repeating-linear-gradient(135deg, rgba(242, 184, 75, 0.06) 0 12px, transparent 12px 24px), var(--surface);
}

.placeholder-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 16px 18px;
  font-size: 14px;
  color: var(--muted);
}

.placeholder-inner code { font-family: var(--mono); font-size: 12px; color: var(--warn); word-break: break-all; }

.placeholder-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--warn);
  color: var(--warn-ink);
  font-size: 12px;
  font-weight: 600;
  vertical-align: middle;
}

/* About */
.about, .contact {
  display: grid;
  gap: 24px;
}

@media (min-width: 860px) {
  .about, .contact { grid-template-columns: 1fr 1.3fr; gap: 56px; }
}

.about p, .contact p { color: var(--muted); }

.facts {
  display: grid;
  gap: 1px;
  margin: 24px 0 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--border);
}

.facts div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
}

.facts dt { color: var(--subtle); font-family: var(--mono); font-size: 13px; padding-top: 2px; }
.facts dd { margin: 0; }

/* Contact */
.contact-email { color: var(--text) !important; }
.contact-aside { font-size: 15px; padding-top: 14px; border-top: 1px solid var(--border); }

.form { display: grid; gap: 14px; }

.field { display: grid; gap: 6px; }

.field label { font-size: 14px; font-weight: 500; }

.form input, .form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 16px; /* prevents iOS zoom on focus */
}

.form textarea { resize: vertical; min-height: 120px; }

.form input:focus, .form textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: transparent;
}

.form .btn { justify-self: start; }

.form-note { margin: 0; font-size: 14px; color: var(--subtle) !important; }

.form-status {
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 15px;
}

.form-status[data-state="sending"] { background: var(--surface); color: var(--muted) !important; }
.form-status[data-state="success"] { background: rgba(103, 216, 173, 0.12); color: var(--ok) !important; border: 1px solid rgba(103, 216, 173, 0.4); }
.form-status[data-state="error"] { background: rgba(255, 155, 145, 0.1); color: var(--danger) !important; border: 1px solid rgba(255, 155, 145, 0.4); }

@media (max-width: 640px) {
  .form .btn { justify-self: stretch; }
  .hero-actions .btn { flex: 1 1 auto; }
}

/* Footer */
.site-footer {
  padding: 28px 0 32px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
}

.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-logo { width: 20px; height: auto; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

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

.footer-note { margin: 16px 0 0; font-size: 13px; color: var(--subtle); }

/* Simple pages (404, thanks) */
.simple {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 72px 0;
}

.simple p { color: var(--muted); }
.simple-logo { width: 52px; height: auto; margin: 0 auto 24px; }

/* Long-form pages (privacy) */
.prose { max-width: 760px; padding-top: 48px; padding-bottom: var(--section-y); }
.prose h1 { font-size: clamp(32px, 5vw, 44px); }
.prose h2 { font-size: 22px; margin-top: 36px; }
.prose p, .prose li { color: var(--muted); }
.prose ul { padding-left: 20px; margin: 0 0 14px; }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--text); font-weight: 600; }
.prose .updated { color: var(--subtle); font-family: var(--mono); font-size: 13px; }
.prose .summary {
  padding: 16px 18px;
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  border-radius: var(--radius);
  background: var(--surface);
}

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