/* =============================================================
   beatquantum.com — small.css
   Dark theme only. Self-hosted Fraunces + Inter (variable).
   Section order:
     1. @font-face
     2. Reset
     3. Tokens (:root)
     4. Base elements (html, body, selection)
     5. Typography (headings, paragraphs, lists, strong, links)
     6. Layout (main, sections)
     7. Components
        7a. Skip link
        7b. Site header + nav
        7c. Hero (wordmark, lede)
        7d. Trailing blocks (founder, updated)
        7e. Readiness icons
        7f. Forms
        7g. Footer
     8. Responsive (≤640px)
     9. Reduced motion
   ============================================================= */


/* 1. ── Fonts ───────────────────────────────────────────────── */
@font-face {
  font-family: 'Fraunces';
  src: url('/assets/fonts/fraunces-v38-latin-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Fraunces';
  src: url('/assets/fonts/fraunces-v38-latin-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Fraunces';
  src: url('/assets/fonts/fraunces-v38-latin-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}


/* 2. ── Reset ──────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}


/* 3. ── Tokens (dark, always on) ───────────────────────────── */
:root {
  color-scheme: dark;

  --bg:          #051C2C;
  --ink:         #FFFFFF;
  --ink-soft:    #D6DEE3;
  --ink-muted:   #8A98A2;
  --rule:        #1F3543;
  --accent:      #8FB4D8;

  /* Form / error palette tuned for dark surfaces */
  --danger-fg:        #FF8A80;
  --danger-strong:    #FFCDD2;
  --danger-bg:        #2E0F0F;
  --danger-rule:      #FF5252;

  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --ease:    cubic-bezier(0.2, 0.6, 0.2, 1);
  --measure: 44rem;
}


/* 4. ── Base ───────────────────────────────────────────────── */
html {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scrollbar-gutter: stable;
}

body {
  font-family: var(--sans);
  background-color: var(--bg);
  color: var(--ink-soft);
  font-size: 1.0625rem;
  line-height: 1.6;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  accent-color: var(--ink);
}

::selection {
  background-color: var(--ink);
  color: var(--bg);
}


/* 5. ── Typography ─────────────────────────────────────────── */
main h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.75rem;
  font-variation-settings: "opsz" 24;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 1.25rem;
  text-wrap: balance;
}

main p {
  margin-bottom: 1.5rem;
  text-wrap: pretty;
}
main p:last-child { margin-bottom: 0; }

main h2 + p,
main h2 + ul,
main h2 + ol { margin-top: 0; }

main p + ul,
main p + ol  { margin-top: -0.5rem; }

main ul,
main ol {
  padding-inline-start: 1.4rem;
  margin-bottom: 1.5rem;
}

main li {
  margin-bottom: 0.6rem;
  line-height: 1.6;
}
main li:last-child { margin-bottom: 0; }

main strong {
  font-weight: 600;
  color: var(--ink);
}

a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  transition: color 160ms var(--ease), border-color 160ms var(--ease);
}
a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 2px;
}


/* 6. ── Layout ─────────────────────────────────────────────── */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;   /* vertical centre */
  /* align-items: start;     ← leave default so text stays left-aligned */
  padding: 2rem;             /* drop the big 6rem top padding */
  max-width: var(--measure);
  width: 100%;
  margin-inline: auto;
}

main section {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}
main section:first-of-type { margin-top: 1rem; }


/* 7a. ── Skip link ─────────────────────────────────────────── */
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 200;
  width: auto;
  height: auto;
  padding: 0.65rem 1rem;
  margin: 0;
  clip-path: none;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  border: none;
  font-family: var(--sans);
  font-weight: 500;
}


/* 7b. ── Site header + nav ─────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms var(--ease);
}

.site-header-inner {
  max-width: var(--measure);
  margin-inline: auto;
  padding: 0.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  border-bottom: none;
  line-height: 0;
  transition: opacity 160ms var(--ease);
}
.site-logo:hover {
  border-bottom: none;
  opacity: 0.75;
}
.site-logo img {
  width: 40px;
  height: 40px;
  display: block;
  border-radius: 6px;
}

.site-nav {
  display: flex;
  gap: 1.75rem;
}
.site-nav a {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  border-bottom: none;
  padding: 0.25rem 0;
  position: relative;
}
.site-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background-color: var(--ink);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 160ms var(--ease), background-color 160ms var(--ease);
}
.site-nav a:hover {
  color: var(--accent);
  border-bottom: none;
}
.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  background-color: var(--accent);
  transform: scaleX(1);
}

/* Scroll-driven hairline under header. Graceful fallback when unsupported. */
@supports (animation-timeline: scroll()) {
  .site-header {
    animation: header-scrolled-rule linear both;
    animation-timeline: scroll(root block);
    animation-range: 0 80px;
  }
  @keyframes header-scrolled-rule {
    from { border-bottom-color: transparent; }
    to   { border-bottom-color: var(--rule); }
  }
}

.site-header ~ main { padding-top: 2.5rem; }


/* 7c. ── Hero (wordmark, lede) ─────────────────────────────── */
.wordmark {
  font-family: var(--display);
  font-size: 3rem;
  font-weight: 400;
  font-variation-settings: "opsz" 144;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.05;
  margin-bottom: 2rem;
  text-wrap: balance;
}

.lede {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.5rem;
  line-height: 1.4;
  color: var(--ink);
  font-weight: 400;
  margin-bottom: 3rem;
  max-width: 36ch;
  text-wrap: balance;
}


/* 7d. ── Trailing blocks ───────────────────────────────────── */
.founder {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.updated {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
  color: var(--ink-muted);
  font-style: italic;
  text-align: end;
}


/* 7e. ── Readiness icons ───────────────────────────────────── */
.readiness-icons {
  display: flex;
  gap: 14px;
  font-size: 2.8rem;
  margin: 12px 0 25px;
}

/* 7f. ── Forms ─────────────────────────────────────────────── */
form .field { margin-bottom: 1.5rem; }

form label {
  display: block;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
form label .muted {
  color: var(--ink-muted);
  font-weight: 400;
}

form input[type="text"],
form input[type="email"],
form textarea {
  display: block;
  width: 100%;
  font: inherit;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  background-color: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 0.65rem 0.85rem;
  transition: border-color 160ms var(--ease);
}

form input:focus-visible,
form textarea:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  border-color: var(--ink);
}

form textarea {
  resize: vertical;
  min-height: 12rem;
}

form button {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1rem;
  color: var(--bg);
  background-color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 2px;
  padding: 0.75rem 2rem;
  cursor: pointer;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease);
}
form button:hover {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}
form button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

form .field-hint {
  display: block;
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-top: 0.35rem;
}

form .field-error {
  display: block;
  font-size: 0.85rem;
  color: var(--danger-fg);
  margin-top: 0.35rem;
}

.form-error {
  padding: 0.85rem 1rem;
  background-color: var(--danger-bg);
  border-left: 3px solid var(--danger-rule);
  color: var(--danger-strong);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

/* Honeypot — hidden from sighted users AND assistive tech via aria-hidden in HTML */
.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}


/* 7g. ── Footer ────────────────────────────────────────────── */
footer {
  padding: 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-muted);
  border-top: 1px solid var(--rule);
}
footer a {
  color: var(--ink-muted);
  border-bottom-color: var(--rule);
}
footer a:hover { color: var(--ink-soft); }
footer .dot {
  display: inline-block;
  margin: 0 0.5rem;
  color: var(--rule);
}

/* 7h. ── Countdown ─────────────────────────────────────────── */
.countdown {
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-bottom: 3rem;
}
.countdown .sep {
  margin: 0 0.35rem;
  color: var(--rule);
}

/* 8. ── Responsive (≤640px) ────────────────────────────────── */
@media (max-width: 640px) {
  main { padding: 3.5rem 1.5rem 3rem; }

  .wordmark { font-size: 2.25rem; margin-bottom: 1.5rem; }
  .lede     { font-size: 1.25rem; margin-bottom: 2rem; }

  main section { margin-top: 2.5rem; padding-top: 1.5rem; }
  main h2      { font-size: 1.4rem; }

  .founder,
  .updated { margin-top: 2.5rem; padding-top: 1.5rem; }

  .site-header-inner { padding: 0.65rem 1.5rem; gap: 1rem; }
  .site-logo img     { width: 32px; height: 32px; }
  .site-nav          { gap: 1.1rem; }
  .site-nav a        { font-size: 0.85rem; }
  .site-header ~ main { padding-top: 1.5rem; }

  footer        { padding: 1.5rem; }
  footer .dot   { display: block; margin: 0.5rem 0; }
  .countdown { font-size: 1rem; margin-bottom: 2rem; }
}


/* 9. ── Reduced motion ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
