/* ============================================================
   CMTA Cyber - main.css
   Authored: 2026 | Stack: Vanilla CSS
   Fonts: Space Mono (mono/brand) + Inter (body)
   Accent: #00ffaa | Background: #080a0f
   ============================================================ */

'use strict';

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

/* ── Design Tokens ── */
:root {
  --bg:        #080a0f;
  --bg2:       #0d1117;
  --bg3:       #161b22;
  --surface:   #111620;
  --border:    rgba(0, 255, 170, 0.08);
  --border-md: rgba(0, 255, 170, 0.15);
  --border-lg: rgba(0, 255, 170, 0.25);
  --accent:    #00ffaa;
  --accent-dim:rgba(0, 255, 170, 0.1);
  --text:      #c8d0e0;
  --text-dim:  #8a9ab5;
  --text-muted:#4a5e78;
  --white:     #ffffff;
  --red:       #ff4757;
  --yellow:    #ffbd2e;
  --green:     #27c93f;
  --blue:      #4a9eff;
  --mono:      'Space Mono', monospace;
  --sans:      'Inter', sans-serif;
  --radius:    3px;
  --transition:0.2s ease;
}

/* ── Base ── */
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: opacity var(--transition); }
a:hover { opacity: 0.8; }

img { max-width: 100%; display: block; }

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: var(--sans);
  font-weight: 900;
  color: var(--white);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); margin-bottom: 1rem; }
h3 { font-size: 1.1rem; font-weight: 700; }

.mono { font-family: var(--mono); }

.section-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.section-label::before { content: '// '; opacity: 0.45; }

.lead {
  font-size: 0.95rem;
  color: var(--text-dim);
  line-height: 1.85;
  max-width: 560px;
  margin-bottom: 2.5rem;
}

/* ── Layout ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 5%; }
section { padding: 5rem 5%; }

/* ── Buttons ── */
.btn-primary {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.75rem 1.8rem;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  text-decoration: none;
}
.btn-primary:hover {
  background: #33ffbb;
  transform: translateY(-2px);
  opacity: 1;
}

.btn-ghost {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.75rem 1.8rem;
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border-md);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
  text-decoration: none;
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  opacity: 1;
}

.cta-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

/* ── Navigation ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 5%;
  background: rgba(8, 10, 15, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: padding var(--transition);
}

.nav-logo {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  text-decoration: none;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--accent); opacity: 1; }

.nav-cta {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.45rem 1.1rem;
  border: 1px solid var(--accent);
  color: var(--accent) !important;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition) !important;
}
.nav-cta:hover {
  background: var(--accent);
  color: var(--bg) !important;
  opacity: 1 !important;
}

/* Mobile hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text-dim);
  transition: transform var(--transition), opacity var(--transition);
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); background: var(--accent); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); background: var(--accent); }

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8rem 5% 5rem;
  position: relative;
  overflow: hidden;
}

.hero-scanlines {
  position: absolute; inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 255, 170, 0.012) 2px,
    rgba(0, 255, 170, 0.012) 4px
  );
}

.hero-grid {
  position: absolute; inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 75% 75% at 50% 50%, black 30%, transparent 100%);
}

.hero-orb {
  position: absolute;
  top: 10%; right: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(0,255,170,0.04) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-content { position: relative; z-index: 2; max-width: 1100px; width: 100%; }

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: flex-start;
}

@media (min-width: 1025px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  margin-bottom: 1.8rem;
  opacity: 0.85;
}
.hero-eyebrow::before { content: '//'; opacity: 0.45; }
.hero-eyebrow-dot {
  width: 5px; height: 5px;
  background: var(--accent);
  border-radius: 50%;
  animation: blink 1.4s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.15; }
}

.hero h1 { margin-bottom: 1.4rem; }
.hero h1 .accent { color: var(--accent); }
.hero h1 .dim { color: var(--text-muted); }

.hero-sub {
  font-size: 1rem;
  color: var(--text-dim);
  line-height: 1.85;
  max-width: 480px;
  margin-bottom: 2.2rem;
}

/* ── Terminal ── */
.terminal {
  background: var(--bg2);
  border: 1px solid var(--border-md);
  border-radius: var(--radius);
  max-width: 500px;
  margin-top: 2.5rem;
  overflow: hidden;
  font-family: var(--mono);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.6rem 0.9rem;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
}

.terminal-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}
.terminal-dot.red   { background: var(--red); }
.terminal-dot.yellow{ background: var(--yellow); }
.terminal-dot.green { background: var(--green); }

.terminal-title {
  font-size: 0.62rem;
  color: var(--text-muted);
  margin-left: auto;
  letter-spacing: 0.06em;
}

.terminal-body {
  padding: 0.9rem 1.1rem;
  font-size: 0.72rem;
  line-height: 1.9;
  min-height: 160px;
}

.t-prompt  { color: var(--accent); }
.t-cmd     { color: var(--text); }
.t-comment { color: #5a7a8a; }
.t-out     { color: var(--blue); }
.t-warn    { color: var(--yellow); }
.t-ok      { color: var(--green); }
.t-err     { color: var(--red); }

.t-cursor {
  display: inline-block;
  width: 7px; height: 13px;
  background: var(--accent);
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}

/* ── Hero illustration ── */
.hero-illustration {
  display: none;
  align-items: flex-start;
  justify-content: center;
  opacity: 0.9;
  margin-top: -5rem;
  padding-top: 0;
}

@media (min-width: 1025px) {
  .hero-illustration {
    display: flex !important;
  }
}

@media (max-width: 1024px) {
  .hero-illustration {
    display: none !important;
  }
}

/* ── Hero stats bar ── */
.hero-bar {
  display: flex;
  gap: 0;
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  flex-wrap: nowrap;
  align-items: flex-start;
}
.hero-bar > div {
  flex: 1;
  padding-right: 1.5rem;
  border-right: 1px solid var(--border);
  margin-right: 1.5rem;
}
.hero-bar > div:last-child {
  border-right: none;
  padding-right: 0;
  margin-right: 0;
}
.hero-stat-val {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
  white-space: nowrap;
}
.hero-stat-val span { color: var(--accent); }
.hero-stat-lbl {
  font-size: 0.65rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.2rem;
  white-space: nowrap;
}

/* ── Services ── */
#services { background: var(--bg2); }

.svc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.svc-card {
  background: var(--bg2);
  padding: 2rem 1.8rem;
  position: relative;
  overflow: hidden;
  transition: background var(--transition);
  cursor: default;
}

.svc-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 2px; height: 0;
  background: var(--accent);
  transition: height 0.35s ease;
}

.svc-card:hover { background: var(--surface); }
.svc-card:hover::before { height: 100%; }

.svc-num {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: rgba(0,255,170,0.25);
  margin-bottom: 0.9rem;
  letter-spacing: 0.1em;
}

.svc-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.svc-card p {
  font-size: 0.84rem;
  color: var(--text-dim);
  line-height: 1.75;
  margin-bottom: 0.9rem;
}

.svc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.svc-tag {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius);
  letter-spacing: 0.06em;
  transition: border-color var(--transition), color var(--transition);
}
.svc-card:hover .svc-tag {
  border-color: rgba(0,255,170,0.2);
  color: var(--text-dim);
}

/* ── Banner Image ── */
.banner-strip {
  position: relative;
  width: 100%;
  height: 420px;
  overflow: hidden;
}
.banner-strip img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}
.banner-strip-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(8,10,15,0.7) 0%,
    rgba(8,10,15,0.25) 40%,
    rgba(8,10,15,0.25) 60%,
    rgba(8,10,15,0.8) 100%
  );
}

/* ── Resources Preview ── */
#resources-preview { background: var(--bg); }

.res-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-bottom: 2rem;
}

.res-preview-card {
  background: var(--bg);
  padding: 1.4rem 1.2rem;
  transition: background var(--transition);
  cursor: default;
}
.res-preview-card:hover { background: var(--surface); }

.res-preview-tag {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

.res-preview-card h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.res-preview-card p {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 0.3rem;
  line-height: 1.6;
}

/* ── Cloud / Full-width bg section ── */
.cloud-section {
  position: relative;
  padding: 5rem 5%;
  overflow: hidden;
  background: var(--bg2);
}
.cloud-section-bg {
  display: none;
}
.cloud-section-content { position: relative; z-index: 2; max-width: 700px; }

/* ── About ── */
#about { background: var(--bg2); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.about-visual {
  position: relative;
  height: 380px;
  border: 1px solid var(--border-md);
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-visual-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 30% 30%, rgba(0,255,170,0.05) 0%, transparent 55%),
    radial-gradient(circle at 70% 70%, rgba(0,100,180,0.05) 0%, transparent 55%);
}

.about-visual-inner { position: relative; z-index: 2; text-align: center; }

.pillars { display: flex; flex-direction: column; gap: 1.1rem; margin-top: 2rem; }

.pillar {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.01);
  transition: border-color var(--transition), background var(--transition);
}
.pillar:hover {
  border-color: var(--border-md);
  background: var(--accent-dim);
}

.pillar-n {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.3;
  line-height: 1;
  min-width: 2rem;
}

.pillar h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.2rem;
  letter-spacing: 0em;
}
.pillar p { font-size: 0.82rem; color: var(--text-dim); line-height: 1.65; }

/* ── Footer image strip ── */
.footer-strip {
  position: relative;
  width: 100%;
  height: 360px;
  overflow: hidden;
}
.footer-strip img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 20%;
}
.footer-strip-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(8,10,15,0.65) 0%,
    rgba(8,10,15,0.2) 40%,
    rgba(8,10,15,0.2) 60%,
    rgba(8,10,15,0.75) 100%
  );
}

/* ── Footer ── */
footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 3.5rem 5% 2rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
}

.footer-logo-txt {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--white);
}
.footer-logo-txt span { color: var(--accent); }

.footer-brand p {
  font-size: 0.84rem;
  color: var(--text-dim);
  line-height: 1.8;
  margin-top: 0.75rem;
  max-width: 280px;
}

.footer-col h5 {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.footer-col ul a {
  color: var(--text-dim);
  font-size: 0.84rem;
  text-decoration: none;
  transition: color var(--transition);
}
.footer-col ul a:hover { color: var(--accent); opacity: 1; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copy {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.footer-legal {
  display: flex;
  gap: 1.5rem;
}
.footer-legal a {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}
.footer-legal a:hover { color: var(--accent); opacity: 1; }

/* ── Industries ── */
#industries { background: var(--bg); }

.ind-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.ind-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.2rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.01);
  text-align: center;
  transition: border-color var(--transition), background var(--transition);
  cursor: default;
}
.ind-card:hover {
  border-color: var(--border-md);
  background: var(--accent-dim);
}
.ind-icon { font-size: 1.4rem; line-height: 1; }
.ind-card span { font-size: 0.78rem; font-weight: 500; color: var(--text-dim); line-height: 1.4; }

/* ── Utilities ── */
.text-accent { color: var(--accent); }
.text-dim    { color: var(--text-dim); }
.text-mono   { font-family: var(--mono); }
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-md), transparent);
  margin: 0;
}

/* ── Scroll animations ── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .cloud-section > div { grid-template-columns: 1fr !important; gap: 2rem !important; }
  .about-visual { height: 220px; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  section { padding: 3.5rem 5%; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .hero-bar { gap: 1.5rem; }
  .svc-grid { grid-template-columns: 1fr; }

  /* Mobile stack utility - converts any 2-col grid to single column */
  .mobile-stack {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  /* Contact form improvements on mobile */
  #contact .mobile-stack > div:first-child {
    order: 2;
  }
  #contact .mobile-stack > div:last-child {
    order: 1;
  }

  /* Form inputs full width on mobile */
  input, textarea, select {
    font-size: 16px !important; /* Prevents iOS zoom on focus */
  }

  /* Terminal width on mobile */
  .terminal {
    max-width: 100%;
  }

  /* Hero bar wraps on mobile */
  .hero-bar {
    flex-wrap: wrap;
    gap: 1.2rem;
  }
  .hero-bar > div {
    flex: 0 0 calc(50% - 0.6rem);
    border-right: none !important;
    padding-right: 0 !important;
    margin-right: 0 !important;
  }
  .hero-stat-val {
    font-size: 0.85rem;
  }
  .hero-stat-lbl {
    white-space: normal;
  }
}

/* ── Mobile nav open state ── */
@media (max-width: 640px) {
  nav.mobile-open {
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 1.5rem;
    gap: 1.5rem;
  }
  nav.mobile-open .nav-links {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    width: 100%;
  }
  nav.mobile-open .nav-links a {
    font-size: 0.85rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    width: 100%;
  }
}
