/* Synthora Labs Inc. - monochrome editorial system.
   Tokens mirror the Speech Away design system (see speech-away-design-architecture.md):
   square corners everywhere, pills only on buttons, confidence via type + space. */

:root {
  --c-ink: 0 0 0;
  --c-ink-soft: 43 43 43;
  --c-paper: 255 255 255;
  --c-paper-alt: 247 247 247;
  --c-surface-dark: 28 28 28;
  --c-surface-darker: 15 15 15;
  --c-neutral-100: 229 229 229;
  --c-neutral-200: 209 209 209;
  --c-neutral-300: 128 128 128;
  --c-neutral-400: 118 118 118;
  --c-neutral-500: 84 84 84;
  --shadow-card: -2px 2px 5px rgba(0, 0, 0, 0.1);
  --ease-smooth: cubic-bezier(0.2, 0, 0, 1);
  --ease-out: cubic-bezier(0.33, 1, 0.68, 1);
}

/* Dark mode: perceptual inversion, not numeric negation (per the design system).
   Three states, mirroring the Speech Away app:
   - explicit dark  -> html.dark   (set by the toggle, persisted)
   - explicit light -> html.light  (blocks the media query below)
   - no choice      -> follow the OS via prefers-color-scheme (works without JS) */
.dark {
  --c-ink: 244 244 244;
  --c-ink-soft: 214 214 214;
  --c-paper: 15 15 15;
  --c-paper-alt: 28 28 28;
  --c-neutral-100: 42 42 42;
  --c-neutral-200: 64 64 64;
  --c-neutral-300: 140 140 140;
  --c-neutral-400: 150 150 150;
  --c-neutral-500: 178 178 178;
  --shadow-card: 0 0 0 1px rgb(var(--c-neutral-100));
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not(.light) {
    --c-ink: 244 244 244;
    --c-ink-soft: 214 214 214;
    --c-paper: 15 15 15;
    --c-paper-alt: 28 28 28;
    --c-neutral-100: 42 42 42;
    --c-neutral-200: 64 64 64;
    --c-neutral-300: 140 140 140;
    --c-neutral-400: 150 150 150;
    --c-neutral-500: 178 178 178;
    --shadow-card: 0 0 0 1px rgb(var(--c-neutral-100));
    color-scheme: dark;
  }
}

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

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: rgb(var(--c-ink));
  background: rgb(var(--c-paper));
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: 'Crimson Text', Georgia, serif;
  font-weight: 600;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

a {
  color: rgb(var(--c-ink));
}

::selection {
  background: rgb(var(--c-ink));
  color: rgb(var(--c-paper));
}

:focus-visible {
  outline: 2px solid rgb(var(--c-ink));
  outline-offset: 2px;
}

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Header ---------------------------------------------------------- */

header {
  border-bottom: 1px solid rgb(var(--c-neutral-100));
}

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

.brand {
  font-family: 'Crimson Text', Georgia, serif;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.2px;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  text-decoration: none;
  color: rgb(var(--c-neutral-400));
  transition: color 200ms var(--ease-smooth);
}

.nav-links a:hover {
  color: rgb(var(--c-ink));
}

/* ---- Theme toggle ----------------------------------------------------- */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  color: rgb(var(--c-neutral-400));
  cursor: pointer;
  transition: color 200ms var(--ease-smooth);
}

.theme-toggle:hover {
  color: rgb(var(--c-ink));
}

.theme-toggle svg {
  display: block;
}

/* Show the icon for the theme you'd switch TO: moon in light, sun in dark. */
.icon-sun { display: none; }
.dark .icon-sun { display: block; }
.dark .icon-moon { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not(.light):not(.dark) .icon-sun { display: block; }
  :root:not(.light):not(.dark) .icon-moon { display: none; }
}

/* ---- Hero ------------------------------------------------------------ */

.hero {
  padding: 120px 0 96px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: rgb(var(--c-neutral-400));
}

.hero h1 {
  margin-top: 16px;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.5px;
  max-width: 720px;
}

.hero p {
  margin-top: 24px;
  font-size: 20px;
  line-height: 1.4;
  color: rgb(var(--c-neutral-500));
  max-width: 640px;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 40px;
  padding: 0 28px;
  border: none;
  border-radius: 9999px;
  background: rgb(var(--c-ink));
  color: rgb(var(--c-paper));
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 200ms var(--ease-smooth), scale 100ms var(--ease-smooth);
}

.cta:hover {
  background: rgb(var(--c-ink-soft));
}

.cta:active {
  scale: 0.96;
}

/* ---- Sections -------------------------------------------------------- */

section {
  padding: 96px 0;
  border-top: 1px solid rgb(var(--c-neutral-100));
  scroll-margin-top: 24px;
}

section h2 {
  margin-top: 12px;
  font-size: 34px;
  line-height: 1.12;
}

.section-body {
  margin-top: 24px;
  max-width: 720px;
}

.section-body p + p {
  margin-top: 16px;
}

.section-body p {
  color: rgb(var(--c-neutral-500));
}

/* ---- Products -------------------------------------------------------- */

.product-card {
  margin-top: 40px;
  max-width: 720px;
  border: 1px solid rgb(var(--c-neutral-100));
  background: rgb(var(--c-paper));
  box-shadow: var(--shadow-card);
  padding: 40px;
}

.product-card h3 {
  font-size: 27px;
  line-height: 1.08;
  letter-spacing: -0.2px;
}

.product-card .tag {
  display: inline-flex;
  align-items: center;
  margin-bottom: 16px;
  padding: 4px 12px;
  border: 1px solid rgb(var(--c-neutral-200));
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: rgb(var(--c-neutral-400));
}

.product-card p {
  margin-top: 16px;
  color: rgb(var(--c-neutral-500));
}

.product-card .product-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin-top: 24px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1px;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 200ms var(--ease-smooth);
}

.product-card .product-link:hover {
  color: rgb(var(--c-neutral-500));
}

/* ---- Contact --------------------------------------------------------- */

.contact-line {
  margin-top: 24px;
  font-size: 20px;
}

.contact-line a {
  text-decoration: underline;
  text-underline-offset: 3px;
  word-break: break-all;
}

.contact-note {
  margin-top: 12px;
  font-size: 14px;
  color: rgb(var(--c-neutral-400));
}

/* ---- Footer ---------------------------------------------------------- */

footer {
  border-top: 1px solid rgb(var(--c-neutral-100));
  padding: 48px 0 64px;
}

footer .wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

footer p {
  font-size: 12px;
  letter-spacing: 0.5px;
  color: rgb(var(--c-neutral-400));
}

footer .legal-name {
  font-weight: 600;
  color: rgb(var(--c-neutral-500));
}

/* ---- Motion ---------------------------------------------------------- */

.enter {
  animation: enter 0.55s var(--ease-out) both;
}

.enter-delay-1 { animation-delay: 80ms; }
.enter-delay-2 { animation-delay: 160ms; }
.enter-delay-3 { animation-delay: 240ms; }

@keyframes enter {
  from {
    opacity: 0;
    translate: 0 10px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

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

/* ---- Small screens --------------------------------------------------- */

@media (max-width: 480px) {
  .hero {
    padding: 72px 0 64px;
  }

  section {
    padding: 64px 0;
  }

  .product-card {
    padding: 24px;
  }

  .nav-links {
    gap: 16px;
  }
}
