/* ============================================================
   Orion Nexus LLC — stylesheet
   Tokens, base, layout, components, responsive, motion
   ============================================================ */

:root {
  --night: #0a1120;
  --night-2: #101a2e;
  --night-3: #16233c;
  --line-dark: rgba(233, 237, 245, 0.1);
  --text-on-dark: #e9edf5;
  --text-dim-dark: #9fadc4;

  --paper: #f4f6fa;
  --paper-2: #ffffff;
  --line-light: #d9e0ea;
  --ink: #0f1b2d;
  --muted: #46566c;

  --gold: #f4c46b;
  --gold-deep: #b9852b;

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --radius: 14px;
  --container: 1120px;
  --shadow-soft: 0 18px 40px -24px rgba(15, 27, 45, 0.35);
  --focus-ring: 0 0 0 3px rgba(244, 196, 107, 0.45);
}

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

html { scroll-behavior: smooth; }

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

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.1;
  margin: 0 0 0.6em;
  letter-spacing: -0.02em;
  font-weight: 500;
}

h1 { font-size: clamp(2.4rem, 5.4vw, 3.9rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }
a { color: inherit; }

img, svg { display: block; max-width: 100%; }

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 4px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 1rem; top: -3rem;
  z-index: 100; padding: 0.7rem 1.1rem;
  background: var(--gold); color: var(--night);
  font-weight: 600; border-radius: 8px;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 1rem; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

/* ---------- Eyebrow / labels ---------- */
.eyebrow,
.mono {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 1.1rem;
}

.eyebrow { color: var(--gold-deep); }
.dark .eyebrow { color: var(--gold); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--night) 92%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-dark);
  color: var(--text-on-dark);
}

.site-header[data-scrolled] { box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.55); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--gold);
}

.brand-word {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-on-dark);
}
.brand-word em {
  font-style: normal;
  color: var(--gold);
}

.primary-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2rem;
  margin: 0;
  padding: 0;
}
.primary-nav a {
  text-decoration: none;
  color: var(--text-dim-dark);
  font-weight: 500;
  font-size: 0.98rem;
  transition: color 0.15s ease;
}
.primary-nav a:hover,
.primary-nav a:focus-visible { color: var(--text-on-dark); }

.nav-cta { display: none; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.nav-toggle .bar {
  width: 22px; height: 2px;
  background: var(--text-on-dark);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.85rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--gold); color: var(--night); }
.btn-primary:hover { background: #ffd183; box-shadow: 0 10px 24px -12px rgba(244, 196, 107, 0.7); }

.btn-ghost {
  border-color: var(--line-dark);
  color: var(--text-on-dark);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

.btn-dark { background: var(--night); color: var(--paper); }
.btn-dark:hover { background: var(--night-2); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(160deg, var(--night) 0%, var(--night-2) 100%);
  color: var(--text-on-dark);
  padding: clamp(5rem, 11vw, 7.5rem) 0 clamp(4rem, 8vw, 6rem);
  overflow: hidden;
}

.starfield {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.75;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 18%, var(--gold), transparent 60%),
    radial-gradient(1.2px 1.2px at 78% 12%, rgba(255,255,255,0.85), transparent 60%),
    radial-gradient(1.8px 1.8px at 42% 64%, var(--gold), transparent 60%),
    radial-gradient(1px 1px at 88% 58%, rgba(255,255,255,0.7), transparent 60%),
    radial-gradient(1.2px 1.2px at 62% 82%, var(--gold), transparent 60%),
    radial-gradient(1px 1px at 24% 86%, rgba(255,255,255,0.55), transparent 60%),
    radial-gradient(1.4px 1.4px at 8% 48%, rgba(255,255,255,0.5), transparent 60%),
    radial-gradient(1px 1px at 94% 34%, var(--gold), transparent 60%),
    radial-gradient(1.2px 1.2px at 34% 8%, rgba(255,255,255,0.6), transparent 60%);
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.hero h1 {
  color: var(--text-on-dark);
  margin-bottom: 1.4rem;
}

.hero-lead {
  color: var(--text-dim-dark);
  font-size: 1.15rem;
  max-width: 34rem;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 2.75rem;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem 3rem;
  margin: 0;
}
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats dt {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim-dark);
  opacity: 0.8;
}
.hero-stats dd {
  margin: 0.15rem 0 0;
  color: var(--gold);
  font-weight: 600;
}

/* Star chart panel */
.starchart { position: relative; }

.starchart-frame {
  position: relative;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  padding: 1.6rem 1.6rem 1.2rem;
  box-shadow: 0 30px 60px -40px rgba(0, 0, 0, 0.8);
}
.starchart-frame::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(244, 196, 107, 0.22);
  border-radius: 9px;
  pointer-events: none;
}

.starchart-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--gold);
  margin: 0 0 0.8rem;
}

.constellation { width: 100%; height: auto; }

.chart-line {
  stroke: rgba(159, 173, 196, 0.35);
  stroke-width: 1;
  stroke-dasharray: 4 4;
  stroke-linecap: round;
}

.star { fill: var(--gold); }
.chart-tags text {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  fill: var(--text-dim-dark);
}

.star-pulse {
  transform-origin: center;
  animation: pulse 3.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.starchart-note {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--text-dim-dark);
  margin: 1.1rem 0 0;
}

/* ---------- Sections ---------- */
.section { padding: clamp(4rem, 9vw, 6.5rem) 0; }

.section.light { background: var(--paper); }
.section.dark { background: var(--night); color: var(--text-on-dark); }
.section.dark h2 { color: var(--text-on-dark); }

.section-head { max-width: 42rem; margin-bottom: 3.25rem; }
.section-sub { color: var(--muted); font-size: 1.08rem; }
.dark .section-sub { color: var(--text-dim-dark); }

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.card {
  background: var(--paper-2);
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--gold-deep);
  box-shadow: 0 26px 50px -26px rgba(15, 27, 45, 0.4);
}

.card-icon {
  width: 52px; height: 52px;
  margin: 0 0 1.3rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, var(--night-3), var(--night-2));
  color: var(--gold);
}
.card-icon svg { width: 30px; height: 30px; }

.card h3 { margin-bottom: 0.6rem; }
.card p { color: var(--muted); font-size: 0.98rem; }

.card-list {
  margin: 1.25rem 0 0;
  padding: 1.1rem 0 0;
  list-style: none;
  border-top: 1px solid var(--line-light);
}
.card-list li {
  position: relative;
  padding-left: 1.35rem;
  margin-bottom: 0.5rem;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
}
.card-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.52em;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gold-deep);
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
}

.about-body p { color: var(--text-dim-dark); font-size: 1.05rem; }

.about-address {
  font-style: normal;
  margin-top: 2rem;
  padding: 1.4rem 1.6rem;
  border-left: 3px solid var(--gold);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-dim-dark);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.9;
}
.about-address strong { color: var(--text-on-dark); font-weight: 500; }

/* ---------- Approach ---------- */
.approach-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.principle-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.principle-list li {
  display: flex;
  gap: 1.4rem;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--line-light);
}
.principle-list li:first-child { padding-top: 0; }

.prin-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--gold-deep);
  padding-top: 0.4rem;
}
.principle-list h3 { margin-bottom: 0.35rem; }
.principle-list p { color: var(--muted); margin: 0; }

.approach-note {
  background: var(--night);
  color: var(--text-on-dark);
  border-radius: var(--radius);
  padding: 2rem 1.9rem;
  box-shadow: var(--shadow-soft);
}
.approach-note .mono { color: var(--gold); }
.approach-note h3 { margin-bottom: 0.7rem; }
.approach-note p { color: var(--text-dim-dark); font-size: 0.98rem; }
.approach-note .btn { margin-top: 0.9rem; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

.led-sub { color: var(--text-dim-dark); font-size: 1.08rem; }

.contact-list {
  list-style: none;
  margin: 2.2rem 0 0;
  padding: 0;
}
.contact-list li {
  display: flex;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line-dark);
  color: var(--text-on-dark);
}
.contact-list a { color: var(--gold); text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }
.contact-list .k {
  min-width: 4.5rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim-dark);
  padding-top: 0.28rem;
}

.contact-form {
  background: var(--paper-2);
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  padding: 1.9rem;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-weight: 600;
  font-size: 0.95rem;
}
.contact-form label i {
  font-style: normal;
  font-weight: 400;
  color: var(--muted);
}

.contact-form input,
.contact-form textarea {
  font: inherit;
  color: var(--ink);
  background: #fafbfd;
  border: 1px solid var(--line-light);
  border-radius: 9px;
  padding: 0.8rem 0.95rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--gold-deep);
  box-shadow: 0 0 0 3px rgba(185, 133, 43, 0.18);
}
.contact-form textarea { resize: vertical; min-height: 110px; }

.contact-form .btn { align-self: flex-start; }

.form-hint {
  min-height: 1.4em;
  font-size: 0.9rem;
  margin: 0;
  color: #a33d2f;
  font-weight: 500;
}
.form-hint[data-ok] { color: #1c7a46; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--night);
  border-top: 1px solid var(--line-dark);
  color: var(--text-dim-dark);
  padding: 2rem 0;
  font-size: 0.92rem;
}
.footer-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  justify-content: space-between;
  align-items: center;
}
.footer-wrap p { margin: 0; }
.footer-detail .dot { color: var(--gold); }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in-view { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .hero-grid,
  .about-grid,
  .contact-grid { grid-template-columns: 1fr; }

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

  .starchart { max-width: 420px; }

  .nav-toggle { display: flex; }

  .primary-nav {
    position: absolute;
    top: 72px;
    left: 0; right: 0;
    background: var(--night-2);
    border-bottom: 1px solid var(--line-dark);
    padding: 1rem clamp(1.25rem, 4vw, 2.5rem) 1.5rem;
    display: none;
  }
  .primary-nav[data-open] { display: block; }

  .primary-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-bottom: 1.2rem;
  }
  .primary-nav li { border-bottom: 1px solid var(--line-dark); }
  .primary-nav li a {
    display: block;
    padding: 0.9rem 0;
  }
  .nav-cta { display: inline-block; text-align: center; }
}

@media (max-width: 620px) {
  .card-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 1.25rem 2rem; }
  .contact-form { padding: 1.4rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .reveal { opacity: 1; transform: none; }
}
