/* Meridyn shared styles: tokens, nav, footer, buttons, forms, page band, prose.
   Hero-specific CSS stays in index.html. */

:root {
  --bg: #111118;
  --bg-2: #16161f;
  --panel: #1b1b25;
  --accent: #b8b9e8;        /* soft periwinkle: links, focus, markers */
  --accent-soft: #8e8eab;   /* second tone of two-tone headlines */
  --text: #ededf3;
  --muted: #a5a5b8;
  --faint: #86869b;
  --slate: #6c6c80;
  --line: rgba(200, 200, 225, .12);
  --green: #4ade80;
  --blue: #5b7cf0;
  --purple: #9b7cf0;
  --pad: clamp(20px, 5.5vw, 88px);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh;
}
main { flex: 1 0 auto; }
a { color: inherit; text-decoration: none; }
.accent { color: var(--accent-soft); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* nav */
.nav {
  position: absolute; z-index: 10; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--pad);
}
.brand { font-weight: 800; letter-spacing: .22em; font-size: 15px; }
.nav__links { display: flex; gap: 34px; font-size: 14px; font-weight: 500; color: var(--muted); }
.nav__links a { transition: color .2s; }
.nav__links a:hover, .nav__links a[aria-current="page"] { color: #fff; }
.menu-btn { display: none; width: 40px; height: 40px; border-radius: 10px; border: 1px solid rgba(200, 200, 225, .3); background: transparent; cursor: pointer; padding: 0; }
.menu-btn span { display: block; width: 16px; height: 1.5px; background: var(--text); margin: 4px auto; }

@media (max-width: 699px) {
  .nav__links { position: absolute; top: 66px; left: var(--pad); right: var(--pad); flex-direction: column; gap: 0; background: rgba(27, 27, 37, .98); border: 1px solid var(--line); border-radius: 14px; padding: 8px; display: none; }
  .nav__links.open { display: flex; }
  .nav__links a { padding: 12px 14px; font-size: 15px; }
  .menu-btn { display: block; }
}

/* primary button */
.eyebrow { margin: 0 0 22px; font-size: clamp(12px, 1vw, 14px); font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.cta {
  display: inline-flex; align-items: center; gap: 10px;
  background: #ececf2; color: #14141b; font: inherit; font-weight: 600; font-size: 16px;
  padding: 14px 26px; border-radius: 10px; border: 0; cursor: pointer;
  box-shadow: 0 8px 28px -10px rgba(200, 200, 255, .25);
  transition: transform .2s, box-shadow .2s, background .2s;
}
.cta:hover { transform: translateY(-1px); background: #fff; box-shadow: 0 0 0 5px rgba(200, 200, 235, .08), 0 12px 34px -10px rgba(200, 200, 255, .35); }
.cta svg { transition: transform .2s; }
.cta:hover svg { transform: translateX(3px); }
@media (prefers-reduced-motion: reduce) { .cta, .cta svg, .nav__links a { transition: none; } }

/* subpage header band: static, dim echo of the hero (lanes + dotted sync lines) */
.band {
  position: relative; overflow: hidden;
  padding: clamp(112px, 16vh, 150px) var(--pad) clamp(40px, 7vh, 64px);
  background:
    radial-gradient(ellipse 60% 120% at 78% 50%, rgba(140, 135, 200, .10), rgba(140, 135, 200, 0) 70%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  border-bottom: 1px solid var(--line);
}
.band__art {
  position: absolute; inset: 0; pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, .15) 0%, rgba(0, 0, 0, .3) 35%, #000 80%);
          mask-image: linear-gradient(90deg, rgba(0, 0, 0, .15) 0%, rgba(0, 0, 0, .3) 35%, #000 80%);
}
.band__art i { position: absolute; left: 0; right: 0; height: 6px; }
.band__art i:nth-child(1) { top: 24%; --c: #c8c8e0;  --x1: 38%; --w1: 16%; --x2: 60%; --w2: 7%;  --x3: 70%; --w3: 20%; }
.band__art i:nth-child(2) { top: 38%; --c: #c8c8e0;   --x1: 30%; --w1: 9%;  --x2: 44%; --w2: 22%; --x3: 80%; --w3: 12%; }
.band__art i:nth-child(3) { top: 52%; --c: #c8c8e0; --x1: 42%; --w1: 18%; --x2: 65%; --w2: 8%;  --x3: 76%; --w3: 18%; }
.band__art i:nth-child(4) { top: 66%; --c: #c8c8e0;  --x1: 34%; --w1: 12%; --x2: 51%; --w2: 14%; --x3: 72%; --w3: 10%; }
.band__art i:nth-child(5) { top: 80%; --c: #c8c8e0;   --x1: 46%; --w1: 10%; --x2: 62%; --w2: 20%; --x3: 88%; --w3: 8%; }
.band__art b { position: absolute; top: 0; height: 100%; border-radius: 3px; background: var(--c); opacity: .14; }
.band__art b:nth-child(1) { left: var(--x1); width: var(--w1); }
.band__art b:nth-child(2) { left: var(--x2); width: var(--w2); }
.band__art b:nth-child(3) { left: var(--x3); width: var(--w3); }
.band__art s {
  position: absolute; top: 10%; bottom: 10%; width: 2px; text-decoration: none;
  background: repeating-linear-gradient(180deg, rgba(200, 200, 230, .35) 0 2px, transparent 2px 7px);
}
.band__art s:nth-of-type(1) { left: 58%; }
.band__art s:nth-of-type(2) { left: 74%; }
.band__art s:nth-of-type(3) { left: 90%; }
.band__inner { position: relative; max-width: 760px; }
.page-title { margin: 0; font-size: clamp(32px, 4.2vw, 56px); line-height: 1.08; letter-spacing: -.03em; font-weight: 800; max-width: 16em; overflow-wrap: break-word; }
.page-sub { margin: 18px 0 0; max-width: 36em; font-size: clamp(16px, 1.25vw, 19px); line-height: 1.6; color: var(--muted); }
.page-sub a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* long-form text (legal pages) */
.prose { width: 100%; max-width: calc(68ch + 2 * var(--pad)); margin: 0; padding: clamp(36px, 6vh, 64px) var(--pad) clamp(56px, 9vh, 96px); font-size: 16px; line-height: 1.75; color: #b6b6c8; overflow-wrap: anywhere; }
.prose > * { max-width: 68ch; }
.prose h1, .prose h2, .prose h3 { color: var(--text); letter-spacing: -.015em; line-height: 1.25; }
.prose h1 { font-size: 32px; font-weight: 800; margin: 2.2em 0 .6em; }
.prose h2 { font-size: 24px; font-weight: 700; margin: 2em 0 .6em; padding-top: 1.2em; border-top: 1px solid var(--line); }
.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose h3 { font-size: 18px; font-weight: 600; margin: 1.8em 0 .5em; }
.prose p { margin: 0 0 1.1em; }
.prose ul { margin: 0 0 1.2em; padding-left: 1.3em; }
.prose li { margin: 0 0 .45em; padding-left: .2em; }
.prose li::marker { color: var(--accent); }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:hover { color: #dcdcff; }

/* form */
.form { max-width: 680px; padding: clamp(36px, 6vh, 64px) var(--pad) clamp(56px, 9vh, 96px); box-sizing: content-box; }
.form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 600; color: var(--text); }
.field .req { color: var(--accent); margin-left: 2px; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--text);
  background: rgba(27, 27, 37, .9); border: 1px solid rgba(200, 200, 225, .3); border-radius: 10px;
  padding: 12px 14px; transition: border-color .2s, background .2s;
}
.field textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.field input::placeholder, .field textarea::placeholder { color: var(--faint); opacity: 1; }
.field input:hover, .field textarea:hover { border-color: rgba(200, 200, 225, .5); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); background: var(--panel); box-shadow: 0 0 0 3px rgba(184, 185, 232, .18); }
.field input:user-invalid, .field textarea:user-invalid { border-color: var(--red, #f25c54); }
.form__actions { margin-top: 26px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.form__note { margin: 22px 0 0; padding: 14px 16px; border-radius: 10px; border: 1px solid rgba(74, 222, 128, .4); background: rgba(74, 222, 128, .07); color: var(--text); font-size: 15px; line-height: 1.6; }
.form__note[hidden] { display: none; }
.form__note a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.form__hint { margin: 0; font-size: 13px; color: var(--faint); }
@media (max-width: 699px) {
  .form__grid { grid-template-columns: 1fr; }
  .form__actions .cta { width: 100%; justify-content: center; }
}

/* 404 */
.nf { padding: clamp(40px, 8vh, 80px) var(--pad) clamp(64px, 12vh, 120px); }
.nf__code { margin: 0 0 20px; font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 600; font-size: 14px; letter-spacing: .2em; color: var(--faint); }

/* footer */
.footer { flex-shrink: 0; border-top: 1px solid var(--line); background: var(--bg); padding: 48px var(--pad) 28px; color: var(--faint); font-size: 14px; }
.footer__inner { display: flex; flex-wrap: wrap; gap: 36px 72px; justify-content: space-between; }
.footer__brand { min-width: 200px; flex: 1 1 200px; }
.footer__brand .brand { color: var(--text); }
.footer__brand p { margin: 10px 0 0; font-size: 14px; }
.footer__col { min-width: 140px; }
.footer__title { margin: 0 0 14px; font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.footer__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer__col a { transition: color .2s; }
.footer__col a:hover { color: #fff; }
.footer__legal { margin: 40px 0 0; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; }
