/* ============================================================
   LEETONE ENTERPRISES — Design System v2.0
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=DM+Sans:wght@400;500&family=Instrument+Serif:ital@0;1&display=swap');

:root {
  --bg-primary: #0A0C10;
  --bg-surface: #0D0F14;
  --bg-hover: rgba(196,164,106,0.03);
  --bg-gold-tint: rgba(196,164,106,0.04);
  --bg-green-tint: rgba(74,124,111,0.08);
  --bg-gold-badge: #C4A46A;

  --text-primary: #F5F0EB;
  --text-body: #A09A91;
  --text-secondary: #BCB7B0;
  --text-muted: #706B63;
  --text-ghost: #5A5650;
  --text-hidden: #454240;

  --accent-gold: #C4A46A;
  --accent-gold-hover: #D4B47A;
  --accent-green: #4A7C6F;

  --border-subtle: rgba(200,190,175,0.04);
  --border-light: rgba(200,190,175,0.06);
  --border-medium: rgba(200,190,175,0.08);
  --border-gold: rgba(196,164,106,0.15);
  --border-gold-strong: rgba(196,164,106,0.3);
  --border-green: rgba(74,124,111,0.15);

  --max-width: 1200px;
  --page-pad: 48px;
  --section-pad: 72px;
  --radius-sm: 3px;
  --radius-md: 4px;
  --radius-lg: 6px;
  --radius-xl: 8px;
}

/* --- RESET --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  background: var(--bg-primary);
  color: var(--text-body);
  overflow-x: hidden;
  font-family: 'DM Sans', -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- TYPOGRAPHY --- */
h1, h2, h3 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.15;
}
h1 { font-size: 52px; }
h2 { font-size: 28px; }
h3 { font-size: 24px; }
h1 em, h2 em, h3 em {
  font-style: italic;
  color: var(--accent-gold);
}
p { margin-bottom: 14px; }
p:last-child { margin-bottom: 0; }
p strong {
  font-weight: 500;
  color: var(--text-secondary);
}
a {
  color: var(--accent-gold);
  text-decoration: none;
  transition: color 0.3s;
}
a:hover { color: var(--accent-gold-hover); }

/* --- SYSTEM TEXT --- */
.mono { font-family: 'DM Mono', 'SF Mono', monospace; }
.label {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.label-gold { color: var(--accent-gold); }
.label-green { color: var(--accent-green); }
.eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}
.eyebrow::before {
  content: '';
  width: 32px;
  height: 0.5px;
  background: var(--accent-gold);
  flex-shrink: 0;
}
.section-num {
  font-family: 'DM Mono', monospace;
  font-size: 36px;
  font-weight: 500;
  color: var(--text-ghost);
  line-height: 1;
}

/* --- NAVIGATION --- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px var(--page-pad);
  border-bottom: 0.5px solid var(--border-light);
  position: relative;
  z-index: 100;
  background: var(--bg-primary);
  transition: box-shadow 0.3s;
}
.nav.sticky {
  position: sticky;
  top: 0;
  box-shadow: 0 1px 20px rgba(0,0,0,0.4);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}
.logo-img {
  height: 140px;
  width: auto;
  transition: transform 0.3s;
}
.nav-logo:hover .logo-img {
  transform: scale(1.04);
}
/* Fallback text mark kept for admin page */
.logo-mark {
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--accent-gold);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Mono', monospace;
  font-size: 15px;
  font-weight: 500;
  color: var(--accent-gold);
  flex-shrink: 0;
}
.logo-text {
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--text-primary);
}
.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}
.nav-links a {
  color: var(--text-muted);
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: color 0.3s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 0.5px;
  background: var(--accent-gold);
  transition: width 0.3s;
}
.nav-links a:hover::after { width: 100%; }
.nav-links a:hover { color: var(--text-secondary); }
.nav-links a.active { color: var(--accent-gold); }
.nav-links a.contact-link { color: var(--accent-gold); }
.nav-links a.contact-link:hover { color: var(--accent-gold-hover); }

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.nav-hamburger span {
  width: 22px;
  height: 1px;
  background: var(--text-muted);
  transition: all 0.3s;
}
.nav-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

.nav-mobile {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-surface);
  z-index: 500;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  font-family: 'DM Mono', monospace;
  font-size: 16px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.3s;
}
.nav-mobile a:hover, .nav-mobile a.active { color: var(--accent-gold); }
.nav-mobile-close {
  position: absolute;
  top: 28px;
  right: var(--page-pad);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  font-family: 'DM Mono', monospace;
}

/* --- BUTTONS --- */
.btn-primary {
  background: var(--accent-gold);
  color: var(--bg-primary);
  padding: 12px 28px;
  border: none;
  border-radius: var(--radius-md);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  display: inline-block;
  text-decoration: none;
  line-height: 1;
}
.btn-primary:hover {
  background: var(--accent-gold-hover);
  transform: scale(1.02);
  color: var(--bg-primary);
}
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 12px 28px;
  border: 0.5px solid var(--border-medium);
  border-radius: var(--radius-md);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-block;
  text-decoration: none;
  line-height: 1;
}
.btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--border-gold);
  transform: scale(1.02);
}

/* --- READOUT COMPONENT --- */
.readout {
  background: var(--bg-surface);
  border: 0.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  overflow: hidden;
}
.readout-bar {
  padding: 6px 14px;
  border-bottom: 0.5px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.readout-title {
  color: var(--text-ghost);
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.readout-status {
  color: var(--accent-green);
  font-size: 9px;
  letter-spacing: 1px;
}
.readout-body { padding: 14px 16px; }
.readout-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  border-bottom: 0.5px solid rgba(200,190,175,0.02);
}
.readout-row:last-child { border-bottom: none; }
.readout-key { color: var(--text-muted); }
.readout-val { color: var(--accent-gold); }
.readout-val--ok { color: var(--accent-green); }
.readout-val--muted { color: var(--text-secondary); }
.readout-val--ghost { color: var(--text-ghost); }

/* Readout grid variant */
.readout-grid {
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.readout-cell {
  padding: 8px 10px;
  background: rgba(200,190,175,0.02);
  border-radius: var(--radius-md);
}
.readout-cell-label {
  color: var(--text-ghost);
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 3px;
}
.readout-cell-value {
  color: var(--accent-gold);
  font-size: 13px;
}

/* Readout flow diagram variant */
.readout-flow { padding: 14px 16px; }
.flow-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  margin: 4px 0;
}
.flow-node {
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  white-space: nowrap;
}
.flow-node--ai {
  background: rgba(196,164,106,0.1);
  color: var(--accent-gold);
  border: 0.5px solid var(--border-gold);
}
.flow-node--human {
  background: rgba(74,124,111,0.1);
  color: var(--accent-green);
  border: 0.5px solid var(--border-green);
}
.flow-node--sys {
  background: rgba(200,190,175,0.04);
  color: var(--text-muted);
  border: 0.5px solid var(--border-light);
}
.flow-arrow {
  color: var(--text-hidden);
  padding: 0 6px;
  font-size: 10px;
}
.flow-pipelines-label {
  padding: 8px 0 4px;
  color: var(--text-ghost);
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Readout progress bar variant */
.readout-stack { padding: 14px 16px; }
.progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 0.5px solid rgba(200,190,175,0.02);
}
.progress-row:last-child { border-bottom: none; }
.progress-label {
  color: var(--text-muted);
  font-size: 10px;
  min-width: 90px;
}
.progress-track {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: rgba(200,190,175,0.04);
}
.progress-fill {
  height: 4px;
  border-radius: 2px;
  background: var(--accent-gold);
  transition: width 1s ease-out;
}
.progress-fill--green { background: var(--accent-green); }
.progress-value {
  color: var(--text-ghost);
  font-size: 10px;
  min-width: 36px;
  text-align: right;
}

/* --- TERMINAL COMPONENT --- */
.terminal {
  background: var(--bg-surface);
  border: 0.5px solid var(--border-light);
  border-radius: var(--radius-xl);
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  overflow: hidden;
}
.terminal-bar {
  background: rgba(200,190,175,0.03);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 0.5px solid var(--border-light);
}
.terminal-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.terminal-dot--red { background: #E24B4A; opacity: 0.6; }
.terminal-dot--yellow { background: #EF9F27; opacity: 0.6; }
.terminal-dot--green { background: #4A7C6F; opacity: 0.6; }
.terminal-title {
  margin-left: 8px;
  color: var(--text-muted);
  font-size: 10px;
  letter-spacing: 1px;
}
.terminal-body {
  padding: 16px 18px;
  line-height: 1.8;
  min-height: 200px;
}
.terminal-prompt { color: var(--accent-green); }
.terminal-cmd { color: var(--text-secondary); }
.terminal-output { color: var(--text-muted); }
.terminal-value { color: var(--accent-gold); }
.terminal-ok { color: var(--accent-green); }
.terminal-tree { color: var(--text-hidden); }
.terminal-cursor {
  display: inline-block;
  width: 7px;
  height: 13px;
  background: var(--accent-gold);
  opacity: 0.7;
  vertical-align: middle;
  margin-left: 2px;
  animation: blink 1.2s step-end infinite;
}
@keyframes blink { 0%,100% { opacity: 0.7; } 50% { opacity: 0; } }

/* --- STATUS INDICATORS --- */
.status-pip {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.status-pip--live {
  background: var(--accent-green);
  box-shadow: 0 0 6px rgba(74,124,111,0.5);
  animation: pulse-green 2s ease-in-out infinite;
}
.status-pip--expanding { background: var(--accent-gold); }
.status-pip--planned { background: var(--text-ghost); }
@keyframes pulse-green {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.badge {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  display: inline-block;
}
.badge--live { background: rgba(74,124,111,0.12); color: var(--accent-green); }
.badge--gold { background: var(--accent-gold); color: var(--bg-primary); }
.badge--ghost { background: rgba(200,190,175,0.05); color: var(--text-muted); }

/* --- PILLS --- */
.pill {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: 0.5px solid var(--border-light);
  color: var(--text-muted);
  display: inline-block;
}
.pill--active {
  border-color: rgba(196,164,106,0.2);
  color: var(--accent-gold);
  background: var(--bg-gold-tint);
}

/* --- SECTION DIVIDERS --- */
.divider {
  height: 0.5px;
  background: var(--border-subtle);
  margin: 0 var(--page-pad);
}
.divider-full {
  height: 0.5px;
  background: linear-gradient(90deg, transparent, var(--border-medium) 20%, var(--border-medium) 80%, transparent);
}

/* --- VERTICAL LABEL --- */
.vertical-label {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--text-muted);
  writing-mode: vertical-lr;
  text-orientation: mixed;
  transform: rotate(180deg);
  white-space: nowrap;
}

/* --- FOOTER --- */
.site-footer {
  padding: 48px var(--page-pad);
  border-top: 0.5px solid var(--border-light);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 32px;
  align-items: end;
}
.footer-newsletter-label {
  font-size: 13px;
  color: var(--text-body);
  margin-bottom: 12px;
}
.footer-newsletter-sub {
  font-size: 11px;
  color: var(--text-ghost);
  margin-top: 6px;
  line-height: 1.5;
}
.footer-email-row {
  display: flex;
  gap: 6px;
}
.footer-email-input {
  background: rgba(245,240,235,0.03);
  border: 0.5px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 9px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: var(--text-primary);
  width: 220px;
  outline: none;
  transition: border-color 0.3s;
}
.footer-email-input:focus { border-color: var(--border-gold); }
.footer-email-input::placeholder { color: var(--text-ghost); }
.footer-subscribe-btn {
  background: var(--accent-gold);
  color: var(--bg-primary);
  border: none;
  border-radius: var(--radius-md);
  padding: 9px 16px;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: background 0.2s;
  white-space: nowrap;
}
.footer-subscribe-btn:hover { background: var(--accent-gold-hover); }
.footer-center { text-align: center; }
.footer-logo-text {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--accent-gold);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.footer-copy {
  font-size: 10px;
  color: var(--text-hidden);
  font-family: 'DM Mono', monospace;
}
.footer-right { text-align: right; }
.footer-right a {
  font-size: 11px;
  color: var(--text-ghost);
  text-decoration: none;
  margin-left: 20px;
  transition: color 0.3s;
}
.footer-right a:hover { color: var(--text-muted); }
.footer-newsletter-msg {
  font-size: 11px;
  margin-top: 8px;
  font-family: 'DM Mono', monospace;
  letter-spacing: 0.5px;
}
.footer-newsletter-msg.success { color: var(--accent-green); }
.footer-newsletter-msg.error { color: #E24B4A; }

/* --- CONTACT PANEL --- */
.contact-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,12,16,0.85);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.contact-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.contact-panel {
  position: fixed;
  top: 0;
  right: -440px;
  bottom: 0;
  width: 420px;
  background: var(--bg-surface);
  border-left: 0.5px solid var(--border-light);
  z-index: 201;
  transition: right 0.35s ease-out;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.contact-overlay.open .contact-panel { right: 0; }
.contact-panel-header {
  padding: 28px 32px;
  border-bottom: 0.5px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}
.contact-panel-title {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--accent-gold);
  text-transform: uppercase;
}
.contact-panel-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  font-family: 'DM Mono', monospace;
  line-height: 1;
  transition: color 0.2s;
  padding: 0;
}
.contact-panel-close:hover { color: var(--text-primary); }
.contact-panel-body {
  padding: 32px;
  flex: 1;
}
.contact-panel h2 {
  font-size: 24px;
  margin-bottom: 6px;
}
.contact-panel-intro {
  font-size: 13px;
  color: var(--text-body);
  margin-bottom: 32px;
  line-height: 1.6;
}
.form-group {
  margin-bottom: 20px;
}
.form-label {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  margin-bottom: 8px;
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: rgba(200,190,175,0.03);
  border: 0.5px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.3s;
  -webkit-appearance: none;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus { border-color: var(--border-gold); }
.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-ghost); }
.form-select {
  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='%234A4740' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  background-color: rgba(200,190,175,0.03);
  cursor: pointer;
}
.form-select option { background: #1a1c20; color: var(--text-primary); }
.form-textarea { resize: vertical; min-height: 100px; }
.form-submit {
  width: 100%;
  background: var(--accent-gold);
  color: var(--bg-primary);
  border: none;
  border-radius: var(--radius-md);
  padding: 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 8px;
}
.form-submit:hover { background: var(--accent-gold-hover); }
.form-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.contact-info {
  padding-top: 24px;
  border-top: 0.5px solid var(--border-subtle);
  margin-top: 24px;
}
.contact-info-item {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--text-muted);
  font-family: 'DM Mono', monospace;
}
.contact-info-label { color: var(--text-ghost); min-width: 60px; }
.contact-info-value { color: var(--text-secondary); }
.contact-footer-note {
  font-size: 10px;
  color: var(--text-ghost);
  margin-top: 20px;
  line-height: 1.6;
  font-family: 'DM Mono', monospace;
  letter-spacing: 0.3px;
}
.form-success {
  text-align: center;
  padding: 40px 0;
}
.form-success-title {
  font-family: 'Instrument Serif', serif;
  font-size: 24px;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.form-success-msg {
  color: var(--text-body);
  font-size: 13px;
  line-height: 1.6;
}
.form-error-msg {
  color: #E24B4A;
  font-size: 11px;
  margin-top: 6px;
  font-family: 'DM Mono', monospace;
}

/* --- CONTENT WRAPPER --- */
.content-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* --- RESPONSIVE --- */
/* When JS adds .nav-compact, switch to hamburger */
.nav.nav-compact .nav-links { display: none; }
.nav.nav-compact .nav-hamburger { display: flex; }

@media (max-width: 480px) {
  :root {
    --page-pad: 20px;
    --section-pad: 40px;
  }
  h1 { font-size: 32px; }
  h2 { font-size: 20px; }
  .logo-img { height: 80px; }
  .vertical-label {
    writing-mode: horizontal-tb;
    transform: none;
    margin-bottom: 16px;
  }
  .site-footer {
    grid-template-columns: 1fr;
    text-align: left;
    gap: 40px;
  }
  .footer-center, .footer-right { text-align: left; }
  .footer-right a { margin-left: 0; margin-right: 20px; }
  .contact-panel {
    width: 100%;
    right: -100%;
  }
}
