/* ============================================================
   STAR SOURCE - design system
   Dark-first, with a light theme via prefers-color-scheme.
   ============================================================ */

:root {
  --bg:            #070a12;
  --bg-elev:       #0c111d;
  --surface:       rgba(255,255,255,.035);
  --surface-hover: rgba(255,255,255,.06);
  --border:        rgba(255,255,255,.09);
  --border-strong: rgba(255,255,255,.16);

  --text:          #e9edf6;
  --text-muted:    #98a3b8;
  --text-dim:      #6f7a90;

  --accent:        #7c9cff;
  --accent-2:      #38e8d0;
  --accent-soft:   rgba(124,156,255,.12);
  --on-accent:     #07101f;

  --danger:        #ff8080;
  --ok:            #48d6a8;

  --radius:   14px;
  --radius-lg:20px;
  --wrap:     1160px;

  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 40px -12px rgba(0,0,0,.6);
  --ease: cubic-bezier(.22,.61,.36,1);

  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg:            #ffffff;
    --bg-elev:       #f7f8fb;
    --surface:       rgba(10,20,40,.025);
    --surface-hover: rgba(10,20,40,.05);
    --border:        rgba(10,20,40,.10);
    --border-strong: rgba(10,20,40,.18);

    --text:          #0d1424;
    --text-muted:    #4e5a70;
    --text-dim:      #6b768c;

    --accent:        #3355e8;
    --accent-2:      #0e9e8b;
    --accent-soft:   rgba(51,85,232,.08);
    --on-accent:     #ffffff;

    --danger:        #b42318;
    --ok:            #08795f;

    --shadow: 0 1px 2px rgba(16,24,40,.05), 0 12px 32px -12px rgba(16,24,40,.18);
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.nav-open { overflow: hidden; }

img, svg { max-width: 100%; }
a { color: inherit; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 22px; }

.section { padding: 88px 0; }
.section-tight { padding: 60px 0; }
.section-alt { background: var(--bg-elev); border-block: 1px solid var(--border); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--accent); color: var(--on-accent);
  padding: 12px 18px; border-radius: 0 0 10px 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

:where(a, button, input, textarea, select, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: clamp(2.15rem, 1.4rem + 3.2vw, 3.75rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); letter-spacing: -.03em; }
h3 { font-size: 1.14rem; }
p  { margin: 0 0 1.1em; color: var(--text-muted); }
.lead { font-size: clamp(1.02rem, .96rem + .45vw, 1.2rem); color: var(--text-muted); max-width: 62ch; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .74rem; font-weight: 600; letter-spacing: .13em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; opacity: .6; }

.section-head { max-width: 66ch; margin-bottom: 46px; }
.section-head p { margin-bottom: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 22px; border-radius: 10px;
  font-size: .93rem; font-weight: 600; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease), opacity .18s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: 9px 16px; font-size: .87rem; }

.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { filter: brightness(1.08); }

.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-hover); }

.btn-link { padding: 0; color: var(--accent); font-weight: 600; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.btn-link:hover { gap: 10px; }
.btn-link::after { content: "\2192"; transition: transform .18s var(--ease); }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(7,10,18,.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, background .25s;
}
@media (prefers-color-scheme: light) { .site-header { background: rgba(255,255,255,.85); } }
.site-header.is-stuck { border-bottom-color: var(--border); }

.header-inner { display: flex; align-items: center; gap: 20px; min-height: 68px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); flex: none; }
.brand-mark { width: 26px; height: 26px; flex: none; }
.brand-name { font-weight: 700; letter-spacing: -.02em; font-size: 1.02rem; }
.brand-thin { font-weight: 400; color: var(--text-muted); margin-left: 2px; }

.nav-desktop { display: none; margin-left: auto; gap: 4px; }
.nav-desktop a {
  padding: 8px 12px; border-radius: 8px; text-decoration: none;
  font-size: .9rem; font-weight: 500; color: var(--text-muted);
  transition: color .16s, background .16s;
}
.nav-desktop a:hover { color: var(--text); background: var(--surface); }
.nav-desktop a[aria-current="page"] { color: var(--text); }

.header-cta { display: none; }

.nav-toggle {
  margin-left: auto; width: 40px; height: 40px; display: grid; place-content: center; gap: 5px;
  background: none; border: 1px solid var(--border); border-radius: 10px; cursor: pointer;
}
.nav-toggle span { display: block; width: 17px; height: 1.5px; background: var(--text); border-radius: 2px; transition: transform .22s var(--ease), opacity .18s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav-mobile[hidden] { display: none; }
.nav-mobile { display: flex; flex-direction: column; padding: 6px 22px 22px; border-top: 1px solid var(--border); background: var(--bg); }
.nav-mobile a { padding: 13px 4px; text-decoration: none; color: var(--text-muted); font-weight: 500; border-bottom: 1px solid var(--border); }
.nav-mobile a:last-child { border-bottom: 0; }
.nav-mobile a[aria-current="page"] { color: var(--accent); }

@media (min-width: 940px) {
  .nav-desktop { display: flex; }
  .header-cta { display: inline-flex; }
  .nav-toggle { display: none; }
  .nav-mobile { display: none !important; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: 96px 0 84px; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero-bg::before {
  content: ""; position: absolute; left: 50%; top: -340px; transform: translateX(-50%);
  width: 1100px; height: 760px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(124,156,255,.20), transparent 72%);
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, var(--border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 90% 62% at 50% 22%, #000 20%, transparent 78%);
  mask-image: radial-gradient(ellipse 90% 62% at 50% 22%, #000 20%, transparent 78%);
  opacity: .75;
}
.hero-inner { position: relative; z-index: 1; display: grid; gap: 56px; align-items: center; }
.hero h1 { margin-bottom: 20px; }
.hero .lead { margin-bottom: 30px; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 6px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: .8rem; color: var(--text-muted); margin-bottom: 24px;
}
.hero-badge { flex-wrap: wrap; }
.hero-badge b { color: var(--text); font-weight: 600; padding-left: 9px; border-left: 1px solid var(--border-strong); }
@media (max-width: 460px) { .hero-badge b { padding-left: 0; border-left: 0; } }
.hero-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2); }

@media (min-width: 960px) {
  .hero { padding: 130px 0 110px; }
  .hero-inner { grid-template-columns: 1.05fr .95fr; gap: 64px; }
}

/* Hero technical visual */
.hero-visual { position: relative; }
.hero-visual svg { width: 100%; height: auto; display: block; }

/* A short dash travels along each link, suggesting traffic without churning the GPU. */
.hero-flow path {
  stroke-dasharray: 16 132;
  stroke-dashoffset: 148;
  animation: hero-flow 4.4s linear infinite;
  animation-play-state: paused;
}
/* Only animate while the visual is actually on screen. */
.hero-visual.is-live .hero-flow path { animation-play-state: running; }
@keyframes hero-flow { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .hero-flow { display: none; } }

/* ---------- Cards & grids ---------- */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
@media (min-width: 700px) { .grid-2, .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  transition: border-color .22s var(--ease), background .22s var(--ease), transform .22s var(--ease);
}
.card:hover { border-color: var(--border-strong); background: var(--surface-hover); transform: translateY(-2px); }
.card h3 { margin-bottom: 8px; }
.card p { margin-bottom: 0; font-size: .94rem; }
.card p + .btn-link, .card ul + .btn-link { margin-top: 16px; }
.card ul { margin-top: 16px; }

.card-icon {
  width: 40px; height: 40px; border-radius: 11px;
  display: grid; place-content: center; margin-bottom: 18px;
  background: var(--accent-soft); border: 1px solid var(--border);
  color: var(--accent);
}
.card-icon svg { width: 19px; height: 19px; }

.tag {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  border: 1px solid var(--border-strong); color: var(--text-dim); background: var(--surface);
  white-space: nowrap;
}

.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }

/* Feature list */
.list-check { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.list-check li { position: relative; padding-left: 26px; color: var(--text-muted); font-size: .94rem; }
.list-check li::before {
  content: ""; position: absolute; left: 0; top: .5em;
  width: 12px; height: 7px; border-left: 1.8px solid var(--accent-2); border-bottom: 1.8px solid var(--accent-2);
  transform: rotate(-45deg);
}

/* ---------- Data / legal table ---------- */
.data-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.data-table th, .data-table td { text-align: left; padding: 15px 4px; border-bottom: 1px solid var(--border); vertical-align: top; }
.data-table th { width: 40%; font-weight: 500; color: var(--text-dim); }
.data-table td { color: var(--text); }
@media (max-width: 620px) {
  .data-table, .data-table tbody, .data-table tr, .data-table th, .data-table td { display: block; width: 100%; }
  .data-table th { border: 0; padding-bottom: 2px; }
  .data-table td { padding-top: 0; }
}

/* Company info panel */
.info-panel {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface); padding: 28px;
}
.info-panel h2 { font-size: 1.25rem; }

/* ---------- Legal / prose ---------- */
.prose { max-width: 74ch; }
.prose h2 { font-size: 1.42rem; margin-top: 2.2em; scroll-margin-top: 90px; }
.prose h2:first-of-type { margin-top: 1em; }
.prose h3 { margin-top: 1.8em; }
.prose ul, .prose ol { color: var(--text-muted); padding-left: 1.25em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .5em; }
.prose a { color: var(--accent); }
.page-head { padding: 72px 0 8px; }
.page-head .lead { margin-bottom: 0; }
.updated { font-size: .85rem; color: var(--text-dim); }

.callout {
  border: 1px solid var(--border); border-left: 3px solid var(--accent);
  background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 20px; margin: 26px 0;
}
.callout p:last-child { margin-bottom: 0; }
.callout p { font-size: .92rem; }

/* ---------- CTA band ---------- */
.cta-band {
  border: 1px solid var(--border); border-radius: 24px;
  background:
    radial-gradient(120% 140% at 12% 0%, var(--accent-soft), transparent 62%),
    var(--surface);
  padding: 48px 32px; text-align: center;
}
.cta-band h2 { margin-bottom: 10px; }
.cta-band p { margin-inline: auto; max-width: 52ch; }
.cta-band .btn-row { justify-content: center; margin-top: 26px; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 18px; max-width: 640px; }
.field { display: grid; gap: 7px; }
.field label { font-size: .88rem; font-weight: 500; }
.field .hint { font-size: .82rem; color: var(--text-dim); }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: .95rem; color: var(--text);
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; transition: border-color .18s, background .18s;
}
.field textarea { min-height: 152px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-dim); }
.field input:hover, .field textarea:hover { border-color: var(--border-strong); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field .error { font-size: .84rem; color: var(--danger); }
.field .error:empty { display: none; }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--danger); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-status { border-radius: 10px; padding: 14px 16px; font-size: .92rem; border: 1px solid var(--border); }
.form-status:empty { display: none; }
.form-status[data-state="ok"]  { color: var(--ok); border-color: var(--ok); }
.form-status[data-state="err"] { color: var(--danger); border-color: var(--danger); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-elev); padding: 60px 0 28px; margin-top: 20px; }
.footer-grid { display: grid; gap: 38px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 44px; } }

.brand-footer { margin-bottom: 14px; }
.footer-tagline { font-size: .92rem; color: var(--text-muted); max-width: 34ch; margin: 0; }
.footer-h { font-size: .78rem; text-transform: uppercase; letter-spacing: .11em; color: var(--text-dim); margin: 0 0 14px; font-weight: 600; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { text-decoration: none; color: var(--text-muted); font-size: .92rem; transition: color .16s; }
.footer-col a:hover { color: var(--text); }
.footer-address { font-style: normal; font-size: .92rem; color: var(--text-muted); line-height: 1.85; }

.footer-bottom {
  margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 6px 20px; justify-content: space-between;
}
.footer-bottom p { margin: 0; font-size: .85rem; color: var(--text-dim); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .card:hover { transform: none; }
}
