/* Clerq — clerq.nz marketing site.
   ---------------------------------------------------------------------------
   Deliberately separate from webapp/frontend/src/styles.css. The portal's
   design language is "ledger, not lifestyle-app" — tight radii, borders doing
   the elevation, dense type — which is right for a screen an adviser works in
   all day and wrong for a page whose whole job is to explain and persuade.

   What IS shared is the identity: the same brand teal (#12A6A6), the same cool
   slate ink (#14262D), the same mark. Somebody arriving at app.clerq.nz after
   reading this page should recognise it as the same product.

   Type is Geist Variable throughout, self-hosted. No CDN, no Google Fonts
   request: a marketing page for a privacy product should not leak its visitors
   to a third party on first paint. */

/* ── Font ──────────────────────────────────────────────────────────────── */
/* One variable file covers 100–900, so the whole weight range costs a single
   ~70KB request instead of one per weight. */

@font-face {
  font-family: "Geist";
  src: url("assets/fonts/Geist-Variable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("assets/fonts/GeistMono-Variable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ── Tokens ────────────────────────────────────────────────────────────── */

:root {
  --brand: #12a6a6;
  --accent: #0b7676;
  --accent-hover: #095f5f;
  --accent-tint: rgba(18, 166, 166, 0.1);

  --ink: #14262d;
  --ink-2: #3f545c;
  --ink-3: #6b8088;

  --bg: #ffffff;
  --bg-soft: #f6f9fa;
  --surface: #ffffff;
  --border: #e3ecef;
  --border-2: #d3e0e5;

  --teal-deep: #0a3f42;
  --teal-deep-2: #06292c;

  --red: #b42318;
  --red-tint: #fdece9;
  --amber: #8a6300;
  --amber-tint: #fbf1d6;
  --green: #15803d;
  --green-tint: #e6f6ec;

  --font: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --shadow-1: 0 1px 2px rgba(15, 40, 48, 0.04), 0 2px 8px rgba(15, 40, 48, 0.04);
  --shadow-2: 0 1px 3px rgba(15, 40, 48, 0.05), 0 18px 48px rgba(15, 40, 48, 0.09);

  --r: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  --wrap: 72rem;
  --gap: clamp(4rem, 2rem + 7vw, 8.5rem);
  --pad: clamp(1.15rem, 0.4rem + 2.6vw, 2.5rem);

  --ease: 160ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eef4f5;
    --ink-2: #b3c4c9;
    --ink-3: #8399a0;
    --bg: #0d1518;
    --bg-soft: #111c20;
    --surface: #162428;
    --border: #24373d;
    --border-2: #2e454c;
    --brand: #1ac2c2;
    --accent: #35c4c4;
    --accent-hover: #52d6d6;
    --accent-tint: rgba(26, 194, 194, 0.14);
    --teal-deep: #0a3235;
    --teal-deep-2: #061f22;
    --red: #f0837a;
    --red-tint: rgba(240, 131, 122, 0.16);
    --amber: #e2b451;
    --amber-tint: rgba(226, 180, 81, 0.16);
    --green: #5ecb8b;
    --green-tint: rgba(94, 203, 139, 0.16);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-2: 0 1px 3px rgba(0, 0, 0, 0.45), 0 18px 48px rgba(0, 0, 0, 0.5);
  }
}

/* ── Base ──────────────────────────────────────────────────────────────── */

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

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: var(--pad);
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: var(--pad);
  top: 0.75rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 8px;
}

/* ── Type ──────────────────────────────────────────────────────────────── */

h1, h2, h3 { margin: 0; letter-spacing: -0.028em; text-wrap: balance; }

.display {
  font-size: clamp(2.4rem, 1.4rem + 3.9vw, 4.15rem);
  line-height: 1.03;
  font-weight: 620;
}

.h2 {
  font-size: clamp(1.75rem, 1.25rem + 1.9vw, 2.6rem);
  line-height: 1.12;
  font-weight: 600;
}

.h3 {
  font-size: 1.06rem;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -0.014em;
}

.lede {
  font-size: clamp(1.06rem, 0.98rem + 0.4vw, 1.28rem);
  line-height: 1.58;
  color: var(--ink-2);
  text-wrap: pretty;
}

.body { font-size: 0.985rem; line-height: 1.65; color: var(--ink-2); text-wrap: pretty; }
.small { font-size: 0.875rem; line-height: 1.6; color: var(--ink-3); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px var(--accent-tint);
}

.grad {
  background: linear-gradient(96deg, var(--accent) 0%, var(--brand) 55%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ── Buttons ───────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.78rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 550;
  cursor: pointer;
  transition: transform var(--ease), box-shadow var(--ease), background var(--ease), border-color var(--ease), color var(--ease);
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 2px rgba(15, 40, 48, 0.16), 0 8px 24px rgba(11, 118, 118, 0.24);
}
.btn--primary:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(15, 40, 48, 0.18), 0 14px 34px rgba(11, 118, 118, 0.3);
}

.btn--ghost { background: var(--surface); border-color: var(--border-2); color: var(--ink); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }

.btn--sm { padding: 0.5rem 0.95rem; font-size: 0.875rem; }

.btn--on-dark { background: #fff; color: var(--teal-deep-2); box-shadow: none; }
.btn--on-dark:hover { background: #eaf7f6; color: var(--teal-deep-2); }

@media (prefers-color-scheme: dark) {
  .btn--primary, .btn--primary:hover { color: #04211f; }
}

/* ── Header ────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--ease);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 66px;
}

.brand { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--ink); font-weight: 640; font-size: 1.12rem; letter-spacing: -0.03em; }
.brand svg { width: 26px; height: 26px; }

.site-nav { display: none; gap: 1.6rem; margin-left: 1rem; }
.site-nav a { color: var(--ink-2); font-size: 0.92rem; font-weight: 480; }
.site-nav a:hover { color: var(--ink); }

.site-header__cta { margin-left: auto; display: flex; align-items: center; gap: 0.7rem; }

@media (min-width: 56rem) { .site-nav { display: flex; } }
@media (max-width: 30rem) { .site-header__cta .btn--ghost { display: none; } }

/* ── Hero ──────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3.5rem, 2rem + 6vw, 7rem) clamp(3rem, 2rem + 4vw, 5.5rem);
  background:
    radial-gradient(60% 70% at 12% -5%, var(--accent-tint) 0%, transparent 60%),
    radial-gradient(45% 60% at 95% 0%, color-mix(in srgb, var(--brand) 9%, transparent) 0%, transparent 60%);
}

.hero__grid { display: grid; gap: clamp(2.5rem, 1rem + 4vw, 4rem); align-items: center; }
@media (min-width: 62rem) { .hero__grid { grid-template-columns: minmax(0, 1.02fr) minmax(21rem, 0.98fr); } }

.hero h1 { margin: 1.4rem 0 1.35rem; }
.hero .lede { max-width: 34rem; margin: 0 0 2rem; }

.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.cta-note { margin: 1.35rem 0 0; }

/* ── Hero product card ─────────────────────────────────────────────────── */

.shot {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-2);
  overflow: hidden;
}

.shot__bar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-3);
}
.shot__bar b { color: var(--ink); font-family: var(--font); font-size: 0.85rem; font-weight: 600; }
.shot__bar span { margin-left: auto; }

.shot__rows { padding: 0.55rem; display: flex; flex-direction: column; gap: 0.3rem; }

.row {
  display: grid;
  grid-template-columns: 4.6rem 1fr auto;
  gap: 0.7rem;
  align-items: center;
  padding: 0.62rem 0.7rem;
  border-radius: 10px;
}
.row:hover { background: var(--bg-soft); }
.row__ref { font-family: var(--mono); font-size: 0.74rem; color: var(--ink-3); }
.row__name { font-size: 0.9rem; font-weight: 520; }
.row__meta { font-size: 0.78rem; color: var(--ink-3); font-weight: 400; }

.chip {
  padding: 0.14rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 560;
  white-space: nowrap;
}
.chip--red { background: var(--red-tint); color: var(--red); }
.chip--amber { background: var(--amber-tint); color: var(--amber); }
.chip--green { background: var(--green-tint); color: var(--green); }

.shot__foot {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  font-size: 0.8rem;
  color: var(--ink-3);
}

/* ── Sections ──────────────────────────────────────────────────────────── */

/* The header is sticky, so an anchored section would otherwise scroll its own
   heading underneath it. Header is 66px; this clears it with room to breathe. */
:where(#product, #compliance, #security, #pricing, #contact) { scroll-margin-top: 5.5rem; }

.section { padding-block: var(--gap); }
.section--soft { background: var(--bg-soft); border-block: 1px solid var(--border); }

.section__head { max-width: 44rem; margin-bottom: clamp(2rem, 1.2rem + 2vw, 3.25rem); }
.section__head .h2 { margin: 1.1rem 0 1rem; }

/* ── Trust strip ───────────────────────────────────────────────────────── */

.strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}
.strip > div { background: var(--bg); padding: 1.4rem 1.5rem; }
.strip dt { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.5rem; }
.strip dd { margin: 0; font-size: 0.92rem; line-height: 1.55; color: var(--ink-2); }
.strip dd b { color: var(--ink); font-weight: 600; }

/* ── Feature blocks ────────────────────────────────────────────────────── */

.feature {
  display: grid;
  gap: clamp(1.75rem, 1rem + 3vw, 3.5rem);
  align-items: center;
  padding-block: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  border-top: 1px solid var(--border);
}
.feature:first-of-type { border-top: 0; }

@media (min-width: 58rem) {
  .feature { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
  .feature--flip > *:first-child { order: 2; }
}

.feature__body .h2 { font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2rem); margin: 1rem 0 0.9rem; }

.ticks { margin: 1.3rem 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0.65rem; }
.ticks li { display: grid; grid-template-columns: 1.1rem 1fr; gap: 0.65rem; font-size: 0.94rem; line-height: 1.55; color: var(--ink-2); }
.ticks svg { width: 1.1rem; height: 1.1rem; color: var(--accent); margin-top: 0.22rem; }
.ticks b { color: var(--ink); font-weight: 580; }

/* ── Card grid ─────────────────────────────────────────────────────────── */

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1rem; }

.card {
  padding: 1.55rem;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}
.card:hover { transform: translateY(-2px); border-color: var(--border-2); box-shadow: var(--shadow-2); }
.card__icon {
  display: grid; place-items: center;
  width: 38px; height: 38px; margin-bottom: 1.1rem;
  border-radius: 11px; background: var(--accent-tint); color: var(--accent);
}
.card__icon svg { width: 20px; height: 20px; }
.card .h3 { margin-bottom: 0.5rem; }
.card p { margin: 0; font-size: 0.9rem; line-height: 1.62; color: var(--ink-2); }

/* ── Dark panel ────────────────────────────────────────────────────────── */

.panel {
  padding: clamp(2.25rem, 1.4rem + 3.5vw, 4.25rem) var(--pad);
  border-radius: var(--r-xl);
  background:
    radial-gradient(80% 110% at 100% 0%, color-mix(in srgb, var(--brand) 22%, transparent) 0%, transparent 55%),
    linear-gradient(155deg, var(--teal-deep) 0%, var(--teal-deep-2) 100%);
  color: #e9f6f5;
}
.panel .eyebrow { color: color-mix(in srgb, var(--brand) 72%, #fff); }
.panel .h2 { color: #f3fbfa; }
.panel .lede { color: rgba(233, 246, 245, 0.8); }
.panel__head { max-width: 44rem; margin-bottom: clamp(1.8rem, 1.2rem + 2vw, 2.75rem); }

.panel__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(16.5rem, 1fr)); gap: 1rem; }
.panel__item {
  padding: 1.35rem;
  border: 1px solid rgba(233, 246, 245, 0.14);
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.045);
}
.panel__item h3 { font-size: 0.98rem; font-weight: 600; margin-bottom: 0.5rem; color: #f3fbfa; }
.panel__item p { margin: 0; font-size: 0.88rem; line-height: 1.6; color: rgba(233, 246, 245, 0.78); }

/* ── Pricing ───────────────────────────────────────────────────────────── */

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: 1.15rem; align-items: start; }

.plan {
  position: relative;
  padding: 1.85rem;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}
.plan--featured { border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); box-shadow: var(--shadow-2); }

.plan__tag {
  position: absolute; top: -0.7rem; left: 1.85rem;
  padding: 0.2rem 0.65rem; border-radius: 999px;
  background: var(--accent); color: #fff;
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase;
}
@media (prefers-color-scheme: dark) { .plan__tag { color: #04211f; } }

.plan__name { font-size: 1.15rem; font-weight: 620; letter-spacing: -0.02em; }
.plan__price { margin: 0.65rem 0 0.35rem; font-size: 1.6rem; font-weight: 600; letter-spacing: -0.03em; }
.plan__price small { font-size: 0.85rem; font-weight: 450; color: var(--ink-3); letter-spacing: 0; }
.plan__note { margin: 0 0 1.35rem; font-size: 0.85rem; color: var(--ink-3); }
.plan .ticks { margin-top: 1.35rem; }
.plan .btn { width: 100%; justify-content: center; }

/* ── FAQ ───────────────────────────────────────────────────────────────── */

.faq { display: grid; gap: 0.6rem; max-width: 52rem; }
.faq details {
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  padding: 1.05rem 1.3rem;
  font-size: 0.99rem;
  font-weight: 560;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  margin-left: auto;
  font-family: var(--mono);
  font-size: 1.1rem;
  color: var(--accent);
  transition: transform var(--ease);
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0; padding: 0 1.3rem 1.25rem; font-size: 0.93rem; line-height: 1.65; color: var(--ink-2); max-width: 46rem; }

/* ── Closing CTA ───────────────────────────────────────────────────────── */

.close {
  text-align: center;
  padding: clamp(2.5rem, 1.5rem + 3.5vw, 4.5rem) var(--pad);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: radial-gradient(90% 150% at 50% 0%, var(--accent-tint) 0%, transparent 62%), var(--surface);
  box-shadow: var(--shadow-1);
}
.close .lede { max-width: 36rem; margin: 1rem auto 2rem; }
.close .cta-row { justify-content: center; }

/* ── Footer ────────────────────────────────────────────────────────────── */

.site-footer { border-top: 1px solid var(--border); padding-block: 3rem 2.5rem; background: var(--bg-soft); }
.site-footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 2rem; margin-bottom: 2.5rem; }
.site-footer h4 { margin: 0 0 0.85rem; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
.site-footer ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0.55rem; }
.site-footer a { color: var(--ink-2); font-size: 0.9rem; }
.site-footer a:hover { color: var(--accent); }
.site-footer__base { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; padding-top: 1.75rem; border-top: 1px solid var(--border); }
.site-footer__base p { margin: 0; font-size: 0.83rem; color: var(--ink-3); }

/* ── Long-form documents (privacy, terms) ──────────────────────────────── */
/* A reading column, not a landing page. Narrower measure, plainer type, and
   no gradients: someone on these pages is checking a fact, not being sold to. */

.doc { padding-block: clamp(2.5rem, 1.5rem + 3vw, 4.5rem) var(--gap); }
.doc__head { max-width: 44rem; margin-bottom: clamp(2rem, 1.2rem + 2vw, 3rem); }
.doc__head h1 { font-size: clamp(2rem, 1.5rem + 1.8vw, 2.9rem); line-height: 1.08; margin-bottom: 1rem; }
.doc__meta { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.05em; color: var(--ink-3); }

.doc__body { max-width: 44rem; }
.doc__body h2 {
  font-size: 1.32rem;
  line-height: 1.25;
  font-weight: 620;
  margin: 2.75rem 0 0.9rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--border);
}
.doc__body h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.doc__body h3 { font-size: 1.02rem; font-weight: 600; margin: 1.75rem 0 0.6rem; }
.doc__body p { margin: 0 0 1.05rem; font-size: 0.99rem; line-height: 1.7; color: var(--ink-2); text-wrap: pretty; }
.doc__body strong { color: var(--ink); font-weight: 600; }
.doc__body ul { margin: 0 0 1.15rem; padding-left: 1.15rem; display: flex; flex-direction: column; gap: 0.55rem; }
.doc__body li { font-size: 0.99rem; line-height: 1.65; color: var(--ink-2); }
.doc__body a { text-decoration: underline; text-underline-offset: 2px; }

/* The plain-language summary at the top. Not a substitute for the text below
   it, and says so — but most people read one thing, and it should be true. */
.doc__tldr {
  padding: 1.5rem 1.65rem;
  margin-bottom: 2.5rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--r);
  background: var(--bg-soft);
}
.doc__tldr h2 { margin: 0 0 0.85rem; padding: 0; border: 0; font-size: 1.02rem; }
.doc__tldr ul { margin: 0; }
.doc__tldr li { font-size: 0.94rem; }
