/* ============================================
   Info pages: about, contact, privacy, terms (and template.html)
   One 720px prose column with a shared header and footer.
   ============================================ */

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

:root {
  --bg: #252525;  /* Brand Grey */
  --surface: #2a2a2a;
  --text: #e0e0e0;
  --text-muted: #888;
  --text-subtle: #7a7a7a;  /* readable on #252525 */
  --accent: #d63944;
  --border: #343434;
  --radius: 10px;
}

html { -webkit-text-size-adjust: 100%; background-color: var(--bg, #252525); color-scheme: dark; }  /* iOS home-screen app paints edges with this */

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Header ── */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 24px 0;
}

/* Wordmark: same construction as the landing page and .home-wordmark
   (brand: Inter, ORP-red "o" flanked by two stripes, period included) */
.wordmark {
  display: inline-flex;
  align-items: flex-end;
  color: var(--text);
  text-decoration: none;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  padding: 6px 2px;
  transition: opacity 150ms ease;
}

.wordmark:hover { opacity: 0.8; }

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

.wordmark-o {
  position: relative;
  display: inline-flex;
  justify-content: center;
  margin: 0 0.05em;
  color: var(--accent);
}

.wordmark-o::before,
.wordmark-o::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 0.28em;
  background: #6b6b6b; /* brand: ORP stripes */
}
.wordmark-o::before { top: -0.18em; }
.wordmark-o::after  { bottom: -0.32em; }

.header-nav {
  display: flex;
  gap: 20px;
}

.header-nav a {
  font-size: 0.8125rem;
  color: var(--text-subtle);
  text-decoration: none;
  transition: color 150ms ease;
}

.header-nav a:hover { color: var(--text-muted); }
.header-nav a.active { color: var(--text); }

/* ── Main content ── */

.page-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 24px 80px;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.page-subtitle {
  font-size: 0.8125rem;
  color: var(--text-subtle);
  margin-bottom: 48px;
}

/* ── Prose ── */

.prose h2 {
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-top: 40px;
  margin-bottom: 12px;
  color: var(--text);
}

.prose h3 {
  font-size: 0.9375rem;
  font-weight: 500;
  margin-top: 28px;
  margin-bottom: 8px;
  color: var(--text);
}

.prose p {
  margin-bottom: 16px;
  color: #c0c0c0;
  font-size: 0.9375rem;
  line-height: 1.65;
}

.prose ul, .prose ol {
  margin-bottom: 16px;
  padding-left: 20px;
}

.prose li {
  color: #c0c0c0;
  font-size: 0.9375rem;
  line-height: 1.65;
  margin-bottom: 6px;
}

.prose a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 3px;
}

.prose a:hover { text-decoration: underline; }

.prose strong {
  font-weight: 500;
  color: var(--text);
}

.prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

/* Terms: disclaimer / liability blocks */
.prose .legal-caps {
  text-transform: uppercase;
  font-size: 0.875rem;
  line-height: 1.7;
}

/* ── FAQ (contact page) ── */

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}

.faq-item:first-child { border-top: 1px solid var(--border); }

.faq-q {
  font-size: 0.9375rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text);
}

.prose .faq-a {
  font-size: 0.875rem;
  color: #aaa;
  line-height: 1.6;
  margin-bottom: 0;
}

/* ── Contact box ── */

.contact-box {
  margin-top: 48px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.prose .contact-box p {
  font-size: 0.875rem;
  color: #aaa;
  line-height: 1.6;
  margin-bottom: 0;
}

.prose .contact-email {
  display: inline-block;
  margin: 8px 0;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
}

.prose .contact-email:hover { text-decoration: underline; }

/* ── Sign-in card (signin.html) ── */

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

.auth-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
}

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

.auth-input {
  flex: 1;
  min-width: 0;
  background: #161616;
  border: 1px solid #3c3e41;
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  font-size: 0.9375rem;
  padding: 12px 14px;
  outline: none;
  transition: border-color 150ms ease-out;
  -webkit-appearance: none;
}

.auth-input::placeholder { color: var(--text-subtle); }
.auth-input:focus        { border-color: var(--accent); }
.auth-input:disabled     { opacity: 0.5; }

.auth-btn {
  background: var(--accent);
  border: none;
  border-radius: 8px;
  color: #f5f4f1;
  cursor: pointer;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 12px 20px;
  min-height: 44px;
  white-space: nowrap;
  transition: opacity 100ms ease-out;
}

.auth-btn:hover:not(:disabled)  { opacity: 0.88; }
.auth-btn:active:not(:disabled) { transform: translateY(1px); }
.auth-btn:disabled              { opacity: 0.45; cursor: not-allowed; }
.auth-btn:focus-visible         { outline: 2px solid var(--text); outline-offset: 2px; }

.auth-status {
  min-height: 1.25rem;
  margin-top: 8px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.auth-status.success { color: #5a9a64; }
.auth-status.error   { color: #ca4754; }

.auth-note {
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--text-subtle);
}

.auth-note a { color: var(--text-muted); }

.auth-faq { margin-top: 56px; }

/* ── Footer ── */

.site-footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 24px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-subtle);
}

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

.footer-links a {
  font-size: 0.75rem;
  color: var(--text-subtle);
  text-decoration: none;
  transition: color 150ms ease;
}

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

/* Touch: 44px tall tap area without moving the text */
@media (pointer: coarse) {
  .footer-links a { display: inline-block; padding: 14px 4px; margin: -14px -4px; }
}

/* ── Responsive ── */

@media (max-width: 540px) {
  .site-header { padding-top: 24px; }
  .page-content { padding: 40px 20px 60px; }
  .header-nav { gap: 14px; }
  .header-nav a { font-size: 0.75rem; }
  .auth-row { flex-direction: column; }
  .auth-btn { width: 100%; }
  .site-footer {
    flex-direction: column;
    gap: 12px;
    text-align: center;
    padding: 20px 20px 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none; }
}

/* Home-screen app: the translucent status bar overlaps the top of the page */
@media (display-mode: standalone) {
  body { padding-top: calc(env(safe-area-inset-top, 0px) + min(20px, env(safe-area-inset-top, 0px) * 100)); }  /* status bar + the band iOS 27 blurs; see --safe-top in mobile.css */
}

/* Phone design pass (#79): the sign-in form sits on the page, not in a card; one full-width field and
   one full-width button, 17px so iOS doesn't zoom. */
@media (max-width: 540px) {
  .auth-card {
    padding: 0;
    background: none;
    border: none;
  }

  .auth-row {
    flex-direction: column;
  }

  .auth-input,
  .auth-btn {
    min-height: 52px;
    border-radius: 12px;
    font-size: 1rem;
  }

  .auth-faq {
    margin-top: 48px;
  }
}

/* ── About (#81): the product first, then short hairline rows ── */

.about-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 0 72px;
}

/* A small reader: the word's focus letter sits exactly on the centre line, framed by the stripes */
.about-demo {
  position: relative;
  width: 100%;
  height: 3.6em;   /* word + both stripes, so the speed caption never touches the lower stripe */
  font-size: clamp(2.5rem, 9vw, 3.5rem);
  line-height: 1;
}

.about-demo-word {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 1em;
  transform: translateY(-50%);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--text);
}

.about-demo-word .pre  { text-align: right; white-space: pre; }
.about-demo-word .post { text-align: left; white-space: pre; }
.about-demo-word .orp  { color: var(--accent); font-weight: 500; }

.about-demo-stripe {
  position: absolute;
  left: 50%;
  width: 2px;
  height: 0.75em;
  background: #6b6b6b;   /* brand: ORP stripes */
  transform: translateX(-50%);
}

.about-demo-stripe-top    { top: calc(50% - 0.5em - 0.25em - 0.75em); }
.about-demo-stripe-bottom { top: calc(50% + 0.5em + 0.25em); }

.about-demo-speed {
  margin-top: 12px;
  font-size: 0.8125rem;
  color: var(--text-subtle);
  font-variant-numeric: tabular-nums;
}

.about-title {
  margin-top: 40px;
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
  text-wrap: balance;
}

.about-lead {
  max-width: 34em;
  margin-top: 14px;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--text-muted);
  text-wrap: balance;   /* no lone last word ("thread.") */
}

.about-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 28px;
  padding: 0 28px;
  border-radius: 12px;
  background: var(--accent);
  color: #f5f4f1;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 100ms ease-out;
}

.about-cta:hover { opacity: 0.9; }
.about-cta:active { transform: translateY(1px); }
.about-cta:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }

.about-section {
  padding-top: 40px;
}

.about-section h2 {
  padding-bottom: 12px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.about-section > p {
  margin-top: 16px;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
}

.about-rows > div {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.about-rows dt {
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--text);
}

.about-rows dd {
  margin-top: 4px;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.about-name em {
  font-style: italic;
  color: var(--text);
}

.about-contact {
  margin-top: 56px;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.about-contact a { color: var(--text); }
