/* ================================================================
   B-TRONIKS — styles.css
   Light "engineering datasheet" theme
   Paper white · graph-grid · blueprint blue · IBM Plex
   ================================================================ */

:root {
  --paper: #FFFFFF;
  --paper-tint: #F5F8FB;
  --ink: #16232F;
  --muted: #49596A;
  --line: #D9E1E8;
  --line-soft: #E7EDF2;
  --blue: #1F55B0;
  --blue-deep: #143C7E;
  --blue-soft: #EAF1FB;
  --signal: #E8730C;
  --whatsapp: #178A47;
  --radius: 8px;
  --radius-lg: 12px;
  --font-display: "Archivo", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --shadow: 0 1px 2px rgba(22, 35, 47, 0.05), 0 8px 24px rgba(22, 35, 47, 0.07);
  --nav-h: 72px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

.container { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }

.mono { font-family: var(--font-mono); font-size: 0.92em; color: var(--blue); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  font-family: var(--font-display); font-weight: 600; font-size: 0.98rem;
  letter-spacing: 0.01em;
  padding: 0.85rem 1.5rem; border-radius: var(--radius); border: 1px solid transparent;
  cursor: pointer; text-decoration: none; min-height: 48px;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.btn-primary {
  background: var(--ink); color: #FFFFFF;
}
.btn-primary:hover { background: var(--blue-deep); }

.btn-outline {
  background: var(--paper); color: var(--ink); border-color: var(--line);
}
.btn-outline:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); }

.btn-whatsapp {
  background: #FFFFFF; color: var(--whatsapp);
  border-color: rgba(23, 138, 71, 0.45); margin-top: 1.4rem; width: 100%;
}
.btn-whatsapp:hover { background: #F0FAF4; border-color: var(--whatsapp); }

.btn-sm { padding: 0.55rem 1.1rem; min-height: 40px; font-size: 0.9rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }

/* ---------- Navbar ---------- */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background-color 0.25s ease;
}
.navbar.scrolled { border-bottom-color: var(--line); background: rgba(255, 255, 255, 0.95); }

.nav-inner { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); }

.brand { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; }
.brand-mark { border-radius: 8px; }
.brand-name {
  font-family: var(--font-display); font-weight: 700; font-size: 1.18rem;
  letter-spacing: 0.05em; color: var(--ink);
}
.brand-dash { color: var(--blue); }

.nav-links { display: flex; align-items: center; gap: 1.9rem; }
.nav-links a:not(.btn) {
  color: var(--muted); text-decoration: none; font-weight: 500; font-size: 0.96rem;
  padding: 0.4rem 0.1rem; transition: color 0.2s ease;
}
.nav-links a:not(.btn):hover, .nav-links a:not(.btn):focus-visible { color: var(--blue); }
.nav-links a:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 46px; height: 46px; background: #FFFFFF; border: 1px solid var(--line);
  border-radius: var(--radius); cursor: pointer; padding: 0 11px;
}
.nav-toggle span { height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.25s ease, opacity 0.25s 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; min-height: 92svh;
  display: flex; align-items: center;
  padding: calc(var(--nav-h) + 3rem) 0 4.5rem;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-bg { position: absolute; inset: 0; pointer-events: none; }

/* graph paper — the engineer's canvas */
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(31, 85, 176, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 85, 176, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(31, 85, 176, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 85, 176, 0.03) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
}

.hero-glow { display: none; }

.hero-circuit {
  position: absolute; right: -40px; top: 50%; transform: translateY(-50%);
  width: min(540px, 52vw); opacity: 0.9;
}
.hero-circuit .trace { stroke: rgba(31, 85, 176, 0.28); stroke-width: 1.4; }
.hero-circuit .node { fill: #FFFFFF; stroke: rgba(31, 85, 176, 0.55); stroke-width: 1.4; }
.trace-1, .trace-2, .trace-3 {
  stroke-dasharray: 1200; stroke-dashoffset: 1200;
  animation: traceDraw 6s ease-out forwards;
}
.trace-2 { animation-delay: 0.8s; }
.trace-3 { animation-delay: 1.6s; }
@keyframes traceDraw { to { stroke-dashoffset: 0; } }

/* data packets travelling along the traces */
.hero-circuit .packet { fill: var(--blue); }
.hero-circuit .packet-2 { fill: var(--signal); }

.hero-inner { position: relative; max-width: 720px; }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue); background: #FFFFFF;
  border: 1px solid var(--line); border-radius: 4px;
  padding: 0.45rem 0.9rem; margin-bottom: 1.7rem;
}
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--signal);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232, 115, 12, 0.45); }
  50% { box-shadow: 0 0 0 7px rgba(232, 115, 12, 0); }
}

.hero-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.4rem, 5.6vw, 4rem); line-height: 1.08;
  letter-spacing: -0.02em; margin-bottom: 1.4rem;
}
.text-gradient { color: var(--blue); background: none; }

.hero-sub { font-size: clamp(1.02rem, 1.6vw, 1.15rem); color: var(--muted); max-width: 56ch; margin-bottom: 2.2rem; }
.hero-sub strong { color: var(--ink); font-weight: 600; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: 3.2rem; }

.hero-stats {
  display: flex; flex-wrap: wrap; gap: 0;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #FFFFFF; width: fit-content;
}
.stat {
  display: flex; flex-direction: column; gap: 0.1rem;
  padding: 1rem 1.8rem;
}
.stat + .stat { border-left: 1px solid var(--line); }
.stat-value { font-family: var(--font-mono); font-weight: 600; font-size: 1.25rem; color: var(--blue); }
.stat-label { font-size: 0.82rem; color: var(--muted); letter-spacing: 0.02em; }

/* ---------- Sections ---------- */
.section { padding: 6rem 0; }
.section-alt { background: var(--paper-tint); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-eyebrow {
  display: flex; align-items: center; gap: 0.7rem;
  font-family: var(--font-mono); color: var(--blue);
  font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase;
  margin-bottom: 1rem;
}
.section-eyebrow::before {
  content: ""; width: 26px; height: 1px; background: var(--blue);
}

.section-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.7rem, 3.6vw, 2.4rem); line-height: 1.15;
  letter-spacing: -0.015em; margin-bottom: 1.2rem; max-width: 26ch;
}
/* dimension-line under titles — |———| like a CAD drawing */
.section-title::after {
  content: ""; display: block; width: 88px; height: 9px; margin-top: 1rem;
  border-left: 1.5px solid var(--blue); border-right: 1.5px solid var(--blue);
  background: linear-gradient(var(--blue), var(--blue)) center / 100% 1.5px no-repeat;
}
.section-sub { color: var(--muted); max-width: 62ch; margin-bottom: 3rem; }
.section-sub strong { color: var(--ink); }

/* ---------- About ---------- */
.about-grid {
  display: grid; grid-template-columns: 1.15fr 1fr;
  gap: 4rem; align-items: center;
}
.about-text p { color: var(--muted); margin-bottom: 1.1rem; max-width: 56ch; }
.about-text p strong { color: var(--ink); }

.mission-card {
  display: flex; gap: 1rem; align-items: flex-start;
  background: var(--blue-soft); border: 1px solid rgba(31, 85, 176, 0.2);
  border-left: 3px solid var(--blue);
  border-radius: var(--radius); padding: 1.4rem 1.5rem; margin-top: 1.8rem;
}
.mission-card svg { color: var(--blue); flex-shrink: 0; margin-top: 0.2rem; }
.mission-card h3 { font-family: var(--font-display); font-size: 1.02rem; margin-bottom: 0.35rem; }
.mission-card p { color: var(--muted); margin: 0; font-size: 0.96rem; }

/* Domain ring visual */
.about-visual { display: flex; justify-content: center; }
.domain-ring {
  position: relative; width: min(340px, 80vw); aspect-ratio: 1;
  border: 1px dashed rgba(31, 85, 176, 0.4); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.domain-core {
  width: 58%; aspect-ratio: 1; border-radius: 50%;
  background: #FFFFFF;
  border: 1.5px solid var(--blue);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.2rem;
  text-align: center; padding: 1rem;
}
.domain-core span { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.05em; font-size: 1.05rem; }
.domain-core small { color: var(--muted); font-size: 0.78rem; }

.domain-chip {
  position: absolute; display: inline-flex; align-items: center; gap: 0.45rem;
  font-family: var(--font-mono); font-weight: 500; font-size: 0.82rem;
  background: #FFFFFF; border: 1px solid var(--line);
  color: var(--blue); border-radius: 4px; padding: 0.5rem 0.9rem;
  box-shadow: var(--shadow); white-space: nowrap;
}
.chip-1 { top: -6%; left: 50%; transform: translateX(-50%); }
.chip-2 { bottom: 8%; left: -8%; }
.chip-3 { bottom: 8%; right: -6%; }

/* ---------- Services ---------- */
.services-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem;
}
.service-card {
  position: relative;
  background: #FFFFFF; border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 1.8rem 1.6rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.service-card:hover {
  border-color: rgba(31, 85, 176, 0.45);
  box-shadow: var(--shadow);
}
.service-icon {
  width: 50px; height: 50px; border-radius: var(--radius);
  background: var(--blue-soft); border: 1px solid rgba(31, 85, 176, 0.22);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem; color: var(--blue);
}
.service-icon svg { width: 25px; height: 25px; }
.service-card h3 { font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 0.55rem; }
.service-card p { color: var(--muted); font-size: 0.95rem; }

/* ---------- Why Us ---------- */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin-top: 2.6rem; }
.why-item {
  border-top: 2px solid var(--line); padding-top: 1.3rem;
  transition: border-color 0.25s ease;
}
.why-item:hover { border-top-color: var(--blue); }
.why-num { display: none; }
.why-item h3 {
  font-family: var(--font-display); font-size: 1.05rem; margin-bottom: 0.5rem;
  display: flex; align-items: center; gap: 0.55rem;
}
.why-item h3::before {
  content: ""; width: 8px; height: 8px; flex-shrink: 0;
  background: var(--blue); border-radius: 2px;
}
.why-item p { color: var(--muted); font-size: 0.94rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.35fr; gap: 2rem; align-items: start; }

.contact-card {
  background: #FFFFFF; border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 2rem 1.8rem;
}
.contact-card h3 { font-family: var(--font-display); font-size: 1.25rem; }
.contact-role { color: var(--muted); font-size: 0.92rem; margin-bottom: 1.6rem; }

.contact-line {
  display: flex; align-items: center; gap: 0.9rem;
  color: var(--ink); text-decoration: none; font-weight: 500;
  padding: 0.7rem 0; border-bottom: 1px solid var(--line-soft);
  transition: color 0.2s ease; min-height: 48px;
}
.contact-line:hover { color: var(--blue); }
.contact-line:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
.contact-ic {
  width: 40px; height: 40px; border-radius: var(--radius); flex-shrink: 0;
  background: var(--blue-soft); border: 1px solid rgba(31, 85, 176, 0.22);
  display: flex; align-items: center; justify-content: center; color: var(--blue);
}
.contact-ic svg { width: 19px; height: 19px; }

.contact-form {
  background: #FFFFFF; border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 2rem 1.8rem;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.form-field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.1rem; }
.form-field label {
  font-weight: 500; font-size: 0.8rem; font-family: var(--font-mono);
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.form-field input, .form-field textarea {
  font-family: var(--font-body); font-size: 1rem; color: var(--ink);
  background: var(--paper-tint); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 0.8rem 1rem; width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  resize: vertical;
}
.form-field input::placeholder, .form-field textarea::placeholder { color: #93A3B3; }
.form-field input:focus, .form-field textarea:focus {
  outline: none; border-color: var(--blue); background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(31, 85, 176, 0.12);
}
.form-status { margin-top: 0.9rem; font-size: 0.94rem; min-height: 1.4em; }
.form-status.ok { color: var(--whatsapp); }
.form-status.err { color: #C2410C; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #C7D2DC; }
.footer .brand-name { color: #FFFFFF; }
.footer .brand-dash { color: #7FA6E8; }
.footer-inner {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start;
  gap: 2rem; padding: 3rem 0 1.6rem;
}
.footer-brand p { color: #93A3B3; font-size: 0.92rem; margin-top: 0.5rem; max-width: 40ch; }
.footer-links { display: flex; gap: 1.6rem; flex-wrap: wrap; }
.footer-links a {
  color: #C7D2DC; text-decoration: none; font-size: 0.95rem;
  transition: color 0.2s ease; padding: 0.3rem 0;
}
.footer-links a:hover { color: #FFFFFF; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14); padding: 1.2rem 0 1.6rem;
  color: #93A3B3; font-size: 0.88rem;
}

/* ---------- Scroll reveal (hidden state only when JS is running) ---------- */
body.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.65s ease, transform 0.65s ease; }
body.js .reveal.visible { opacity: 1; transform: none; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body.js .reveal { opacity: 1; transform: none; transition: none; }
  .trace-1, .trace-2, .trace-3 { animation: none; stroke-dashoffset: 0; }
  .pulse-dot { animation: none; }
  .hero-circuit .packet { display: none; }
  .btn, .service-card, .why-item { transition: none; }
}

/* ================================================================
   Responsive
   ================================================================ */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem 1.4rem; }
  .hero-circuit { opacity: 0.35; }
}

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; gap: 3.4rem; }
  .contact-grid { grid-template-columns: 1fr; }
  .chip-2 { left: 0; }
  .chip-3 { right: 0; }
}

@media (max-width: 768px) {
  .section { padding: 4.4rem 0; }

  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #FFFFFF;
    border-bottom: 1px solid var(--line);
    padding: 0.6rem 1.25rem 1.2rem;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s;
  }
  .nav-links.open { transform: none; opacity: 1; visibility: visible; }
  .nav-links a:not(.btn) { padding: 0.9rem 0.2rem; border-bottom: 1px solid var(--line-soft); min-height: 48px; display: flex; align-items: center; }
  .nav-cta { margin-top: 1rem; }
}

@media (max-width: 560px) {
  .services-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero-stats { width: 100%; flex-direction: column; }
  .stat + .stat { border-left: none; border-top: 1px solid var(--line); }
  .hero-actions .btn { width: 100%; }
  .contact-card, .contact-form { padding: 1.6rem 1.3rem; }
}

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: 0.9rem; max-width: 760px; }
.faq-item {
  background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0 1.4rem; transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.faq-item[open] { border-color: var(--blue); box-shadow: var(--shadow); }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 1.15rem 0; font-family: var(--font-display);
  font-weight: 600; font-size: 1.02rem; color: var(--ink);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-size: 1.5rem; font-weight: 400; color: var(--blue); line-height: 1; flex-shrink: 0;
  transition: transform 0.25s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { color: var(--muted); padding: 0 0 1.2rem; font-size: 0.98rem; max-width: 62ch; }
