/* Tally marketing — calm, descriptive aesthetic.
 *
 * Colours match the app:
 *   canvas (page bg)    #fbf9f4
 *   surface (card bg)   #ffffff
 *   ink (text)          #1c1917
 *   ink-muted           #57534e
 *   ink-subtle          #a8a29e
 *   ink-line            #efedeb
 *   accent (terracotta) #9a3412
 *   accent2 (teal)      #5e7a73
 *
 * Type: Inter Variable for UI, Newsreader for display.
 */

:root {
  --canvas: #fbf9f4;
  --surface: #ffffff;
  --ink: #1c1917;
  --ink-muted: #57534e;
  --ink-subtle: #a8a29e;
  --ink-line: #efedeb;
  --ink-line-soft: #f5f3ed;
  --accent: #9a3412;
  --accent-soft: rgba(154, 52, 18, 0.08);
  --accent2: #5e7a73;
  --accent2-soft: rgba(94, 122, 115, 0.1);
  --income: #15803d;
  --loss: #b91c1c;
  --max: 1080px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family:
    'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    sans-serif;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  line-height: 1.55;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Header ---- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  max-width: var(--max);
  margin: 0 auto;
}
.brand {
  font-family: 'Newsreader', ui-serif, Georgia, serif;
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.brand:hover {
  text-decoration: none;
}
.brand-dot {
  color: var(--accent);
  font-style: italic;
}
.site-nav {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}
.site-nav a {
  color: var(--ink-muted);
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  transition: color 120ms ease;
}
.site-nav a:hover {
  color: var(--ink);
  text-decoration: none;
}
.site-nav .ghost {
  color: var(--ink);
  border: 1px solid var(--ink-line);
  background: var(--surface);
}
.site-nav .ghost:hover {
  border-color: var(--ink-subtle);
}

/* ---- Hero ---- */
.hero {
  padding: 3rem 1.5rem 4rem;
}
.hero-inner {
  max-width: 720px;
  margin: 0 auto;
}
.eyebrow {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-subtle);
  font-weight: 500;
  margin: 0 0 0.75rem;
}
.hero-title {
  font-family: 'Newsreader', ui-serif, Georgia, serif;
  font-weight: 500;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
  color: var(--ink);
}
.hero-sub {
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--ink-muted);
  margin: 0 0 1.5rem;
  max-width: 60ch;
}
.hero-meta {
  display: flex;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--ink-subtle);
  margin: 0 0 2rem;
  flex-wrap: wrap;
}

/* ---- Waitlist form ---- */
.waitlist {
  background: var(--surface);
  border: 1px solid var(--ink-line);
  border-radius: 10px;
  padding: 1.25rem;
  margin: 0 0 1rem;
  scroll-margin-top: 80px;
}
.waitlist-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}
.waitlist-row:last-child {
  margin-bottom: 0;
}
.waitlist input[type='email'],
.waitlist input[type='text'],
.waitlist textarea {
  flex: 1;
  min-width: 200px;
  padding: 0.625rem 0.875rem;
  border-radius: 8px;
  border: 1px solid var(--ink-line);
  background: var(--canvas);
  font: inherit;
  color: var(--ink);
  transition:
    border-color 120ms ease,
    box-shadow 120ms ease;
}
.waitlist textarea {
  resize: vertical;
  min-height: 60px;
}
.waitlist input:focus,
.waitlist textarea:focus {
  outline: none;
  border-color: var(--accent2);
  box-shadow: 0 0 0 3px var(--accent2-soft);
}
.waitlist-more {
  margin-top: 0.5rem;
}
.waitlist-more summary {
  cursor: pointer;
  color: var(--ink-muted);
  font-size: 0.8125rem;
  padding: 0.25rem 0;
}
.waitlist-more summary:hover {
  color: var(--ink);
}
.waitlist-more[open] summary {
  margin-bottom: 0.5rem;
}
.waitlist-status {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  min-height: 1.4em;
}
.waitlist-status.is-success {
  color: var(--income);
}
.waitlist-status.is-error {
  color: var(--loss);
}

.hero-fineprint {
  color: var(--ink-subtle);
  font-size: 0.75rem;
  margin: 0;
  max-width: 60ch;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.125rem;
  border-radius: 8px;
  font: inherit;
  font-weight: 500;
  font-size: 0.875rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background 120ms ease,
    box-shadow 120ms ease,
    transform 120ms ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--ink);
  color: var(--surface);
}
.btn-primary:hover {
  background: rgba(28, 25, 23, 0.85);
  text-decoration: none;
}
.btn-primary:focus-visible {
  box-shadow: 0 0 0 3px var(--accent2-soft);
  outline: none;
}
.btn-primary:disabled {
  opacity: 0.55;
  cursor: wait;
}

/* ---- Sections ---- */
section {
  padding: 3rem 1.5rem;
}
.section-title {
  font-family: 'Newsreader', ui-serif, Georgia, serif;
  font-weight: 500;
  font-size: 1.875rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
  color: var(--ink);
}
.prose {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink-muted);
  margin: 0 0 1rem;
  max-width: 60ch;
}
.prose-lg {
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--ink-muted);
  margin: 0 0 1.5rem;
  max-width: 60ch;
}
.prose em {
  font-family: 'Newsreader', serif;
  font-style: italic;
  color: var(--ink);
}

.why {
  background: var(--surface);
  border-top: 1px solid var(--ink-line);
  border-bottom: 1px solid var(--ink-line);
}
.why-inner {
  max-width: 720px;
  margin: 0 auto;
}

/* ---- Three-up cards ---- */
.three-up-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--ink-line);
  border-radius: 12px;
  padding: 1.5rem;
}
.card-eyebrow {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.card h3 {
  font-family: 'Newsreader', ui-serif, Georgia, serif;
  font-weight: 500;
  font-size: 1.25rem;
  line-height: 1.3;
  margin: 0 0 0.75rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.card p {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink-muted);
  margin: 0 0 1rem;
}
.card-link {
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 500;
}

/* ---- CTA ---- */
.cta {
  text-align: center;
}
.cta-inner {
  max-width: 600px;
  margin: 0 auto;
}
.cta .prose {
  margin: 0 auto 1.5rem;
}

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--ink-line);
  padding: 1.5rem;
  margin-top: 2rem;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  color: var(--ink-subtle);
}
.footer-brand {
  font-family: 'Newsreader', ui-serif, Georgia, serif;
  color: var(--ink);
  font-size: 1rem;
}
.footer-nav {
  display: flex;
  gap: 1.25rem;
}
.footer-nav a {
  color: var(--ink-muted);
}
.footer-copy {
  font-size: 0.75rem;
}

/* ---- Features page ---- */
.features-page section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}
.features-hero {
  padding-top: 2rem !important;
  padding-bottom: 1rem !important;
}
.features-toc {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 1rem 1.5rem !important;
  max-width: var(--max);
  margin: 0 auto;
  border-top: 1px solid var(--ink-line);
  border-bottom: 1px solid var(--ink-line);
  font-size: 0.8125rem;
}
.features-toc a {
  color: var(--ink-muted);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}
.features-toc a:hover {
  background: var(--accent2-soft);
  color: var(--ink);
  text-decoration: none;
}

.feature-section {
  border-bottom: 1px solid var(--ink-line);
  scroll-margin-top: 60px;
}
.feature-section:last-of-type {
  border-bottom: none;
}
.feature-section h2 {
  margin-bottom: 1rem;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
}
.feature-list li {
  position: relative;
  padding: 0.5rem 0 0.5rem 1.25rem;
  color: var(--ink-muted);
  font-size: 0.9375rem;
  line-height: 1.55;
  border-bottom: 1px solid var(--ink-line-soft);
}
.feature-list li:last-child {
  border-bottom: none;
}
.feature-list li::before {
  content: '·';
  position: absolute;
  left: 0.5rem;
  color: var(--accent);
  font-weight: bold;
}
.feature-list b {
  color: var(--ink);
  font-weight: 500;
}

.three-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}
.three-col h3 {
  font-family: 'Inter', sans-serif;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 500;
  margin: 0 0 0.5rem;
}

.access-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}
.access-card {
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--ink-line);
  border-radius: 10px;
}
.access-card h3 {
  font-family: 'Newsreader', ui-serif, Georgia, serif;
  font-weight: 500;
  font-size: 1.125rem;
  margin: 0 0 0.5rem;
  color: var(--ink);
}
.access-card p {
  font-size: 0.875rem;
  color: var(--ink-muted);
  margin: 0;
  line-height: 1.55;
}

@media (max-width: 600px) {
  .hero {
    padding: 2rem 1rem 3rem;
  }
  section {
    padding: 2.25rem 1rem;
  }
  .features-page section {
    padding: 1.75rem 1rem;
  }
  .features-toc {
    padding: 0.75rem 1rem !important;
  }
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
