/* =========================================================================
   Operalynsys — core stylesheet
   Design language: editorial type, restrained sage/pine palette, a single
   custom motif (nodes resolving into a connected system) used sparingly.
   ========================================================================= */

:root {
  /* ---- Color tokens (dark "space" theme) ---- */
  --paper: #05070b;                      /* page background / opaque dark surfaces */
  --paper-raised: rgba(255, 255, 255, 0.055); /* glass panel fill, floats over the starfield */
  --ink: #eef1f4;                        /* primary (light) text */
  --ink-soft: #b7c0c7;
  --ink-faint: #838d95;
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.26);
  --accent: #3a6152;
  --accent-deep: #12211b;
  --accent-glow: #7fe3b4;                /* bright mint used for text/icons/glow, never as a button fill under light text */
  --accent-tint: rgba(127, 227, 180, 0.14);
  --warm: #d1a25f;
  --warm-tint: rgba(209, 162, 95, 0.14);
  --focus-ring: #4da3ff;
  --error: #ff8f76;
  --error-tint: rgba(255, 143, 118, 0.14);
  --success: #79d99b;
  --success-tint: rgba(121, 217, 155, 0.14);

  /* ---- Type ---- */
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-body: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* ---- Layout ---- */
  --content-max: 1180px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius-sm: 3px;
  --radius-md: 6px;
}

/* The brand runs on a dark "space" surface: a fixed starfield canvas plus a
   faint nebula wash sit behind every page, with content panels floating
   above as translucent glass. This holds in light and dark OS modes alike —
   it's a deliberate identity, not a color-scheme fallback. */

/* ---- Reset ---- */
*, *::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;
    scroll-behavior: auto !important;
  }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Nebula wash: a couple of very soft, static color blooms for depth.
   Purely decorative — sits behind the star canvas. */
.space-backdrop {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60% 50% at 15% 10%, rgba(58, 97, 82, 0.18), transparent 60%),
    radial-gradient(50% 45% at 85% 85%, rgba(209, 162, 95, 0.08), transparent 65%),
    var(--paper);
  pointer-events: none;
}
#starfield {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; }
ul, ol { padding: 0; margin: 0; list-style: none; }
button { font: inherit; }
h1, h2, h3, h4, p, figure { margin: 0; }

/* ---- Focus & accessibility ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  z-index: 1000;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 1rem; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0; padding: 0; margin: -1px;
}

/* ---- Type scale ---- */
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  font-weight: 600;
}
h1, .h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--ink);
}
h2, .h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  line-height: 1.15;
  color: var(--ink);
}
h3, .h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  line-height: 1.3;
  color: var(--ink);
}
.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 46ch;
  line-height: 1.6;
}
p { max-width: 65ch; color: var(--ink-soft); }
.text-tight { max-width: none; }

/* ---- Layout helpers ---- */
.wrap {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}
.section-tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section-divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
}
.section--raised {
  background: var(--paper-raised);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-block: 1px solid var(--line);
}
.section--ink { background: var(--accent-deep); color: var(--ink); }
.section--ink p, .section--ink .lede { color: #cfe0d7; }
.section--ink h2, .section--ink h1 { color: var(--ink); }

.grid {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
@media (min-width: 780px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .grid-asym { grid-template-columns: 1.1fr 0.9fr; align-items: center; }
}

.stack { display: flex; flex-direction: column; gap: 1rem; }
.stack-lg { gap: 2rem; }
.cluster { display: flex; flex-wrap: wrap; gap: 0.85rem; align-items: center; }

/* ---- Buttons & links ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--accent-deep);
  color: var(--ink);
  border-color: var(--accent-deep);
}
.btn--primary:hover { background: var(--accent); border-color: var(--accent); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn--ghost:hover { border-color: var(--ink); }
.section--ink .btn--ghost { color: var(--ink); border-color: rgba(238, 241, 244, 0.4); }
.section--ink .btn--ghost:hover { border-color: var(--ink); }
.section--ink .btn--primary { background: var(--ink); color: var(--accent-deep); border-color: var(--ink); }
.section--ink .btn--primary:hover { background: #ffffff; }

.text-link {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line-strong);
  font-weight: 600;
}
.text-link:hover { text-decoration-color: currentColor; }

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(5, 7, 11, 0.78);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.9rem;
  gap: 1rem;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--ink);
}
.wordmark svg {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16);
}
.wordmark-text {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.nav-primary { display: none; }
.nav-primary ul { display: flex; gap: 1.9rem; }
.nav-primary a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.98rem;
  color: var(--ink-soft);
  padding-block: 0.3rem;
  border-bottom: 2px solid transparent;
}
.nav-primary a:hover,
.nav-primary a[aria-current="page"] {
  color: var(--ink);
  border-color: var(--accent);
}
.header-actions { display: flex; align-items: center; gap: 0.75rem; }
.header-actions .btn { display: none; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

.mobile-nav {
  position: fixed;
  inset: 0;
  top: 65px;
  background: var(--paper);
  padding: 1.5rem var(--gutter) 2.5rem;
  overflow-y: auto;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
  z-index: 400;
}
.mobile-nav.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.mobile-nav ul { display: flex; flex-direction: column; gap: 0.25rem; }
.mobile-nav a {
  display: block;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.6rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}
.mobile-nav .btn { margin-top: 1.5rem; width: 100%; justify-content: center; }

@media (min-width: 900px) {
  .nav-primary { display: block; }
  .header-actions .btn { display: inline-flex; }
  .nav-toggle { display: none; }
  .mobile-nav { display: none; }
}

/* ---- Hero ---- */
.hero {
  padding-block: clamp(3rem, 8vw, 5.5rem) clamp(2.5rem, 6vw, 4rem);
}
.hero-grid {
  display: grid;
  gap: 2.5rem;
}
@media (min-width: 940px) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: 3rem; }
}
.hero h1 { margin-bottom: 1.1rem; }
.hero .lede { margin-bottom: 1.75rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.hero-note {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--ink-faint);
  max-width: 42ch;
}
.hero-figure {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: clamp(1rem, 3vw, 1.75rem);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.hero-figure figcaption {
  font-size: 0.82rem;
  color: var(--ink-faint);
  margin-top: 0.75rem;
}

/* ---- Orbit motif (home hero) ----
   Scattered signals on independent orbits, converging into one small,
   tightly locked, glowing orbit at the centre — the visual metaphor for
   "clarity out of complexity". Built as one inline SVG; every rotation is a
   plain CSS transform animation, so prefers-reduced-motion (handled in the
   global reset above) freezes it automatically. */
.orbit-motif { overflow: visible; }
.orbit-guide {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 1;
  stroke-dasharray: 2 7;
}
.orbit-rotate {
  transform-box: view-box;
  transform-origin: 240px 180px;
}
@keyframes orbit-spin { to { transform: rotate(360deg); } }
@keyframes orbit-spin-reverse { to { transform: rotate(-360deg); } }
.orbit-outer-a { animation: orbit-spin 34s linear infinite; }
.orbit-outer-b { animation: orbit-spin-reverse 27s linear infinite; }
.orbit-outer-c { animation: orbit-spin 22s linear infinite; }
.orbit-mid-a { animation: orbit-spin-reverse 15s linear infinite; }
.orbit-mid-b { animation: orbit-spin 12s linear infinite; }
.orbit-inner { animation: orbit-spin 9s linear infinite; }

.orbit-node--dim { fill: rgba(255, 255, 255, 0.4); }
.orbit-node--mid { fill: #a9c6d8; }
.orbit-spoke { stroke: rgba(169, 198, 216, 0.5); stroke-width: 1.2; }
.orbit-node--bright {
  fill: var(--accent-glow);
  filter: drop-shadow(0 0 5px rgba(127, 227, 180, 0.85));
}
.orbit-link-bright {
  stroke: var(--accent-glow);
  stroke-width: 1.6;
  opacity: 0.9;
  filter: drop-shadow(0 0 3px rgba(127, 227, 180, 0.6));
}
.orbit-hub-wrap {
  transform-box: view-box;
  transform-origin: 240px 180px;
  animation: orbit-hub-pulse 3.4s ease-in-out infinite;
}
@keyframes orbit-hub-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.14); }
}
.orbit-hub {
  fill: #f4f6f8;
  filter: drop-shadow(0 0 9px rgba(238, 241, 244, 0.8));
}

/* ---- Feature / card grids ---- */
.card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.card h3 { margin-bottom: 0.6rem; }
.card p { margin-bottom: 0; }
.card-index {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--ink-faint);
  display: block;
  margin-bottom: 0.9rem;
}

.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
  white-space: nowrap;
}
.status-tag--planned { background: var(--warm-tint); border-color: rgba(209, 162, 95, 0.45); color: #e6c691; }
.status-tag--illustrative { background: var(--accent-tint); border-color: rgba(127, 227, 180, 0.45); color: #a3ecc7; }

/* ---- Steps / how it works ---- */
.steps { counter-reset: step; }
.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  padding-block: 1.5rem;
  border-top: 1px solid var(--line);
}
.step:last-child { border-bottom: 1px solid var(--line); }
.step-num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--ink-faint);
  min-width: 2.4ch;
}

/* ---- Accordion (Solutions / FAQ) ---- */
.accordion-item { border-top: 1px solid var(--line); }
.accordion-item:last-child { border-bottom: 1px solid var(--line); }
.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.25rem;
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
}
.accordion-trigger h3 { font-size: 1.15rem; }
.accordion-trigger .plus {
  flex-shrink: 0;
  width: 24px; height: 24px;
  position: relative;
}
.accordion-trigger .plus::before,
.accordion-trigger .plus::after {
  content: "";
  position: absolute;
  background: var(--ink);
  transition: transform 0.18s ease;
}
.accordion-trigger .plus::before { top: 50%; left: 0; width: 100%; height: 2px; margin-top: -1px; }
.accordion-trigger .plus::after { left: 50%; top: 0; height: 100%; width: 2px; margin-left: -1px; }
.accordion-trigger[aria-expanded="true"] .plus::after { transform: scaleY(0); }
.accordion-panel {
  overflow: hidden;
  height: 0;
  transition: height 0.2s ease;
}
.accordion-panel[data-open="true"] { height: auto; }
.accordion-panel-inner { padding-bottom: 1.5rem; }
.accordion-panel-inner p { margin-bottom: 0.75rem; }

/* ---- Screens / illustrative product views ---- */
.screen {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.screen-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--ink-faint);
}
.screen-body { padding: 1.25rem; }
.screen-caption {
  padding: 0.9rem 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--ink-faint);
}

.mock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}
.mock-row:last-child { border-bottom: none; }
.mock-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.mock-dot--a { background: var(--accent-glow); }
.mock-dot--b { background: var(--warm); }
.mock-dot--c { background: var(--line-strong); }

/* ---- Solutions fit list ---- */
.fit-list li {
  display: flex;
  gap: 0.75rem;
  padding-block: 0.6rem;
  border-top: 1px solid var(--line);
}
.fit-list li:last-child { border-bottom: 1px solid var(--line); }

/* ---- Forms ---- */
.form-field { display: flex; flex-direction: column; gap: 0.4rem; }
.form-field label { font-weight: 600; font-size: 0.95rem; }
.form-field .hint { font-size: 0.82rem; color: var(--ink-faint); }
.form-field input,
.form-field textarea {
  font: inherit;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--paper-raised);
  color: var(--ink);
}
.form-field input:invalid[aria-invalid="true"],
.form-field textarea[aria-invalid="true"],
.form-field input[aria-invalid="true"] {
  border-color: var(--error);
}
.form-field .error-msg {
  font-size: 0.85rem;
  color: var(--error);
  display: none;
}
.form-field.has-error .error-msg { display: block; }
.form-field.has-error input,
.form-field.has-error textarea { border-color: var(--error); }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-status {
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  font-size: 0.95rem;
  display: none;
  gap: 0.6rem;
}
.form-status.is-visible { display: flex; }
.form-status--success { background: var(--success-tint); color: var(--success); border: 1px solid rgba(121, 217, 155, 0.4); }
.form-status--error { background: var(--error-tint); color: var(--error); border: 1px solid rgba(255, 143, 118, 0.4); }
.form-status--info { background: var(--warm-tint); color: #e6c691; border: 1px solid rgba(209, 162, 95, 0.4); }

/* ---- Footer ---- */
.site-footer {
  background: var(--accent-deep);
  color: #d9e4dd;
  padding-block: clamp(2.5rem, 5vw, 3.5rem) 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.site-footer a { color: #eef3ef; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-top {
  display: grid;
  gap: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(238, 243, 239, 0.18);
}
@media (min-width: 780px) {
  .footer-top { grid-template-columns: 1.3fr 0.7fr 0.7fr 1fr; }
}
.footer-brand .wordmark-text { color: #eef3ef; }
.footer-brand svg { color: #eef3ef; }
.footer-brand p { color: #b9c6bf; margin-top: 0.85rem; max-width: 34ch; }
.footer-col h4 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  color: #eef3ef;
  margin-bottom: 0.85rem;
}
.footer-col ul { display: flex; flex-direction: column; gap: 0.55rem; }
.footer-col a { color: #cfdad3; font-size: 0.95rem; }
.footer-parent {
  padding-top: 1.5rem;
  font-size: 0.9rem;
  color: #cfdad3;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
}
.footer-parent strong { color: #eef3ef; font-weight: 600; }

/* ---- Placeholder callouts ---- */
.placeholder-note {
  border: 1px dashed var(--line-strong);
  background: var(--paper-raised);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.3rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.placeholder-note strong { color: var(--ink); }

/* ---- Utility ---- */
.mt-0 { margin-top: 0 !important; }
.center { text-align: center; margin-inline: auto; }
.max-measure { max-width: 60ch; }
.small { font-size: 0.88rem; color: var(--ink-faint); }
