/* Mantiq — marketing / support site.
   Brand tokens mirror the app (CLAUDE.md):
   night indigo #141B2B, deep sand #C9A876, bone #E8E3D8, slate #6B7688.
   Dark-mode-first; a warm off-white light variant follows the OS. */

/* ---- Faces ----
   Self-hosted, not fetched from fonts.googleapis.com: a page that promises
   "your data never leaves your phone" must not hand every visitor's IP to a
   third party to render its own headline. These are subsets of the very files
   the app bundles in assets/fonts/ (see tool/subset_site_fonts.py) — 31K for
   all three, so the privacy fix is also the faster one. */

@font-face {
  font-family: "Cormorant Garamond";
  src: url("/fonts/CormorantGaramond-Medium.woff2") format("woff2");
  font-weight: 400 500;   /* .tagline and .script ask for 400; headings for 500 */
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("/fonts/SourceSans3-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("/fonts/SourceSans3-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --indigo: #141B2B;
  --sand: #C9A876;
  --bone: #E8E3D8;
  --slate: #6B7688;
  --hairline: rgba(107, 118, 136, 0.28);

  --bg: var(--indigo);
  --text: var(--bone);
  --muted: var(--slate);
  --rule: var(--hairline);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #F2EEE6;          /* warm off-white */
    --text: #141B2B;        /* indigo text */
    --muted: #6B7688;
    --rule: rgba(20, 27, 43, 0.16);
    --sand: #B4915C;        /* a touch deeper so it holds on the light field */
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.65;
  font-feature-settings: "tnum" 1;   /* tabular numerals, a first-class element */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap {
  max-width: 40rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5rem) 1.5rem 5rem;
}

/* ---- Type ---- */

h1, h2, h3, .display {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: clamp(2.4rem, 8vw, 3.4rem); margin: 0; }
h2 { font-size: clamp(1.5rem, 5vw, 1.9rem); margin: 2.75rem 0 0.75rem; }

p { margin: 0 0 1.1rem; }

a { color: var(--sand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

strong { font-weight: 600; }

.muted { color: var(--muted); }

.script {
  font-family: "Cormorant Garamond", serif;
  color: var(--sand);
  font-size: 1.35rem;
}

/* ---- Mark ---- */

.mark {
  width: 88px;
  height: 88px;
  display: block;
}
.mark line, .mark circle, .mark rect, .mark polygon {
  fill: none;
  stroke: var(--sand);
  stroke-width: 2.5;
}

/* ---- Layout pieces ---- */

.masthead {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
  padding-bottom: 2.5rem;
}

.tagline {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.35rem, 4.5vw, 1.75rem);
  color: var(--text);
  max-width: 28rem;
  margin: 0 auto;
}

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2.5rem 0;
}

.lead { font-size: 1.1rem; }

.nav {
  display: flex;
  gap: 1.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.backlink {
  display: inline-block;
  margin-bottom: 2rem;
  color: var(--muted);
  font-size: 0.95rem;
}

footer {
  margin-top: 4rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.updated {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: -0.25rem;
}

/* Support Q&A */
.qa h2 { font-size: 1.4rem; }
.qa p { color: var(--text); }
