@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700&display=swap');

/* --- DESIGN SYSTEM TOKENS --- */
:root {
  --color-bg: #0D0E12;
  --color-bg-card: rgba(18, 20, 26, 0.6);
  --color-text: #FFFFFF;
  --color-text-muted: #8E939E;
  --color-border: #262930;
  --color-border-hover: #3E4352;
  --color-accent: #00F0FF;
  --color-accent-dim: rgba(0, 240, 255, 0.15);
  --color-alert: #FF453A;
  --color-alert-dim: rgba(255, 69, 58, 0.1);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --grid-size: 50px;
}

/* --- BASE STYLES --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

/* --- TECHNICAL BLUEPRINT GRID BACKGROUND --- */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: 
    linear-gradient(rgba(38, 41, 48, 0.25) 1px, transparent 1px),
    linear-gradient(90deg, rgba(38, 41, 48, 0.25) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
  z-index: -2;
  pointer-events: none;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at 50% 50%, rgba(13, 14, 18, 0) 10%, rgba(13, 14, 18, 0.95) 90%);
  z-index: -1;
  pointer-events: none;
}

/* --- UTILITIES --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.mono-tag {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  color: var(--color-accent);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.mono-tag::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: var(--color-accent);
  box-shadow: 0 0 8px var(--color-accent);
}

.heading-huge {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.25rem, 5vw, 4.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

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

/* --- CORNER CAD DECORATIONS --- */
.cad-frame {
  position: relative;
  border: 1px solid var(--color-border);
  background-color: var(--color-bg-card);
  transition: var(--transition-smooth);
}

.cad-frame::before, .cad-frame::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  border: 1px solid var(--color-accent);
  opacity: 0;
  transition: var(--transition-smooth);
}

/* Top-Left Corner mark */
.cad-frame::before {
  top: -1px;
  left: -1px;
  border-right: none;
  border-bottom: none;
}

/* Bottom-Right Corner mark */
.cad-frame::after {
  bottom: -1px;
  right: -1px;
  border-left: none;
  border-top: none;
}

.cad-frame:hover {
  border-color: var(--color-border-hover);
}

.cad-frame:hover::before, .cad-frame:hover::after {
  opacity: 1;
}

/* --- HEADER / NAVIGATION --- */
header {
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 100;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 4.5rem;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-symbol {
  width: 14px;
  height: 14px;
  border: 1px solid var(--color-accent);
  position: relative;
}

.logo-symbol::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 6px;
  height: 6px;
  background-color: var(--color-accent);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  transition: var(--transition-smooth);
}

.nav-links a:hover {
  color: var(--color-text);
}

.nav-container {
  display: flex;
  align-items: center;
}

.lang-switcher {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-left: 1px solid var(--color-border);
  padding-left: 1.5rem;
  margin-left: 1.5rem;
  margin-right: 1.5rem;
}

.lang-switcher span {
  color: var(--color-text-muted);
}

.lang-switcher a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.lang-switcher a:hover {
  color: var(--color-text);
}

.lang-switcher a.active {
  color: var(--color-accent);
  font-weight: 700;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
}

.nav-cta {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  padding: 0.5rem 1.25rem;
  text-decoration: none;
  background: transparent;
  transition: var(--transition-smooth);
}

.nav-cta:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.1);
}

/* --- MOBILE TOGGLE & MEDIA QUERIES --- */
.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--color-border);
  width: 40px;
  height: 40px;
  cursor: pointer;
  position: relative;
  transition: var(--transition-smooth);
}

.menu-toggle:hover {
  border-color: var(--color-accent);
}

.menu-toggle span {
  display: block;
  position: absolute;
  height: 1.5px;
  width: 18px;
  background: var(--color-text);
  left: 10px;
  transition: var(--transition-smooth);
}

.menu-toggle span:first-child {
  top: 15px;
}

.menu-toggle span:last-child {
  top: 23px;
}

/* Toggle Active State: Morph to X */
.menu-toggle.active span:first-child {
  transform: translateY(4px) rotate(45deg);
  background: var(--color-accent);
}

.menu-toggle.active span:last-child {
  transform: translateY(-4px) rotate(-45deg);
  background: var(--color-accent);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .nav-container {
    display: none;
    position: absolute;
    top: 4.5rem;
    left: 0;
    width: 100%;
    background-color: rgba(13, 14, 18, 0.98);
    border-bottom: 1px solid var(--color-border);
    padding: 2.5rem 2rem;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    z-index: 99;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  }

  .nav-container.active {
    display: flex;
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  .nav-links {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
  }

  .nav-links li {
    text-align: center;
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 0.5rem 0;
    font-size: 1rem;
    border-bottom: 1px dashed rgba(38, 41, 48, 0.3);
  }

  .lang-switcher {
    border-left: none;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 0;
    margin: 0.5rem 0;
    width: 100%;
    justify-content: center;
    margin-left: 0;
    margin-right: 0;
  }

  .nav-cta {
    width: 100%;
    text-align: center;
    padding: 0.8rem 1.5rem;
  }
}

/* --- HERO SECTION --- */
.hero {
  padding: 6rem 0 4rem;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto text-align center;
  text-align: center;
  margin-bottom: 4rem;
}

.hero-subtitle {
  font-size: 1.15rem;
  max-width: 680px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

/* PREMIUM MINIMAL BUTTONS */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background-color: transparent;
  color: var(--color-text);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 1.1rem 2.2rem;
  border: 1px solid var(--color-accent);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.1), transparent);
  transition: 0.5s;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  background-color: var(--color-accent-dim);
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.2);
  transform: translateY(-1px);
}

.btn-primary svg {
  transition: var(--transition-smooth);
}

.btn-primary:hover svg {
  transform: translateX(4px);
}

/* INTERACTIVE PROCESS MAP CONTAINER */
.visualizer-container {
  width: 100%;
  border: 1px solid var(--color-border);
  background-color: rgba(13, 14, 18, 0.85);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 3.5rem;
  display: grid;
  grid-template-columns: 2fr 1fr;
  min-height: 480px;
}

@media (max-width: 768px) {
  .visualizer-container {
    grid-template-columns: 1fr;
  }
}

.visualizer-main {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(9, 10, 13, 0.6);
  border-right: 1px solid var(--color-border);
}

@media (max-width: 768px) {
  .visualizer-main {
    border-right: none;
    border-bottom: 1px solid var(--color-border);
    height: 350px;
  }
}

.visualizer-canvas-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

#process-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* CAD HUD Panel Overlay on Visualizer */
.visualizer-hud {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: rgba(16, 17, 22, 0.9);
  font-family: 'Courier New', Courier, monospace;
}

.hud-header {
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

.hud-title {
  color: var(--color-accent);
  font-size: 0.8rem;
  font-weight: bold;
  letter-spacing: 0.1em;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hud-status-dot {
  width: 6px;
  height: 6px;
  background-color: var(--color-accent);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

.hud-logs {
  flex-grow: 1;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  overflow-y: auto;
  max-height: 300px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.hud-log-entry {
  border-left: 2px solid var(--color-border);
  padding-left: 0.5rem;
  transition: var(--transition-smooth);
}

.hud-log-entry.active {
  border-left-color: var(--color-accent);
  color: var(--color-text);
  background-color: rgba(0, 240, 255, 0.03);
}

.hud-log-time {
  color: var(--color-accent);
}

.hud-meta {
  border-top: 1px solid var(--color-border);
  padding-top: 0.75rem;
  margin-top: 1rem;
  font-size: 0.7rem;
  color: var(--color-text-muted);
  display: flex;
  justify-content: space-between;
}

/* --- SECTION GENERAL --- */
.section-wrapper {
  padding: 6rem 0;
  border-top: 1px solid var(--color-border);
}

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

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 3.5vw, 3rem);
  line-height: 1.2;
  margin-bottom: 1rem;
}

/* --- HOW IT WORKS SECTION --- */
.three-col-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

@media (max-width: 992px) {
  .three-col-grid {
    grid-template-columns: 1fr;
  }
}

.tech-step-card {
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 320px;
}

.step-num {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--color-accent);
  letter-spacing: 0.1em;
  margin-bottom: 2rem;
}

.step-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 1rem;
  color: var(--color-text);
}

.step-desc {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* --- BENTO WOW GRID --- */
.bento-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  grid-auto-rows: 240px;
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .bento-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }
}

.bento-card {
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

@media (max-width: 768px) {
  .bento-card {
    min-height: 220px;
  }
}

/* Card layout spans */
.bento-wide {
  grid-column: span 1;
}

.bento-tall {
  grid-row: span 2;
  justify-content: space-between;
}

@media (min-width: 769px) {
  .bento-card-a { grid-column: 1 / 2; grid-row: 1 / 2; }
  .bento-card-b { grid-column: 2 / 3; grid-row: 1 / 3; } /* tall */
  .bento-card-c { grid-column: 1 / 2; grid-row: 2 / 3; }
  .bento-card-d { grid-column: 1 / 3; grid-row: 3 / 4; } /* wide bottom */
}

.bento-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bento-value {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1;
  margin: 1rem 0;
  color: var(--color-text);
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.bento-desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* Alerts inside diagnostics */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  font-family: monospace;
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
}

.status-badge.alert {
  background-color: var(--color-alert-dim);
  border: 1px solid var(--color-alert);
  color: var(--color-alert);
}

.status-badge.success {
  background-color: rgba(0, 240, 255, 0.05);
  border: 1px solid var(--color-accent);
  color: var(--color-accent);
}

/* Bento custom interactive canvas mini visualizer for deviations */
.mini-chart-container {
  height: 80px;
  width: 100%;
  margin-top: 1rem;
  border-top: 1px dashed var(--color-border);
  padding-top: 1rem;
}

/* --- FOOTER & FORM --- */
footer {
  border-top: 1px solid var(--color-border);
  background-color: #090A0D;
  padding: 6rem 0 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  margin-bottom: 5rem;
}

@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

.footer-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.footer-brand {
  margin-bottom: 2rem;
}

.footer-text {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  max-width: 360px;
  margin-top: 1rem;
}

.footer-email {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.footer-email span {
  color: var(--color-text-muted);
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  margin-right: 0.5rem;
}

.footer-email a {
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 1px dashed rgba(0, 240, 255, 0.3);
  padding-bottom: 2px;
  transition: var(--transition-smooth);
}

.footer-email a:hover {
  color: var(--color-text);
  border-bottom-color: var(--color-accent);
}

/* Surgical Form Design */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 576px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
}

.form-control {
  background-color: rgba(13, 14, 18, 0.8);
  border: 1px solid var(--color-border);
  border-radius: 2px;
  padding: 0.9rem 1.2rem;
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: var(--transition-smooth);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.1);
  background-color: rgba(20, 22, 28, 0.9);
}

textarea.form-control {
  resize: vertical;
  min-height: 110px;
}

/* Simulated cryptographic token output overlay */
.submit-status-container {
  display: none;
  border: 1px dashed var(--color-accent);
  background-color: rgba(0, 240, 255, 0.02);
  padding: 1.5rem;
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--color-accent);
  margin-top: 1.5rem;
  position: relative;
  overflow: hidden;
}

.submit-status-container.show {
  display: block;
}

.crypto-line {
  margin-bottom: 0.25rem;
  white-space: pre-wrap;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--color-border);
  padding-top: 2rem;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

@media (max-width: 576px) {
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.footer-links a:hover {
  color: var(--color-text);
}

/* --- STEP 1: HUMAN FIRST SECTION --- */
.human-first-intro {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3.5rem;
  margin-bottom: 4rem;
  align-items: start;
}

.callout-box {
  border: 1px solid var(--color-border);
  border-left: 2px solid var(--color-accent);
  background-color: rgba(0, 240, 255, 0.015);
  padding: 2.2rem;
  position: relative;
  border-radius: 2px;
}

.callout-box::before {
  content: 'CAD // VALUES_01';
  position: absolute;
  top: -8px;
  right: 15px;
  font-family: monospace;
  font-size: 0.65rem;
  color: var(--color-accent);
  background-color: var(--color-bg);
  padding: 0 0.5rem;
  letter-spacing: 0.1em;
}

.callout-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.25rem;
  color: var(--color-text);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.callout-title::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: var(--color-accent);
}

.callout-desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.step-icon-wrapper {
  width: 44px;
  height: 44px;
  border: 1px solid var(--color-border);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.75rem;
  transition: var(--transition-smooth);
}

.tech-step-card:hover .step-icon-wrapper {
  border-color: var(--color-accent);
  color: #FFFFFF;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.15);
}

@media (max-width: 992px) {
  .human-first-intro {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

/* --- KEYFRAME ANIMATIONS --- */
@keyframes pulse {
  0% {
    opacity: 0.4;
    box-shadow: 0 0 0 0 rgba(0, 240, 255, 0.4);
  }
  70% {
    opacity: 1;
    box-shadow: 0 0 0 6px rgba(0, 240, 255, 0);
  }
  100% {
    opacity: 0.4;
    box-shadow: 0 0 0 0 rgba(0, 240, 255, 0);
  }
}
