/* ==========================================================================
   MSCODE — Design tokens
   ========================================================================== */
:root {
  --bg: #0a0e12;
  --bg-alt: #0d1319;
  --surface: #121922;
  --surface-hover: #161f2a;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eef1f4;
  --text-muted: #97a3af;
  --text-faint: #5f6b78;

  --brand: #1a9432;
  --brand-strong: #14762a;
  --brand-light: #34c759;
  --brand-glow: rgba(52, 199, 89, 0.18);

  --font-head: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;

  --container: 1160px;
  --radius: 14px;
  --radius-sm: 9px;

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

/* ==========================================================================
   Reset
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

html, body { max-width: 100%; overflow-x: hidden; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--brand);
  color: #fff;
  padding: 10px 16px;
  z-index: 200;
  border-radius: var(--radius-sm);
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}

:focus-visible {
  outline: 2px solid var(--brand-light);
  outline-offset: 3px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--brand);
  color: #fff;
}
.btn-primary:hover { background: var(--brand-light); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { border-color: var(--brand-light); color: var(--brand-light); }

.btn-outline {
  background: transparent;
  color: var(--brand-light);
  border-color: rgba(52, 199, 89, 0.35);
}
.btn-outline:hover { background: var(--brand-glow); border-color: var(--brand-light); }

.btn-sm { padding: 10px 18px; font-size: 0.88rem; }
.btn-block { width: 100%; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 18, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 76px;
}

.brand-logo { height: 42px; width: auto; }

.main-nav ul {
  display: flex;
  gap: 34px;
}
.main-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s var(--ease);
}
.main-nav a:hover { color: var(--text); }

.header-actions { display: flex; align-items: center; gap: 18px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin-inline: auto;
  background: var(--text);
  transition: transform 0.25s var(--ease), opacity 0.25s 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 {
  position: relative;
  padding: 96px 0 88px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto;
  height: 620px;
  background: radial-gradient(ellipse at top, var(--brand-glow), transparent 65%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  overflow-wrap: break-word;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-light);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-light);
  box-shadow: 0 0 0 4px var(--brand-glow);
}

.hero h1 {
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  margin-bottom: 20px;
}

.hero-lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 46ch;
  margin-bottom: 34px;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }

/* Terminal mockup */
.terminal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255,255,255,0.02);
  overflow: hidden;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  background: var(--surface-hover);
  border-bottom: 1px solid var(--border);
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-red { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green { background: #28c840; }
.terminal-title {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-faint);
}
.terminal-body {
  padding: 26px 24px 30px;
  font-family: var(--font-mono);
  font-size: 0.92rem;
}
.terminal-body p { margin-bottom: 12px; color: var(--text-muted); overflow-wrap: break-word; }
.terminal-body p:last-child { margin-bottom: 0; }
.prompt { color: var(--brand-light); margin-right: 6px; }
.line-ok { color: var(--text); }
.line-done { color: var(--brand-light); font-weight: 600; }
.blink { animation: blink 1.1s step-end infinite; color: var(--brand-light); }
@keyframes blink { 50% { opacity: 0; } }

/* ==========================================================================
   About band / stats
   ========================================================================== */
.about-band {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 48px 0;
}
.about-band-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}
.about-text { color: var(--text-muted); font-size: 1.02rem; max-width: 56ch; }
.about-text strong { color: var(--text); }

.stats {
  display: flex;
  gap: 32px;
  justify-content: flex-end;
}
.stat-num {
  display: block;
  font-family: var(--font-head);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--brand-light);
}
.stat-label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-faint);
  margin-top: 2px;
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }

.section-head { max-width: 620px; margin-bottom: 52px; }
.section-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  margin-bottom: 14px;
}
.section-lead { color: var(--text-muted); font-size: 1.05rem; }

.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Service cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.card:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.card-icon {
  width: 46px;
  height: 46px;
  border-radius: 11px;
  background: var(--brand-glow);
  color: var(--brand-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.card-icon svg { width: 22px; height: 22px; }
.card-icon { font-family: var(--font-head); font-weight: 700; font-size: 1rem; }
.card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.card p { color: var(--text-muted); font-size: 0.96rem; }

.section-footnote {
  max-width: 620px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.98rem;
}

.about-copy { display: flex; flex-direction: column; gap: 14px; }
.why-us { margin-top: 40px; }

.faq-list { display: flex; flex-direction: column; gap: 12px; max-width: 760px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  flex-shrink: 0;
  font-size: 1.2rem;
  color: var(--brand-light);
  transition: transform 0.2s var(--ease);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { color: var(--text-muted); font-size: 0.96rem; margin-top: 14px; }

/* Product cards */
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.product-card:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.product-head { display: flex; align-items: center; gap: 12px; }
.product-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--brand-light);
  background: var(--brand-glow);
  border: 1px solid rgba(52, 199, 89, 0.3);
  padding: 3px 9px;
  border-radius: 100px;
}
.product-head h3 { font-size: 1.25rem; }
.product-card p { color: var(--text-muted); flex-grow: 1; }
.product-card .btn { align-self: flex-start; }

/* Projects grid */
.grid-projects {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.project-card:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.project-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 10px 12px;
  background: var(--surface-hover);
  border-bottom: 1px solid var(--border);
}
.project-bar i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border-strong);
  font-style: normal;
}
.project-card img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  object-position: top;
  transition: transform 0.4s var(--ease);
}
.project-card:hover img { transform: scale(1.05); }
.project-name {
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 64px;
}
.contact-list { margin-top: 30px; display: flex; flex-direction: column; gap: 18px; font-style: normal; }
.contact-list .contact-item { display: flex; flex-direction: column; gap: 3px; }
.contact-label { font-size: 0.78rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.05em; }
.contact-list a { font-size: 1.05rem; font-weight: 500; transition: color 0.2s var(--ease); }
.contact-list a:hover { color: var(--brand-light); }
.social-links { display: flex; gap: 16px; }
.social-links a { font-size: 1rem; }

.whatsapp-link { display: inline-flex; align-items: center; gap: 8px; }
.whatsapp-link svg { width: 18px; height: 18px; flex-shrink: 0; color: #25D366; }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.form-row { display: flex; flex-direction: column; gap: 8px; }
.form-row label { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }
.form-row input,
.form-row select,
.form-row textarea {
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  transition: border-color 0.2s var(--ease);
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  border-color: var(--brand-light);
  outline: none;
}
.form-row textarea { resize: vertical; min-height: 96px; }
.form-row-hidden {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-status {
  font-size: 0.9rem;
  min-height: 1.2em;
}
.form-status.is-ok { color: var(--brand-light); }
.form-status.is-error { color: #ff6b6b; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-logo { height: 30px; width: auto; opacity: 0.85; }
.footer-copy { color: var(--text-faint); font-size: 0.86rem; }
.footer-links { display: flex; gap: 22px; }
.footer-links a { color: var(--text-muted); font-size: 0.88rem; transition: color 0.2s var(--ease); }
.footer-links a:hover { color: var(--brand-light); }

/* ==========================================================================
   Reveal-on-scroll
   ========================================================================== */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .about-band-inner { grid-template-columns: 1fr; text-align: left; }
  .stats { justify-content: flex-start; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .grid-projects { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .contact-inner { grid-template-columns: 1fr; gap: 44px; }
}

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

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

  .header-actions .btn-primary { display: none; }

  .hero { padding: 56px 0 64px; }
  .section { padding: 64px 0; }
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .grid-projects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
  .grid-projects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { flex-wrap: wrap; gap: 24px; }
}
