/* ==========================================================================
   DevNox Solutions — Design System
   Cybersecurity · AI · Software Engineering
   ========================================================================== */

:root{
  /* --- Color: deep circuit-board navy, logo blue, signal gold --- */
  --bg:            #090d17;
  --bg-alt:        #0c1120;
  --surface:       #111a2e;
  --surface-2:     #16213a;
  --line:          rgba(148, 163, 199, 0.14);
  --line-strong:   rgba(148, 163, 199, 0.28);

  --primary:       #2f6df6;   /* logo blue */
  --primary-dim:   #1c3f96;
  --primary-bright:#6ea1ff;   /* trace glow */
  --gold:          #ffb020;   /* signal / CTA accent */
  --gold-dim:      #b97e12;
  --danger:        #ff5c72;
  --ok:            #35d68a;

  --text:          #eaf0fb;
  --text-muted:    #9aa6c3;
  --text-faint:    #5c6785;

  /* --- Type --- */
  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body:    'Inter', 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  /* --- Scale --- */
  --container: 1180px;
  --radius-sm: 6px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --ease: cubic-bezier(.16,.84,.44,1);
}

/* ---------- Reset ---------- */
*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
ul{ list-style:none; margin:0; padding:0; }
button{ font-family:inherit; cursor:pointer; }
h1,h2,h3,h4{
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
  color: var(--text);
}
p{ margin:0 0 1em; color: var(--text-muted); }
.container{ max-width: var(--container); margin:0 auto; padding: 0 24px; }

::selection{ background: var(--primary); color:#fff; }

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

/* Background circuit-grid texture (site-wide, very subtle) */
body::before{
  content:"";
  position: fixed; inset:0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity:.35;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 85%);
  pointer-events:none;
  z-index:0;
}

/* ---------- Eyebrow / mono labels ---------- */
.eyebrow{
  display:inline-flex; align-items:center; gap:10px;
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--primary-bright);
  margin-bottom: 18px;
}
.eyebrow::before{
  content:"";
  width:8px; height:8px;
  background: var(--gold);
  border-radius: 2px;
  transform: rotate(45deg);
  box-shadow: 0 0 12px var(--gold);
}

/* ---------- Buttons ---------- */
.btn{
  --pad-y: 14px; --pad-x: 26px;
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  padding: var(--pad-y) var(--pad-x);
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight:600;
  font-size: .95rem;
  letter-spacing: .01em;
  border:1px solid transparent;
  transition: transform .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease), color .25s var(--ease);
  white-space: nowrap;
}
.btn-primary{
  background: var(--gold);
  color: #1a1200;
  box-shadow: 0 8px 24px -8px rgba(255,176,32,.55);
}
.btn-primary:hover{ transform: translateY(-2px); box-shadow: 0 12px 28px -8px rgba(255,176,32,.7); }
.btn-ghost{
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.btn-ghost:hover{ border-color: var(--primary-bright); color: var(--primary-bright); transform: translateY(-2px); }
.btn-block{ width:100%; }
.btn-sm{ --pad-y: 10px; --pad-x: 18px; font-size:.85rem; }
.btn[disabled]{ opacity:.5; cursor:not-allowed; transform:none !important; }

/* ---------- Navigation ---------- */
.site-header{
  position: sticky; top:0; z-index: 100;
  background: rgba(9,13,23,.78);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.nav{
  display:flex; align-items:center; justify-content:space-between;
  padding: 14px 24px;
  max-width: var(--container); margin:0 auto;
}
.brand{ display:flex; align-items:center; gap:12px; }
.brand img{ width:34px; height:34px; }
.brand-word{ font-family: var(--font-display); font-weight:700; font-size:1.15rem; letter-spacing:.01em; }
.brand-word span{ color: var(--primary-bright); font-weight:400; display:block; font-size:.58rem; font-family:var(--font-mono); letter-spacing:.22em; color:var(--text-faint); margin-top:1px; }

.nav-links{ display:flex; align-items:center; gap:2px; }
.nav-links a{
  padding: 10px 16px; border-radius: var(--radius-sm);
  font-size:.92rem; color: var(--text-muted);
  transition: color .2s, background .2s;
  position: relative;
}
.nav-links a:hover{ color: var(--text); background: var(--surface); }
.nav-links a.active{ color: var(--text); }
.nav-links a.active::after{
  content:""; position:absolute; left:16px; right:16px; bottom:5px; height:2px;
  background: var(--gold); border-radius:2px;
}
.nav-cta{ display:flex; align-items:center; gap:10px; }

.nav-toggle{
  display:none; background:none; border:none; padding:8px;
  flex-direction:column; gap:5px;
}
.nav-toggle span{ width:22px; height:2px; background: var(--text); border-radius:2px; transition: transform .25s var(--ease), opacity .25s var(--ease); }
.nav-toggle.is-open span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2){ opacity:0; }
.nav-toggle.is-open span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero{
  position:relative;
  padding: 96px 0 80px;
  overflow:hidden;
}
.hero-canvas-wrap{
  position:absolute; inset:0; z-index:0;
  mask-image: linear-gradient(to bottom, black 55%, transparent 96%);
}
#circuit-canvas{ width:100%; height:100%; display:block; }
.hero-inner{ position:relative; z-index:1; max-width: 760px; }
.hero h1{ font-size: clamp(2.3rem, 5vw, 3.6rem); }
.hero .lede{ font-size: 1.15rem; max-width: 560px; }
.hero-actions{ display:flex; gap:14px; margin-top: 30px; flex-wrap:wrap; }
.hero-meta{
  display:flex; gap:28px; margin-top: 56px; flex-wrap:wrap;
  font-family: var(--font-mono); font-size:.8rem; color: var(--text-faint);
}
.hero-meta b{ color: var(--text); font-weight:600; }

/* ---------- Sections ---------- */
section{ position:relative; z-index:1; padding: 88px 0; }
.section-head{ max-width: 620px; margin-bottom: 52px; }
.section-head.center{ margin-left:auto; margin-right:auto; text-align:center; }
.section-head h2{ font-size: clamp(1.7rem, 3vw, 2.4rem); }

/* Trace divider — signature element echoing the logo's circuit lines */
.trace-divider{ width:100%; height:34px; margin: 0 auto; display:block; opacity:.55; }

/* ---------- Cards / Services (hex-corner nod to logo) ---------- */
.grid{ display:grid; gap: 22px; }
.grid-3{ grid-template-columns: repeat(3, 1fr); }
.grid-2{ grid-template-columns: repeat(2, 1fr); }

.card{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 30px 26px;
  position:relative;
  transition: border-color .3s var(--ease), transform .3s var(--ease), background .3s var(--ease);
  clip-path: polygon(0 18px, 18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%);
}
.card::before{
  content:"";
  position:absolute; inset:0;
  border-radius: var(--radius-md);
  clip-path: inherit;
  padding:1px;
  background: linear-gradient(135deg, var(--primary-bright), transparent 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity:0; transition: opacity .35s var(--ease);
}
.card:hover{ transform: translateY(-4px); background: var(--surface-2); }
.card:hover::before{ opacity:1; }
.card-icon{
  width:44px; height:44px; margin-bottom:18px;
  display:flex; align-items:center; justify-content:center;
  color: var(--primary-bright);
}
.card-icon svg{ width:100%; height:100%; }
.card h3{ font-size:1.15rem; margin-bottom:10px; }
.card ul{ margin-top:14px; display:flex; flex-direction:column; gap:8px; }
.card ul li{
  font-size:.88rem; color: var(--text-muted);
  padding-left:16px; position:relative;
}
.card ul li::before{
  content:""; position:absolute; left:0; top:8px;
  width:6px; height:1px; background: var(--gold);
}
.card-link{ display:inline-flex; align-items:center; gap:6px; margin-top:20px; font-size:.88rem; font-weight:600; color: var(--primary-bright); }
.card-link svg{ width:14px; height:14px; transition: transform .2s; }
.card:hover .card-link svg{ transform: translateX(3px); }

/* ---------- Process (real sequence -> numbered ok) ---------- */
.process{ display:grid; grid-template-columns: repeat(4,1fr); gap:0; position:relative; }
.process::before{
  content:""; position:absolute; top:22px; left:6%; right:6%; height:1px;
  background: repeating-linear-gradient(to right, var(--line-strong) 0 8px, transparent 8px 14px);
}
.process-step{ padding: 0 18px 0 0; position:relative; }
.process-num{
  width:44px; height:44px; border-radius:50%;
  background: var(--bg-alt); border:1px solid var(--line-strong);
  display:flex; align-items:center; justify-content:center;
  font-family: var(--font-mono); font-size:.85rem; color: var(--gold);
  margin-bottom:20px; position:relative; z-index:1;
}
.process-step h4{ font-size:1.02rem; margin-bottom:8px; }
.process-step p{ font-size:.88rem; }

/* ---------- Stat / trust strip ---------- */
.trust-strip{
  border-top:1px solid var(--line); border-bottom:1px solid var(--line);
  padding: 26px 0;
}
.trust-strip .container{
  display:flex; align-items:center; justify-content:center; gap:14px; flex-wrap:wrap;
  text-align:center;
  font-family: var(--font-mono); font-size:.82rem; color: var(--text-faint); letter-spacing:.04em;
}
.trust-strip strong{ color: var(--text-muted); font-weight:600; }

/* ---------- CTA band ---------- */
.cta-band{
  background: linear-gradient(135deg, var(--surface), var(--bg-alt));
  border:1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 56px;
  display:flex; align-items:center; justify-content:space-between; gap:40px; flex-wrap:wrap;
  position:relative; overflow:hidden;
}
.cta-band::after{
  content:""; position:absolute; right:-60px; top:-60px; width:220px; height:220px;
  background: radial-gradient(circle, rgba(47,109,246,.35), transparent 70%);
}
.cta-band h3{ font-size:1.6rem; max-width:460px; }
.cta-actions{ display:flex; gap:14px; flex-wrap:wrap; }

/* ---------- Footer ---------- */
.site-footer{
  border-top:1px solid var(--line);
  padding: 64px 0 28px;
  background: var(--bg-alt);
}
.footer-grid{
  display:grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px;
  margin-bottom: 48px;
}
.footer-brand p{ font-size:.9rem; max-width: 280px; margin-top:16px; }
.footer-col h5{
  font-family: var(--font-mono); font-size:.75rem; letter-spacing:.14em; text-transform:uppercase;
  color: var(--text-faint); margin-bottom:16px;
}
.footer-col ul{ display:flex; flex-direction:column; gap:11px; }
.footer-col a{ font-size:.9rem; color: var(--text-muted); transition: color .2s; }
.footer-col a:hover{ color: var(--primary-bright); }
.footer-social{ display:flex; gap:10px; margin-top:18px; }
.footer-social a{
  width:38px; height:38px; border:1px solid var(--line-strong); border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  transition: border-color .2s, color .2s, transform .2s;
}
.footer-social a:hover{ border-color: var(--primary-bright); color: var(--primary-bright); transform: translateY(-2px); }
.footer-social svg{ width:16px; height:16px; }
.footer-bottom{
  display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px;
  padding-top: 26px; border-top:1px solid var(--line);
  font-size:.82rem; color: var(--text-faint);
}

/* ---------- Back to top ---------- */
.to-top{
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width:46px; height:46px; border-radius:50%;
  background: var(--surface-2); border:1px solid var(--line-strong);
  color: var(--text); display:flex; align-items:center; justify-content:center;
  opacity:0; visibility:hidden; transform: translateY(10px);
  transition: opacity .3s, transform .3s, visibility .3s, border-color .2s;
}
.to-top.visible{ opacity:1; visibility:visible; transform:none; }
.to-top:hover{ border-color: var(--gold); color: var(--gold); }

/* ---------- Reveal-on-scroll ---------- */
[data-reveal]{ opacity:0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
[data-reveal].in-view{ opacity:1; transform:none; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero{ padding: 64px 0 56px; }
.page-hero h1{ font-size: clamp(2rem, 4vw, 2.8rem); }
.breadcrumb{
  font-family: var(--font-mono); font-size:.78rem; color: var(--text-faint);
  display:flex; gap:8px; align-items:center; margin-bottom:22px;
}
.breadcrumb a:hover{ color: var(--primary-bright); }

/* ---------- About page ---------- */
.about-grid{ display:grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items:center; }
.founder-card{
  background: var(--surface); border:1px solid var(--line); border-radius: var(--radius-md);
  padding: 30px; display:flex; gap:18px; align-items:flex-start; margin-top:26px;
}
.founder-avatar{
  width:56px; height:56px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary), var(--primary-dim));
  display:flex; align-items:center; justify-content:center;
  font-family: var(--font-display); font-weight:700; font-size:1.2rem; color:#fff; flex-shrink:0;
}
.founder-card h4{ margin-bottom:2px; font-size:1.02rem; }
.founder-card .role{ font-family: var(--font-mono); font-size:.75rem; color: var(--gold); letter-spacing:.05em; margin-bottom:10px; display:block; }

.values-list{ display:flex; flex-direction:column; gap:22px; margin-top:10px; }
.value-item{ display:flex; gap:18px; }
.value-num{ font-family: var(--font-mono); color: var(--text-faint); font-size:.85rem; padding-top:3px; }
.value-item h4{ font-size:1.02rem; margin-bottom:4px; }
.value-item p{ font-size:.92rem; margin:0; }

/* ---------- Projects ---------- */
.project-card{
  background: var(--surface); border:1px solid var(--line); border-radius: var(--radius-md);
  overflow:hidden; transition: transform .3s var(--ease), border-color .3s;
}
.project-card:hover{ transform: translateY(-4px); border-color: var(--line-strong); }
.project-thumb{
  height:160px; display:flex; align-items:center; justify-content:center;
  background:
    radial-gradient(circle at 30% 20%, rgba(47,109,246,.35), transparent 60%),
    var(--bg-alt);
  border-bottom:1px solid var(--line);
  position:relative; overflow:hidden;
}
.project-thumb svg{ width:52px; height:52px; color: var(--primary-bright); position:relative; z-index:1; }
.project-body{ padding: 24px; }
.project-tags{ display:flex; gap:8px; flex-wrap:wrap; margin-bottom:14px; }
.tag{
  font-family: var(--font-mono); font-size:.7rem; letter-spacing:.04em;
  padding:4px 10px; border-radius:20px; border:1px solid var(--line-strong); color: var(--text-muted);
}
.project-card h3{ font-size:1.08rem; }

/* ---------- Contact ---------- */
.contact-grid{ display:grid; grid-template-columns: 1fr 1.15fr; gap: 50px; }
.contact-info-item{ display:flex; gap:16px; padding: 20px 0; border-bottom:1px solid var(--line); }
.contact-info-item:first-child{ padding-top:0; }
.contact-icon{
  width:42px; height:42px; border-radius: var(--radius-sm); flex-shrink:0;
  background: var(--surface); border:1px solid var(--line-strong);
  display:flex; align-items:center; justify-content:center; color: var(--primary-bright);
}
.contact-icon svg{ width:19px; height:19px; }
.contact-info-item h4{ font-size:.95rem; margin-bottom:4px; }
.contact-info-item a, .contact-info-item span{ font-size:.9rem; color: var(--text-muted); }
.contact-info-item a:hover{ color: var(--primary-bright); }

.form-card{
  background: var(--surface); border:1px solid var(--line); border-radius: var(--radius-lg);
  padding: 36px;
}
.form-row{ display:grid; grid-template-columns: 1fr 1fr; gap:16px; }
.field{ margin-bottom: 18px; }
.field label{
  display:block; font-size:.82rem; font-weight:600; margin-bottom:8px; color: var(--text-muted);
}
.field input, .field select, .field textarea{
  width:100%; background: var(--bg-alt); border:1px solid var(--line-strong);
  border-radius: var(--radius-sm); padding: 12px 14px; color: var(--text);
  font-family: var(--font-body); font-size:.92rem;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .field textarea:focus{
  outline:none; border-color: var(--primary-bright);
  box-shadow: 0 0 0 3px rgba(47,109,246,.2);
}
.field textarea{ resize:vertical; min-height:120px; }
.field-error{ font-size:.78rem; color: var(--danger); margin-top:6px; display:none; }
.field.has-error input, .field.has-error textarea, .field.has-error select{ border-color: var(--danger); }
.field.has-error .field-error{ display:block; }
.form-note{ font-size:.8rem; color: var(--text-faint); margin-top:14px; text-align:center; }
.form-status{
  margin-top:16px; padding:12px 16px; border-radius: var(--radius-sm);
  font-size:.85rem; display:none;
}
.form-status.show{ display:block; }
.form-status.ok{ background: rgba(53,214,138,.12); color: var(--ok); border:1px solid rgba(53,214,138,.3); }

.map-embed{
  border-radius: var(--radius-md); overflow:hidden; border:1px solid var(--line); margin-top:26px;
  filter: grayscale(.4) invert(.92) contrast(.9);
}
.map-embed iframe{ width:100%; height:260px; border:0; display:block; }

/* Copy-to-clipboard micro button */
.copy-btn{
  background:none; border:none; color: var(--text-faint); padding:2px 6px; font-size:.75rem;
  border:1px solid var(--line-strong); border-radius:4px; margin-left:8px;
  transition: color .2s, border-color .2s;
}
.copy-btn:hover{ color: var(--gold); border-color: var(--gold); }

/* ---------- FAQ (services page) ---------- */
.faq-item{ border-bottom:1px solid var(--line); }
.faq-q{
  width:100%; text-align:left; background:none; border:none; color: var(--text);
  padding: 22px 0; display:flex; justify-content:space-between; align-items:center;
  font-family: var(--font-display); font-weight:600; font-size:1rem;
}
.faq-q svg{ width:18px; height:18px; flex-shrink:0; transition: transform .3s var(--ease); color: var(--text-faint); }
.faq-item.open .faq-q svg{ transform: rotate(45deg); color: var(--gold); }
.faq-a{
  max-height:0; overflow:hidden; transition: max-height .35s var(--ease), padding .35s var(--ease);
  font-size:.92rem; color: var(--text-muted);
}
.faq-item.open .faq-a{ max-height: 240px; padding-bottom: 22px; }

/* ---------- Utilities ---------- */
.text-center{ text-align:center; }
.mt-0{ margin-top:0 !important; }
.badge{
  display:inline-block; font-family: var(--font-mono); font-size:.7rem; letter-spacing:.06em;
  padding:5px 10px; border-radius:20px; border:1px solid var(--line-strong); color: var(--text-muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 980px){
  .grid-3{ grid-template-columns: repeat(2,1fr); }
  .footer-grid{ grid-template-columns: 1fr 1fr; }
  .about-grid, .contact-grid{ grid-template-columns: 1fr; }
  .process{ grid-template-columns: repeat(2,1fr); row-gap:36px; }
  .process::before{ display:none; }
}
@media (max-width: 760px){
  .nav-links, .nav-cta .btn-ghost{ display:none; }
  .nav-toggle{ display:flex; }
  .nav.is-open .nav-links{
    display:flex; position:absolute; top:100%; left:0; right:0;
    flex-direction:column; background: var(--bg-alt); border-bottom:1px solid var(--line);
    padding: 10px 20px 20px;
  }
  .grid-3, .grid-2{ grid-template-columns: 1fr; }
  .form-row{ grid-template-columns: 1fr; }
  .cta-band{ padding: 36px 26px; flex-direction:column; text-align:center; }
  .cta-actions{ justify-content:center; }
  .footer-grid{ grid-template-columns: 1fr; gap:32px; }
  .footer-bottom{ flex-direction:column; text-align:center; }
  .process{ grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior:auto !important; }
}
