/* ======================================================================
   ONDA TECH CALHAS E RUFOS — style.css
   Identidade: águas do litoral + metal (galvanizado/graphite) + chuva.
   Mobile-first. Sem frameworks.
   ====================================================================== */

/* ---------- 1. TOKENS (design system) ---------- */
:root {
  /* Cores da marca (definidas na identidade visual) */
  --azul-profundo: #1B4B66;
  --azul-agua: #2E86AB;
  --azul-claro: #5FB4D8;
  --grafite: #2B2F33;
  --cinza-zinco: #8A9499;
  --cinza-claro: #C7D2D8;
  --branco-nevoa: #F7F9FA;
  --whatsapp: #25D366;
  --whatsapp-escuro: #1DA851;

  /* Superfícies */
  --bg: var(--branco-nevoa);
  --bg-tinted: #EEF2F4;
  --bg-dark: #14222C;
  --text: var(--grafite);
  --text-light: var(--cinza-zinco);
  --text-inverse: var(--branco-nevoa);
  --border: #DDE4E8;

  /* Tipografia */
  --font-display: 'Space Grotesk', 'Segoe UI', Arial, sans-serif;
  --font-body: 'Inter', 'Segoe UI', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* Escala fluida */
  --fs-h1: clamp(2.1rem, 5vw + 1rem, 3.6rem);
  --fs-h2: clamp(1.7rem, 3vw + 1rem, 2.5rem);
  --fs-h3: 1.15rem;
  --fs-lead: clamp(1rem, 0.6vw + 0.85rem, 1.15rem);

  /* Espaçamento */
  --space-section: clamp(3.5rem, 6vw, 6.5rem);
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 12px 30px -14px rgba(20, 34, 44, 0.28);
  --shadow-sm: 0 4px 14px -6px rgba(20, 34, 44, 0.2);

  --container: 1180px;
  --transition: 220ms cubic-bezier(.4,0,.2,1);
}

/* ---------- 2. RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0 0 .5em; line-height: 1.15; color: var(--azul-profundo); }
p { margin: 0 0 1em; line-height: 1.65; }

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

:focus-visible {
  outline: 3px solid var(--azul-claro);
  outline-offset: 3px;
}

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--azul-profundo); color: #fff;
  padding: 12px 18px; z-index: 200; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--azul-agua);
  margin: 0 0 .6em;
}
.eyebrow--light { color: var(--azul-claro); }

.lead { font-size: var(--fs-lead); color: var(--text-light); max-width: 60ch; }
.lead--light { color: var(--cinza-claro); }

/* ---------- 3. BOTÕES ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .95rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .98rem;
  border: 2px solid transparent;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.btn--primary { background: var(--azul-agua); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--azul-profundo); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--outline { border-color: var(--azul-profundo); color: var(--azul-profundo); }
.btn--outline:hover { background: var(--azul-profundo); color: #fff; transform: translateY(-2px); }
.btn--whatsapp { background: var(--whatsapp); color: #fff; }
.btn--whatsapp:hover { background: var(--whatsapp-escuro); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--sm { padding: .55rem 1.1rem; font-size: .85rem; }
.icon-wa { width: 1.15em; height: 1.15em; fill: currentColor; flex-shrink: 0; }
.icon-check { width: 1em; height: 1em; fill: var(--azul-agua); flex-shrink: 0; }
.icon-social { width: 1.4em; height: 1.4em; flex-shrink: 0; }

/* ---------- 4. CABEÇALHO ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(247, 249, 250, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; padding-block: .7rem; gap: 1rem; }
.header__brand { display: flex; align-items: center; gap: .6rem; }
.header__icon { width: 38px; height: 38px; }
.header__brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.header__brand-text strong { font-family: var(--font-display); font-size: 1.05rem; color: var(--azul-profundo); }
.header__brand-text small { font-family: var(--font-mono); font-size: .62rem; letter-spacing: .12em; color: var(--cinza-zinco); text-transform: uppercase; }

.nav__list { display: flex; gap: 1.7rem; }
.nav__link {
  font-weight: 500; font-size: .95rem; color: var(--text); position: relative; padding-block: .3rem;
}
.nav__link::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px; background: var(--azul-agua);
  transition: right var(--transition);
}
.nav__link:hover::after, .nav__link:focus-visible::after { right: 0; }

.header__actions { display: flex; align-items: center; gap: .8rem; }

.nav-toggle {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; background: none; border: none; padding: 0;
}
.nav-toggle span { display: block; width: 100%; height: 2.5px; background: var(--azul-profundo); border-radius: 2px; transition: transform var(--transition), opacity var(--transition); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* Mobile nav */
@media (max-width: 880px) {
  .nav {
    position: fixed; inset: 0 0 0 30%; top: 68px;
    background: var(--branco-nevoa);
    box-shadow: -12px 0 30px rgba(0,0,0,.12);
    padding: 2rem 1.5rem;
    transform: translateX(100%);
    transition: transform var(--transition);
    z-index: 99;
  }
  .nav.is-open { transform: translateX(0); }
  .nav__list { flex-direction: column; gap: 1.4rem; }
  .nav__link { font-size: 1.1rem; }
}
@media (min-width: 881px) {
  .nav-toggle { display: none; }
}

/* ---------- 5. HERO ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex; align-items: center;
  overflow: hidden;
  color: var(--text-inverse);
}
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__img { width: 100%; height: 100%; object-fit: cover; }
.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,38,53,.55) 0%, rgba(15,38,53,.78) 65%, rgba(15,38,53,.92) 100%);
}
.hero__rain {
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(115deg, rgba(95,180,216,0.12) 0 1px, transparent 1px 60px);
  animation: rainMove 3.5s linear infinite;
}
@keyframes rainMove {
  from { background-position: 0 0; }
  to { background-position: -120px 220px; }
}

.hero__content { position: relative; z-index: 1; padding-block: 6rem 4rem; }
.hero h1 { color: #fff; font-size: var(--fs-h1); max-width: 16ch; }
.hero__subtitle { font-size: var(--fs-lead); color: var(--cinza-claro); max-width: 52ch; margin-bottom: 2rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 2.2rem; }

.hero__badges {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem 1.5rem;
  max-width: 560px;
}
.hero__badges li { display: flex; align-items: center; gap: .5em; font-size: .9rem; color: var(--cinza-claro); }

.hero__scroll {
  position: absolute; bottom: 1.6rem; left: 50%; transform: translateX(-50%);
  z-index: 1; color: #fff; opacity: .8;
  animation: bounce 2s ease-in-out infinite;
}
.hero__scroll svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; }
@keyframes bounce { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

@media (max-width: 600px) {
  .hero__badges { grid-template-columns: 1fr; }
}

/* ---------- 6. DIVISOR "PERFIL DE CALHA" (elemento assinatura) ---------- */
.channel-divider { line-height: 0; color: var(--bg); }
.channel-divider svg { width: 100%; height: 32px; display: block; }
.channel-divider path { fill: none; stroke: var(--cinza-zinco); stroke-width: 3; }
.channel-divider--flip { transform: scaleY(-1); }

/* ---------- 7. SEÇÕES GERAIS ---------- */
.section { padding-block: var(--space-section); }
.section--tinted { background: var(--bg-tinted); }
.section--dark { background: var(--bg-dark); color: var(--cinza-claro); }
.section--dark h2 { color: #fff; }

.section__head { max-width: 720px; margin-bottom: 3rem; }
.section__head h2 { font-size: var(--fs-h2); }

/* ---------- 8. SOBRE ---------- */
.about { display: grid; gap: 3rem; align-items: center; }
.about h2 { font-size: var(--fs-h2); max-width: 16ch; }
.about__list { display: grid; gap: 1.1rem; margin: 1.8rem 0 2rem; }
.about__list li { display: flex; flex-direction: column; gap: .15rem; padding-left: 1.2rem; border-left: 3px solid var(--azul-agua); }
.about__list strong { font-family: var(--font-display); color: var(--azul-profundo); font-size: 1.02rem; }
.about__list span { color: var(--text-light); font-size: .92rem; }
.about__visual { display: flex; justify-content: center; }
.channel-svg { width: min(320px, 70vw); height: auto; }

@media (min-width: 920px) {
  .about { grid-template-columns: 1.15fr .85fr; }
}

/* ---------- 9. CARDS DE SERVIÇO ---------- */
.cards-grid { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); }
.service-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.8rem 1.6rem; display: flex; flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.service-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--azul-claro); }
.service-card__icon {
  width: 52px; height: 52px; border-radius: 12px;
  background: linear-gradient(135deg, var(--azul-profundo), var(--azul-agua));
  color: #fff; display: flex; align-items: center; justify-content: center; margin-bottom: 1rem;
}
.service-card__icon svg { width: 26px; height: 26px; }
.service-card h3 { font-size: var(--fs-h3); margin-bottom: .4em; }
.service-card p { color: var(--text-light); font-size: .92rem; flex: 1; }
.service-card__link { margin-top: .8rem; font-weight: 600; color: var(--azul-agua); font-size: .9rem; transition: color var(--transition); }
.service-card__link:hover { color: var(--azul-profundo); }

/* ---------- 10. DIFERENCIAIS ---------- */
.diff-grid { display: grid; gap: 1.6rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.diff-item {
  text-align: center; padding: 1.6rem 1rem; border-radius: var(--radius);
  background: var(--bg-tinted); transition: transform var(--transition), background var(--transition);
}
.diff-item:hover { transform: translateY(-4px); background: #E4ECF0; }
.diff-item svg { width: 40px; height: 40px; color: var(--azul-agua); margin-bottom: .8rem; }
.diff-item h3 { font-size: .95rem; margin: 0; color: var(--grafite); }

/* ---------- 11. GALERIA ---------- */
.gallery { display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); }
.gallery__item {
  position: relative; border: none; padding: 0; border-radius: var(--radius);
  overflow: hidden; background: var(--grafite); aspect-ratio: 4/3;
}
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.gallery__item:hover img { transform: scale(1.08); }
.gallery__label {
  position: absolute; left: 0; right: 0; bottom: 0; padding: .6rem .8rem;
  background: linear-gradient(0deg, rgba(20,34,44,.85), transparent);
  color: #fff; font-size: .82rem; font-weight: 600; text-align: left;
}
@media (min-width: 620px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 980px) { .gallery { grid-template-columns: repeat(4, 1fr); } }

/* ---------- 12. LIGHTBOX ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(15, 23, 29, .94);
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  padding: 2rem;
}
.lightbox[hidden] { display: none; }
.lightbox__img { max-width: min(90vw, 900px); max-height: 72vh; border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.lightbox__caption { color: var(--cinza-claro); margin-top: 1rem; font-size: .9rem; }
.lightbox__close {
  position: absolute; top: 1.2rem; right: 1.4rem; background: none; border: none;
  color: #fff; font-size: 2.2rem; line-height: 1; padding: .3rem;
}
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.1); border: none; color: #fff; width: 46px; height: 46px;
  border-radius: 50%; font-size: 1.1rem; transition: background var(--transition);
}
.lightbox__nav:hover { background: rgba(255,255,255,.22); }
.lightbox__nav--prev { left: 1.2rem; }
.lightbox__nav--next { right: 1.2rem; }
@media (max-width: 600px) {
  .lightbox__nav { width: 38px; height: 38px; }
}

/* ---------- 13. ÁREA DE ATENDIMENTO ---------- */
.coverage { display: grid; gap: 3rem; align-items: center; }
.coverage h2 { font-size: var(--fs-h2); max-width: 18ch; }
.coverage__cities {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem 1rem; margin: 1.6rem 0;
}
.coverage__cities li {
  font-family: var(--font-mono); font-size: .85rem; font-weight: 600;
  padding: .55rem .8rem; background: var(--bg-tinted); border-radius: var(--radius-sm);
  color: var(--azul-profundo); border-left: 3px solid var(--azul-agua);
}
.coverage__note { font-size: .88rem; color: var(--text-light); margin-bottom: 1.6rem; }
.coverage__map { display: flex; justify-content: center; }
.map-illustration { width: min(360px, 80vw); height: auto; }

@media (min-width: 920px) {
  .coverage { grid-template-columns: 1.1fr .9fr; }
}

/* ---------- 14. CONTATO ---------- */
.contact { text-align: center; }
.contact h2 { max-width: none; }
.contact .lead { margin-inline: auto; }
.contact__grid {
  display: grid; gap: 1.2rem; margin-top: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.contact__card {
  display: flex; align-items: center; gap: 1rem; justify-content: center;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius); padding: 1.4rem; text-align: left;
  transition: transform var(--transition), background var(--transition), border-color var(--transition);
}
.contact__card:hover { transform: translateY(-4px); background: rgba(255,255,255,.09); border-color: var(--azul-claro); }
.contact__card .icon-wa { color: var(--whatsapp); width: 2rem; height: 2rem; }
.contact__card .icon-social { color: var(--azul-claro); }
.contact__card strong { display: block; color: #fff; font-family: var(--font-display); font-size: 1rem; }
.contact__card small { color: var(--cinza-claro); font-size: .85rem; }

/* ---------- 15. RODAPÉ ---------- */
.footer { background: var(--grafite); color: var(--cinza-claro); padding-top: 3.5rem; }
.footer__inner {
  display: grid; gap: 2.4rem; padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer__brand p { font-size: .88rem; color: var(--cinza-zinco); max-width: 32ch; margin-top: .9rem; }
.footer__col h3 { color: #fff; font-size: .92rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .9rem; }
.footer__col ul { display: grid; gap: .55rem; }
.footer__col a { font-size: .9rem; color: var(--cinza-claro); transition: color var(--transition); }
.footer__col a:hover { color: var(--azul-claro); }
.footer__col li { font-size: .9rem; color: var(--cinza-zinco); }

.footer__bottom { padding-block: 1.4rem; text-align: center; font-size: .8rem; color: var(--cinza-zinco); }

@media (min-width: 700px) {
  .footer__inner { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}

/* ---------- 16. FLUTUANTES ---------- */
.whatsapp-float {
  position: fixed; right: 1.3rem; bottom: 1.3rem; z-index: 150;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--whatsapp); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px -6px rgba(37, 211, 102, 0.55);
  animation: pulse 2.6s ease-in-out infinite;
}
.whatsapp-float svg { width: 30px; height: 30px; fill: currentColor; }
.whatsapp-float:hover { background: var(--whatsapp-escuro); }
@keyframes pulse {
  0%, 100% { box-shadow: 0 10px 24px -6px rgba(37, 211, 102, 0.55); }
  50% { box-shadow: 0 10px 32px -4px rgba(37, 211, 102, 0.85); }
}

.back-to-top {
  position: fixed; right: 1.3rem; bottom: 6.2rem; z-index: 150;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--azul-profundo); color: #fff; border: none;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
  opacity: 0; transform: translateY(10px);
  transition: opacity var(--transition), transform var(--transition), background var(--transition);
}
.back-to-top:not([hidden]) { opacity: 1; transform: translateY(0); }
.back-to-top svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.back-to-top:hover { background: var(--azul-agua); }

/* ---------- 17. REVEAL AO ROLAR ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- 18. UTILITÁRIOS ---------- */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
