/* Mercureal marketing site — the app's editorial design language on the open
   web: warm cream surfaces, terracotta accent, Newsreader display over IBM
   Plex. Static, no JS; one stylesheet shared by the landing + legal pages. */

:root {
  --bg: #f4f0e9;
  --surface: #fbf8f2;
  --surface-alt: #efeae0;
  --ink1: #1a1814;
  --ink2: #57503f;
  --ink3: #6f6656; /* darkened from #8a8171 to clear WCAG AA (4.5:1) — used on body-sized meta/trust copy, not just labels */
  --border: rgba(26, 24, 20, 0.1);
  --hairline: rgba(26, 24, 20, 0.06);
  --accent: #b45c3e;
  --accent-soft: rgba(180, 92, 62, 0.1);
  --accent-on: #ffffff;
  --chip-bg: rgba(180, 92, 62, 0.1);
  --chip-border: rgba(180, 92, 62, 0.35);
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink1);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
img { max-width: 100%; }

.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1.25rem; }
.wrap-narrow { max-width: 46rem; margin: 0 auto; padding: 0 1.25rem; }

/* ---------- header / nav ---------- */

.site-header {
  border-bottom: 1px solid var(--hairline);
  background: var(--bg);
}
.site-header .bar {
  display: flex;
  align-items: baseline;
  gap: 1.75rem;
  padding: 1.1rem 0;
  flex-wrap: wrap;
}
.wordmark {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.45rem;
  color: var(--ink1);
  text-decoration: none;
  margin-right: auto;
}
.site-nav { display: flex; gap: 1.4rem; align-items: baseline; flex-wrap: wrap; }
.site-nav a {
  color: var(--ink2);
  text-decoration: none;
  font-size: 0.95rem;
}
.site-nav a:hover { color: var(--accent); }
.site-nav .nav-cta {
  color: var(--accent-on);
  background: var(--accent);
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-weight: 500;
}
.site-nav .nav-cta:hover { color: var(--accent-on); opacity: 0.92; }
/* Mobile header: a full nav row wraps awkwardly under the wordmark on phones,
   so keep just wordmark + Sign in (one stable row). The text links survive
   elsewhere: Pricing in the hero CTA, Privacy/Terms/Support in the footer. */
@media (max-width: 46rem) {
  .site-header .bar { padding: 0.9rem 0; align-items: center; flex-wrap: nowrap; }
  .wordmark { font-size: 1.3rem; }
  .site-nav a:not(.nav-cta) { display: none; }
}

/* ---------- landing: hero ---------- */

.hero { padding: 5rem 0 4rem; }
@media (max-width: 46rem) { .hero { padding: 3rem 0; } }
.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 1rem;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.3rem, 6vw, 3.6rem);
  line-height: 1.08;
  margin: 0 0 1.1rem;
  max-width: 20ch;
  text-wrap: balance;
}
.hero .lede {
  color: var(--ink2);
  font-size: 1.12rem;
  max-width: 54ch;
  margin: 0 0 2rem;
}
.cta-row { display: flex; gap: 0.9rem; align-items: center; flex-wrap: wrap; }
.btn {
  display: inline-block;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.7rem 1.5rem;
  font-weight: 500;
  font-size: 1rem;
}
.btn-primary { background: var(--accent); color: var(--accent-on); }
.btn-primary:hover { opacity: 0.92; }
.btn-ghost { color: var(--ink1); border: 1px solid var(--border); background: var(--surface); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.coming-soon {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink3);
  border: 1px dashed var(--border);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
}

/* ---------- landing: product shots ---------- */

.hero-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: center;
}
/* A restrained device frame: warm dark bezel, big radius, soft shadow. */
.phone {
  margin: 0;
  width: clamp(13rem, 22vw, 17rem);
  padding: 0.55rem;
  background: var(--ink1);
  border-radius: 2.2rem;
  box-shadow: 0 24px 48px -20px rgba(26, 24, 20, 0.35);
  justify-self: end;
}
.phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 1.7rem;
}
.phone-tilt { transform: rotate(-2deg); }
/* DOM order is copy-then-phone (natural reading order for screen readers and
   small screens); grid-template-areas puts the phone LEFT on desktop without
   reordering the DOM (Gemini a11y). */
.showcase {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "phone copy";
  gap: 3.5rem;
  align-items: center;
}
.showcase .phone { grid-area: phone; justify-self: start; }
.showcase-copy { grid-area: copy; }
.showcase-copy h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.7rem, 3.6vw, 2.4rem);
  line-height: 1.15;
  margin: 0 0 1rem;
  text-wrap: balance;
}
.showcase-copy p { color: var(--ink2); max-width: 56ch; margin: 0 0 1rem; }
@media (max-width: 46rem) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-grid .phone { justify-self: center; }
  .showcase { grid-template-columns: 1fr; grid-template-areas: none; }
  .showcase .phone { grid-area: auto; justify-self: center; }
  .showcase-copy { grid-area: auto; }
}

/* ---------- landing: features ---------- */

.section { padding: 3.5rem 0; }
.section + .section { border-top: 1px solid var(--hairline); }
.section-head { margin-bottom: 2rem; }
.section-head h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin: 0 0 0.4rem;
  text-wrap: balance;
}
.section-head p { color: var(--ink2); margin: 0; max-width: 60ch; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1rem;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 18px;
  padding: 1.5rem 1.5rem 1.4rem;
}
.feature .glyph {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--accent);
  margin: 0 0 0.6rem;
}
.feature h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.2rem;
  margin: 0 0 0.4rem;
}
.feature p { color: var(--ink2); font-size: 0.95rem; margin: 0; }

/* ---------- landing: trust strip ---------- */

.trust {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 18px;
  padding: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.5rem 2rem;
}
.trust h3 {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink3);
  font-weight: 600;
  margin: 0 0 0.35rem;
}
.trust p { margin: 0; color: var(--ink2); font-size: 0.95rem; }
.trust strong { color: var(--ink1); }

/* ---------- landing: closing cta ---------- */

.closing { text-align: center; padding: 4.5rem 0 5rem; }
.closing h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  margin: 0 0 1.6rem;
  text-wrap: balance;
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 2.2rem 0 3rem;
  color: var(--ink3);
  font-size: 0.9rem;
}
.site-footer .cols {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.site-footer nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.site-footer a { color: var(--ink2); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }

/* ---------- placeholder chips (unfilled operator values) ---------- */

.ph {
  font-family: var(--mono);
  font-size: 0.82em;
  white-space: nowrap;
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  border-radius: 5px;
  padding: 0.08em 0.4em;
  color: var(--accent);
}

/* ---------- legal documents ---------- */

.doc { padding: 3.5rem 0 5rem; }
.doc header.doc-head {
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 1.3rem;
  margin-bottom: 1.8rem;
}
.doc h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  line-height: 1.12;
  margin: 0 0 0.4rem;
  text-wrap: balance;
}
.doc-meta { color: var(--ink3); font-size: 0.92rem; margin: 0; }

.toc {
  background: var(--surface-alt);
  border-radius: 10px;
  padding: 1.1rem 1.4rem;
  margin: 0 0 2.2rem;
}
.toc-label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink3);
  font-weight: 600;
  margin: 0 0 0.4rem;
}
.toc ol { margin: 0; padding-left: 1.25rem; columns: 2; column-gap: 2rem; font-size: 0.92rem; }
@media (max-width: 34rem) { .toc ol { columns: 1; } }
.toc li { margin-bottom: 0.25rem; break-inside: avoid; }
.toc a { color: var(--ink2); text-decoration: none; }
.toc a:hover { color: var(--accent); }

.doc h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.3rem;
  margin: 2.4rem 0 0.6rem;
  text-wrap: balance;
}
.doc h3 { font-size: 1rem; margin: 1.5rem 0 0.4rem; }
.doc p, .doc li { color: var(--ink2); max-width: 68ch; }
.doc ul, .doc ol { padding-left: 1.35rem; }
.doc li { margin-bottom: 0.4rem; }
.doc strong { color: var(--ink1); }

.tbl-scroll { overflow-x: auto; margin: 1.2rem 0; }
.doc table { border-collapse: collapse; font-size: 0.9rem; min-width: 34rem; }
.doc th, .doc td {
  text-align: left;
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
}
.doc th {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink3);
}
.doc td { color: var(--ink2); }
.doc td:first-child { color: var(--ink1); font-weight: 600; white-space: nowrap; }
