/* =========================================================
   DeTLeng Ops — Design system
   Base: deep graphite / Accent: teal (operations) / Amber for approval moments
   ========================================================= */

:root {
  --bg: #0E1116;
  --bg-panel: #141A21;
  --bg-panel-raised: #182028;
  --border: #262C35;
  --border-strong: #333C48;

  --text: #E9ECEF;
  --text-muted: #9BA5B0;
  --text-faint: #6B7480;

  --accent: #4FD1C5;
  --accent-strong: #3AB8AC;
  --accent-soft: rgba(79, 209, 197, 0.12);
  --amber: #F0A63A;
  --amber-soft: rgba(240, 166, 58, 0.12);

  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;

  --content-width: 1180px;
  --radius-sm: 6px;
  --radius-md: 10px;

  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--text); margin: 0; line-height: 1.15; font-weight: 600; }
p { margin: 0; color: var(--text-muted); }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
button { font-family: inherit; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--accent);
  color: #04201D;
  padding: 12px 18px;
  z-index: 999;
  font-weight: 600;
  border-radius: var(--radius-sm);
}
.skip-link:focus { left: 16px; top: 16px; }

.wrap {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Section head ---------- */
.section-head {
  max-width: 640px;
  margin-bottom: 48px;
}
.section-head h2 { font-size: clamp(28px, 3vw, 36px); margin-bottom: 14px; }
.section-head p { font-size: 18px; }

section { padding: 96px 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 16px;
  border: 1px solid transparent;
  transition: transform 0.15s var(--ease), background 0.15s var(--ease), border-color 0.15s var(--ease);
  cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  color: #04201D;
}
.btn-primary:hover { background: var(--accent-strong); }
.btn-secondary {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
  padding: 10px 18px;
  font-size: 15px;
}
.btn-ghost:hover { color: var(--text); border-color: var(--border-strong); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(14, 17, 22, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  color: var(--text);
}
.brand-suffix { color: var(--text-muted); font-weight: 500; }

.main-nav ul { display: flex; gap: 32px; }
.main-nav a {
  font-size: 15.5px;
  color: var(--text-muted);
  transition: color 0.15s var(--ease);
}
.main-nav a:hover { color: var(--text); }

.header-actions { display: flex; align-items: center; gap: 14px; }
.nav-cta { display: inline-flex; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 18px;
  margin: 0 auto;
  background: var(--text);
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding: 88px 0 80px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.eyebrow {
  font-family: var(--font-display);
  color: var(--accent);
  font-size: 15px;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(36px, 4.8vw, 56px);
  margin-bottom: 22px;
  max-width: 15ch;
}
.hero .lead {
  font-size: 19px;
  max-width: 52ch;
  margin-bottom: 34px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-diagram {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
}
.node-graphic { width: 100%; height: auto; }
.graphic-lines path {
  stroke: var(--border-strong);
  stroke-width: 1.5;
  fill: none;
}
.graphic-nodes circle {
  fill: var(--bg);
  stroke: var(--text-faint);
  stroke-width: 1.5;
}
.graphic-nodes .node-brain { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 2; }
.graphic-nodes .node-gate { fill: var(--amber-soft); stroke: var(--amber); stroke-width: 2; }
.graphic-labels text {
  fill: var(--text-faint);
  font-family: var(--font-body);
  font-size: 12px;
}

/* ---------- Outcome strip ---------- */
.outcomes {
  padding: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-panel);
}
.outcomes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.outcome {
  padding: 34px 22px;
  border-left: 1px solid var(--border);
}
.outcome:first-child { border-left: none; }
.outcome h2 {
  font-size: 17px;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--text);
}

/* ---------- Architecture ---------- */
.arch-rail {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 12px;
  counter-reset: stage;
}
.arch-stage {
  position: relative;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 14px 20px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.arch-stage:hover, .arch-stage:focus-visible { border-color: var(--accent); }
.arch-stage[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.arch-num {
  display: block;
  font-family: var(--font-display);
  color: var(--accent);
  font-size: 13px;
  margin-bottom: 10px;
}
.arch-stage h3 {
  font-size: 15px;
  margin-bottom: 6px;
}
.arch-stage .arch-sub {
  font-size: 13px;
  color: var(--text-faint);
  display: block;
}
.arch-rail::after { content: none; }

.arch-detail {
  margin-top: 28px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 26px 30px;
  min-height: 108px;
}
.arch-detail .detail-eyebrow {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 13px;
  display: block;
  margin-bottom: 8px;
}
.arch-detail h3 { font-size: 20px; margin-bottom: 10px; }
.arch-detail p { font-size: 17px; margin-bottom: 6px; }
.arch-detail .concern-label {
  color: var(--amber);
  font-weight: 600;
}

/* ---------- Services ---------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.service-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 30px 28px;
}
.service-card--flagship { border-left-color: var(--accent); }
.service-card h3 { font-size: 20px; margin-bottom: 12px; }
.service-card > p { margin-bottom: 18px; font-size: 17px; }
.service-card ul li {
  color: var(--text-muted);
  font-size: 15.5px;
  padding-left: 18px;
  position: relative;
  margin-bottom: 8px;
}
.service-card ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- Projects ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.project-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.project-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.project-card h3 { font-size: 18px; }
.status-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  white-space: nowrap;
}
.status-badge.status-live { color: var(--accent); border-color: var(--accent); }
.status-badge.status-in-development { color: var(--amber); border-color: var(--amber); }

.project-card p.summary { font-size: 15.5px; }

.flow-trace {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 12.5px;
  color: var(--text-faint);
}
.flow-trace span:not(.arrow) {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 4px 9px;
  border-radius: 4px;
}
.flow-trace .arrow { color: var(--border-strong); }

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-row span {
  font-size: 12.5px;
  color: var(--text-faint);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: 4px;
}

.project-card-foot { margin-top: auto; }
.project-view-btn {
  width: 100%;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 12px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease);
}
.project-view-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Process ---------- */
.process { background: var(--bg-panel); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
}
.process-steps li { padding-top: 6px; border-top: 2px solid var(--border-strong); }
.step-index {
  display: block;
  font-family: var(--font-display);
  color: var(--accent);
  font-size: 14px;
  margin-bottom: 14px;
}
.process-steps h3 { font-size: 18px; margin-bottom: 8px; }
.process-steps p { font-size: 16.5px; }

/* ---------- Technology ---------- */
.tech-groups {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.tech-group {
  background: var(--bg-panel);
  padding: 26px 28px;
}
.tech-group h3 {
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 10px;
}
.tech-group p { font-size: 16.5px; color: var(--text); }

/* ---------- Principles ---------- */
.principle-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.principle { background: var(--bg-panel); padding: 24px 22px; }
.principle h3 { font-size: 16.5px; margin-bottom: 8px; }
.principle p { font-size: 15.5px; }

/* ---------- Multilingual ---------- */
.multilingual { background: var(--bg-panel); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.multilingual-inner {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 40px;
  align-items: center;
}
.multilingual h2 { font-size: 26px; margin-bottom: 14px; }
.multilingual p { font-size: 17.5px; }
.lang-list { display: flex; flex-direction: column; gap: 10px; }
.lang-list li {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  font-family: var(--font-display);
  font-size: 15px;
}

/* ---------- Value ---------- */
.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.value-item { padding-top: 6px; border-top: 2px solid var(--border-strong); }
.value-item h3 { font-size: 19px; margin-bottom: 10px; }
.value-item p { font-size: 16.5px; }

/* ---------- Final CTA ---------- */
.final-cta { padding: 100px 0; }
.final-cta-inner { text-align: left; max-width: 720px; }
.final-cta h2 { font-size: clamp(30px, 4vw, 42px); margin-bottom: 30px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding-top: 48px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
  padding-bottom: 32px;
}
.footer-brand p { margin-top: 6px; font-size: 15.5px; }
.footer-nav { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-nav a { color: var(--text-muted); font-size: 15px; }
.footer-nav a:hover { color: var(--accent); }
.footer-legal {
  border-top: 1px solid var(--border);
  padding: 20px 28px 32px;
}
.footer-legal p { font-size: 13.5px; color: var(--text-faint); }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 8, 11, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 200;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  background: var(--bg-panel-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  max-width: 560px;
  width: 100%;
  padding: 36px;
  position: relative;
  max-height: 85vh;
  overflow-y: auto;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.modal-close:hover { color: var(--text); border-color: var(--border-strong); }
.modal-body h3 { font-size: 22px; margin-bottom: 14px; }
.modal-body p { font-size: 16.5px; margin-bottom: 16px; }
.modal-flow { margin-bottom: 18px; }
.modal-note {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--text-faint);
  font-size: 15px;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1024px) {
  .arch-rail { grid-template-columns: repeat(4, 1fr); }
  .service-grid, .project-grid, .value-grid { grid-template-columns: repeat(2, 1fr); }
  .process-steps { grid-template-columns: repeat(2, 1fr); }
  .tech-groups, .principle-list { grid-template-columns: repeat(2, 1fr); }
  .outcomes-grid { grid-template-columns: repeat(2, 1fr); }
  .outcome:nth-child(3) { border-left: none; }
  .multilingual-inner { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .main-nav { display: none; }
  .nav-cta { display: none; }
  .nav-toggle { display: flex; }

  .site-header.nav-open .main-nav {
    display: block;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 12px 28px 24px;
  }
  .site-header.nav-open .main-nav ul { flex-direction: column; gap: 4px; }
  .site-header.nav-open .main-nav a {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }

  .hero-grid { grid-template-columns: 1fr; }
  .hero-diagram { order: -1; }
}

@media (max-width: 720px) {
  body { font-size: 17px; }
  section { padding: 64px 0; }
  .wrap { padding: 0 20px; }
  .arch-rail { grid-template-columns: repeat(2, 1fr); }
  .service-grid, .project-grid, .value-grid,
  .process-steps, .tech-groups, .principle-list { grid-template-columns: 1fr; }
  .outcomes-grid { grid-template-columns: 1fr; }
  .outcome { border-left: none; border-top: 1px solid var(--border); }
  .outcome:first-child { border-top: none; }
  .footer-inner { flex-direction: column; }
}
