/* ==========================================================================
   Alconnect Tecnologia — Estilo corporativo
   CSS vanilla, mobile-first, sem dependências externas.
   ========================================================================== */

:root {
  /* Marca — roxo extraído de public/logo.jpg (dominante #540070) */
  --brand-deep: #2b0038;
  --brand: #540070;
  --brand-light: #8a2ea8;

  /* Aliases legados: mantêm os pontos de uso existentes válidos */
  --navy: var(--brand-deep);
  --blue: var(--brand);
  --blue-light: var(--brand-light);
  --navy-soft: #3d0050;

  --slate: #5f5566;
  --off-white: #f8f5fa;
  --white: #ffffff;
  --accent: #ffc94d;
  --whatsapp: #25d366;

  --text-body: #2e2733;
  --border: #ece5f0;
  --footer-bg: #1e0026;
  --shadow-sm: 0 2px 10px rgba(43, 0, 56, 0.08);
  --shadow-md: 0 10px 30px rgba(43, 0, 56, 0.14);
  --radius: 12px;
  --transition: 0.25s ease;
  --header-h: 72px;

  --font-stack: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  font-family: var(--font-stack);
  color: var(--text-body);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--blue);
  text-decoration: none;
}

h1, h2, h3 {
  color: var(--navy);
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 700;
}

p {
  margin: 0 0 1em;
}

/* Acessibilidade: skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 200;
  padding: 12px 20px;
  background: var(--navy);
  color: var(--white);
  border-radius: 0 0 8px 0;
}

.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 3px solid var(--blue-light);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  /* Só o eixo horizontal: o shorthand zeraria o padding vertical de
     quem compõe .container com espaçamento próprio (ex.: .footer__inner). */
  padding-inline: 20px;
}

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.4;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition),
    border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  text-align: center;
}

.btn--primary {
  background: var(--blue);
  color: var(--white);
}

.btn--primary:hover {
  background: var(--blue-light);
}

.btn--outline {
  background: transparent;
  border-color: var(--white);
  color: var(--white);
}

.btn--outline:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn--lg {
  padding: 15px 30px;
  font-size: 1.05rem;
}

.btn--cta {
  padding: 10px 20px;
  margin-left: 16px;
}

.btn--whatsapp {
  background: var(--whatsapp);
  color: var(--white);
  margin-top: 8px;
}

.btn--whatsapp:hover {
  background: #1fb959;
}

.btn--whatsapp svg {
  flex-shrink: 0;
}

/* Cabeçalho fixo */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(43, 0, 56, 0.92);
  backdrop-filter: blur(8px);
  transition: background-color var(--transition), box-shadow var(--transition);
}

.header.is-scrolled {
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 16px;
}

.header__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-size: 1.15rem;
  font-weight: 500;
}

.header__brand:hover {
  color: var(--white);
}

.header__logo,
.footer__logo {
  border-radius: 8px;
  object-fit: cover;
}

.header__name strong {
  color: var(--accent);
  font-weight: 700;
}

/* Menu desktop */
.header__nav {
  display: flex;
  align-items: center;
}

.header__menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 6px;
}

.header__link {
  color: rgba(255, 255, 255, 0.85);
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 500;
  position: relative;
  transition: color var(--transition), background-color var(--transition);
}

.header__link:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

.header__link.is-active {
  color: var(--accent);
}

/* Botão hambúrguer */
.header__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  background: transparent;
  border: 0;
  cursor: pointer;
  border-radius: 8px;
}

.header__toggle-bar {
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: var(--white);
  transition: transform var(--transition), opacity var(--transition);
}

/* Hero */
.hero {
  position: relative;
  padding: calc(var(--header-h) + 64px) 0 88px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  color: var(--white);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  top: -120px;
  right: -120px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(160, 60, 200, 0.4) 0%, transparent 70%);
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 820px;
}

.hero__eyebrow {
  display: inline-block;
  margin-bottom: 18px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero__title {
  color: var(--white);
  font-size: clamp(2rem, 5vw, 3.75rem);
  font-weight: 700;
  margin: 0 0 20px;
}

.hero__sub {
  font-size: 1.15rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.9);
  max-width: 720px;
  margin: 0 0 32px;
}

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

/* Seções genéricas */
.section {
  padding: 72px 0;
}

.section--contact {
  background: var(--off-white);
}

.section__eyebrow {
  margin: 0 0 8px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
}

.section__eyebrow--light {
  color: var(--accent);
}

.section__title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  margin: 0 0 12px;
}

.section__title--light {
  color: var(--white);
}

.section__lead {
  color: var(--slate);
  font-size: 1.05rem;
  max-width: 720px;
  margin: 0 0 40px;
}

/* Grids */
.grid {
  display: grid;
  gap: 22px;
}

.grid--solutions,
.grid--about {
  grid-template-columns: 1fr;
}

/* Cards */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 28px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  margin-bottom: 18px;
  color: var(--blue);
  background: linear-gradient(135deg, var(--off-white), var(--white));
  border: 1px solid var(--border);
}

.card__title {
  font-size: 1.2rem;
  margin: 0 0 8px;
}

.card__text {
  color: var(--slate);
  margin: 0;
  font-size: 0.98rem;
}

.card--about {
  background: var(--off-white);
  border-left: 4px solid var(--accent);
}

.card--about:hover {
  background: var(--white);
}

/* Diferenciais */
.differentials {
  padding: 72px 0;
  background: linear-gradient(135deg, var(--brand-deep) 0%, var(--navy-soft) 100%);
  color: var(--white);
}

.differentials .section__lead {
  color: rgba(255, 255, 255, 0.7);
}

.grid--differentials {
  grid-template-columns: 1fr;
  margin-top: 12px;
}

.differential {
  text-align: left;
  padding: 20px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: transform var(--transition), background-color var(--transition);
}

.differential:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.09);
}

.differential__icon {
  color: var(--accent);
  margin-bottom: 14px;
}

.differential__title {
  color: var(--white);
  font-size: 1.15rem;
  margin: 0 0 6px;
}

.differential__text {
  color: rgba(255, 255, 255, 0.78);
  margin: 0;
  font-size: 0.95rem;
}

/* Números */
.numbers {
  padding: 72px 0;
  background: var(--off-white);
}

.numbers__title {
  text-align: center;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin: 0 0 40px;
}

.grid--numbers {
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.number {
  text-align: center;
  padding: 24px 12px;
}

.number__value {
  display: block;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
  color: var(--blue);
  line-height: 1.1;
}

.number__label {
  display: block;
  margin-top: 6px;
  color: var(--slate);
  font-weight: 500;
}

/* Sobre */
.about__content {
  max-width: 860px;
  font-size: 1.05rem;
  margin: 0 0 40px;
}

.about__content p:last-child {
  margin-bottom: 0;
}

/* Formulário */
.contact {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
}

.contact__form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 28px;
}

.field {
  margin-bottom: 18px;
}

.field__label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: var(--navy);
  font-size: 0.95rem;
}

.field__input {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-body);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.field__input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(84, 0, 112, 0.18);
}

.field__input--area {
  resize: vertical;
  min-height: 120px;
}

.field__input.is-invalid {
  border-color: #d93025;
}

.field__error {
  display: block;
  margin-top: 4px;
  color: #c5221f;
  font-size: 0.85rem;
  min-height: 0;
}

.field__error:empty {
  display: none;
}

.btn--submit {
  width: 100%;
}

.contact__success {
  margin: 16px 0 0;
  padding: 14px 16px;
  background: #eaf6ec;
  border: 1px solid #2e7d32;
  color: #1b5e20;
  border-radius: 10px;
  font-weight: 500;
}

.contact__success[hidden] {
  display: none;
}

/* Aside contato */
.contact__aside {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 28px;
  align-self: start;
}

.contact__aside-title {
  font-size: 1.25rem;
  margin: 0 0 16px;
}

.contact__list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
}

.contact__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.contact__item-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--off-white);
  color: var(--blue);
}

.contact__link,
.contact__text {
  color: var(--text-body);
  font-size: 0.98rem;
  line-height: 1.5;
}

address.contact__text {
  font-style: normal;
  margin: 0;
}

.contact__link:hover {
  color: var(--blue);
}

.contact__note {
  margin: 16px 0 0;
  color: var(--slate);
  font-size: 0.9rem;
}

/* Rodapé */
.footer {
  background: var(--footer-bg);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding-top: 72px;
  padding-bottom: 48px;
}

.footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.footer__brand:hover {
  color: var(--white);
}

.footer__name strong {
  color: var(--accent);
}

.footer__about {
  color: rgba(255, 255, 255, 0.7);
  max-width: 320px;
  margin: 0;
}

.footer__title {
  color: var(--white);
  font-size: 1rem;
  margin: 6px 0 14px;
}

.footer__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer__list li {
  margin-bottom: 10px;
}

.footer__link {
  color: rgba(255, 255, 255, 0.8);
  transition: color var(--transition);
}

.footer__link:hover {
  color: var(--accent);
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 0;
}

.footer__copyright {
  margin: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.88rem;
  line-height: 1.8;
}

/* ==========================================================================
   Breakpoints — mobile-first
   ========================================================================== */

/* ≥ 640px */
@media (min-width: 640px) {
  .container {
    padding-inline: 28px;
  }

  .grid--solutions {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid--numbers {
    grid-template-columns: repeat(4, 1fr);
  }

  .btn--submit {
    width: auto;
    min-width: 220px;
  }
}

/* ≥ 768px */
@media (min-width: 768px) {
  .grid--differentials {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid--about {
    grid-template-columns: repeat(3, 1fr);
  }

  .contact {
    grid-template-columns: 1.4fr 1fr;
  }

  .footer__inner {
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 24px;
  }
}

/* ≥ 1024px */
@media (min-width: 1024px) {
  .container {
    padding-inline: 32px;
  }

  .grid--solutions {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid--differentials {
    grid-template-columns: repeat(4, 1fr);
  }

  .section {
    padding: 96px 0;
  }

  .differentials,
  .numbers {
    padding: 96px 0;
  }
}

/* Menu mobile — máximo 768px */
@media (max-width: 767.98px) {
  .header__toggle {
    display: inline-flex;
  }

  .header__nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--navy);
    box-shadow: var(--shadow-md);
    padding: 8px 20px 20px;
    transform: translateY(-120%);
    visibility: hidden;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s;
  }

  .header__nav.is-open {
    transform: translateY(0);
    visibility: visible;
    opacity: 1;
  }

  .header__menu {
    flex-direction: column;
    gap: 2px;
    margin-bottom: 16px;
  }

  .header__link {
    display: block;
    padding: 12px 10px;
    font-size: 1.05rem;
    color: var(--white);
  }

  .btn--cta {
    margin-left: 0;
  }

  /* Hambúrguer animado quando aberto */
  .header__toggle[aria-expanded="true"] .header__toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .header__toggle[aria-expanded="true"] .header__toggle-bar:nth-child(2) {
    opacity: 0;
  }

  .header__toggle[aria-expanded="true"] .header__toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

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