/* ====================================================
   Cyber Guard — style.css
   External stylesheet: loaded via <link> in index.html
   No unsafe-inline required with this approach.
   ==================================================== */

/* ====== CSS Variables ====== */
:root {
  --primary:       #7ca9f7;
  --primary-dim:   #4d7fd4;
  --accent:        #a8c8ff;
  --accent2:       #dce8ff;
  --danger:        #f87171;
  --bg-deep:       #060d1f;
  --bg-dark:       #091428;
  --bg-card:       #0b1a35;
  --bg-card2:      #0e2045;
  --text-muted:    #6b8ab5;
  --text-dim:      #3d5a80;
  --card-border:   rgba(124,169,247,0.2);
  --card-border-h: rgba(168,200,255,0.45);
  --ring:          rgba(124,169,247,0.18);
  --font-display:  'Orbitron', sans-serif;
  --font-body:     'Inter', sans-serif;
  --font-mono:     'JetBrains Mono', monospace;
  /* Legacy aliases */
  --primary-green:   var(--primary);
  --secondary-green: var(--accent);
  --darker-bg:       var(--bg-deep);
  --dark-bg:         var(--bg-dark);
  --terminal-bg:     var(--bg-card);
  --red-alert:       var(--danger);
  --blue-accent:     var(--accent2);
  --gray-text:       var(--text-muted);
  --orange-gold:     var(--accent);
  --orange-gold-2:   var(--accent2);
}

/* ====== Reset / Base ====== */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--accent2);
  background:
    radial-gradient(ellipse 120% 60% at 10% -10%, #0d2348 0%, transparent 60%),
    radial-gradient(ellipse 80% 50% at 90% 10%, #091d3e 0%, transparent 55%),
    linear-gradient(180deg, #060d1f 0%, #08112a 50%, #060d1f 100%);
  line-height: 1.7;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ====== Matrix Background ====== */
.matrix-bg {
  position: fixed; inset: 0;
  pointer-events: none; z-index: -1; opacity: .05;
}
.matrix-column {
  position: absolute; top: -100px;
  font-size: 14px; color: var(--primary);
  animation: matrix-fall linear infinite;
  font-family: var(--font-mono);
}
@keyframes matrix-fall {
  from { transform: translateY(-100vh); }
  to   { transform: translateY(100vh); }
}

/* ====== Header / Nav ====== */
header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(6,13,31,.93);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(124,169,247,.12);
}
.nav {
  max-width: 1200px; margin: 0 auto;
  padding: .9rem 1rem;
  display: flex; align-items: center;
  justify-content: space-between; gap: 1rem;
}
.brand { display: flex; align-items: center; gap: .8rem; }
.brand-logo { width: 128px; filter: drop-shadow(0 0 10px rgba(124,169,247,.35)); }
.brand-name { display: grid; }
.logo-main {
  font-family: var(--font-display); font-weight: 700;
  letter-spacing: .12em; font-size: 1.3rem;
  background: linear-gradient(90deg, var(--accent2), var(--primary), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.logo-tagline {
  color: var(--gray-text); letter-spacing: .2em;
  font-size: .68rem; margin-top: -2px; font-family: var(--font-mono);
}
.nav-links {
  display: flex; gap: 1.5rem; align-items: center;
  font-family: var(--font-mono); font-size: .9rem;
}
.nav-links a { color: var(--gray-text); position: relative; padding: .25rem 0; }
.nav-links a::before {
  content: '>'; position: absolute; left: -12px; top: 0;
  opacity: 0; transition: .25s; color: var(--primary);
}
.nav-links a:hover { color: var(--accent2); text-shadow: 0 0 8px rgba(124,169,247,.5); }
.nav-links a:hover::before { opacity: 1; }
.hamburger {
  display: none; font-size: 1.35rem; color: var(--primary);
  border: 1px solid rgba(124,169,247,.25); padding: .45rem .6rem;
  border-radius: 8px; background: transparent; cursor: pointer;
}

/* ====== Layout ====== */
main { max-width: 1200px; margin: 0 auto; padding: 2rem 1rem 4rem; }

/* ====== Hero ====== */
.hero {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 3rem; align-items: start; padding: 3.5rem 0 2.5rem;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.8vw, 2.8rem);
  font-weight: 900; letter-spacing: .06em;
  margin: 0 0 .75rem; line-height: 1.2;
  background: linear-gradient(135deg, var(--accent2) 0%, var(--primary) 60%, var(--accent) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.subtitle {
  font-size: .95rem; color: var(--text-muted);
  max-width: 48ch; line-height: 1.7; margin: 0 0 1.2rem;
}

/* Hero CTAs */
.cta { display: flex; gap: .8rem; margin-top: 1.4rem; flex-wrap: wrap; }
.btn {
  font-family: var(--font-display); font-weight: 700;
  color: var(--accent2); border: 1.5px solid rgba(124,169,247,.4);
  padding: .85rem 1.4rem; border-radius: 10px;
  background: rgba(124,169,247,.07); transition: .25s;
  letter-spacing: .06em; display: inline-flex;
  align-items: center; gap: .55rem; font-size: .88rem;
  cursor: pointer;
}
.btn:hover {
  background: var(--primary); color: var(--bg-deep);
  box-shadow: 0 0 28px rgba(124,169,247,.35); transform: translateY(-2px);
}
.btn.secondary { color: var(--accent2); border-color: rgba(124,169,247,.3); background: rgba(124,169,247,.05); }
.btn.secondary:hover {
  background: rgba(124,169,247,.15); color: var(--accent2);
  box-shadow: 0 0 20px rgba(124,169,247,.2);
}
.submit-btn { font-family: inherit; }

/* Hero badges */
.hero-badges { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1.1rem; }
.hero-badge {
  font-family: var(--font-mono); font-size: .65rem; letter-spacing: .1em;
  color: var(--primary); border: 1px solid rgba(124,169,247,.25);
  background: rgba(124,169,247,.06); padding: .3rem .7rem;
  border-radius: 6px; display: inline-flex; align-items: center; gap: .4rem;
}
.hero-badge i { font-size: .7rem; }

/* Hero stats */
.hero-stats {
  display: flex; gap: 2rem; margin-top: 1.6rem;
  padding-top: 1.4rem; border-top: 1px solid rgba(124,169,247,.12);
}
.stat-num {
  font-family: var(--font-display); font-size: 1.5rem;
  font-weight: 900; color: var(--accent2);
  letter-spacing: .04em; line-height: 1;
}
.stat-label {
  font-family: var(--font-mono); font-size: .65rem;
  letter-spacing: .15em; color: var(--text-muted);
  margin-top: .25rem; text-transform: uppercase;
}

/* ====== Terminal Box ====== */
.terminal-box {
  border: 1px solid rgba(124,169,247,.22);
  border-radius: 14px; overflow: hidden;
  background: linear-gradient(170deg, #071830 0%, #040e20 100%);
  box-shadow: 0 24px 64px rgba(0,0,0,.55), inset 0 0 0 1px rgba(124,169,247,.05);
  display: flex; flex-direction: column;
  height: 440px; position: sticky; top: 5rem;
}
.terminal-topbar {
  display: flex; align-items: center; gap: .6rem;
  padding: .65rem 1rem;
  background: rgba(124,169,247,.05);
  border-bottom: 1px solid rgba(124,169,247,.12);
  flex-shrink: 0;
}
.terminal-title {
  font-family: var(--font-mono); font-size: .75rem;
  color: var(--text-muted); flex: 1; text-align: center;
}
.terminal-status {
  font-family: var(--font-mono); font-size: .65rem;
  color: var(--text-muted); display: flex; align-items: center; gap: .35rem;
}
.terminal-live-dot { color: #27ca3f; font-size: .5rem; }
.terminal-typing {
  padding: .7rem 1rem;
  border-bottom: 1px solid rgba(124,169,247,.08);
  font-family: var(--font-mono); font-size: .82rem;
  color: var(--primary); display: flex; align-items: center;
  flex-shrink: 0; background: rgba(0,0,0,.15); min-height: 42px;
}
.terminal-prompt { color: var(--primary); opacity: .7; }
.live-terminal {
  padding: .9rem 1rem; height: 360px;
  overflow: auto; font-family: var(--font-mono); font-size: .84rem;
}
.cursor {
  display: inline-block;
  border-right: 2px solid var(--primary);
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { border-color: transparent; } }

/* Terminal dots */
.dots { display: inline-flex; gap: .25rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red    { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green  { background: #27ca3f; }

/* Terminal output lines */
.cmd     { color: var(--primary); margin: .4rem 0; font-size: .85rem; }
.out     { color: var(--gray-text); margin-left: .75rem; font-size: .85rem; }
.out.success { color: var(--accent); }
.out.warn    { color: #ffa500; }
.out.err     { color: var(--red-alert); }

/* ====== Sections ====== */
.section { padding: 4rem 0; position: relative; }
.section::before {
  content: ''; display: block; width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124,169,247,.2) 20%, rgba(124,169,247,.2) 80%, transparent);
  margin-bottom: 3.5rem;
}
#home.hero { padding: 3.5rem 0 2.5rem; }
#home.hero::before { display: none; }

.section-header { margin-bottom: 2.4rem; }
.title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
  font-weight: 800; text-align: left;
  margin: 0 0 .4rem; letter-spacing: -.01em; color: var(--accent2);
}
.section-subtitle {
  font-size: .95rem; color: var(--gray-text);
  margin: 0; font-family: var(--font-body);
}
.section-tag {
  font-family: var(--font-mono); font-size: .7rem;
  letter-spacing: .2em; color: var(--primary);
  display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem;
}
.section-tag::before { content: '//'; }

/* ====== Services Grid ====== */
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.2rem; }

.card {
  position: relative; padding: 1.6rem; border-radius: 14px;
  border: 1px solid rgba(124,169,247,.15);
  background: linear-gradient(135deg, rgba(11,26,53,.9), rgba(6,15,34,.95));
  transition: .3s; cursor: pointer; overflow: hidden;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 50px rgba(124,169,247,.12), 0 0 0 1px rgba(124,169,247,.3);
  border-color: rgba(168,200,255,.45);
}
.card > i { font-size: 1.9rem; color: var(--primary); display: block; margin-bottom: .8rem; }
.card h3 {
  font-family: var(--font-display); margin: 0 0 .5rem;
  color: var(--accent2); font-size: .95rem; font-weight: 700; letter-spacing: .06em;
}
.card p { color: var(--gray-text); font-size: .9rem; line-height: 1.65; margin: 0; font-family: var(--font-body); }

.badge {
  position: absolute; top: 14px; right: 14px;
  font-size: .62rem; color: var(--bg-deep);
  background: linear-gradient(90deg, var(--primary), var(--accent2));
  padding: .2rem .55rem; border-radius: 999px;
  font-weight: 800; font-family: var(--font-mono); letter-spacing: .08em;
}

/* ====== Contact ====== */
.contact {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1.8rem; align-items: start;
}
.info {
  border: 1px solid rgba(124,169,247,.2); border-radius: 12px;
  padding: 1.6rem; background: rgba(11,26,53,.5);
}
.info h3 {
  font-family: var(--font-display); color: var(--accent2);
  margin: 0 0 1rem; font-size: .9rem; font-weight: 700; letter-spacing: .08em;
}
.item {
  display: grid; grid-template-columns: 28px 1fr;
  gap: .7rem; align-items: start; margin: .8rem 0;
  color: var(--gray-text); font-family: var(--font-body); font-size: .95rem;
}
.item i { color: var(--primary); margin-top: .15rem; }
.about-text { color: var(--gray-text); margin: .25rem 0; }

/* Form */
.contact .form { grid-column: 1 / -1; }
.form {
  border: 1px solid rgba(124,169,247,.15); border-radius: 12px;
  padding: 1.6rem; background: rgba(11,26,53,.5);
}
.form-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1rem; margin-bottom: 1rem;
}
.form-group { margin-bottom: 1rem; }
.honeypot-field { display: none; }

label {
  display: block; font-weight: 600; color: var(--primary);
  margin-bottom: .4rem; font-family: var(--font-mono);
  font-size: .78rem; letter-spacing: .12em;
}
input, textarea {
  width: 100%;
  border: 1px solid rgba(124,169,247,.18); color: var(--accent2);
  background: rgba(3,11,24,.8); padding: .9rem 1rem;
  border-radius: 10px; outline: none; transition: .2s;
  font-family: var(--font-body); font-size: .95rem;
}
input:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(124,169,247,.12);
}
textarea { resize: vertical; min-height: 140px; }
.form-msg { margin-top: .8rem; font-size: .9rem; min-height: 1.4em; }
.form-msg.error   { color: var(--red-alert); }
.form-msg.success { color: var(--accent); }

/* ====== Footer ====== */
footer {
  border-top: 1px solid rgba(124,169,247,.12);
  margin-top: 3rem; padding: 2rem 1rem;
  text-align: center; background: rgba(3,11,24,.5);
}
.foot-brand {
  display: flex; justify-content: center;
  align-items: center; gap: .8rem; margin-bottom: .8rem;
}
.foot-logo { width: 140px; filter: drop-shadow(0 0 10px rgba(124,169,247,.4)); }
.foot-logo-text { font-size: 1.2rem; }
.foot-text { color: var(--gray-text); font-size: .88rem; font-family: var(--font-body); }

.social {
  display: flex; justify-content: center; gap: 16px;
  margin: 1.1rem 0 0; padding-top: 1.1rem;
  border-top: 1px dashed rgba(124,169,247,.15);
}
.social a {
  width: 52px; height: 52px; display: grid; place-items: center;
  border-radius: 50%; border: 2px solid currentColor;
  transition: .25s; font-size: 1.2rem; position: relative; overflow: hidden;
}
.social a::before {
  content: ""; position: absolute; inset: 0; left: -100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.25), transparent);
  transition: .45s;
}
.social a:hover::before { left: 100%; }
.social a:hover { transform: translateY(-2px) scale(1.05); box-shadow: 0 0 18px currentColor; }
.whatsapp { color: #25d366; }
.facebook { color: #1877f2; }
.email    { color: #ea4335; }
.linkedin { color: #0077b5; }

/* ====== Floating Buttons ====== */
.float-wa { position: fixed; right: 18px; bottom: 18px; z-index: 1050; }
.float-wa a {
  background: #25d366; color: #fff;
  width: 58px; height: 58px; display: grid; place-items: center;
  border-radius: 50%; box-shadow: 0 10px 30px rgba(37,211,102,.35); transition: .25s;
}
.float-wa a:hover { transform: translateY(-2px) scale(1.05); box-shadow: 0 12px 40px rgba(37,211,102,.55); }

.float-fb { position: fixed; right: 18px; bottom: 86px; z-index: 1050; }
.float-fb a {
  background: #1877f2; color: #fff;
  width: 58px; height: 58px; display: grid; place-items: center;
  border-radius: 50%; box-shadow: 0 10px 30px rgba(24,119,242,.35); transition: .25s;
}
.float-fb a:hover { transform: translateY(-2px) scale(1.05); box-shadow: 0 12px 40px rgba(24,119,242,.55); }

/* ====== Utilities ====== */
.sr-only {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

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

/* ====== Service Modal ====== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(2,8,20,.82); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem; opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: linear-gradient(160deg, #0b1e3d, #060f22);
  border: 1px solid var(--card-border); border-radius: 16px;
  padding: 2rem; max-width: 560px; width: 100%;
  max-height: 85vh; overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,.6), 0 0 0 1px rgba(0,255,65,.06);
  transform: translateY(20px) scale(.97);
  transition: transform .25s ease; position: relative;
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal-close {
  position: absolute; top: 1rem; right: 1rem;
  background: transparent; border: 1px solid rgba(0,255,65,.3);
  color: var(--gray-text); border-radius: 8px;
  width: 30px; height: 30px; cursor: pointer;
  display: grid; place-items: center; font-size: .85rem;
  transition: .2s; font-family: var(--font-mono);
}
.modal-close:hover { border-color: var(--red-alert); color: var(--red-alert); }
.modal-header { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; padding-right: 2rem; }
.modal-icon-wrap {
  width: 48px; height: 48px; flex-shrink: 0;
  border-radius: 12px; border: 1px solid rgba(124,169,247,.25);
  background: rgba(124,169,247,.1);
  display: grid; place-items: center;
  font-size: 1.4rem; color: var(--orange-gold);
}
.modal-meta { flex: 1; }
.modal-badge {
  display: inline-block; font-size: .62rem; font-weight: 800; color: var(--bg-deep);
  background: linear-gradient(90deg, var(--primary), var(--accent2));
  padding: .18rem .5rem; border-radius: 999px; margin-bottom: .35rem;
  font-family: var(--font-mono); letter-spacing: .08em;
}
.modal-title {
  font-family: var(--font-display); font-size: 1.1rem;
  font-weight: 800; color: var(--accent2); margin: 0; line-height: 1.2; letter-spacing: .05em;
}
.modal-desc {
  color: var(--text-muted); font-size: .9rem; font-family: var(--font-body);
  line-height: 1.65; margin: 0 0 1.4rem; padding-bottom: 1.2rem;
  border-bottom: 1px solid rgba(124,169,247,.1);
}
.modal-sub-title {
  font-size: .65rem; letter-spacing: .22em; color: var(--primary);
  text-transform: uppercase; margin-bottom: .75rem; font-family: var(--font-mono);
}
.sub-list { list-style: none; padding: 0; margin: 0 0 1.4rem; display: grid; gap: .45rem; }
.sub-list li {
  display: flex; align-items: flex-start; gap: .65rem;
  border: 1px solid rgba(124,169,247,.1); border-radius: 10px;
  padding: .65rem .9rem; color: var(--text-muted); font-size: .86rem;
  font-family: var(--font-body); line-height: 1.55;
  transition: background .15s, border-color .15s, color .15s; cursor: default;
}
.sub-list li:hover { background: rgba(124,169,247,.07); border-color: rgba(124,169,247,.3); color: var(--accent2); }
.sub-list li i { color: var(--primary); flex-shrink: 0; width: 15px; margin-top: 2px; font-size: .82rem; }
.sub-list li strong {
  color: var(--accent2); display: block; margin-bottom: .1rem;
  font-family: var(--font-display); font-size: .82rem; letter-spacing: .04em;
}
.modal-cta {
  display: inline-flex; align-items: center; gap: .5rem;
  color: var(--accent2); border: 1.5px solid rgba(124,169,247,.4);
  padding: .65rem 1.2rem; border-radius: 9px; font-weight: 700;
  font-family: var(--font-display); background: rgba(124,169,247,.08);
  transition: .2s; font-size: .82rem; letter-spacing: .06em;
  text-decoration: none; cursor: pointer;
}
.modal-cta:hover { background: var(--primary); color: var(--bg-deep); box-shadow: 0 0 24px rgba(124,169,247,.3); }

/* ====== Responsive ====== */
@media (max-width: 960px) {
  .hero             { grid-template-columns: 1fr; }
  .contact          { grid-template-columns: 1fr; }
  .contact .form    { grid-column: auto; }
  .hamburger        { display: inline-grid; }
  .nav-links        { display: none; }
  .nav-links.open   {
    display: grid; position: absolute; top: 64px; right: 12px;
    background: rgba(3,11,24,.98); border: 1px solid rgba(124,169,247,.2);
    border-radius: 10px; padding: .8rem 1rem; gap: .6rem; font-family: var(--font-mono);
  }
  .title            { font-size: clamp(1.5rem, 5vw, 2rem); }
  .form-row         { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
