/* ==========================================================================
   TheNewOps Corporate Design System
   Visual System: Executive Monochrome (Paper #fafafa / Black #111111)
   Reference: brand/DESIGN.md
   ========================================================================== */

:root {
  --bg: #fafafa;
  --fg: #111111;
  --muted: #6b6b6b;
  --line: #e6e6e6;
  --line-dark: #111111;
  --panel: #ffffff;
  --code-bg: #f0f0f0;
  --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-wordmark: Verdana, Geneva, Tahoma, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --max-width: 1240px;
  --header-height: 64px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-radius: 0 !important;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  color: var(--fg);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.75rem);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 300;
}

h3 {
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: -0.01em;
}

p {
  margin-bottom: 1rem;
  color: var(--fg);
}

p.lead {
  font-size: 1.125rem;
  color: var(--muted);
  font-weight: 300;
  line-height: 1.6;
  max-width: 42rem;
}

.kicker {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  font-weight: 600;
  display: inline-block;
  margin-bottom: 0.75rem;
}

.mono {
  font-family: var(--font-mono);
}

.muted {
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Wordmark Lockup
   -------------------------------------------------------------------------- */
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--fg);
}

.brand-icon {
  width: 28px;
  height: 28px;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-name {
  font-family: var(--font-wordmark);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--fg);
}

.brand-sub {
  font-family: var(--font-wordmark);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.15em;
  color: var(--muted);
  margin-top: 2px;
}

/* --------------------------------------------------------------------------
   Buttons & Links
   -------------------------------------------------------------------------- */
a {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: opacity 0.15s ease;
}

a:hover {
  opacity: 0.7;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 12px 24px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid var(--fg);
  background: transparent;
  color: var(--fg);
  white-space: nowrap;
}

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

.btn-primary:hover {
  background: #333333;
  color: #ffffff;
  opacity: 1;
}

.btn-secondary {
  background: transparent;
  color: var(--fg);
  border-color: var(--line-dark);
}

.btn-secondary:hover {
  background: var(--panel);
  opacity: 1;
}

.btn-muted {
  border-color: var(--line);
  color: var(--muted);
  font-size: 11px;
  padding: 8px 16px;
}

.btn-muted:hover {
  border-color: var(--fg);
  color: var(--fg);
}

/* --------------------------------------------------------------------------
   Layout & Container
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --------------------------------------------------------------------------
   Header / Navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(250, 250, 250, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  height: var(--header-height);
  display: flex;
  align-items: center;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-link {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--fg);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  padding: 6px 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--fg);
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero-section {
  padding: 80px 0 60px 0;
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-title {
  margin-bottom: 20px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
}

.hero-aside {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 24px;
}

/* --------------------------------------------------------------------------
   Hero Interactive 3D Spline Robot Card & Dynamic Spotlight
   -------------------------------------------------------------------------- */
.hero-3d-card {
  position: relative;
  background: #09090b;
  border: 1px solid #222222;
  padding: 0;
  min-height: 520px;
  height: 540px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.4);
}

/* Dynamic Cursor-following Spotlight Effect */
.spotlight-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  background: radial-gradient(
    460px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(255, 255, 255, 0.16),
    rgba(255, 255, 255, 0.04) 45%,
    transparent 80%
  );
  z-index: 2;
}

.hero-3d-card:hover .spotlight-layer {
  opacity: 1;
}

/* WebGL Initialization Placeholder & Technical Spinner */
.spline-loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: #09090b;
  z-index: 4;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.spline-loader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.spline-spinner {
  width: 32px;
  height: 32px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-top-color: #ffffff;
  animation: spline-spin 0.8s linear infinite;
}

@keyframes spline-spin {
  to {
    transform: rotate(360deg);
  }
}

.spline-loader-text {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: #737373;
  text-transform: uppercase;
}

/* 3D Spline Canvas Canvas Wrapper */
.spline-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
}

.spline-wrapper spline-viewer {
  width: 100%;
  height: 100%;
  display: block;
}

@media (max-width: 960px) {
  .hero-3d-card {
    min-height: 460px;
    height: 480px;
  }
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
  margin-bottom: 16px;
}

.status-dot {
  width: 6px;
  height: 6px;
  background: var(--fg);
  display: inline-block;
}

/* --------------------------------------------------------------------------
   Metrics / Invariant Strip
   -------------------------------------------------------------------------- */
.metrics-strip {
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.metric-cell {
  padding: 24px;
  border-right: 1px solid var(--line);
}

.metric-cell:last-child {
  border-right: none;
}

.metric-val {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 300;
  color: var(--fg);
  line-height: 1;
  margin-bottom: 6px;
}

.metric-lbl {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Section Layouts
   -------------------------------------------------------------------------- */
.section {
  padding: 80px 0;
  border-bottom: 1px solid var(--line);
}

.section-header {
  margin-bottom: 48px;
  max-width: 48rem;
}

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

/* Capabilities Grid */
.capabilities-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background-color: var(--line);
  border: 1px solid var(--line);
}

.capability-card {
  background-color: var(--panel);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cap-number {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 24px;
  display: block;
}

.cap-title {
  margin-bottom: 12px;
}

.cap-desc {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.cap-specs {
  list-style: none;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: auto;
}

.cap-specs li {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cap-specs li::before {
  content: "—";
  color: var(--fg);
}

/* --------------------------------------------------------------------------
   Interactive Terminal Simulation
   -------------------------------------------------------------------------- */
.terminal-container {
  border: 1px solid var(--line);
  background: var(--panel);
  margin-top: 24px;
}

.terminal-header {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.terminal-title {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
}

.terminal-tabs {
  display: flex;
  gap: 1px;
  background: var(--line);
}

.terminal-tab-btn {
  background: var(--panel);
  border: none;
  padding: 6px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.terminal-tab-btn.active {
  background: var(--fg);
  color: var(--bg);
}

.terminal-body {
  padding: 24px;
  background: #ffffff;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  color: var(--fg);
  min-height: 280px;
  overflow-x: auto;
}

.terminal-step {
  display: none;
}

.terminal-step.active {
  display: block;
}

.t-prompt {
  color: var(--muted);
  user-select: none;
}

.t-highlight {
  font-weight: 600;
  color: var(--fg);
}

.t-tag {
  display: inline-block;
  padding: 1px 6px;
  border: 1px solid var(--line);
  font-size: 10px;
  text-transform: uppercase;
  margin-right: 6px;
}

.t-tag.err {
  border-color: var(--fg);
}

/* --------------------------------------------------------------------------
   Architecture & Sovereignty Section
   -------------------------------------------------------------------------- */
.arch-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.arch-feature-list {
  list-style: none;
  border-top: 1px solid var(--line);
}

.arch-feature-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.arch-feature-title {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
}

.arch-feature-desc {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.tech-spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.tech-spec-table th, 
.tech-spec-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.tech-spec-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
  font-weight: 600;
  background: var(--panel);
}

.tech-spec-table td.spec-name {
  font-weight: 500;
}

.tech-spec-table td.spec-val {
  font-family: var(--font-mono);
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   CTA Section
   -------------------------------------------------------------------------- */
.cta-section {
  padding: 100px 0;
  background: var(--fg);
  color: var(--bg);
  border-bottom: 1px solid var(--line);
}

.cta-inner {
  text-align: center;
  max-width: 44rem;
  margin: 0 auto;
}

.cta-inner h2 {
  color: #ffffff;
  margin-bottom: 16px;
}

.cta-inner p {
  color: #b0b0b0;
  font-size: 1.125rem;
  margin-bottom: 32px;
}

.cta-inner .kicker {
  color: #888888;
}

.cta-inner .btn-primary {
  background: #ffffff;
  color: #111111;
  border-color: #ffffff;
}

.cta-inner .btn-primary:hover {
  background: #e6e6e6;
}

/* --------------------------------------------------------------------------
   Policy & Legal Page Styling
   -------------------------------------------------------------------------- */
.policy-page {
  padding: 60px 0 100px 0;
}

.policy-header {
  border-bottom: 1px solid var(--line);
  padding-bottom: 32px;
  margin-bottom: 48px;
}

.policy-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 64px;
}

.policy-toc {
  position: sticky;
  top: 96px;
  height: fit-content;
  border-right: 1px solid var(--line);
  padding-right: 24px;
}

.policy-toc ul {
  list-style: none;
}

.policy-toc li {
  margin-bottom: 12px;
}

.policy-toc a {
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: block;
}

.policy-toc a:hover {
  color: var(--fg);
}

.policy-article {
  max-width: 46rem;
}

.policy-section {
  margin-bottom: 48px;
}

.policy-section h2 {
  font-size: 1.5rem;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.policy-section h3 {
  font-size: 1.125rem;
  margin: 24px 0 12px 0;
}

.policy-section p, 
.policy-section ul, 
.policy-section ol {
  color: var(--fg);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 16px;
}

.policy-section ul, 
.policy-section ol {
  padding-left: 24px;
}

.policy-section li {
  margin-bottom: 8px;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  margin-top: auto;
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: 48px 0 32px 0;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}

.footer-nav {
  display: flex;
  gap: 48px;
}

.footer-col-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  font-size: 12px;
  color: var(--fg);
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* --------------------------------------------------------------------------
   Modal Component (Request Access)
   -------------------------------------------------------------------------- */
.modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(17, 17, 17, 0.6);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-card {
  background: var(--panel);
  border: 1px solid var(--fg);
  width: 100%;
  max-width: 520px;
  padding: 32px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 18px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 8px;
}

.modal-close:hover {
  color: var(--fg);
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--fg);
  outline: none;
  transition: border-color 0.15s ease;
}

.form-control:focus {
  border-color: var(--fg);
  background: #ffffff;
}

.form-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23111111' d='M6 8.825L1.175 4 2.238 2.938 6 6.7 9.763 2.938 10.825 4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}

.form-note {
  font-size: 11px;
  color: var(--muted);
  margin-top: 12px;
  line-height: 1.5;
}

.form-feedback {
  display: none;
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  margin-top: 16px;
  font-size: 12px;
}

.form-feedback.active {
  display: block;
}

/* --------------------------------------------------------------------------
   Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 960px) {
  .hero-grid, 
  .arch-grid, 
  .capabilities-grid {
    grid-template-columns: 1fr;
  }

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

  .metric-cell:nth-child(2) {
    border-right: none;
  }

  .metric-cell:nth-child(3) {
    border-top: 1px solid var(--line);
  }

  .metric-cell:nth-child(4) {
    border-top: 1px solid var(--line);
    border-right: none;
  }

  .policy-layout {
    grid-template-columns: 1fr;
  }

  .policy-toc {
    display: none;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }

  .mobile-nav-toggle {
    display: block;
  }

  .nav-menu.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 24px;
    gap: 18px;
    align-items: flex-start;
  }

  .footer-top {
    flex-direction: column;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .metric-cell {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .metric-cell:last-child {
    border-bottom: none;
  }
}
