/* ──────────────────────────────────────────────────────────────────────
   sentra.build - landing
   Design tokens lifted directly from sentra.app's CSS so the two sites
   read as the same brand. Light surface, brand-blue accent, scattered
   crosshatch pattern decorations, Geist Sans + Geist Mono.
   ────────────────────────────────────────────────────────────────────── */

:root {
  /* ─── Surfaces (matches sentra.app's --background, --surface-*) ─── */
  --background: #f8f8f8;
  --surface: #ffffff;
  --surface-hover: #f0f0f2;
  --surface-muted: #fafafa;
  --surface-dark: #1a1a1f; /* used for hero / inverse cards / dark sections */

  /* ─── Text (matches --foreground, --secondary, --muted, --tertiary) ─── */
  --foreground: #1a1a1f;
  --foreground-inverse: #f0f0f0;
  --secondary: #52525b;
  --muted: #71717a;
  --muted-foreground: #3f3f46;
  --tertiary: #a1a1aa;
  --muted-dark: #808085;

  /* ─── Strokes (matches --stroke-* and --border-*) ─── */
  --border: #e8e8ec;
  --stroke-subtle: #e8e8ec;
  --stroke-default: #e0e0e3;
  --stroke-strong: #d4d4d8;
  --border-dark: #333338;

  /* ─── Brand (matches --brand, --brand-hover) ─── */
  --brand: #268cff;
  --brand-hover: #1a6fcc;
  --brand-soft: #268cff14; /* 8% - for tinted backgrounds */
  --focus-ring: #268cff33; /* 20% - for focus outlines */

  /* ─── Pattern (matches --pattern: the crosshatch decoration color) ─── */
  --pattern: #b4b4ba;

  /* ─── Misc ─── */
  --success: #16a34a;
  --decoration: #e4e4e7;
  --shadow-card: 0 1px 3px #0000000a, 0 1px 2px -1px #0000000f;
  --shadow-card-hover: 0 4px 12px #0000000f, 0 2px 4px #0000000a;
  --shadow-button-primary: 0 0 0 1px var(--brand-hover), 0 1px 2px #0006;
  --shadow-button-neutral: 0 0 0 1px #00000014, 0 1px 2px #0000001f;

  /* ─── Typography (matches sentra.app's Geist family) ─── */
  --sans: var(--font-geist-sans, "Geist"), -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: var(--font-geist-mono, "Geist Mono"), ui-monospace, "SF Mono", "Menlo", monospace;

  /* Tailwind-style scale (Geist on Tailwind v4 spec) */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;
  --text-7xl: 4.5rem;

  --tracking-tighter: -0.05em;
  --tracking-tight: -0.025em;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
  --tracking-widest: 0.1em;

  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-relaxed: 1.625;

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;

  /* Layout */
  --content: 1120px;
  --content-narrow: 720px;
  --nav-h: 60px;

  /* Animation */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  background: var(--background);
}

html,
body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--sans);
  font-feature-settings: "ss01" on, "cv11" on;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  min-height: 100%;
}

::selection {
  background: var(--brand-soft);
  color: var(--foreground);
}

/* ─── Crosshatch pattern decorations (sentra.app signature) ───────── */

.bg-decorations {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  color: var(--pattern);
}

.text-pattern {
  position: absolute;
  background-image:
    repeating-linear-gradient(
      45deg,
      currentColor,
      currentColor 1px,
      transparent 1px,
      transparent 5px
    ),
    repeating-linear-gradient(
      -45deg,
      currentColor,
      currentColor 1px,
      transparent 1px,
      transparent 5px
    );
}

/* ─── Nav ──────────────────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 248, 248, 0.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--stroke-subtle);
}

.nav-inner {
  max-width: var(--content);
  margin: 0 auto;
  height: var(--nav-h);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: var(--tracking-tight);
  color: var(--foreground);
  text-decoration: none;
  transition: color 200ms var(--ease);
}

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

.nav-mark-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 4px;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-family: var(--sans);
  font-weight: 500;
  font-size: var(--text-sm);
  letter-spacing: -0.005em;
  color: var(--secondary);
  text-decoration: none;
  transition:
    color 180ms var(--ease),
    background-color 180ms var(--ease);
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--foreground);
  background: var(--surface-hover);
  outline: none;
}

.nav-link-external .nav-arrow {
  font-family: var(--mono);
  font-size: var(--text-xs);
  color: var(--brand);
  transition: transform 180ms var(--ease);
}

.nav-link-external:hover .nav-arrow {
  transform: translate(2px, -2px);
}

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

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  text-align: center;
  padding: clamp(96px, 16vh, 192px) 24px;
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100dvh - var(--nav-h));
  position: relative;
  z-index: 1;
}

.wordmark {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(72px, 13vw, 156px);
  line-height: 0.95;
  letter-spacing: var(--tracking-tighter);
  color: var(--foreground);

  opacity: 0;
  transform: translateY(8px);
  animation: fadeUp 1000ms var(--ease-out) 200ms forwards;
}

.byline {
  font-family: var(--mono);
  font-size: var(--text-xs);
  line-height: 1.4;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;

  opacity: 0;
  animation: fadeUp 800ms var(--ease-out) 700ms forwards;
}

.byline-sep {
  color: var(--tertiary);
}

.byline-arrow {
  color: var(--brand);
  font-family: var(--sans);
  font-size: var(--text-sm);
  letter-spacing: 0;
  margin-left: 2px;
  animation: arrowPulse 4s var(--ease) infinite;
}

/* ─── Section frame ────────────────────────────────────────────────── */

.section {
  padding: clamp(80px, 12vh, 144px) 24px;
  border-top: 1px solid var(--stroke-subtle);
  position: relative;
  z-index: 1;
}

.section-inner {
  max-width: var(--content);
  margin: 0 auto;
}

.section-inner--narrow {
  max-width: var(--content-narrow);
}

.eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 24px;
  font-weight: 500;
}

.section-heading {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(32px, 4.6vw, 56px);
  line-height: 1.05;
  letter-spacing: var(--tracking-tighter);
  color: var(--foreground);
  max-width: 22ch;
}

.section-lede {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.55;
  letter-spacing: -0.01em;
  color: var(--secondary);
  margin-top: 28px;
  max-width: 64ch;
}

.section-lede--quiet {
  font-size: var(--text-sm);
  color: var(--muted);
  max-width: 56ch;
}

.inline-link {
  color: var(--brand);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 180ms var(--ease);
}

.inline-link:hover,
.inline-link:focus-visible {
  border-bottom-color: var(--brand);
  outline: none;
}

/* ─── Product cards ────────────────────────────────────────────────── */

.product {
  margin-top: 64px;
  padding: 40px;
  background: var(--surface);
  border: 1px solid var(--stroke-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 28px;
  transition:
    border-color 200ms var(--ease),
    box-shadow 200ms var(--ease),
    transform 200ms var(--ease);
}

.product:hover {
  border-color: var(--stroke-strong);
  box-shadow: var(--shadow-card-hover);
}

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

.product-name {
  font-family: var(--sans);
  font-weight: 600;
  font-size: var(--text-3xl);
  line-height: 1.1;
  letter-spacing: var(--tracking-tight);
  color: var(--foreground);
}

.product-tagline {
  font-family: var(--mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 500;
}

.product-blurb {
  font-family: var(--sans);
  font-size: var(--text-base);
  line-height: 1.6;
  letter-spacing: -0.005em;
  color: var(--secondary);
  max-width: 64ch;
}

.product-blurb em,
.section-lede em,
.paper-abstract em,
.paper-authors em {
  color: var(--brand);
  font-style: normal;
  font-weight: 500;
}

.product-media {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}

@media (max-width: 720px) {
  .product-media {
    grid-template-columns: 1fr;
  }
}

.product-loom,
.screenshot-placeholder {
  position: relative;
  background: var(--surface-muted);
  border: 1px dashed var(--stroke-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.product-loom {
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-loom::before {
  content: "▶";
  position: absolute;
  font-size: 36px;
  color: var(--brand);
  opacity: 0.4;
  z-index: 1;
}

.placeholder-label {
  position: relative;
  z-index: 2;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--stroke-subtle);
  margin-top: 64px;
}

.product-screenshots {
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  gap: 12px;
}

.screenshot-placeholder {
  aspect-ratio: 16 / 10;
  background-image:
    repeating-linear-gradient(
      45deg,
      var(--decoration),
      var(--decoration) 1px,
      transparent 1px,
      transparent 8px
    );
}

.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* ─── Buttons / action links ──────────────────────────────────────── */

.action-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border: 1px solid var(--stroke-default);
  border-radius: var(--radius-md);
  background: var(--surface);
  font-family: var(--sans);
  font-weight: 500;
  font-size: var(--text-sm);
  letter-spacing: -0.005em;
  color: var(--foreground);
  text-decoration: none;
  box-shadow: var(--shadow-button-neutral);
  transition:
    border-color 180ms var(--ease),
    color 180ms var(--ease),
    background-color 180ms var(--ease),
    box-shadow 180ms var(--ease);
}

.action-link:hover,
.action-link:focus-visible {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--surface);
  outline: none;
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.action-primary {
  background: var(--brand);
  color: #ffffff;
  border-color: var(--brand-hover);
  box-shadow: var(--shadow-button-primary);
}

.action-primary:hover,
.action-primary:focus-visible {
  background: var(--brand-hover);
  color: #ffffff;
  border-color: var(--brand-hover);
  box-shadow: 0 0 0 3px var(--focus-ring), var(--shadow-button-primary);
}

.action-arrow {
  font-family: var(--mono);
  font-size: var(--text-xs);
  transition: transform 180ms var(--ease);
}

.action-link:hover .action-arrow,
.action-link:focus-visible .action-arrow {
  transform: translate(2px, -2px);
}

.action-primary:hover .action-arrow {
  transform: translate(2px, 0);
}

/* ─── Waitlist forms ───────────────────────────────────────────────── */

.waitlist-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--stroke-subtle);
}

.waitlist-form--global {
  margin-top: 32px;
  border-top: none;
  padding-top: 0;
}

.waitlist-label {
  font-family: var(--mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

.waitlist-row {
  display: flex;
  gap: 8px;
}

@media (max-width: 540px) {
  .waitlist-row {
    flex-direction: column;
  }
}

.waitlist-input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--stroke-default);
  border-radius: var(--radius-md);
  font-family: var(--sans);
  font-size: var(--text-sm);
  letter-spacing: -0.005em;
  color: var(--foreground);
  transition:
    border-color 180ms var(--ease),
    box-shadow 180ms var(--ease);
}

.waitlist-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.waitlist-input::placeholder {
  color: var(--tertiary);
}

.waitlist-submit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 18px;
  background: var(--surface);
  border: 1px solid var(--stroke-default);
  border-radius: var(--radius-md);
  font-family: var(--sans);
  font-weight: 500;
  font-size: var(--text-sm);
  letter-spacing: -0.005em;
  color: var(--foreground);
  cursor: pointer;
  box-shadow: var(--shadow-button-neutral);
  transition:
    background-color 180ms var(--ease),
    border-color 180ms var(--ease),
    color 180ms var(--ease),
    box-shadow 180ms var(--ease);
}

.waitlist-submit:hover,
.waitlist-submit:focus-visible {
  border-color: var(--brand);
  color: var(--brand);
  outline: none;
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.waitlist-submit--primary {
  background: var(--brand);
  border-color: var(--brand-hover);
  color: #ffffff;
  font-size: var(--text-sm);
  padding: 14px 22px;
  box-shadow: var(--shadow-button-primary);
}

.waitlist-submit--primary:hover,
.waitlist-submit--primary:focus-visible {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
  color: #ffffff;
  box-shadow: 0 0 0 3px var(--focus-ring), var(--shadow-button-primary);
}

.waitlist-submit:disabled {
  opacity: 0.5;
  cursor: wait;
}

.waitlist-submit:hover .action-arrow,
.waitlist-submit:focus-visible .action-arrow {
  transform: translateX(2px);
}

.waitlist-hint {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-top: 4px;
}

.waitlist-form--success .waitlist-input {
  border-color: var(--success);
}

.waitlist-form--success .waitlist-submit {
  background: #16a34a14;
  border-color: var(--success);
  color: var(--success);
}

.waitlist-form--success .waitlist-hint,
.waitlist-form--success .waitlist-label {
  color: var(--success);
}

.contact-aside {
  margin-top: 28px;
  font-family: var(--mono);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* ─── Papers (research section) ───────────────────────────────────── */

.papers-list {
  list-style: none;
  margin-top: 56px;
  display: flex;
  flex-direction: column;
}

.paper {
  padding: 40px 0;
  border-top: 1px solid var(--stroke-subtle);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.papers-list .paper:last-child {
  border-bottom: 1px solid var(--stroke-subtle);
}

.paper-act {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 500;
  margin-bottom: -4px;
}

.paper-title {
  font-family: var(--sans);
  font-weight: 600;
  font-size: var(--text-2xl);
  line-height: 1.25;
  letter-spacing: var(--tracking-tight);
  color: var(--foreground);
  max-width: 60ch;
}

.paper-authors {
  font-family: var(--mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  color: var(--muted);
}

.paper-abstract {
  font-family: var(--sans);
  font-size: var(--text-base);
  line-height: 1.65;
  letter-spacing: -0.005em;
  color: var(--secondary);
  max-width: 64ch;
  margin-top: 4px;
}

.paper-links {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.research-cta {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--stroke-subtle);
  font-family: var(--sans);
  font-size: var(--text-base);
  letter-spacing: -0.005em;
  color: var(--secondary);
}

/* ─── Blog posts ──────────────────────────────────────────────────── */

.posts-list {
  list-style: none;
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--stroke-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: var(--foreground);
  height: 100%;
  overflow: hidden;
  transition:
    border-color 200ms var(--ease),
    box-shadow 200ms var(--ease),
    transform 200ms var(--ease);
}

.post-card:hover,
.post-card:focus-visible {
  border-color: var(--stroke-strong);
  box-shadow: var(--shadow-card-hover);
  outline: none;
  transform: translateY(-2px);
}

.post-image {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--surface-muted);
  border-bottom: 1px solid var(--stroke-subtle);
  overflow: hidden;
}

.post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 400ms var(--ease);
}

.post-card:hover .post-image img,
.post-card:focus-visible .post-image img {
  transform: scale(1.03);
}

.post-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  flex: 1;
}

.post-date {
  font-family: var(--mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

.post-title {
  font-family: var(--sans);
  font-weight: 600;
  font-size: var(--text-lg);
  line-height: 1.3;
  letter-spacing: var(--tracking-tight);
  color: var(--foreground);
}

.post-excerpt {
  font-family: var(--sans);
  font-size: var(--text-sm);
  line-height: 1.55;
  color: var(--secondary);
  flex: 1;
}

.post-meta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--brand);
  margin-top: 4px;
  font-weight: 500;
}

.post-card:hover .action-arrow,
.post-card:focus-visible .action-arrow {
  transform: translate(2px, -2px);
}

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

.footer {
  padding: 48px 24px 64px;
  border-top: 1px solid var(--stroke-subtle);
  position: relative;
  z-index: 1;
}

.footer-inner {
  max-width: var(--content);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

.footer-divider {
  color: var(--tertiary);
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  text-decoration: none;
  transition: color 180ms var(--ease);
}

.footer-link:hover,
.footer-link:focus-visible {
  color: var(--brand);
  outline: none;
}

.footer-link .action-arrow {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--brand);
}

.footer-copy {
  white-space: nowrap;
}

/* ─── Animation primitives ────────────────────────────────────────── */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes arrowPulse {
  0%,
  100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .wordmark,
  .byline {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .byline-arrow {
    animation: none;
    opacity: 1;
  }
  .post-card:hover {
    transform: none;
  }
}

/* ─── Responsive - narrower breakpoints ───────────────────────────── */

@media (max-width: 768px) {
  .nav-inner {
    padding: 0 16px;
  }
  .nav-links {
    gap: 0;
  }
  .nav-links a {
    padding: 8px 10px;
    font-size: var(--text-xs);
  }
  .section {
    padding: clamp(72px, 10vh, 112px) 20px;
  }
  .product {
    padding: 28px 24px;
    margin-top: 48px;
  }
  .product-name {
    font-size: var(--text-2xl);
  }
  .paper {
    padding: 32px 0;
  }
  .paper-title {
    font-size: var(--text-xl);
  }
}

@media (max-width: 480px) {
  .nav-mark-text {
    display: none;
  }
  .nav-links a {
    padding: 8px 8px;
    font-size: 11px;
  }
}
