/* ===================================================================
   DLG Labs — offensive security consultancy
   Dark, modern, terminal-inspired design system
   =================================================================== */

:root {
  --bg:        #070a0f;
  --bg-2:      #0b0f17;
  --panel:     #0f151f;
  --panel-2:   #131b27;
  --line:      #1e2836;
  --line-soft: #17202c;

  --text:      #e6edf3;
  --muted:     #94a3b8;
  --dim:       #5b6b7d;

  --accent:    #43f5c0;   /* signal green/cyan */
  --accent-2:  #22d3ee;   /* cyan */
  --accent-3:  #7c6cff;   /* violet */
  --crit:      #ff5d6c;
  --warn:      #ffbf5d;

  --radius:    14px;
  --radius-sm: 10px;
  --maxw:      1160px;

  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  --shadow: 0 24px 60px -20px rgba(0,0,0,.7);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* --- background layers --- */
.bg-grid {
  position: fixed; inset: 0; z-index: -2;
  background-image:
    linear-gradient(to right, rgba(67,245,192,.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(67,245,192,.04) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 80%);
}
.bg-glow {
  position: fixed; z-index: -1; inset: 0;
  background:
    radial-gradient(60% 45% at 15% 0%, rgba(34,211,238,.12), transparent 60%),
    radial-gradient(55% 40% at 90% 10%, rgba(124,108,255,.12), transparent 60%);
  pointer-events: none;
}

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 22px; }

a { color: inherit; text-decoration: none; }

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--accent); color: #04120c; padding: 10px 16px; border-radius: 8px; font-weight: 700;
}
.skip-link:focus { left: 12px; }

.eyebrow {
  display: inline-block; font-family: var(--mono); font-size: .8rem; letter-spacing: .08em;
  color: var(--accent); margin-bottom: 14px; text-transform: uppercase;
}

/* ===================== Buttons ===================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: .98rem; padding: 13px 22px; border-radius: 10px;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn-sm { padding: 9px 16px; font-size: .9rem; }
.btn-primary {
  background: linear-gradient(180deg, var(--accent), #2fd6a6);
  color: #04120c; box-shadow: 0 10px 30px -12px rgba(67,245,192,.6);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px rgba(67,245,192,.75); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ===================== Nav ===================== */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(7,10,15,.72);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.nav.scrolled { border-bottom-color: var(--line); background: rgba(7,10,15,.9); }
.nav-inner { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; }
.brand-name { font-family: var(--mono); }
.brand-dim { color: var(--accent); }
.nav-links { display: flex; gap: 26px; margin-left: 18px; flex: 1; }
.nav-links a { color: var(--muted); font-size: .95rem; font-weight: 500; transition: color .2s ease; }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 16px; }

.lang-toggle { display: flex; align-items: center; gap: 4px; font-family: var(--mono); font-size: .85rem; }
.lang-btn { background: none; border: none; color: var(--dim); cursor: pointer; padding: 4px 4px; font-family: inherit; font-size: inherit; transition: color .2s ease; }
.lang-btn.is-active { color: var(--accent); font-weight: 700; }
.lang-btn:hover { color: var(--text); }
.lang-sep { color: var(--line); }

.nav-burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-burger span { width: 24px; height: 2px; background: var(--text); transition: .25s; }

.mobile-menu {
  display: none; flex-direction: column; gap: 4px; padding: 8px 22px 20px;
  border-bottom: 1px solid var(--line); background: rgba(7,10,15,.97);
}
.mobile-menu a { padding: 12px 4px; color: var(--muted); border-bottom: 1px solid var(--line-soft); }
.mobile-menu.open { display: flex; }

/* ===================== Hero ===================== */
.hero {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 54px; align-items: center;
  padding: clamp(48px, 9vw, 110px) 22px clamp(40px, 6vw, 72px);
}
.hero-title {
  font-size: clamp(2.4rem, 6vw, 4.1rem); line-height: 1.05; letter-spacing: -.03em;
  margin: 0 0 20px; font-weight: 800;
}
.hero-title .accent {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { font-size: 1.12rem; color: var(--muted); max-width: 40ch; margin: 0 0 30px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 30px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; list-style: none; }
.hero-badges li {
  font-family: var(--mono); font-size: .74rem; letter-spacing: .04em; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; background: var(--panel);
}

/* terminal */
.hero-term {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.term-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--panel-2); }
.term-bar .dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.r { background: #ff5f57; } .dot.y { background: #febc2e; } .dot.g { background: #28c840; }
.term-title { font-family: var(--mono); font-size: .78rem; color: var(--dim); margin-left: 8px; }
.term-body { margin: 0; padding: 20px; font-family: var(--mono); font-size: .86rem; line-height: 1.85; overflow-x: auto; }
.term-body code { color: var(--text); }
.c-dim { color: var(--dim); } .c-cmd { color: var(--accent-2); } .c-ok { color: var(--accent); }
.c-warn { color: var(--warn); } .c-crit { color: var(--crit); font-weight: 700; }
.cursor { color: var(--accent); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ===================== Stats ===================== */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  padding: 10px 22px 20px;
}
.stat {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 22px; text-align: center;
}
.stat-n { display: block; font-family: var(--mono); font-size: 1.7rem; font-weight: 700; color: var(--accent); }
.stat-l { display: block; font-size: .88rem; color: var(--muted); margin-top: 6px; }

/* ===================== Sections ===================== */
.section { padding: clamp(56px, 8vw, 96px) 22px; }
.section-head { max-width: 62ch; margin-bottom: 46px; }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.12; letter-spacing: -.02em; margin: 0 0 16px; }
.section-lead { color: var(--muted); font-size: 1.06rem; margin: 0; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  position: relative; overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0; transition: opacity .25s ease;
}
.card:hover { transform: translateY(-4px); border-color: #2a3b4d; box-shadow: var(--shadow); }
.card:hover::before { opacity: 1; }
.card-ico {
  width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px;
  background: rgba(67,245,192,.1); color: var(--accent); font-size: 1.3rem; margin-bottom: 18px;
  border: 1px solid rgba(67,245,192,.2);
}
.card h3 { font-size: 1.18rem; margin: 0 0 10px; letter-spacing: -.01em; }
.card p { color: var(--muted); margin: 0; font-size: .96rem; }

/* steps */
.steps { list-style: none; counter-reset: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.step {
  display: grid; grid-template-columns: 64px 1fr; gap: 22px; align-items: start;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px;
  transition: border-color .2s ease;
}
.step:hover { border-color: #2a3b4d; }
.step-n { grid-column: 1; grid-row: 1 / span 2; font-family: var(--mono); font-size: 1.5rem; font-weight: 700; color: var(--accent); }
.step h3 { grid-column: 2; grid-row: 1; margin: 0 0 6px; font-size: 1.14rem; }
.step p { grid-column: 2; grid-row: 2; margin: 0; color: var(--muted); font-size: .97rem; }

/* why grid */
.why-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.why-item { padding: 26px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius-sm); background: var(--panel); }
.why-item h3 { margin: 0 0 8px; font-size: 1.12rem; }
.why-item p { margin: 0; color: var(--muted); }

/* about */
.about { display: grid; grid-template-columns: 1.1fr .9fr; gap: 44px; align-items: center; }
.about-copy h2 { margin-bottom: 18px; }
.about-copy p { color: var(--muted); margin: 0 0 16px; }
.about-panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.about-panel pre { margin: 0; font-family: var(--mono); font-size: .9rem; line-height: 1.9; color: var(--text); overflow-x: auto; }

/* contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 44px; align-items: start; }
.contact-intro .section-lead { margin: 0 0 24px; }
.contact-points { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 12px; }
.contact-points li { position: relative; padding-left: 26px; color: var(--muted); }
.contact-points li::before {
  content: ""; position: absolute; left: 2px; top: .45em; width: 9px; height: 9px;
  border: 2px solid var(--accent); border-radius: 2px; transform: rotate(45deg);
}
.contact-direct { color: var(--muted); font-size: .95rem; margin: 0; }
.contact-direct a { color: var(--accent); font-family: var(--mono); }
.contact-direct a:hover { text-decoration: underline; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; gap: 30px; } }

/* ===================== Footer ===================== */
.footer { border-top: 1px solid var(--line); padding: 40px 22px; margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer-brand .brand-name { font-family: var(--mono); font-weight: 800; }
.footer-brand p { margin: 6px 0 0; color: var(--muted); font-size: .92rem; }
.footer-meta { display: flex; gap: 20px; align-items: center; color: var(--dim); font-size: .9rem; }
.footer-meta a { color: var(--muted); }
.footer-meta a:hover { color: var(--accent); }

/* ===================== Reveal animation ===================== */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ===================== Responsive ===================== */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 40px; }
  .hero-term { order: 2; }
  .cards { grid-template-columns: 1fr 1fr; }
  .about { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .nav-actions .btn-sm { display: none; }
}
@media (max-width: 620px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .cards { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .step { grid-template-columns: 48px 1fr; gap: 14px; padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ===================== Contact form ===================== */
.contact-form { display: grid; gap: 15px; padding: clamp(22px, 3vw, 30px); }
.contact-form.card:hover { transform: none; border-color: var(--line); box-shadow: var(--shadow); }
.contact-form.card::before { display: none; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.field { display: grid; gap: 6px; }
.field .lbl { font-size: .84rem; color: var(--muted); font-weight: 500; }
.req { color: var(--accent); font-style: normal; }
.field input, .field textarea, .field select {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--text); font: inherit; padding: 12px 14px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.field select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238b98a5' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 12px;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(67,245,192,.15);
}
.field textarea { resize: vertical; min-height: 130px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: .88rem; color: var(--muted); cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--accent); flex-shrink: 0; }
.contact-form .btn-primary { justify-self: start; margin-top: 4px; }
.contact-form .btn-primary:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-status { margin: 2px 0 0; font-size: .92rem; min-height: 1.2em; }
.form-status.is-ok { color: var(--accent); }
.form-status.is-error { color: var(--crit); }
.field.invalid input, .field.invalid textarea, .field.invalid select { border-color: var(--crit); box-shadow: 0 0 0 3px rgba(255,93,108,.12); }
.field.invalid .lbl { color: var(--crit); }
.check.invalid { color: var(--crit); }
.check.invalid input { outline: 2px solid var(--crit); outline-offset: 2px; }
@media (max-width: 620px) { .form-row { grid-template-columns: 1fr; } }

/* ===================== FAQ ===================== */
.faq-list { display: grid; gap: 12px; max-width: 840px; }
.faq-item { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; transition: border-color .2s ease; }
.faq-item[open] { border-color: #2a3b4d; }
.faq-item summary {
  cursor: pointer; padding: 18px 22px; font-weight: 600; font-size: 1.02rem; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--accent); font-family: var(--mono); font-size: 1.3rem; line-height: 1; }
.faq-item[open] summary::after { content: "-"; }
.faq-item p { margin: 0; padding: 0 22px 20px; color: var(--muted); }

/* ===================== Dynamic touches ===================== */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 60;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px rgba(67,245,192,.5);
}
@keyframes glow-drift {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 1; }
  50% { transform: translate(-2%, 1.5%) scale(1.05); opacity: .82; }
}
.bg-glow { animation: glow-drift 16s ease-in-out infinite; }

.hero-title .accent {
  background: linear-gradient(110deg, var(--accent), var(--accent-2), var(--accent-3), var(--accent-2), var(--accent));
  background-size: 260% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: accent-shift 9s linear infinite;
}
@keyframes accent-shift { to { background-position: 260% 0; } }

.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--accent); transition: width .25s ease;
}
.nav-links a { position: relative; }
.nav-links a:hover::after { width: 100%; }

.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after {
  content: ""; position: absolute; top: 0; left: -80%; width: 55%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-20deg); transition: left .55s ease; pointer-events: none;
}
.btn-primary:hover::after { left: 140%; }

.card-ico { transition: transform .25s ease, background .25s ease; }
.card:hover .card-ico { transform: translateY(-2px) scale(1.06); }

/* ===================== Services explorer ===================== */
.svc-explorer { display: grid; grid-template-columns: 258px 1fr; gap: 24px; align-items: start; }
.svc-tabs { display: flex; flex-direction: column; gap: 6px; }
.svc-tab {
  text-align: left; background: transparent; border: 1px solid transparent; border-left: 2px solid transparent;
  border-radius: var(--radius-sm); color: var(--muted); font: inherit; font-weight: 500; font-size: .96rem;
  padding: 13px 16px; cursor: pointer; transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.svc-tab:hover { color: var(--text); background: var(--panel); }
.svc-tab.is-active { color: var(--text); background: var(--panel); border-color: var(--line); border-left-color: var(--accent); }
.svc-panel {
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(26px, 3vw, 38px);
  box-shadow: var(--shadow); animation: panel-in .3s ease;
}
@keyframes panel-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.svc-panel h3 { font-size: clamp(1.3rem, 2.6vw, 1.6rem); margin: 0 0 14px; letter-spacing: -.02em; }
.svc-panel > p { color: var(--muted); font-size: 1.04rem; margin: 0 0 22px; max-width: 62ch; }
.svc-tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.svc-tags li {
  font-size: .84rem; color: var(--text); background: rgba(67,245,192,.07);
  border: 1px solid rgba(67,245,192,.22); border-radius: 999px; padding: 7px 14px;
}
@media (max-width: 820px) {
  .svc-explorer { grid-template-columns: 1fr; }
  .svc-tabs { flex-direction: row; overflow-x: auto; gap: 8px; padding-bottom: 6px; }
  .svc-tab { white-space: nowrap; border-left: none; border-bottom: 2px solid transparent; }
  .svc-tab.is-active { border-left: none; border-bottom-color: var(--accent); }
}

/* ===================== Edge (differentiator) ===================== */
.edge { text-align: center; }
.edge h2 { font-size: clamp(1.9rem, 4.5vw, 3rem); letter-spacing: -.02em; margin: 12px auto 20px; max-width: 20ch; }
.edge-body { color: var(--muted); font-size: 1.1rem; max-width: 70ch; margin: 0 auto 40px; }
.edge-pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; text-align: left; }
.edge-pillar { background: var(--panel); border: 1px solid var(--line); border-top: 2px solid var(--accent); border-radius: var(--radius-sm); padding: 24px; }
.edge-pillar h3 { margin: 0 0 8px; font-size: 1.1rem; }
.edge-pillar p { margin: 0; color: var(--muted); font-size: .96rem; }
@media (max-width: 760px) { .edge-pillars { grid-template-columns: 1fr; } }

/* ===================== Credentials ===================== */
.creds { text-align: center; padding: 44px 22px; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); margin: 0 auto; }
.creds-label { font-family: var(--mono); font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); margin: 0 0 20px; }
.creds-badges { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.cbadge {
  font-family: var(--mono); font-size: .82rem; font-weight: 500; letter-spacing: .03em; color: var(--muted);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px; background: var(--panel);
  transition: color .2s ease, border-color .2s ease;
}
.cbadge:hover { color: var(--accent); border-color: rgba(67,245,192,.4); }
