/*
 * Nitor marketing site.
 * Colors and type come from the app's design tokens
 * (packages/design-tokens, design-reference/coach-design-system/project/colors_and_type.css):
 * dark-first, one teal accent, Inter / Inter Tight / JetBrains Mono.
 * Light mode follows the visitor's system setting and uses the app's light
 * re-binds (accents darkened for contrast on white).
 *
 * Two deliberate departures from the app tokens, so every text color meets
 * WCAG AA (4.5:1) on every surface: --fg-3 is lighter in dark mode and darker
 * in light mode, and light-mode teal uses the app's darker teal (#0F766E).
 */

@font-face {
  font-family: "Inter";
  src: url("/fonts/Inter-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/Inter-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter Tight";
  src: url("/fonts/InterTight-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/JetBrainsMono-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark light;

  --bg: #0a0b0d;
  --surface-1: #111316;
  --surface-2: #1a1d21;
  --fg-1: #e7e9ec;
  --fg-2: #9ca3af;
  --fg-3: #858c97;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --teal-400: #2dd4bf;
  --teal-500: #14b8a6;
  --teal-glow: rgba(45, 212, 191, 0.14);
  --amber-400: #fbbf24;
  --on-accent: #0a0b0d;

  --font-ui: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Inter Tight", "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --page-max: 1120px;
  --prose-max: 68ch;
  --gutter: 20px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f2f4f6;
    --surface-1: #ffffff;
    --surface-2: #f8fafb;
    --fg-1: #0f1115;
    --fg-2: #4b5563;
    --fg-3: #626977;
    --border: rgba(15, 17, 21, 0.1);
    --border-strong: rgba(15, 17, 21, 0.16);
    --teal-400: #0f766e;
    --teal-500: #115e59;
    --teal-glow: rgba(13, 148, 136, 0.1);
    --amber-400: #b45309;
    --on-accent: #ffffff;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg-1);
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--teal-glow);
}

a {
  color: var(--teal-400);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover {
  text-decoration-thickness: 2px;
}
a:focus-visible,
.badge:focus-visible {
  outline: 2px solid var(--teal-400);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  padding: 8px 12px;
  background: var(--surface-1);
  color: var(--fg-1);
  border-radius: var(--radius-md);
  z-index: 10;
}
.skip-link:focus {
  left: 8px;
}

.wrap {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 16px;
}

/*
 * Text wordmark until the logo is chosen. To swap in a logo, replace the
 * contents of every `.wordmark` link with an <img> or inline <svg>.
 */
.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 26px;
  letter-spacing: -0.04em;
  color: var(--fg-1);
  text-decoration: none;
  line-height: 1;
}
.wordmark span {
  color: var(--teal-400);
}

.site-nav {
  display: flex;
  gap: 20px;
  font-size: 15px;
}
.site-nav a {
  color: var(--fg-2);
  text-decoration: none;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--fg-1);
}

/* ---------- Home: hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
  padding: 56px 0 72px;
}
@media (min-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: center;
    gap: 64px;
    padding: 96px 0 112px;
  }
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(44px, 8vw, 76px);
  line-height: 1;
  letter-spacing: -0.045em;
  margin: 0 0 24px;
  max-width: 11ch;
}
.hero .lede {
  font-size: 19px;
  color: var(--fg-2);
  margin: 0 0 32px;
  max-width: 34em;
}

/*
 * App Store badge placeholder. Replace with Apple's official
 * "Download on the App Store" badge artwork once the app is live:
 * https://developer.apple.com/app-store/marketing/guidelines/
 */
.badge {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-height: 52px;
  padding: 8px 20px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface-1);
  color: var(--fg-1);
  text-decoration: none;
  line-height: 1.2;
}
.badge small {
  font-size: 12px;
  color: var(--fg-2);
}
.badge strong {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* The worked answer: a coach reply with its reasoning laid out. */
.worked {
  position: relative;
  margin: 0;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px;
  font-size: 15px;
  line-height: 1.55;
}
@media (min-width: 600px) {
  .worked {
    padding: 28px;
  }
}
.worked .ask {
  margin: 0 0 20px auto;
  max-width: 80%;
  width: fit-content;
  padding: 10px 14px;
  border-radius: 14px 14px 4px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--fg-1);
}
.worked .answer {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0 0 20px;
}
.worked .answer .num,
.ledger .num {
  font-family: var(--font-mono);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}
.worked .answer .num {
  font-size: 0.9em;
  color: var(--teal-400);
}
.ledger {
  list-style: none;
  margin: 0 0 20px;
  padding: 0 0 0 16px;
  border-left: 2px solid var(--teal-400);
}
.ledger li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  column-gap: 16px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
@media (max-width: 479px) {
  .ledger li {
    flex-direction: column;
  }
}
.ledger li:last-child {
  border-bottom: 0;
}
.ledger .what {
  color: var(--fg-2);
}
.ledger .num {
  font-size: 14px;
  color: var(--fg-1);
}
.ledger .num .vs {
  color: var(--fg-3);
}
.worked .because {
  margin: 0;
  color: var(--fg-1);
}
.worked .caption {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--fg-3);
}

/* ---------- Home: features ---------- */

.section {
  padding: 72px 0;
  border-top: 1px solid var(--border);
}
.section h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 4.5vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.035em;
  margin: 0 0 12px;
  max-width: 20ch;
}
.section .intro {
  color: var(--fg-2);
  margin: 0 0 40px;
  max-width: 36em;
}

.features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 760px) {
  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 56px;
  }
}
.features li {
  padding: 22px 0;
  border-top: 1px solid var(--border);
}
.features h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}
.features p {
  margin: 0;
  color: var(--fg-2);
}

.closing {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.closing h2 {
  margin: 0;
}

/* ---------- Prose pages (privacy, terms, support) ---------- */

.prose {
  max-width: var(--prose-max);
  padding: 48px 0 80px;
}
@media (min-width: 900px) {
  .prose {
    padding: 72px 0 112px;
  }
}
.prose h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(36px, 6vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin: 0 0 12px;
}
.prose .updated {
  color: var(--fg-3);
  font-size: 15px;
  margin: 0 0 32px;
}
.prose h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin: 44px 0 12px;
}
.prose h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 28px 0 8px;
}
.prose p,
.prose ul,
.prose ol {
  margin: 0 0 16px;
}
.prose ul,
.prose ol {
  padding-left: 22px;
}
.prose li {
  margin-bottom: 8px;
}
.prose li::marker {
  color: var(--fg-3);
}
.prose strong {
  font-weight: 600;
}

/* Review notice on draft legal text. Remove once the text is signed off. */
.draft-note {
  border: 1px solid var(--amber-400);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin: 0 0 32px;
  color: var(--fg-1);
  font-size: 15px;
}
.draft-note strong {
  color: var(--amber-400);
}
.fill-in {
  background: var(--teal-glow);
  border-radius: 4px;
  padding: 0 2px;
}

.contact-block {
  border: 1px solid var(--border);
  background: var(--surface-1);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin: 0 0 40px;
}
.contact-block p {
  margin: 0;
}
.contact-block .email {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.contact-block .email a {
  text-decoration: none;
}
.contact-block .note {
  margin-top: 6px;
  color: var(--fg-2);
  font-size: 15px;
}

.faq details {
  border-top: 1px solid var(--border);
  padding: 4px 0;
}
.faq details:last-of-type {
  border-bottom: 1px solid var(--border);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 32px 14px 0;
  position: relative;
  font-weight: 600;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 12px;
  font-family: var(--font-mono);
  color: var(--fg-3);
}
.faq details[open] summary::after {
  content: "\2212";
}
.faq summary:focus-visible {
  outline: 2px solid var(--teal-400);
  outline-offset: 2px;
  border-radius: 4px;
}
.faq details > :not(summary) {
  color: var(--fg-2);
}

/* ---------- 404 ---------- */

.not-found {
  padding: 96px 0 128px;
}
.not-found h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(36px, 6vw, 52px);
  letter-spacing: -0.04em;
  margin: 0 0 12px;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0 48px;
  font-size: 15px;
  color: var(--fg-3);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 32px;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}
.site-footer a {
  color: var(--fg-2);
  text-decoration: none;
}
.site-footer a:hover {
  color: var(--fg-1);
}
.site-footer p {
  margin: 0;
}

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