/* Senscoder marketing site — shared stylesheet.
   Color tokens mirror the app's InstrumentPalette (NightLabPalette / FieldPaperPalette)
   so the site reads as the same instrument, just on the web. */

:root {
  --bg: #070b12;
  --panel: #0d141e;
  --panel-2: #131d29;
  --line-strong: #53697d;
  --line-subtle: #1b2a38;
  --text: #e8f0f7;
  --text-secondary: #8a9bad;
  --accent: #58d8e8;
  --accent-ink: #070b12;
  --accent-blue: #6b9fff;
  --good: #6ce5a6;
  --warn: #f1be65;
  --danger: #ff7979;
  --max-width: 1100px;
  --prose-width: 68ch;
  --radius-control: 4px;
  --radius-instrument: 6px;
  --radius-panel: 8px;
  --radius-pill: 999px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f3f0e7;
    --panel: #fcfaf3;
    --panel-2: #e7e5dc;
    --line-strong: #687478;
    --line-subtle: #c5cbc7;
    --text: #182126;
    --text-secondary: #4f5d62;
    --accent: #006879;
    --accent-ink: #ffffff;
    --accent-blue: #2457a6;
    --good: #176b45;
    --warn: #855700;
    --danger: #a5262d;
  }
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark light;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

.eyebrow {
  font-family: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

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

/* Header */

.site-header {
  border-bottom: 1px solid var(--line-subtle);
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(6px);
  z-index: 10;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 7px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.92rem;
}

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

.lang-switch {
  display: flex;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  overflow: hidden;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 600;
}

.lang-switch a {
  padding: 5px 12px;
  color: var(--text-secondary);
  text-decoration: none;
}

.lang-switch a[aria-current="true"] {
  background: var(--accent);
  color: var(--accent-ink);
}

/* Hero */

.hero {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--line-subtle);
}

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 2.9rem);
  font-weight: 300;
  letter-spacing: -0.01em;
  margin: 14px 0 18px;
  max-width: 18ch;
}

.hero p.lede {
  max-width: var(--prose-width);
  font-size: 1.1rem;
  color: var(--text-secondary);
}

.hero-cta {
  margin-top: 28px;
}

.cta-pending {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: var(--radius-instrument);
  padding: 12px 20px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.cta-pending .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: cta-pulse 2s ease-in-out infinite;
}

@keyframes cta-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@media (prefers-reduced-motion: reduce) {
  .cta-pending .dot {
    animation: none;
  }
}

.cta-note {
  margin: 10px 0 0;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.badge {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-family: ui-monospace, Menlo, Consolas, monospace;
}

/* Section headings */

section {
  padding: 56px 0;
  border-bottom: 1px solid var(--line-subtle);
}

section:last-of-type {
  border-bottom: none;
}

.section-head {
  max-width: var(--prose-width);
  margin-bottom: 32px;
}

.section-head h2 {
  font-size: 1.7rem;
  font-weight: 600;
  margin: 10px 0 8px;
}

.section-head p {
  color: var(--text-secondary);
  margin: 0;
}

/* Feature grid */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.feature-card {
  background: var(--panel);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-panel);
  padding: 20px;
}

.feature-card .icon {
  width: 34px;
  height: 34px;
  color: var(--accent);
  margin-bottom: 14px;
}

.feature-card h3 {
  font-size: 1.05rem;
  margin: 0 0 8px;
}

.feature-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.94rem;
}

/* Screenshots */

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.screenshot-card {
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-panel);
  overflow: hidden;
}

.screenshot-card img {
  width: 100%;
  height: auto;
}

.screenshot-card figcaption {
  padding: 10px 14px;
  border-top: 1px solid var(--line-subtle);
  color: var(--text-secondary);
  font-size: 0.84rem;
}

/* Approach / principles list */

.principle-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.principle-list li {
  border-left: 2px solid var(--accent);
  padding-left: 16px;
}

.principle-list h3 {
  font-size: 1rem;
  margin: 0 0 6px;
}

.principle-list p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.94rem;
}

/* Disclosure note (measurement honesty callout) */

.note {
  background: var(--panel-2);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-instrument);
  padding: 18px 20px;
  color: var(--text-secondary);
  font-size: 0.92rem;
  max-width: var(--prose-width);
}

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

/* Footer */

.site-footer {
  border-top: 1px solid var(--line-subtle);
  padding: 32px 0 48px;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
}

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

.footer-meta {
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}

/* Legal / prose pages */

.legal-page main {
  padding: 48px 0 64px;
}

.legal-page h1 {
  font-weight: 600;
  font-size: 1.9rem;
  margin: 10px 0 28px;
}

.legal-page .prose {
  max-width: var(--prose-width);
}

.legal-page .prose h2 {
  font-size: 1.15rem;
  margin: 34px 0 10px;
}

.legal-page .prose h2:first-of-type {
  margin-top: 0;
}

.legal-page .prose p,
.legal-page .prose li {
  color: var(--text-secondary);
  font-size: 0.96rem;
}

.legal-page .prose address {
  font-style: normal;
  color: var(--text);
  line-height: 1.7;
}

.legal-page .prose ul {
  padding-left: 20px;
}

/* Chooser page */

.chooser {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.chooser-card {
  text-align: center;
  max-width: 360px;
}

.chooser-card img {
  margin: 0 auto 20px;
  width: 56px;
  height: 56px;
  border-radius: 12px;
}

.chooser-card h1 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0 0 24px;
}

.chooser-links {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.chooser-links a {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-instrument);
  padding: 12px 22px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
}

.chooser-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 640px) {
  .site-nav {
    gap: 12px 16px;
    font-size: 0.9rem;
  }
  .hero {
    padding: 44px 0 36px;
  }
  section {
    padding: 40px 0;
  }
}
