/* ==========================================================================
   BHS Informática — Design System
   ========================================================================== */

:root {
  --navy-950: #050b1a;
  --navy-900: #0a1330;
  --navy-800: #0e1a42;
  --blue-700: #16296b;
  --blue-600: #1e3a8a;
  --blue-500: #2f5bd0;
  --cyan-400: #22d3ee;
  --cyan-300: #67e8f9;
  --cyan-500: #06b6d4;
  --ice-50: #f4f7fb;
  --white: #ffffff;

  --gradient-brand: linear-gradient(135deg, var(--navy-900) 0%, var(--blue-600) 45%, var(--cyan-400) 100%);
  --gradient-brand-soft: linear-gradient(135deg, rgba(10, 19, 48, 0.9) 0%, rgba(30, 58, 138, 0.85) 45%, rgba(34, 211, 238, 0.85) 100%);
  --gradient-text: linear-gradient(135deg, #67e8f9 0%, #22d3ee 50%, #7dd3fc 100%);

  --shadow-soft: 0 10px 40px -12px rgba(10, 19, 48, 0.15);
  --shadow-card: 0 4px 24px -8px rgba(10, 19, 48, 0.12);
  --shadow-glow: 0 0 40px -8px rgba(34, 211, 238, 0.35);
}

* { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--white);
  color: var(--navy-900);
  overflow-x: hidden;
}

h1, h2, h3, h4, .font-display {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
}

::selection {
  background: var(--cyan-400);
  color: var(--navy-950);
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--ice-50); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--blue-600), var(--cyan-400)); border-radius: 10px; }

/* ==========================================================================
   Utility: gradient text / borders / bg
   ========================================================================== */

.text-gradient {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.bg-brand-gradient { background: var(--gradient-brand); }
.bg-navy { background-color: var(--navy-900); }

.border-gradient {
  position: relative;
  border: 1px solid rgba(30, 58, 138, 0.12);
  transition: border-color .35s ease, transform .35s ease, box-shadow .35s ease;
}
.border-gradient:hover {
  border-color: transparent;
  transform: translateY(-6px);
  box-shadow: var(--shadow-glow), var(--shadow-card);
}
.border-gradient::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--gradient-brand);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
}
.border-gradient:hover::after { opacity: 1; }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .9rem 1.9rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  color: var(--navy-950);
  background: linear-gradient(135deg, var(--cyan-300), var(--cyan-400) 60%, var(--blue-500));
  background-size: 160% 160%;
  background-position: 0% 50%;
  transition: background-position .5s ease, transform .25s ease, box-shadow .25s ease;
  box-shadow: 0 8px 30px -8px rgba(34, 211, 238, 0.55);
}
.btn-primary:hover {
  background-position: 100% 50%;
  transform: translateY(-2px);
  box-shadow: 0 14px 36px -8px rgba(34, 211, 238, 0.65);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .9rem 1.9rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(6px);
  transition: border-color .3s ease, background .3s ease, transform .25s ease;
}
.btn-secondary:hover {
  border-color: var(--cyan-400);
  background: rgba(34, 211, 238, 0.08);
  transform: translateY(-2px);
}

.btn-secondary--dark {
  color: var(--navy-900);
  border: 1px solid rgba(10, 19, 48, 0.15);
  background: rgba(10, 19, 48, 0.02);
}
.btn-secondary--dark:hover {
  border-color: var(--cyan-500);
  background: rgba(34, 211, 238, 0.06);
}

/* ==========================================================================
   Header
   ========================================================================== */

#site-header {
  transition: background-color .4s ease, box-shadow .4s ease, padding .4s ease;
}
#site-header.is-scrolled {
  background-color: rgba(5, 11, 26, 0.85);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 30px -12px rgba(5, 11, 26, 0.5);
}

.nav-link {
  position: relative;
  color: rgba(255, 255, 255, 0.82);
  font-size: .9rem;
  font-weight: 500;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 2px;
  background: var(--gradient-text);
  transition: width .3s ease;
}
.nav-link:hover { color: var(--white); }
.nav-link:hover::after { width: 100%; }

/* ==========================================================================
   Circuit line decorations
   ========================================================================== */

.circuit-bg {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240'%3E%3Cg fill='none' stroke='%2322D3EE' stroke-width='1' opacity='0.35'%3E%3Cpath d='M20 20 L20 80 L60 120 L60 200'/%3E%3Cpath d='M100 10 L100 60 L150 60 L150 130 L200 130'/%3E%3Cpath d='M10 150 L70 150 L70 210 L120 210'/%3E%3Cpath d='M180 20 L180 70 L230 70'/%3E%3Cpath d='M210 150 L210 220 L160 220'/%3E%3C/g%3E%3Cg fill='%2322D3EE' opacity='0.55'%3E%3Ccircle cx='20' cy='20' r='2.5'/%3E%3Ccircle cx='60' cy='120' r='2.5'/%3E%3Ccircle cx='60' cy='200' r='2.5'/%3E%3Ccircle cx='100' cy='10' r='2.5'/%3E%3Ccircle cx='150' cy='60' r='2.5'/%3E%3Ccircle cx='200' cy='130' r='2.5'/%3E%3Ccircle cx='10' cy='150' r='2.5'/%3E%3Ccircle cx='120' cy='210' r='2.5'/%3E%3Ccircle cx='180' cy='20' r='2.5'/%3E%3Ccircle cx='230' cy='70' r='2.5'/%3E%3Ccircle cx='210' cy='220' r='2.5'/%3E%3Ccircle cx='160' cy='220' r='2.5'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  opacity: 0.5;
  pointer-events: none;
}

.circuit-fade-mask {
  -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 75%);
  mask-image: radial-gradient(ellipse at center, black 0%, transparent 75%);
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.divider-circuit {
  height: 2px;
  width: 100%;
  background: repeating-linear-gradient(90deg, rgba(34,211,238,0.5) 0 8px, transparent 8px 16px);
}

/* ==========================================================================
   Sections / reveal animation
   ========================================================================== */

.section-dark {
  background-color: var(--navy-950);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s cubic-bezier(.16,.84,.44,1), transform .8s cubic-bezier(.16,.84,.44,1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: .08s; }
.reveal-delay-2 { transition-delay: .16s; }
.reveal-delay-3 { transition-delay: .24s; }
.reveal-delay-4 { transition-delay: .32s; }

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
  background: var(--white);
  border-radius: 1.1rem;
  padding: 1.9rem;
  box-shadow: var(--shadow-card);
}

.card-dark {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.1rem;
  padding: 1.9rem;
  transition: border-color .35s ease, transform .35s ease, background .35s ease;
}
.card-dark:hover {
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(34, 211, 238, 0.05);
  transform: translateY(-6px);
}

.icon-badge {
  width: 3rem;
  height: 3rem;
  border-radius: .85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(30,58,138,0.1), rgba(34,211,238,0.15));
  color: var(--blue-600);
}
.icon-badge--dark {
  background: linear-gradient(135deg, rgba(34,211,238,0.12), rgba(103,232,249,0.08));
  color: var(--cyan-400);
}

/* ==========================================================================
   Stats counter
   ========================================================================== */

.stat-number {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(2.2rem, 4vw, 3rem);
}

/* ==========================================================================
   Timeline (Processo)
   ========================================================================== */

.timeline-line {
  background: repeating-linear-gradient(90deg, rgba(34,211,238,0.6) 0 10px, transparent 10px 20px);
  height: 2px;
}

.timeline-node {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-brand);
  box-shadow: var(--shadow-glow);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  color: var(--white);
}

/* ==========================================================================
   FAQ accordion
   ========================================================================== */

.faq-item { border-bottom: 1px solid rgba(10,19,48,0.1); }
.faq-question {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1.4rem 0;
  text-align: left;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--navy-900);
}
.faq-icon { transition: transform .35s ease; flex-shrink: 0; color: var(--cyan-500); }
.faq-item.is-open .faq-icon { transform: rotate(45deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease, padding .4s ease;
  color: #4b5877;
  line-height: 1.7;
}
.faq-item.is-open .faq-answer { padding-bottom: 1.4rem; }

/* ==========================================================================
   Testimonials carousel
   ========================================================================== */

.testimonial-track {
  display: flex;
  transition: transform .6s cubic-bezier(.16,.84,.44,1);
}
.testimonial-slide { flex: 0 0 100%; }

@media (min-width: 768px) {
  .testimonial-slide { flex: 0 0 50%; padding: 0 .75rem; }
}
@media (min-width: 1024px) {
  .testimonial-slide { flex: 0 0 33.3333%; }
}

/* ==========================================================================
   Marquee (Tecnologias)
   ========================================================================== */

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 28s linear infinite;
}
.marquee-track:hover { animation-play-state: paused; }

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ==========================================================================
   Misc animations
   ========================================================================== */

@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
.animate-float { animation: float-y 6s ease-in-out infinite; }

@keyframes pulse-glow {
  0%, 100% { opacity: .4; }
  50% { opacity: 1; }
}
.animate-pulse-glow { animation: pulse-glow 3s ease-in-out infinite; }

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.animate-spin-slow { animation: spin-slow 40s linear infinite; }

.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height .45s ease;
}
.mobile-menu.is-open { max-height: 32rem; }

/* Back to top */
#back-to-top {
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
}
#back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
}
