/* Tenstride landing. Values transcribed 1:1 from the design export
   (design/Tenstride Identity Directions.html); only additions are marked. */

@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 400 700; font-stretch: 100%; font-display: swap;
  src: url(/assets/fonts/archivo-latin.woff2) format('woff2'); }
@font-face { font-family: 'Archivo'; font-style: italic; font-weight: 600; font-stretch: 100%; font-display: swap;
  src: url(/assets/fonts/archivo-italic-600-latin.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/assets/fonts/plexmono-400-latin.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(/assets/fonts/plexmono-500-latin.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/assets/fonts/plexmono-600-latin.woff2) format('woff2'); }

:root {
  --carbon-black: #0b0b0b; --charcoal: #1a1a1a; --slate: #2e2e2e; --warm-white: #f7f7f7; --soft-gray: #a0a0a0;
  --bg: #0b0b0b; --surface: #1a1a1a; --line: #2e2e2e; --fg: #f7f7f7; --fg-muted: #a0a0a0;
  --border-control: #a0a0a0; --focus-ring: #f7f7f7; --input-bg: #111111;
  --font-sans: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark; /* added: native select menus render dark */
}

* { box-sizing: border-box; }
body { margin: 0; background: #0b0b0b; }
a { color: #a0a0a0; }
a:hover { color: #f7f7f7; }

/* added: visible keyboard focus */
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -48px; z-index: 10; background: #f7f7f7; color: #0b0b0b; padding: 8px 12px; font: 600 14px var(--font-sans); }
.skip:focus { top: 12px; }

.page { position: relative; width: 100%; min-height: 100vh; background-color: #0b0b0b; color: #f7f7f7;
  font-family: var(--font-sans); overflow: hidden; display: flex; flex-direction: column; }

/* Dot field */
.field { position: absolute; right: 0; top: 0; width: 900px; height: 520px; overflow: hidden; opacity: 0.7; pointer-events: none; }
.field .dot { position: absolute; width: 3px; height: 3px; border-radius: 2px; }
.field .ring { position: absolute; border: 1px solid #3a3a3a; border-radius: 50%; }
.field .plus { position: absolute; font-size: 28px; font-weight: 300; line-height: 20px; }
.field .fade { position: absolute; inset: 0;
  background-image: linear-gradient(90deg, #0b0b0b 0%, rgba(11,11,11,0) 45%), linear-gradient(0deg, #0b0b0b 0%, rgba(11,11,11,0) 40%); }

.mono-label { font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: 1.4px; color: #a0a0a0; }

/* Header */
.site-header { position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 16px; padding: 24px clamp(16px, 4vw, 48px); }
.site-header .logo { display: block; line-height: 0; }
.site-header .logo img { width: 160px; height: auto; display: block; }
.site-header .tag { font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 1.4px; color: #a0a0a0; }

/* Main layout */
.main { position: relative; z-index: 2; flex-grow: 1; max-width: 1280px; width: 100%; margin: 0 auto;
  padding: 48px clamp(16px, 4vw, 48px) 64px; display: flex; flex-wrap: wrap; gap: 56px; align-items: flex-start; }
.hero { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.hero-copy { display: flex; flex-direction: column; gap: 18px; }
.hero h1 { margin: 0; max-width: 680px; font-size: clamp(36px, 4.6vw, 60px); line-height: 1.04; font-weight: 700; letter-spacing: -0.02em; }
.hero .lede { margin: 0; max-width: 600px; font-size: 18px; line-height: 1.6; color: #a0a0a0; }

/* Thesis expander */
.expander { border-top: 1px solid #2e2e2e; border-bottom: 1px solid #2e2e2e; max-width: 680px; }
.expander-toggle { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0;
  background: none; border: none; color: #f7f7f7; font-family: var(--font-sans); font-size: 15px; font-weight: 600; cursor: pointer; text-align: left; }
.expander-toggle .icon { font-family: var(--font-mono); font-size: 18px; font-weight: 400; color: #a0a0a0; }
a.expander-toggle { text-decoration: none; }
a.expander-toggle:hover { color: #f7f7f7; }

/* Thesis text (shared by the expander and /thesis), built from the expander's original item styles */
.thesis { display: flex; flex-direction: column; gap: 14px; font-size: 15px; line-height: 1.65; color: #a0a0a0; }
.thesis p { margin: 0; }
.thesis b, .thesis strong { color: #f7f7f7; font-weight: 600; }
.thesis .t-title { margin: 0; font-size: 26px; line-height: 32px; font-weight: 700; color: #f7f7f7; }
.thesis .t-section { display: flex; gap: 16px; margin-top: 10px; }
.thesis .t-num { font-family: var(--font-mono); font-size: 12px; color: #f7f7f7; padding-top: 3px; flex: none; }
.thesis .t-body { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.thesis h2, .thesis h3 { margin: 0; color: #f7f7f7; font-size: 15px; line-height: 1.65; font-weight: 600; }
.thesis .t-close { color: #f7f7f7; }
.thesis a { color: #f7f7f7; text-underline-offset: 2px; }
.thesis a:hover { color: #a0a0a0; }
.thesis .t-sources { font-size: 13px; line-height: 1.6; border-top: 1px solid #2e2e2e; padding-top: 14px; margin-top: 4px; }
.expander-page-link { display: inline-block; margin-top: 18px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.2px; }

/* Thesis reading view: centered modal over the dimmed, blurred page */
html.reader-open { overflow: hidden; }
.reader { position: fixed; inset: 0; margin: auto; padding: 0; width: min(720px, calc(100% - 48px)); height: fit-content;
  max-width: none; max-height: 85vh; max-height: 85dvh; overflow: hidden;
  background: #0b0b0b; color: #f7f7f7; font-family: var(--font-sans);
  border: 1px solid #2e2e2e; border-radius: 6px; /* --radius-md */
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55), 0 4px 16px rgba(0, 0, 0, 0.35); }
.reader[open] { display: flex; flex-direction: column; }
.reader::backdrop { background: rgba(11, 11, 11, 0.7); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.reader:not(:modal) { z-index: 50; box-shadow: 0 0 0 100vmax rgba(11, 11, 11, 0.7); } /* /thesis without JS */
.reader-panel { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 clamp(16px, 4vw, 48px) 48px; }
.reader-bar { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 64px; background: #0b0b0b; border-bottom: 1px solid #2e2e2e; margin-bottom: 32px; }
.reader-close { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-right: -12px;
  font-family: var(--font-mono); font-size: 24px; font-weight: 400; line-height: 1; color: #a0a0a0; text-decoration: none; }
.reader-close:hover { color: #f7f7f7; }
.reader-body { font-size: 17px; }
.reader-body .t-title { font-size: clamp(30px, 3.4vw, 40px); line-height: 1.1; letter-spacing: -0.01em; margin-bottom: 6px; }
.reader-body .t-title:focus { outline: none; }
.reader-body h3 { font-size: 18px; }
.reader-body .doc-cta { margin-top: 18px; }
@media (max-width: 560px) {
  .reader { width: calc(100% - 24px); max-height: 90vh; max-height: 90dvh; }
}

/* Open: backdrop fades 200ms; modal fades, rises 12px, scales .98 → 1 over 250ms.
   Close (.is-closing, set by app.js before close()): the reverse in 180ms. */
@keyframes reader-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes reader-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(12px) scale(0.98); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { from { opacity: 1; } to { opacity: 0; } }
.reader:modal { animation: reader-in 250ms cubic-bezier(0.16, 1, 0.3, 1) both; }
.reader:modal::backdrop { animation: fade-in 200ms ease-out both; }
.reader.is-closing { animation: reader-out 180ms cubic-bezier(0.4, 0, 1, 1) both; }
.reader.is-closing::backdrop { animation: fade-out 180ms ease-in both; }
@media (prefers-reduced-motion: reduce) {
  .reader:modal { animation-name: fade-in; }
  .reader.is-closing { animation-name: fade-out; }
}

/* Demo */
.demo { max-width: 680px; display: flex; flex-direction: column; gap: 12px; }
.demo-frame { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 1px solid #2e2e2e; background-color: #111111;
  background-image: radial-gradient(#262626 1.2px, transparent 1.2px); background-size: 18px 18px; text-decoration: none; overflow: hidden; padding: 0; color: inherit; font: inherit; }
button.demo-frame { cursor: pointer; }
.demo-frame .play { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border: 1px solid #a0a0a0;
  border-radius: 50%; display: flex; align-items: center; justify-content: center; background-color: #0b0b0b; }
.demo-frame .caption { position: absolute; left: 16px; bottom: 14px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 1px; color: #a0a0a0; }
.demo-frame video, .demo-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }

/* Form card */
.card { flex: 1 1 340px; max-width: 440px; min-width: 0; border: 1px solid #2e2e2e; background-color: #0b0b0b; padding: 32px;
  display: flex; flex-direction: column; gap: 22px; scroll-margin-top: 24px; }
.card-head { display: flex; flex-direction: column; gap: 8px; }
.card h2 { margin: 0; font-size: 26px; line-height: 32px; font-weight: 700; }
.card-head p { margin: 0; font-size: 14px; line-height: 22px; color: #a0a0a0; }
.form { display: flex; flex-direction: column; gap: 16px; }
.field-row { display: flex; flex-direction: column; gap: 6px; }
.field-row label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.2px; color: #a0a0a0; }
.field-row label .opt { color: #8a8a8a; } /* was #6e6e6e; raised for AA contrast */
.control { height: 46px; width: 100%; background-color: #111111; border: 1px solid #a0a0a0; border-radius: 2px; color: #f7f7f7;
  font-family: var(--font-sans); font-size: 15px; padding: 0 14px; }
select.control { padding: 0 12px; }
.control::placeholder { color: #8a8a8a; opacity: 1; }
.control[aria-invalid="true"] { border-color: #ff8a80; }
.field-error { margin: 0; font-size: 12px; line-height: 18px; color: #ff8a80; }
.field-error:empty { display: none; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.submit { height: 48px; margin-top: 6px; background-color: #f7f7f7; color: #0b0b0b; border: none; border-radius: 2px;
  font-family: var(--font-sans); font-weight: 600; font-size: 15px; cursor: pointer; }
.submit[disabled] { opacity: 0.6; cursor: progress; }
.form-note { margin: 0; font-size: 12px; line-height: 18px; color: #a0a0a0; }
.form-alert { margin: 0; font-size: 13px; line-height: 20px; color: #ff8a80; }
.form-alert:empty { display: none; }
.success { display: flex; flex-direction: column; gap: 16px; padding: 12px 0; }
.success[hidden], .signup[hidden] { display: none; }
.success-mark { position: relative; width: 56px; height: 56px; border: 1px solid #a0a0a0; border-radius: 50%; }
.success-mark span { position: absolute; left: 18px; top: 13px; font-size: 26px; font-weight: 300; line-height: 26px; }
.success p { margin: 0; font-size: 15px; line-height: 24px; color: #a0a0a0; }
.success h2:focus { outline: none; }
.signup { display: flex; flex-direction: column; gap: 22px; }

/* Wide screens: the two columns form one centered block; the card spans from the
   "+ OUR THESIS" line to the bottom edge of the demo video. */
@media (min-width: 1280px) {
  .main { display: grid; grid-template-columns: 680px 340px; justify-content: center; align-content: start; align-items: stretch; }
  .card { max-width: none; }
  .signup, .signup .form { flex: 1 1 auto; }
  .signup .form { justify-content: space-between; }
}

/* Footer */
.site-footer { position: relative; z-index: 2; border-top: 1px solid #2e2e2e; padding: 20px clamp(16px, 4vw, 48px); display: flex; flex-wrap: wrap;
  justify-content: space-between; gap: 12px; font-family: var(--font-mono); font-size: 11px; color: #a0a0a0; }
.site-footer .motto { font-family: var(--font-sans); font-size: 13px; font-weight: 600; font-style: italic; color: #f7f7f7; }
.site-footer nav { display: flex; gap: 8px; flex-wrap: wrap; }

/* Secondary pages (/thesis, /privacy, /terms) reuse the hero column */
.doc { position: relative; z-index: 2; flex-grow: 1; max-width: 1280px; width: 100%; margin: 0 auto; padding: 48px clamp(16px, 4vw, 48px) 64px; }
.doc-inner { max-width: 680px; display: flex; flex-direction: column; gap: 28px; }
.doc h1 { margin: 0; font-size: clamp(36px, 4.6vw, 60px); line-height: 1.04; font-weight: 700; letter-spacing: -0.02em; }
.doc .thesis { font-size: 17px; }
.doc .thesis h2 { font-size: 18px; }
.doc-cta { align-self: flex-start; display: inline-flex; align-items: center; height: 48px; padding: 0 22px; background: #f7f7f7; color: #0b0b0b;
  border-radius: 2px; font-weight: 600; font-size: 15px; text-decoration: none; }
.placeholder { font-size: 15px; line-height: 1.65; color: #a0a0a0; margin: 0; }

/* Light buttons: the label is always black. Selectors are doubled up so link rules like
   `a:hover` and `.thesis a` can never repaint the text. Hover = slight darken only. */
.skip, .skip:hover, .skip:focus,
.doc-cta, .doc-cta:hover, .doc-cta:focus-visible,
.thesis .doc-cta, .thesis .doc-cta:hover, .thesis .doc-cta:focus-visible,
.submit, .submit:hover { color: #0b0b0b; text-decoration: none; }
.skip:hover, .doc-cta:hover, .thesis .doc-cta:hover, .submit:hover:not([disabled]) { background-color: #e4e4e4; }
.skip, .doc-cta, .submit { transition: background-color 120ms ease-out; }

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