/* =========================================================
   SolarTP — Custom Styles
   Base: Tailwind (via CDN). Este arquivo adiciona
   componentes reutilizáveis e detalhes fora do escopo do Tailwind.
   ========================================================= */

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }

::selection { background: #00A9E0; color: #fff; }

/* =========================================================
   SCROLL REVEAL — fade/slide/zoom on enter
   Sistema leve, sem lib externa. Use as classes:
     .reveal            → fade + slide up (padrão)
     .reveal.reveal-left  → entra pela esquerda
     .reveal.reveal-right → entra pela direita
     .reveal.reveal-zoom  → zoom in
     .d-1 ... .d-5        → delay em cascata (.12s .. .60s)
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity .9s cubic-bezier(.22,.61,.36,1),
              transform .9s cubic-bezier(.22,.61,.36,1);
  will-change: opacity, transform;
}
.reveal.reveal-left  { transform: translateX(-42px); }
.reveal.reveal-right { transform: translateX(42px); }
.reveal.reveal-zoom  { transform: scale(.92); }
.reveal.visible      { opacity: 1; transform: none; }

.d-1 { transition-delay: .12s; }
.d-2 { transition-delay: .24s; }
.d-3 { transition-delay: .36s; }
.d-4 { transition-delay: .48s; }
.d-5 { transition-delay: .60s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .marquee-track { animation: none; }
}

/* ---------- HEADER STATES ---------- */
#header { background: transparent; }
#header.scrolled {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(14px);
  box-shadow: 0 6px 30px -12px rgba(11,42,91,0.15);
}
#header .nav-link {
  color: #fff;
  transition: color .2s ease;
  position: relative;
}
#header .nav-link::after {
  content: '';
  position: absolute; left: 0; bottom: -6px;
  width: 0; height: 2px;
  background: linear-gradient(90deg, #00A9E0, #00BFA6);
  transition: width .3s ease;
}
#header .nav-link:hover { color: #00BFA6; }
#header .nav-link:hover::after { width: 100%; }

#header.scrolled .nav-link { color: #0F172A; }
#header.scrolled .nav-link:hover { color: #0B2A5B; }

#header.scrolled #menu-toggle {
  background: #0B2A5B;
  color: #fff;
}

.mobile-link {
  padding: 10px 0;
  border-bottom: 1px solid #F1F5F9;
}
.mobile-link:last-of-type { border-bottom: none; }

/* ---------- COMMON TITLES ---------- */
.section-label {
  display: inline-block;
  font-size: 12px;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: #0B2A5B;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(11,42,91,0.08), rgba(0,191,166,0.08));
}
.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #0F172A;
}
.text-gradient {
  background: linear-gradient(135deg, #0B2A5B 0%, #00A9E0 60%, #00BFA6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- SERVICE CARDS ---------- */
.service-card {
  background: #fff;
  border-radius: 20px;
  padding: 32px 28px;
  position: relative;
  border: 1px solid #EEF2F7;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,169,224,0.06), rgba(0,191,166,0.06));
  opacity: 0;
  transition: opacity .3s ease;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -20px rgba(11,42,91,0.25);
  border-color: transparent;
}
.service-card:hover::before { opacity: 1; }
.service-card > * { position: relative; z-index: 1; }
.service-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 10px;
}
.service-card p {
  color: #64748B;
  font-size: .95rem;
  line-height: 1.6;
}
.service-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(11,42,91,0.1), rgba(0,191,166,0.1));
  color: #0B2A5B;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 22px;
}
.service-tag {
  position: absolute;
  top: 18px; right: 18px;
  background: linear-gradient(135deg, #F5B301, #ffb703);
  color: #0F172A;
  font-size: 10px; font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: .05em;
  text-transform: uppercase;
  z-index: 2;
}
.highlight-card {
  background: linear-gradient(135deg, #0B2A5B 0%, #00A9E0 60%, #00BFA6 100%) !important;
  border: none;
  color: #fff;
}
.highlight-card:hover { box-shadow: 0 25px 50px -20px rgba(0,169,224,0.5); }

/* ---------- COMO FUNCIONA / TIMELINE ---------- */
.step-item {
  text-align: center;
  padding: 0 12px;
}
.step-number {
  width: 72px; height: 72px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0B2A5B, #00A9E0);
  color: #fff;
  font-weight: 800;
  font-size: 1.35rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 30px -10px rgba(0,169,224,0.5);
  position: relative;
  z-index: 2;
}
.step-item h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 8px;
}
.step-item p {
  color: #64748B;
  font-size: .9rem;
  line-height: 1.55;
}

/* ---------- COUNTERS ---------- */
.counter-value {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, #ffffff 0%, #00BFA6 60%, #F5B301 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.02em;
}
.counter-label {
  margin-top: 12px;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: rgba(255,255,255,0.75);
  font-weight: 500;
}

/* ---------- PROJECT CARDS ---------- */
.project-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 4/5;
  cursor: pointer;
  box-shadow: 0 10px 30px -15px rgba(11,42,91,0.25);
  transition: transform .4s ease, box-shadow .4s ease;
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 25px 50px -20px rgba(11,42,91,0.4);
}
.project-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.project-card:hover img { transform: scale(1.08); }
.project-card::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(11,42,91,0.95) 100%);
}
.project-info {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 22px 24px;
  color: #fff;
  z-index: 2;
}
.project-info span {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #F5B301, #00BFA6);
  color: #0F172A;
  margin-bottom: 10px;
}
.project-info h4 {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 6px;
}
.project-info p {
  font-size: .85rem;
  opacity: .9;
  display: flex; align-items: center; gap: 6px;
}
.project-info p i { color: #00BFA6; }

/* ---------- TESTIMONIALS ---------- */
.testimonial-card {
  background: #fff;
  border-radius: 20px;
  padding: 32px;
  border: 1px solid #EEF2F7;
  transition: transform .3s ease, box-shadow .3s ease;
  position: relative;
}
.testimonial-card::before {
  content: '\201C';
  position: absolute;
  top: 12px; right: 20px;
  font-size: 5rem;
  line-height: 1;
  color: rgba(0,169,224,0.15);
  font-family: Georgia, serif;
}
.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -20px rgba(11,42,91,0.2);
}
.testimonial-card p {
  color: #334155;
  line-height: 1.65;
  font-size: .95rem;
  position: relative;
  z-index: 1;
}

/* ---------- BRAND MARQUEE ---------- */
.marquee-container {
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
}
.marquee-track {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: marquee 40s linear infinite;
}
.marquee-track.reverse { animation: marquee-reverse 45s linear infinite; }
.marquee-container:hover .marquee-track { animation-play-state: paused; }

.brand-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  border-radius: 12px;
  background: #F5F7FA;
  color: #0F172A;
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .02em;
  border: 1px solid #EEF2F7;
  transition: all .3s ease;
  white-space: nowrap;
}
.brand-chip:hover {
  background: linear-gradient(135deg, #0B2A5B, #00A9E0);
  color: #fff;
  border-color: transparent;
  transform: translateY(-2px);
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes marquee-reverse {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

/* ---------- FAQ ---------- */
.faq-item {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #EEF2F7;
  overflow: hidden;
  transition: box-shadow .3s ease, border-color .3s ease;
}
.faq-item[open] {
  border-color: transparent;
  box-shadow: 0 15px 40px -20px rgba(11,42,91,0.25);
}
.faq-item summary {
  padding: 22px 26px;
  cursor: pointer;
  list-style: none;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px;
  font-weight: 600;
  color: #0F172A;
  font-size: 1.02rem;
  transition: color .2s ease;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: #0B2A5B; }
.faq-item summary i {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(11,42,91,0.1), rgba(0,191,166,0.1));
  color: #0B2A5B;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem;
  transition: transform .3s ease, background .3s ease, color .3s ease;
  flex-shrink: 0;
}
.faq-item[open] summary i {
  transform: rotate(45deg);
  background: linear-gradient(135deg, #0B2A5B, #00A9E0);
  color: #fff;
}
.faq-content {
  padding: 0 26px 24px;
  color: #64748B;
  line-height: 1.7;
  font-size: .95rem;
}

/* ---------- FOOTER ---------- */
.social-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: all .3s ease;
}
.social-icon:hover {
  background: linear-gradient(135deg, #0B2A5B, #00A9E0);
  border-color: transparent;
  transform: translateY(-3px);
}

/* ---------- MOBILE FINE-TUNING ---------- */
@media (max-width: 1023px) {
  #header .nav-link { color: #0F172A; }
}
@media (max-width: 640px) {
  .section-title { font-size: 1.85rem; }
  .service-card, .testimonial-card { padding: 24px 20px; }
  .project-card { aspect-ratio: 4/4; }
}
