/* VOLYAR X public site — shared stylesheet
   Dark theme is the default; a light override applies when the
   system/browser reports a light color scheme preference. */

:root {
  --bg: #0b0d12;
  --bg-elevated: #12151c;
  --border: #232733;
  --text: #e7e9ee;
  --text-muted: #9aa1b1;
  --accent: #4fd1c5;
  --accent-strong: #7ee6da;
  --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  --max-width: 960px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f8fa;
    --bg-elevated: #ffffff;
    --border: #e2e5ec;
    --text: #171a21;
    --text-muted: #565d6d;
    --accent: #0f8f82;
    --accent-strong: #0b6e64;
    --card-shadow: 0 1px 2px rgba(20, 20, 30, 0.08);
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover,
a:focus {
  color: var(--accent-strong);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}

.site-brand img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: contain;
}

.site-nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.site-nav a[aria-current="page"] {
  color: var(--accent);
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin: 0 0 0.5rem;
}

h2 {
  font-size: clamp(1.3rem, 3vw, 1.6rem);
  margin: 2.25rem 0 0.75rem;
}

h3 {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.5rem;
}

p {
  color: var(--text);
}

.lede {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 640px;
}

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  box-shadow: var(--card-shadow);
  margin: 1rem 0;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0.75rem 0;
}

.tag-list li {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.profile {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: flex-start;
  margin: 1.5rem 0;
}

.photo-placeholder {
  width: 180px;
  height: 180px;
  border-radius: 12px;
  border: 1px dashed var(--border);
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 1rem;
  flex-shrink: 0;
}

.profile-body {
  flex: 1;
  min-width: 240px;
}

.role-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 1rem;
  color: var(--text-muted);
}

.role-list li::before {
  content: "— ";
  color: var(--accent);
}

.timeline {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  border-left: 2px solid var(--border);
}

.timeline-item {
  position: relative;
  padding: 0 0 1.75rem 1.5rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -6.5px;
  top: 0.35rem;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline-date {
  display: block;
  font-weight: 700;
  color: var(--accent);
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
}

.timeline-item h3 {
  margin: 0 0 0.35rem;
}

.timeline-item p {
  color: var(--text-muted);
  margin: 0;
}

.screenshot-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  border: 1px dashed var(--border);
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0.75rem 0 1.25rem;
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

th,
td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

th {
  color: var(--text-muted);
  font-weight: 600;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.2rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border: 1px solid var(--border);
}

.badge--implemented {
  color: var(--accent);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.badge--planned {
  color: var(--text-muted);
  border-style: dashed;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0.75rem 0 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  flex-shrink: 0;
}

.legend-swatch--implemented {
  background: var(--bg-elevated);
  border: 2px solid var(--accent);
}

.legend-swatch--planned {
  background: var(--bg-elevated);
  border: 2px dashed var(--text-muted);
}

.diagram-wrap {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
}

.diagram-wrap svg {
  width: 100%;
  height: auto;
  display: block;
  min-width: 520px;
}

.principle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.capability-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  align-items: start;
  margin: 1rem 0;
}

.capability-columns .card ul {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
}

.capability-columns .card li {
  margin: 0.35rem 0;
}

.flow-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.5rem;
  margin: 1rem 0 1.5rem;
  list-style: none;
  padding: 0;
  counter-reset: step;
}

.flow-steps li {
  counter-increment: step;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  flex: 1 1 150px;
  font-size: 0.9rem;
  color: var(--text-muted);
  position: relative;
}

.flow-steps li::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.flow-steps li strong {
  display: block;
  color: var(--text);
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.site-footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ---- Homepage-only components (index.html) ---- */

.home-main {
  max-width: none;
  padding: 0;
}

.home-section {
  padding: 4.5rem 1.25rem;
}

.home-section--elevated {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.home-section__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-header {
  max-width: 640px;
  margin: 0 0 2rem;
}

.section-header--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-eyebrow {
  display: block;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.section-header h2 {
  margin-top: 0;
}

.hero {
  position: relative;
  padding: 6rem 1.25rem 5rem;
  text-align: center;
  overflow: hidden;
}

.hero-visual {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.5;
  pointer-events: none;
}

.hero-visual svg {
  width: 100%;
  height: 100%;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
}

.hero-eyebrow {
  display: inline-block;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  line-height: 1.1;
  margin: 0 0 1.25rem;
  letter-spacing: -0.01em;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  max-width: 560px;
  margin: 0 auto 2.25rem;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.btn:hover,
.btn:focus {
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--accent-strong);
  color: var(--bg);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover,
.btn-secondary:focus {
  border-color: var(--accent);
  color: var(--accent);
}

.card--link {
  display: block;
  color: var(--text);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.card--link:hover,
.card--link:focus {
  border-color: var(--accent);
  color: var(--text);
  text-decoration: none;
  transform: translateY(-2px);
}

.card--link h3 {
  margin-top: 0;
  color: var(--text);
}

.card--link .card-arrow {
  color: var(--accent);
  font-weight: 700;
}

.status-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.footer-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.25rem 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2rem;
}

.footer-col h3 {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li {
  margin: 0.5rem 0;
}

.footer-col a {
  color: var(--text);
  font-size: 0.9rem;
}

.footer-social {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.social-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px dashed var(--border);
  color: var(--text-muted);
  font-size: 0.75rem;
  cursor: default;
}

@media (max-width: 640px) {
  .site-header__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .site-footer__inner {
    flex-direction: column;
  }

  .hero {
    padding: 4rem 1.25rem 3rem;
  }

  .home-section {
    padding: 3rem 1.25rem;
  }
}

/* ======================================================================
   Cinematic homepage components (index.html only)
   Namespaced under .cinematic-*, .architecture-*, .thinking-demo-*
   Nothing in this block redefines a shared class used by interior pages.
   ====================================================================== */

.cinematic-hero {
  padding-top: 7.5rem;
  padding-bottom: 6.5rem;
}

.cinematic-hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.cinematic-hero-fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(480px 320px at 50% 38%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
    radial-gradient(900px 500px at 50% 100%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 75%);
}

/* Canvas compositing: the fallback sits later in source order at the same
   z-index, so without this it paints over the live canvas. Only show it
   when the canvas can't run (no JS / no canvas support). */
.js .cinematic-hero-fallback {
  display: none;
}

.cinematic-hero-content {
  opacity: 1;
  transform: none;
}

.js .cinematic-hero-content {
  opacity: 0;
  transform: translateY(14px);
  animation: cinematic-hero-in 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards;
}

@keyframes cinematic-hero-in {
  to {
    opacity: 1;
    transform: none;
  }
}

.cinematic-stat-bar {
  margin: 2.75rem auto 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  max-width: 760px;
}

.cinematic-stat {
  background: color-mix(in srgb, var(--bg-elevated) 82%, transparent);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.9rem 0.75rem;
  backdrop-filter: blur(6px);
}

.cinematic-stat dt {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.cinematic-stat dd {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.01em;
}

.cinematic-stat__text {
  font-size: 1.05rem;
}

/* ---- Scroll reveal (progressive enhancement; visible by default without JS) ---- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---- Architecture network ---- */

.architecture-graph {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
}

.architecture-connector {
  width: 2px;
  height: 1.75rem;
  margin: 0 auto;
  background: var(--border);
  position: relative;
}

.architecture-connector--planned {
  background: repeating-linear-gradient(180deg, var(--text-muted) 0 4px, transparent 4px 8px);
}

.architecture-connector.is-tracing {
  background: var(--accent);
}

.architecture-connector.is-tracing::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-strong);
  transform: translateX(-50%);
  box-shadow: 0 0 8px 2px color-mix(in srgb, var(--accent) 70%, transparent);
}

.js .architecture-connector.is-tracing::after {
  animation: architecture-trace 1.1s ease-in-out infinite;
}

@keyframes architecture-trace {
  0% { top: -3px; opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { top: calc(100% - 4px); opacity: 0; }
}

.architecture-node {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.architecture-node > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  outline-offset: 4px;
}

.architecture-node > summary::-webkit-details-marker {
  display: none;
}

.architecture-node__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.architecture-node--planned .architecture-node__dot {
  background: var(--text-muted);
}

.architecture-node__title {
  font-weight: 700;
  color: var(--text);
}

.architecture-node__hint {
  color: var(--text-muted);
  font-size: 0.85rem;
  flex: 1 1 auto;
}

.architecture-node p {
  color: var(--text-muted);
  margin: 0.75rem 0 0;
  font-size: 0.95rem;
}

.architecture-node.is-active,
.architecture-node.is-related {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent);
}

.architecture-node.is-dimmed {
  opacity: 0.55;
}

.architecture-node--group {
  padding-bottom: 1.1rem;
}

.architecture-subgrid {
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px dashed var(--border);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.6rem;
}

.architecture-node--sub {
  padding: 0.75rem 0.9rem;
}

.architecture-node--sub .architecture-node__title {
  font-size: 0.9rem;
}

.architecture-node--sub .architecture-node__hint {
  display: block;
  flex-basis: 100%;
  font-size: 0.78rem;
}

.architecture-node--sub p {
  font-size: 0.85rem;
}

/* ---- Watch VOLYAR X think ---- */

.thinking-demo {
  max-width: 760px;
  margin: 0 auto;
}

.thinking-demo__controls {
  display: none;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.js .thinking-demo__controls {
  display: flex;
}

.thinking-demo__controls .btn[hidden] {
  display: none;
}

.thinking-demo__progress {
  flex: 1 1 220px;
  min-width: 200px;
}

.thinking-demo__progress-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.thinking-demo__progress-track {
  height: 6px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.thinking-demo__progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 999px;
}

.js .thinking-demo__progress-fill {
  transition: width 0.4s ease;
}

.thinking-demo__status {
  min-height: 1.2em;
  margin: 0 0 1rem;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
}

.thinking-demo-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.thinking-demo-step {
  display: flex;
  gap: 0.9rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}

.js .thinking-demo-steps[data-active="true"] .thinking-demo-step {
  opacity: 0.5;
}

.js .thinking-demo-steps[data-active="true"] .thinking-demo-step.is-done {
  opacity: 0.75;
}

.js .thinking-demo-steps[data-active="true"] .thinking-demo-step.is-current {
  opacity: 1;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent);
}

.thinking-demo-step__index {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

.thinking-demo-step.is-current .thinking-demo-step__index {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.thinking-demo-step.is-done .thinking-demo-step__index {
  border-color: var(--accent);
  color: var(--accent);
}

.thinking-demo-step__body h3 {
  margin: 0 0 0.3rem;
  font-size: 1rem;
}

.thinking-demo-step__body p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.thinking-demo__complete {
  margin-top: 1.25rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--text);
  font-size: 0.9rem;
}

@media (max-width: 640px) {
  .cinematic-hero {
    padding-top: 5.5rem;
  }

  .cinematic-stat-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .thinking-demo-step {
    flex-direction: column;
    gap: 0.4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .js .cinematic-hero-content {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .js [data-reveal] {
    transition: none;
    opacity: 1;
    transform: none;
  }

  .js .architecture-connector.is-tracing::after {
    animation: none;
  }

  .js .thinking-demo__progress-fill {
    transition: none;
  }

  .thinking-demo-step {
    transition: none;
  }
}
