/* StartSmart — Nocturne
   Ported from the app's Styling/DesignSystem.swift so the site and the app
   read as one product. Three rules carry it:
     1. One accent (#9184D9). success/warning/danger report state, never decorate.
     2. The accent is a line, an outline or a glow — never a fill.
     3. Every section opens the same way: uppercase overline, flush-left
        medium-weight title, hairline that fades to nothing at both edges.
   Nothing is centred and nothing is bold. Weight is not how this creates
   hierarchy. */

:root {
  --bg: #0d0e19;
  --bg-elevated: #171826;
  --bg-deep: #0a0b14;

  --text: #f3f5fe;
  --text-2: #cfd3e5;
  --text-3: #9397ab;
  --muted: #75798c;
  --faint: #5f6273;

  --accent: #9184d9;
  --accent-300: #d2cefd;
  --accent-400: #b5abfc;
  --accent-600: #796cbf;
  --accent-900: #2b2741;
  --periwinkle: #a5b4fc;

  --surface: rgba(233, 233, 237, 0.035);
  --surface-elevated: rgba(233, 233, 237, 0.06);
  --stroke: rgba(233, 233, 237, 0.09);
  --stroke-strong: rgba(233, 233, 237, 0.14);
  --stroke-faint: rgba(233, 233, 237, 0.07);

  --success: #8fd0b4;
  --warning: #c8a279;

  --radius: 14px;
  --radius-sm: 10px;
  --measure: 1080px;
  --measure-narrow: 720px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
}

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  color: var(--text-2);
  background: var(--bg);
  background-image:
    radial-gradient(
      760px 520px at 50% -8%,
      rgba(145, 132, 217, 0.16),
      transparent 70%
    ),
    linear-gradient(180deg, #1b1a2e 0%, #131425 48%, var(--bg-deep) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

h1,
h2,
h3,
h4 {
  color: var(--text);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0;
}

h1 {
  font-size: clamp(2.5rem, 6.4vw, 3.5rem);
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.75rem, 3.6vw, 2.25rem);
}

h3 {
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

p {
  margin: 0 0 1rem;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--accent-400);
  text-decoration: none;
  border-bottom: 1px solid rgba(181, 171, 252, 0.28);
  transition: color 0.18s ease, border-color 0.18s ease;
}

a:hover {
  color: var(--accent-300);
  border-bottom-color: rgba(210, 206, 253, 0.6);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-400);
  outline-offset: 3px;
  border-radius: 4px;
}

strong {
  color: var(--text);
  font-weight: 500;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  color: var(--accent-300);
}

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

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 24px;
}

.wrap--narrow {
  max-width: var(--measure-narrow);
}

section {
  padding: 88px 0;
}

@media (max-width: 700px) {
  section {
    padding: 64px 0;
  }
}

/* The fading hairline every screen opens with. */
.rule {
  height: 1px;
  border: 0;
  margin: 0;
  background: linear-gradient(
    90deg,
    transparent,
    var(--stroke-strong) 18%,
    var(--stroke-strong) 82%,
    transparent
  );
}

.overline {
  display: block;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}

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

.section-head {
  margin-bottom: 40px;
}

.section-head .rule {
  margin-top: 24px;
}

.lede {
  font-size: 1.0625rem;
  color: var(--text-3);
  max-width: 62ch;
  margin-top: 18px;
}

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

.mark {
  display: block;
  flex: none;
}

.mark path,
.mark circle,
.mark ellipse,
.mark line {
  fill: var(--periwinkle);
  stroke: none;
}

.mark line {
  stroke: var(--periwinkle);
  stroke-linecap: round;
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 14, 25, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--stroke-faint);
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 62px;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  border: 0;
  font-weight: 500;
  letter-spacing: -0.01em;
  font-size: 1.0625rem;
}

.nav__brand:hover {
  color: var(--text);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
}

.nav__links a {
  color: var(--text-3);
  border: 0;
  font-size: 0.9375rem;
}

.nav__links a:hover {
  color: var(--text);
}

@media (max-width: 820px) {
  .nav__links a.nav__hide-sm {
    display: none;
  }
  .nav__links {
    gap: 18px;
  }
}

/* ---------- Buttons ---------- */
/* The accent is an outline and a glow. On a near-black ground a filled slab
   reads as one more surface. */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid rgba(145, 132, 217, 0.55);
  background: rgba(145, 132, 217, 0.07);
  box-shadow: 0 0 0 4px rgba(145, 132, 217, 0.07),
    0 14px 34px -16px rgba(145, 132, 217, 0.7);
  color: var(--text);
  font-size: 1rem;
  font-weight: 500;
  font-family: var(--font);
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease,
    transform 0.2s ease;
}

.btn:hover {
  color: var(--text);
  border-color: rgba(181, 171, 252, 0.9);
  background: rgba(145, 132, 217, 0.13);
  box-shadow: 0 0 0 5px rgba(145, 132, 217, 0.1),
    0 18px 40px -16px rgba(145, 132, 217, 0.85);
  transform: translateY(-1px);
}

.btn--ghost {
  border-color: var(--stroke-strong);
  background: transparent;
  box-shadow: none;
  color: var(--text-2);
}

.btn--ghost:hover {
  border-color: var(--stroke-strong);
  background: var(--surface);
  box-shadow: none;
  color: var(--text);
}

.btn__sub {
  display: block;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 400;
  line-height: 1.2;
}

.btn__stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 36px;
}

.cta-note {
  margin-top: 18px;
  font-size: 0.875rem;
  color: var(--muted);
}

/* ---------- Hero ---------- */

.hero {
  padding: 84px 0 72px;
  position: relative;
}

/* The mark is centred over its rule, and the rule sits exactly on the sun's
   base: the svg's -34px bottom margin is (1 - 0.627) of its 92px height, which
   is where the mark's own horizon falls. gap must stay 0 or the two separate. */
.hero__mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 210px;
  margin-bottom: 34px;
  position: relative;
}

/* The glow is a background, never a flex/grid sibling — as a sibling a
   fixed-width glow sets the column's width and pushes content off both edges. */
.hero__mark::before {
  content: "";
  position: absolute;
  left: -120px;
  top: -70px;
  width: 420px;
  height: 260px;
  background: radial-gradient(
    closest-side,
    rgba(165, 180, 252, 0.17),
    transparent 100%
  );
  pointer-events: none;
  z-index: -1;
}

.hero__horizon {
  width: 210px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(165, 180, 252, 0.5) 30%,
    rgba(165, 180, 252, 0.5) 70%,
    transparent
  );
}

.hero h1 {
  max-width: 15ch;
}

.hero__sub {
  font-size: clamp(1.0625rem, 2.2vw, 1.1875rem);
  color: var(--text-3);
  max-width: 46ch;
  margin-top: 22px;
}

/* ---------- Trust marks ---------- */

.marks {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 42px;
  padding: 0;
  list-style: none;
}

.marks li {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 16px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.875rem;
  color: var(--text-3);
}

.marks svg {
  flex: none;
  stroke: var(--accent);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Cards ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 26px;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .grid--3,
  .grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: minmax(0, 1fr);
  }
}

.card p {
  color: var(--text-3);
  font-size: 0.9375rem;
  margin-top: 10px;
}

.step__index {
  display: block;
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 16px;
  font-variant-numeric: tabular-nums;
}

/* ---------- Voices ---------- */

.voice {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.voice__name {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.voice__tag {
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.voice__line {
  color: var(--text-2);
  font-size: 0.9375rem;
  font-style: italic;
  padding-left: 14px;
  border-left: 1px solid rgba(145, 132, 217, 0.45);
  margin: 2px 0 0;
}

.voice__desc {
  color: var(--text-3);
  font-size: 0.875rem;
  margin: 0;
}

/* ---------- Split ---------- */

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px;
  align-items: start;
}

@media (max-width: 820px) {
  .split {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
}

.ticks {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 14px;
}

.ticks li {
  position: relative;
  padding-left: 26px;
  color: var(--text-3);
  font-size: 0.9375rem;
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 10px;
  height: 1px;
  background: var(--accent);
}

/* ---------- FAQ ---------- */

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

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

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 22px 40px 22px 0;
  color: var(--text);
  font-weight: 500;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  position: relative;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 1px solid var(--muted);
  border-bottom: 1px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: translateY(-30%) rotate(-135deg);
}

.faq details > div {
  padding: 0 0 24px;
  color: var(--text-3);
  font-size: 0.9375rem;
  max-width: 72ch;
}

/* ---------- Closing CTA ---------- */

.closing {
  border-top: 1px solid var(--stroke-faint);
  background: radial-gradient(
    620px 300px at 50% 120%,
    rgba(145, 132, 217, 0.14),
    transparent 70%
  );
}

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--stroke-faint);
  padding: 44px 0 56px;
  font-size: 0.875rem;
  color: var(--muted);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 32px;
  align-items: center;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-left: auto;
}

.footer a {
  color: var(--text-3);
  border: 0;
}

.footer a:hover {
  color: var(--text);
}

.footer__legal {
  margin-top: 26px;
  color: var(--faint);
  font-size: 0.8125rem;
  max-width: 70ch;
}

/* ---------- Legal / document pages ---------- */

.doc {
  padding: 56px 0 24px;
}

.doc__meta {
  color: var(--muted);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  margin-top: 20px;
}

.doc__body {
  padding: 8px 0 88px;
  font-size: 1rem;
}

.doc__body h2 {
  font-size: 1.375rem;
  margin: 52px 0 6px;
  scroll-margin-top: 84px;
}

.doc__body h3 {
  font-size: 1.0625rem;
  color: var(--text-2);
  margin: 30px 0 4px;
}

.doc__body h2 + .rule {
  margin-bottom: 20px;
}

.doc__body p,
.doc__body li {
  color: var(--text-3);
  max-width: 74ch;
}

.doc__body ul {
  padding-left: 20px;
  margin: 0 0 1rem;
}

.doc__body li {
  margin-bottom: 8px;
}

.doc__body li::marker {
  color: var(--faint);
}

/* The lede panel at the top of each legal page — the plain-English summary. */
.summary {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 30px 0 8px;
}

.summary p {
  color: var(--text-2);
  max-width: none;
}

.toc {
  margin: 34px 0 0;
  padding: 22px 24px;
  border: 1px solid var(--stroke-faint);
  border-radius: var(--radius);
}

.toc ol {
  margin: 12px 0 0;
  padding-left: 20px;
  columns: 2;
  column-gap: 32px;
}

@media (max-width: 620px) {
  .toc ol {
    columns: 1;
  }
}

.toc li {
  margin-bottom: 6px;
  break-inside: avoid;
}

.toc a {
  color: var(--text-3);
  border: 0;
  font-size: 0.9375rem;
}

.toc a:hover {
  color: var(--accent-400);
}

/* A named third party and what it receives. */
.party {
  border: 1px solid var(--stroke);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 14px;
}

.party h3 {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 1rem;
}

.party p {
  margin: 6px 0 0;
  font-size: 0.9375rem;
}

.party__role {
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 10px;
}

.note {
  border: 1px solid rgba(200, 162, 121, 0.35);
  background: rgba(200, 162, 121, 0.06);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 22px 0;
}

.note p {
  color: var(--text-2);
}

.contact-card {
  border: 1px solid var(--stroke);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 26px;
}

.contact-card dl {
  margin: 0;
  display: grid;
  gap: 12px;
}

.contact-card dt {
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-card dd {
  margin: 4px 0 0;
  color: var(--text-2);
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 100;
  background: var(--bg-elevated);
  border: 1px solid var(--stroke-strong);
  padding: 10px 16px;
  border-radius: 8px;
}
