/* ==========================================================================
   Nexdha — site styles
   Palette is taken from the logo: navy #122b3d on warm paper.
   ========================================================================== */

:root {
  --navy:        #122b3d;
  --navy-deep:   #0d1f2d;
  --navy-soft:   #1c3d54;

  --paper:       #ffffff;
  --paper-warm:  #f8f6f2;
  --paper-warm2: #f2efe9;

  --ink:         #16232c;
  --ink-mid:     #4d5f6b;
  --ink-light:   #7b8b95;

  --rule:        #e2ded6;
  --rule-dark:   #2a4759;

  --sand:        #b98a4a;

  --measure:     64ch;
  --gutter:      clamp(1.25rem, 5vw, 3.5rem);
  --pad-y:       clamp(4.5rem, 9vw, 8.5rem);

  --sans: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
          Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.62;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.08;
  color: var(--navy);
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.5rem, 5.6vw, 4.25rem); }
h2 { font-size: clamp(1.85rem, 3.4vw, 2.75rem); }
h3 { font-size: 1.0625rem; letter-spacing: -0.01em; line-height: 1.35; }

p { margin: 0 0 1.1em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

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

.mono {
  font-family: var(--mono);
  font-size: 0.875em;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.muted       { color: var(--ink-mid); }
.muted-light { color: rgba(255,255,255,0.62); }
.strong      { font-weight: 500; color: var(--navy); }

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

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--navy); color: #fff; padding: 0.75rem 1.25rem;
}
.skip:focus { left: 0; }

:focus-visible { outline: 2px solid var(--sand); outline-offset: 3px; }

/* ── Layout ──────────────────────────────────────────────────────────── */

.wrap {
  width: 100%;
  max-width: 76rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap.narrow { max-width: 52rem; }

.band { padding-block: var(--pad-y); border-top: 1px solid var(--rule); }
.band.alt { background: var(--paper-warm); }
.band.dark {
  background: var(--navy);
  color: rgba(255,255,255,0.78);
  border-top: 0;
}
.band.dark h2, .band.dark h3 { color: #fff; }
.band.dark a:not(.btn) { color: #fff; }

.sec-head { margin-bottom: clamp(2.5rem, 5vw, 4rem); max-width: 46rem; }
.sec-head h2 { margin-bottom: 1.1rem; }
.sec-head p { color: var(--ink-mid); font-size: 1.125rem; }
.sec-head.light p { color: rgba(255,255,255,0.66); }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 1.75rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  padding: 0.6rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 2px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease;
  white-space: nowrap;
}
.btn-lg { padding: 0.85rem 1.6rem; font-size: 1rem; }

.btn-solid { background: var(--navy); color: #fff; }
.btn-solid:hover { background: var(--navy-soft); color: #fff; }

.btn-line { border-color: var(--rule); color: var(--navy); background: transparent; }
.btn-line:hover { border-color: var(--navy); background: transparent; color: var(--navy); }

.btn-quiet { color: var(--ink-mid); background: transparent; }
.btn-quiet:hover { color: var(--navy); }

.btn-invert { background: #fff; color: var(--navy); }
.btn-invert:hover { background: var(--paper-warm2); color: var(--navy); }

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

.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255,255,255,0.94);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-head.is-stuck { border-bottom-color: var(--rule); }

.head-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  min-height: 4.75rem;
}

.brand { flex: 0 0 auto; line-height: 0; }
.brand img { width: 132px; height: auto; }

.nav {
  display: flex;
  gap: 1.75rem;
  margin-right: auto;
}
.nav a {
  font-size: 0.9375rem;
  color: var(--ink-mid);
  text-decoration: none;
}
.nav a:hover { color: var(--navy); }

/* The in-menu app link only exists for the mobile drawer. */
.nav-cta { display: none; }

.head-actions { display: flex; align-items: center; gap: 0.5rem; }

.menu-btn {
  display: none;
  align-items: center;
  gap: 0.6rem;
  margin-left: auto;
  background: none;
  border: 0;
  padding: 0.5rem 0;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--navy);
  cursor: pointer;
}
.menu-lines { display: inline-flex; flex-direction: column; gap: 4px; width: 18px; }
.menu-lines i { display: block; height: 1px; background: var(--navy); transition: transform .2s ease, opacity .2s ease; }
.menu-btn[aria-expanded="true"] .menu-lines i:first-child { transform: translateY(2.5px) rotate(11deg); }
.menu-btn[aria-expanded="true"] .menu-lines i:last-child  { transform: translateY(-2.5px) rotate(-11deg); }

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

.hero { padding-block: clamp(3.5rem, 8vw, 7rem) var(--pad-y); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.85fr);
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: start;
}

.hero-copy h1 { margin-bottom: 1.75rem; }

.lede {
  font-size: clamp(1.0625rem, 1.35vw, 1.1875rem);
  color: var(--ink-mid);
  max-width: 34rem;
  margin-bottom: 2.25rem;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1.5rem; }

.fineprint { font-size: 0.875rem; color: var(--ink-light); }

/* Payment summary panel */
.statement {
  background: var(--paper-warm);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 1.5rem 1.6rem 1.4rem;
}

.statement-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid var(--rule);
}
.tag {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  border: 1px solid var(--rule);
  background: #fff;
  padding: 0.3rem 0.55rem;
  border-radius: 2px;
}
.statement-head .mono { font-size: 0.75rem; }

.ledger { margin: 0; padding: 1.15rem 0 0; }
.ledger > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.42rem 0;
}
.ledger dt { color: var(--ink-mid); font-size: 0.9375rem; }
.ledger dd { margin: 0; color: var(--ink); }
.ledger .rule { border-top: 1px solid var(--rule); padding: 0; margin: 0.6rem 0; }
.ledger .total dt { color: var(--navy); font-weight: 500; }
.ledger .total dd { color: var(--navy); font-weight: 500; font-size: 1.0625rem; }

.statement-foot {
  margin-top: 1.35rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--rule);
  display: grid;
  gap: 0.7rem;
}
.statement-foot > div { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.statement-foot .label { font-size: 0.8125rem; color: var(--ink-light); }
.statement-foot .mono { font-size: 0.8125rem; color: var(--ink); }

/* ── Column lists ────────────────────────────────────────────────────── */

.cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 3.5rem);
}
.col h3 {
  padding-bottom: 0.9rem;
  margin-bottom: 1.1rem;
  border-bottom: 1px solid var(--rule);
}
.col p { color: var(--ink-mid); font-size: 0.9875rem; }

.on-dark .col h3 { border-bottom-color: var(--rule-dark); }
.on-dark .col p { color: rgba(255,255,255,0.66); }

.list { list-style: none; margin: 0; padding: 0; }
.list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.9875rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: baseline;
  justify-content: space-between;
}
.list li:last-child { border-bottom: 0; }
.list .mono { font-size: 0.75rem; color: var(--ink-light); }

/* ── Steps ───────────────────────────────────────────────────────────── */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 3.5rem);
  counter-reset: none;
}
.steps li { border-top: 2px solid var(--navy); padding-top: 1.25rem; }
.step-no {
  display: block;
  font-size: 0.8125rem;
  color: var(--ink-light);
  letter-spacing: 0.08em;
  margin-bottom: 1.5rem;
}
.steps h3 { margin-bottom: 0.7rem; }
.steps p { color: var(--ink-mid); font-size: 0.9875rem; }

.aside-note {
  margin-top: clamp(2.5rem, 4vw, 3.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9375rem;
  color: var(--ink-light);
  max-width: 46rem;
}

/* ── Two-up (side heading + definition list) ─────────────────────────── */

.two-up {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
.two-up-side h2 { margin-bottom: 1rem; }
.two-up-side p { font-size: 1.0625rem; }

.reasons { margin: 0; display: grid; gap: 0; }
.reasons > div {
  padding: 1.6rem 0;
  border-top: 1px solid var(--rule);
}
.reasons > div:first-child { border-top: 0; padding-top: 0; }
.reasons > div:last-child { padding-bottom: 0; }
.reasons dt {
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -0.015em;
  font-size: 1.0625rem;
  margin-bottom: 0.5rem;
}
.reasons dd { margin: 0; color: var(--ink-mid); font-size: 0.9875rem; max-width: var(--measure); }
.reasons.tight > div { padding-block: 1.35rem; }

/* A note placed after the list keeps to the list's column. */
.two-up > .aside-note { grid-column: 2; margin-top: 0; }

/* ── Dark section CTA ────────────────────────────────────────────────── */

.dark-cta {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-top: 2rem;
  border-top: 1px solid var(--rule-dark);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 2rem;
}
.dark-cta .mono { font-size: 0.8125rem; }

/* ── Fees ────────────────────────────────────────────────────────────── */

.fee-note {
  border-top: 2px solid var(--navy);
  padding-top: 1.5rem;
  max-width: 44rem;
}
.fee-lead {
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  color: var(--navy);
  letter-spacing: -0.012em;
  line-height: 1.5;
}

.notes {
  list-style: none;
  margin: 2.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
  max-width: 46rem;
}
.notes li {
  font-size: 0.9375rem;
  color: var(--ink-mid);
  padding-left: 1.1rem;
  position: relative;
}
.notes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 5px;
  height: 1px;
  background: var(--ink-light);
}

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

.faq { border-top: 1px solid var(--rule); }

.faq details { border-bottom: 1px solid var(--rule); }

.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 1.35rem 2.5rem 1.35rem 0;
  position: relative;
  font-weight: 500;
  color: var(--navy);
  letter-spacing: -0.015em;
  font-size: 1.0625rem;
}
.faq summary::-webkit-details-marker { display: none; }

.faq summary::after,
.faq summary::before {
  content: "";
  position: absolute;
  right: 0.35rem;
  top: 50%;
  background: var(--ink-light);
  transition: transform .18s ease, opacity .18s ease;
}
.faq summary::before { width: 13px; height: 1px; margin-top: -0.5px; }
.faq summary::after  { width: 1px; height: 13px; margin-top: -6.5px; right: 0.72rem; }

.faq details[open] summary::after { opacity: 0; transform: rotate(90deg); }
.faq summary:hover::before, .faq summary:hover::after { background: var(--navy); }

.faq details p {
  margin: 0;
  padding: 0 clamp(0px, 4vw, 3.5rem) 1.6rem 0;
  color: var(--ink-mid);
  font-size: 0.9875rem;
  max-width: var(--measure);
}

/* ── Closer ──────────────────────────────────────────────────────────── */

.closer {
  padding-block: var(--pad-y);
  border-top: 1px solid var(--rule);
  text-align: center;
}
.closer h2 { margin-bottom: 1.1rem; }
.closer p { color: var(--ink-mid); margin-inline: auto; max-width: 40rem; font-size: 1.0625rem; }
.closer-cta {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* ── Legal pages ─────────────────────────────────────────────────────── */

.legal-head {
  padding-block: clamp(3rem, 6vw, 5rem) clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--rule);
}
.legal-head h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1.25rem;
  max-width: 30rem;
}
.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--ink-light);
}

.legal-body { padding-block: clamp(2.5rem, 5vw, 4rem) clamp(4rem, 8vw, 6rem); }

/* Sections are nested inside .wrap, so this cannot be a child selector. */
.legal-body section { padding-top: clamp(2.5rem, 4.5vw, 3.5rem); }
.legal-body section:first-child { padding-top: 0; }

.legal-body h2 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  margin-bottom: 1.1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--rule);
}
.legal-body h3 {
  font-size: 1rem;
  margin: 1.85rem 0 0.55rem;
}
.legal-body p,
.legal-body li { color: var(--ink-mid); font-size: 0.9875rem; }
.legal-body p { max-width: var(--measure); }

.legal-body ul,
.legal-body ol {
  margin: 0 0 1.1em;
  padding-left: 1.15rem;
  max-width: var(--measure);
}
.legal-body li { margin-bottom: 0.45rem; }
.legal-body li::marker { color: var(--ink-light); }

/* Two-part rows used for "what we collect / why". */
.pairs { margin: 0 0 0.5rem; }
.pairs > div {
  padding: 1.15rem 0;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: 0.35rem 2rem;
}
.pairs > div:last-child { border-bottom: 1px solid var(--rule); }
.pairs dt { font-weight: 600; color: var(--navy); letter-spacing: -0.012em; font-size: 0.9875rem; }
.pairs dd { margin: 0; color: var(--ink-mid); font-size: 0.9875rem; }

.callout {
  background: var(--paper-warm);
  border-left: 2px solid var(--navy);
  padding: 1.25rem 1.4rem;
  margin: 1.5rem 0;
  max-width: var(--measure);
}
.callout p { margin: 0; }

.legal-contact {
  margin-top: 1.25rem;
  font-style: normal;
  color: var(--ink-mid);
  font-size: 0.9875rem;
  line-height: 1.75;
}

.legal-body .legal-toc {
  margin-bottom: 0;
  padding-left: 0;
  list-style: none;
  columns: 2;
  column-gap: 2.5rem;
  max-width: none;
}
.legal-toc li { margin-bottom: 0.4rem; break-inside: avoid; }
.legal-toc a { color: var(--ink-mid); text-decoration: none; }
.legal-toc a:hover { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }

.back-link {
  display: inline-block;
  margin-bottom: 2rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-light);
  text-decoration: none;
}
.back-link:hover { color: var(--navy); }

@media (max-width: 620px) {
  .pairs > div { grid-template-columns: 1fr; }
  .legal-body .legal-toc { columns: 1; }
}

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

.site-foot {
  background: var(--navy-deep);
  color: rgba(255,255,255,0.7);
  padding-block: clamp(3.5rem, 6vw, 5rem) 2rem;
  font-size: 0.9375rem;
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: clamp(2rem, 4vw, 3rem);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

.foot-mark { width: 104px; height: auto; margin-bottom: 1.25rem; opacity: 0.92; }
.foot-brand p { font-size: 0.9375rem; max-width: 22rem; }

.foot-col h3 {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 1.1rem;
}
.foot-col { display: flex; flex-direction: column; align-items: flex-start; gap: 0.6rem; }
.foot-col a {
  color: rgba(255,255,255,0.72);
  text-decoration: none;
  font-size: 0.9375rem;
}
.foot-col a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.foot-col address {
  font-style: normal;
  color: rgba(255,255,255,0.62);
  font-size: 0.9375rem;
  line-height: 1.7;
}
.foot-col address .mono { font-size: 0.8125rem; }

.foot-base {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 1.75rem;
  display: grid;
  gap: 0.75rem;
}
.foot-base p { font-size: 0.8125rem; max-width: 62rem; color: rgba(255,255,255,0.5); }
.foot-base p:first-child { color: rgba(255,255,255,0.72); }

/* ── Responsive ──────────────────────────────────────────────────────── */

@media (max-width: 1040px) {
  .foot-grid { grid-template-columns: repeat(3, 1fr); }
  .foot-brand { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .statement { max-width: 30rem; }
  .two-up { grid-template-columns: 1fr; }
  .two-up > .aside-note { grid-column: 1; }
  .cols, .steps { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav, .head-actions { display: none; }
  .menu-btn { display: inline-flex; }

  .site-head.nav-open { border-bottom-color: var(--rule); }

  .site-head.nav-open .nav {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--paper);
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    padding: 0.5rem var(--gutter) 1.25rem;
    margin: 0;
  }
  .site-head.nav-open .nav a {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--rule);
    font-size: 1.0625rem;
    color: var(--navy);
  }
  .site-head.nav-open .nav a:last-of-type { border-bottom: 0; }

  /* Must out-specify `.site-head.nav-open .nav a` above, which would
     otherwise repaint this navy-on-navy. */
  .site-head.nav-open .nav a.nav-cta {
    display: block;
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    background: var(--navy);
    color: #fff;
    text-align: center;
    border-radius: 2px;
  }
}

@media (max-width: 620px) {
  body { font-size: 1rem; }
  .cols, .steps { grid-template-columns: 1fr; }
  .steps li { border-top-width: 1px; }
  .step-no { margin-bottom: 1rem; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .list li { justify-content: flex-start; }

  /* Stack the calls to action rather than letting long labels
     widen the page. */
  .btn { white-space: normal; }
  .hero-cta, .closer-cta { display: grid; gap: 0.6rem; }
  .hero-cta .btn, .closer-cta .btn { width: 100%; }

  .statement { padding: 1.25rem 1.15rem; }
}

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