/* Meridian Works — shared styles */
:root {
  --void: #04060c;
  --deep: #070b16;
  --panel: rgba(14, 22, 42, 0.62);
  --panel-solid: #0c1426;
  --line: rgba(140, 180, 255, 0.14);
  --line-strong: rgba(140, 200, 255, 0.32);
  --ice: #e9f2ff;
  --text: #b8c6df;
  --muted: #6f7f9c;
  --cyan: #6ee7ff;
  --violet: #8c8cff;
  --signal: #b6ff6e;
  --glow: 0 0 24px rgba(110, 231, 255, 0.35);
  --f-title: "Michroma", "Eurostile", "Arial Black", sans-serif;
  --f-head: "Jost", "Futura", "Century Gothic", sans-serif;
  --f-body: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

body {
  margin: 0;
  background-color: var(--void);
  background-image:
    radial-gradient(1200px 600px at 80% -10%, rgba(140, 140, 255, 0.16), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(110, 231, 255, 0.09), transparent 60%),
    linear-gradient(180deg, var(--deep), var(--void) 40%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--f-body);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.75;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Starfield: three layers of tiny radial dots, no images, no JS */
.stars, .stars::before, .stars::after {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; content: "";
}
.stars {
  background-image:
    radial-gradient(1px 1px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 27% 72%, #cfe 50%, transparent 51%),
    radial-gradient(1px 1px at 44% 33%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 63% 81%, #def 50%, transparent 51%),
    radial-gradient(1px 1px at 78% 12%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 91% 54%, #cdf 50%, transparent 51%);
  background-size: 420px 420px;
  opacity: 0.55;
}
.stars::before {
  background-image:
    radial-gradient(1.4px 1.4px at 8% 62%, #fff 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 36% 9%, #bdf 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 58% 47%, #fff 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 84% 88%, #fff 50%, transparent 51%);
  background-size: 640px 640px;
  opacity: 0.5;
  animation: twinkle 6s ease-in-out infinite alternate;
}
.stars::after {
  background-image:
    radial-gradient(2px 2px at 22% 40%, #9ef 50%, transparent 52%),
    radial-gradient(2px 2px at 70% 26%, #fff 50%, transparent 52%);
  background-size: 980px 980px;
  opacity: 0.45;
}
@keyframes twinkle { from { opacity: 0.25; } to { opacity: 0.6; } }

a { color: var(--cyan); text-decoration: none; transition: color .2s, text-shadow .2s; }
a:hover, a:focus-visible { color: var(--ice); text-shadow: var(--glow); }
:focus-visible { outline: 1px solid var(--cyan); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); position: relative; z-index: 1; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: rgba(4, 6, 12, 0.66);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ice); }
.brand:hover { text-shadow: none; }
.brand svg { flex: none; }
.brand span { font-family: var(--f-title); font-size: 12px; letter-spacing: 0.28em; }
.nav { display: flex; gap: clamp(14px, 3vw, 32px); }
.nav a { font-family: var(--f-head); font-weight: 400; font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--cyan); }
@media (max-width: 560px) { .brand span { display: none; } .nav a { font-size: 12px; letter-spacing: 0.12em; } }

/* ---------- Typography ---------- */
.title { font-family: var(--f-title); font-weight: 400; color: var(--ice); letter-spacing: 0.08em; line-height: 1.12; margin: 0; }
h2, h3 { font-family: var(--f-head); color: var(--ice); font-weight: 500; letter-spacing: 0.02em; }
h2 { font-size: clamp(26px, 3.6vw, 38px); line-height: 1.2; margin: 0 0 20px; font-weight: 400; }
h3 { font-size: 19px; margin: 36px 0 10px; }
p { margin: 0 0 16px; }
strong { color: var(--ice); font-weight: 500; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--f-body); font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--cyan); margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: linear-gradient(90deg, transparent, var(--cyan)); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(80px, 14vh, 150px) 0 clamp(90px, 16vh, 170px); overflow: hidden; }
.hero .title { font-size: clamp(34px, 8.4vw, 104px); letter-spacing: 0.06em; }
.hero .title .thin { display: block; background: linear-gradient(90deg, var(--cyan), var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lede { font-family: var(--f-head); font-weight: 300; font-size: clamp(18px, 2.3vw, 24px); color: var(--ice); max-width: 620px; margin: 28px 0 0; line-height: 1.5; }
.readout { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 40px; font-size: 12px; letter-spacing: 0.14em; color: var(--muted); text-transform: uppercase; }
.readout b { color: var(--text); font-weight: 400; }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 10px var(--signal); margin-right: 8px; vertical-align: 1px; animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }

.orbit { position: absolute; right: -180px; top: 50%; width: 720px; height: 720px; transform: translateY(-50%); pointer-events: none; opacity: 0.85; z-index: 0; }
.orbit .spin { transform-origin: 360px 360px; animation: spin 90s linear infinite; }
.orbit .spin-slow { transform-origin: 360px 360px; animation: spin 160s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 860px) { .orbit { right: -320px; opacity: 0.45; } }

.horizon { position: absolute; left: 50%; bottom: -1px; width: 160%; height: 160px; transform: translateX(-50%); border-radius: 50% 50% 0 0 / 100% 100% 0 0; border-top: 1px solid rgba(110, 231, 255, 0.45); box-shadow: 0 -18px 60px rgba(110, 231, 255, 0.12); background: linear-gradient(180deg, rgba(110,231,255,0.06), transparent 70%); pointer-events: none; }

/* ---------- Sections ---------- */
.section { padding: clamp(70px, 10vw, 120px) 0; border-top: 1px solid var(--line); position: relative; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
@media (max-width: 820px) { .grid-2 { grid-template-columns: 1fr; } }

.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 4px;
  padding: clamp(22px, 3.4vw, 38px); position: relative;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.panel::before, .panel::after { content: ""; position: absolute; width: 14px; height: 14px; border-color: var(--cyan); border-style: solid; opacity: 0.8; }
.panel::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.panel::after { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }

.specs { list-style: none; margin: 0; padding: 0; }
.specs li { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.specs li:last-child { border-bottom: 0; }
.specs span:first-child { color: var(--muted); letter-spacing: 0.12em; text-transform: uppercase; font-size: 11.5px; padding-top: 2px; }
.specs span:last-child { color: var(--ice); text-align: right; }

/* ---------- Reachward feature ---------- */
.mission { overflow: hidden; }
.mission .title { font-size: clamp(30px, 5.6vw, 64px); }
.mission .tagline { font-family: var(--f-head); font-weight: 300; font-size: clamp(17px, 2vw, 22px); color: var(--cyan); letter-spacing: 0.06em; margin: 14px 0 26px; }
.badge { display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--signal); border: 1px solid rgba(182, 255, 110, 0.35); padding: 6px 12px; border-radius: 999px; margin-bottom: 26px; }
.boss-track { display: flex; gap: 5px; margin: 26px 0 8px; }
.boss-track i { flex: 1; height: 4px; background: rgba(140, 180, 255, 0.16); border-radius: 2px; }
.boss-track i:nth-child(-n+3) { background: var(--cyan); box-shadow: 0 0 8px rgba(110, 231, 255, 0.6); }
.boss-caption { font-size: 11.5px; letter-spacing: 0.16em; color: var(--muted); text-transform: uppercase; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-head); font-weight: 500; font-size: 14px; letter-spacing: 0.16em; text-transform: uppercase;
  padding: 14px 22px; border-radius: 2px; border: 1px solid var(--cyan); color: var(--void); background: var(--cyan);
  transition: box-shadow .2s, background .2s, color .2s;
}
.btn:hover, .btn:focus-visible { color: var(--void); background: var(--ice); box-shadow: var(--glow); text-shadow: none; }
.btn.ghost { background: transparent; color: var(--cyan); }
.btn.ghost:hover, .btn.ghost:focus-visible { background: rgba(110, 231, 255, 0.1); color: var(--ice); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* ---------- Contact ---------- */
.contact-email { font-family: var(--f-head); font-weight: 300; font-size: clamp(18px, 3.2vw, 30px); color: var(--ice); word-break: break-all; display: inline-block; margin: 6px 0 24px; border-bottom: 1px solid var(--line-strong); padding-bottom: 4px; }
.contact-email:hover { border-color: var(--cyan); }

/* ---------- Document pages (privacy / support) ---------- */
.doc-hero { padding: clamp(64px, 10vh, 110px) 0 40px; }
.doc-hero .title { font-size: clamp(30px, 6vw, 64px); }
.doc-meta { margin-top: 22px; font-size: 12px; letter-spacing: 0.14em; color: var(--muted); text-transform: uppercase; }
.doc { display: grid; grid-template-columns: 220px 1fr; gap: clamp(28px, 5vw, 64px); padding-bottom: 110px; }
.toc { position: sticky; top: 96px; align-self: start; font-size: 12.5px; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; border-left: 1px solid var(--line); }
.toc li { counter-increment: toc; }
.toc a { display: block; padding: 6px 0 6px 16px; color: var(--muted); margin-left: -1px; border-left: 1px solid transparent; }
.toc a::before { content: counter(toc, decimal-leading-zero) "  "; color: var(--violet); }
.toc a:hover { color: var(--ice); border-left-color: var(--cyan); text-shadow: none; }
.doc-body { max-width: 720px; }
.doc-body section { padding-top: 8px; margin-bottom: 44px; scroll-margin-top: 90px; }
.doc-body h2 { font-size: clamp(22px, 2.8vw, 28px); padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.doc-body ul { padding-left: 20px; margin: 0 0 16px; }
.doc-body li { margin-bottom: 8px; }
.doc-body li::marker { color: var(--cyan); }
.summary-box { border-left: 2px solid var(--cyan); background: rgba(110, 231, 255, 0.06); padding: 18px 22px; margin: 0 0 44px; }
.summary-box p:last-child { margin-bottom: 0; }
@media (max-width: 820px) { .doc { grid-template-columns: 1fr; } .toc { position: static; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 48px; font-size: 12.5px; color: var(--muted); position: relative; z-index: 1; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; }
.site-footer nav { display: flex; gap: 22px; }
.site-footer a { color: var(--text); }

.skip { position: absolute; left: -999px; top: 8px; background: var(--cyan); color: var(--void); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }
