/* Conatus site. Tokens copied from the app (src/app/globals.css): Ink is the
   dark default, Paper the light theme. The site follows the system setting. */

/* Every "Fraunces" face below must carry the same descriptors (weight range,
   style, and no font-stretch). Browsers pick one group of faces by those
   descriptors first and only then split by unicode-range, so a face with an
   extra font-stretch range lost to the Piazzolla face and Latin headings fell
   back to Georgia. Fraunces has no width axis, so the descriptor did nothing. */
@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-var-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/plexmono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/plexmono-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
/* Cyrillic: the same rules as the app. Piazzolla stands in for Fraunces. */
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/plexmono-400-cyrillic.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/plexmono-500-cyrillic.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Fraunces";
  src: url("fonts/piazzolla-cyrillic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Fraunces";
  src: url("fonts/piazzolla-cyrillic-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* Ink (dark) */
:root {
  color-scheme: dark light;
  --bg: #0a0a0c;
  --surface-1: #141417;
  --surface-2: #1d1d21;
  --ink: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.68);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --line-brand: rgba(235, 169, 79, 0.4);
  --brand: #eba94f;
  --brand-soft: rgba(235, 169, 79, 0.12);
  --on-brand: #1c1305;
  --ring: #eba94f;
  --stream-fundamentals: #7dcfb6;
  --stream-thinking: #b18af8;
  --stream-creation: #f0b35e;
  --stream-body: #6fd08c;
  --stream-connection: #e79ab5;
  --font-display: "Fraunces", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --font-ui: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Paper (light) */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #faf7f2;
    --surface-1: #ffffff;
    --surface-2: #f1ede6;
    --ink: #1c1a17;
    --muted: rgba(28, 26, 23, 0.7);
    --line: rgba(0, 0, 0, 0.1);
    --line-strong: rgba(0, 0, 0, 0.16);
    --line-brand: rgba(138, 90, 20, 0.4);
    --brand: #8a5a14;
    --brand-soft: rgba(138, 90, 20, 0.1);
    --on-brand: #ffffff;
    --ring: #8a5a14;
    --stream-fundamentals: #177a5c;
    --stream-thinking: #6f42c8;
    --stream-creation: #a35f00;
    --stream-body: #257f42;
    --stream-connection: #b04672;
  }
}

@media (prefers-contrast: more) {
  :root {
    --muted: rgba(255, 255, 255, 0.82);
    --line: rgba(255, 255, 255, 0.2);
    --line-strong: rgba(255, 255, 255, 0.3);
  }
}
@media (prefers-contrast: more) and (prefers-color-scheme: light) {
  :root {
    --muted: rgba(28, 26, 23, 0.82);
    --line: rgba(0, 0, 0, 0.22);
    --line-strong: rgba(0, 0, 0, 0.34);
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 1.0625rem;
  line-height: 1.6;
  letter-spacing: 0.01em;
  overflow-wrap: break-word;
  font-variant-numeric: tabular-nums;
}

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  padding: 8px 12px;
  background: var(--brand);
  color: var(--on-brand);
  border-radius: 8px;
  z-index: 10;
}
.skip:focus {
  top: 12px;
}

.wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 16px;
}

a {
  color: var(--brand);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover {
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Top bar */
.topbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-variation-settings: "opsz" 72;
  font-weight: 560;
  font-size: 1.25rem;
  min-height: 44px;
}
.wordmark img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}
.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 14px;
  font-size: 0.9375rem;
}
.topnav a {
  color: var(--muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.topnav a:hover,
.topnav a[aria-current="page"] {
  color: var(--ink);
}

/* Hero */
.hero {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--line);
}
.kicker {
  margin: 0 0 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 620;
  color: var(--muted);
}
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 560;
  letter-spacing: 0;
  color: var(--ink);
}
h1 {
  margin: 0;
  font-variation-settings: "opsz" 144;
  font-size: clamp(2.25rem, 10vw, 3.5rem);
  line-height: 1.05;
}
.lead {
  margin: 18px 0 0;
  font-family: var(--font-display);
  font-size: 1.3rem;
  line-height: 1.45;
  color: var(--ink);
}
.promise {
  margin: 22px 0 0;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--muted);
}
.promise strong {
  color: var(--brand);
  font-weight: 500;
}

.store {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-top: 30px;
}
/* Placeholder for Apple's official badge (see README). */
.store-badge {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-height: 52px;
  padding: 8px 20px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  line-height: 1.15;
}
.store-badge small {
  font-size: 0.6875rem;
  letter-spacing: 0.02em;
}
.store-badge span {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0;
}
.store-badge:hover {
  text-decoration: none;
  opacity: 0.92;
}
.store-note {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
}

/* Sections */
.section {
  padding: 44px 0;
  border-bottom: 1px solid var(--line);
}
.section:last-of-type {
  border-bottom: none;
}
.section h2 {
  margin: 0 0 14px;
  font-variation-settings: "opsz" 72;
  font-size: clamp(1.6rem, 6.5vw, 2.1rem);
  line-height: 1.15;
}
.section p {
  margin: 0 0 14px;
}
.section p.muted,
.muted {
  color: var(--muted);
}
.num {
  font-family: var(--font-mono);
  font-weight: 500;
  white-space: nowrap;
}
/* File names: mono like .num, but allowed to wrap on a 320px screen. */
.file {
  font-family: var(--font-mono);
  font-size: 0.9375em;
  overflow-wrap: anywhere;
}
.quote {
  font-family: var(--font-display);
  font-style: italic;
}

/* Illustration: one example day */
.mock {
  margin: 26px 0 8px;
  padding: 6px 18px;
  background: var(--surface-1);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
}
.mock-kicker {
  margin: 12px 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.6875rem;
  font-weight: 620;
  color: var(--muted);
}
.score-row {
  display: grid;
  /* One fixed label width for every row, so the 0 / +1 / +2 columns line up
     and the longest name ("Meals & errands", about 120px) stays clear of the 0. */
  grid-template-columns: 8rem repeat(3, minmax(36px, 1fr));
  align-items: center;
  gap: 6px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.score-row:last-child {
  border-bottom: none;
}
.area {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9375rem;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}
.dot-fundamentals { background: var(--stream-fundamentals); }
.dot-thinking { background: var(--stream-thinking); }
.dot-creation { background: var(--stream-creation); }
.dot-body { background: var(--stream-body); }
.dot-connection { background: var(--stream-connection); }
.seg {
  text-align: center;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--muted);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.seg.on {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

/* Illustration: a card in the week review */
.card-mock {
  margin: 26px 0 8px;
  padding: 18px;
  background: var(--surface-1);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
}
/* As the app's card: the date a thought was set aside, then the thought. */
.card-mock .meta {
  margin: 10px 0 0;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--muted);
}
.card-mock .thought {
  margin: 4px 0 16px;
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.35;
}
.gestures {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.gesture {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line-brand);
  border-radius: 999px;
  color: var(--brand);
  font-size: 0.9375rem;
}

.figcaption {
  margin: 8px 0 0;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* Lists */
.plain {
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}
.plain li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.plain li:last-child {
  border-bottom: none;
}
.plain b {
  font-weight: 600;
}

.nevers {
  margin: 20px 0 0;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--muted);
}

/* Long-form pages: privacy, support */
.doc {
  padding: 44px 0 24px;
}
.doc h1 {
  font-size: clamp(2rem, 9vw, 2.8rem);
}
.doc .updated {
  margin: 10px 0 28px;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--muted);
}
.doc h2 {
  margin: 36px 0 10px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  font-variation-settings: "opsz" 72;
  font-size: 1.45rem;
  line-height: 1.25;
}
.doc h3 {
  margin: 26px 0 8px;
  font-size: 1.15rem;
  line-height: 1.3;
}
.doc p,
.doc ul,
.doc ol {
  margin: 0 0 14px;
}
.doc ul,
.doc ol {
  padding-left: 1.3em;
}
.doc li {
  margin: 0 0 8px;
}
.notice {
  margin: 0 0 28px;
  padding: 14px 16px;
  border: 1px solid var(--line-brand);
  border-radius: 12px;
  background: var(--brand-soft);
  font-size: 0.9375rem;
}
.contact {
  margin: 8px 0 18px;
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--surface-1);
}
.contact p:last-child {
  margin-bottom: 0;
}
.contact .email {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 500;
}

details {
  border-bottom: 1px solid var(--line);
}
details:first-of-type {
  border-top: 1px solid var(--line);
}
summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 12px 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 560;
  line-height: 1.3;
}
summary::-webkit-details-marker {
  display: none;
}
summary::after {
  content: "+";
  font-family: var(--font-mono);
  color: var(--brand);
  flex: none;
}
details[open] summary::after {
  content: "\2212";
}
details > div {
  padding: 0 0 12px;
}

/* Footer */
.footer {
  margin-top: 24px;
  padding: 28px 0 44px;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  color: var(--muted);
}
.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin-bottom: 10px;
}
.footer nav a {
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.footer nav a:hover {
  color: var(--ink);
}
.footer p {
  margin: 0 0 6px;
}
.tagline {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--ink);
}

.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;
}

@media (min-width: 640px) {
  .hero {
    padding: 80px 0 56px;
  }
  .section {
    padding: 56px 0;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
