/* =========================================================
   SGR Corretora de Seguros — estilos
   ========================================================= */

:root {
  /* Laranja da marca — mesma cor do SVG do logo (#D55B0D) */
  --brand: #D55B0D;
  --brand-dark: #B44A07;
  --brand-tint: #FCEFE4;

  --ink-900: #333F48;
  --ink-700: #4B5563;
  --ink-500: #6B7280;
  --line: #E6E9EC;
  --surface: #F4F6F8;
  --footer: #333B45;
  --white: #FFFFFF;

  --radius-lg: 14px;
  --radius-md: 10px;
  --shadow-card: 0 1px 2px rgba(17, 24, 39, .05), 0 10px 30px rgba(17, 24, 39, .07);
  --shadow-btn: 0 6px 18px rgba(213, 91, 13, .28);

  --container: 1280px;
  --gutter: clamp(20px, 4vw, 48px);
  --hero-h: 600px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-700);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
ul { list-style: none; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }

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

/* ---------------- Botões ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding-inline: 26px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
  gap: 10px;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease,
              box-shadow .18s ease, transform .18s ease;
}

.btn-icon { width: 20px; height: 20px; flex-shrink: 0; }

.btn-arrow {
  font-size: 16px;
  line-height: 1;
  transition: transform .18s ease;
}

.btn:hover .btn-arrow { transform: translateX(3px); }

.btn-primary {
  background: var(--brand);
  color: var(--white);
  box-shadow: var(--shadow-btn);
}

.btn-primary:hover { background: var(--brand-dark); }

.btn-ghost {
  background: var(--white);
  color: var(--brand);
  border: 1.5px solid var(--brand);
}

.btn-ghost:hover { background: var(--brand-tint); }

.btn-on-orange {
  background: var(--white);
  color: var(--brand);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .14);
}

.btn-on-orange:hover { background: #FFF6EF; }

.btn:focus-visible {
  outline: 2px solid var(--ink-900);
  outline-offset: 3px;
}

/* ---------------- Header ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 96px;
}

.brand { display: block; flex-shrink: 0; }

.brand img {
  height: 62px;
  width: auto;
}

/* ---------------- Hero ---------------- */
.hero { position: relative; }

.hero-grid {
  display: flex;
  align-items: center;
  min-height: var(--hero-h);
}

.hero-copy {
  width: 52%;
  padding-right: 56px;
  padding-block: 56px 96px;
}

.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand);
}

.hero h1 {
  margin-top: 18px;
  font-size: clamp(2rem, 3.6vw, 3rem);
  line-height: 1.14;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink-900);
}

.hero h1 em {
  font-style: normal;
  color: var(--brand);
}

.hero-sub {
  margin-top: 20px;
  max-width: 470px;
  font-size: 17px;
  color: var(--ink-500);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

/* Selos de confiança, separados por divisórias verticais */
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 40px;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--ink-700);
}

.hero-trust li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 24px;
  border-right: 1px solid var(--line);
}

.hero-trust li:last-child {
  padding-right: 0;
  border-right: 0;
}

.trust-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  color: var(--brand);
}

.trust-icon svg { width: 26px; height: 26px; }

/* Imagem de destaque: encosta na borda direita da tela, canto esquerdo arredondado */
.hero-visual {
  position: absolute;
  top: 0;
  right: 0;
  width: 48%;
  height: var(--hero-h);
  overflow: hidden;
  border-bottom-left-radius: 180px;
  background: var(--brand-tint);
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% center;
}

/* ---------------- Cards de ramos ---------------- */
/* Compensa o header fixo ao pular pela âncora "Conheça nossos seguros" */
#seguros { scroll-margin-top: 120px; }

.ramos {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-top: -64px;
}

.ramo-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 26px 24px 28px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.ramo-card:hover {
  transform: translateY(-4px);
  border-color: rgba(213, 91, 13, .35);
  box-shadow: 0 1px 2px rgba(17, 24, 39, .05), 0 18px 38px rgba(17, 24, 39, .11);
}

.ramo-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: var(--brand);
}

.ramo-icon svg { width: 34px; height: 34px; }

.ramo-card h2 {
  margin-top: 14px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink-900);
}

.ramo-card p {
  margin-top: 10px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-500);
}

/* ---------------- Títulos de seção ---------------- */
.section-title {
  text-align: center;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--ink-900);
}

.section-sub {
  max-width: 560px;
  margin: 12px auto 0;
  text-align: center;
  font-size: 16px;
  color: var(--ink-500);
}

/* ---------------- Seguradoras ---------------- */
.parceiros {
  margin-top: 96px;
  padding-block: 80px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.logos-grid {
  --logo-cols: 5;
  --logo-gap: 18px;
  /* Flex em vez de grid: a última linha incompleta fica centralizada
     em vez de encostada à esquerda, qualquer que seja o total de logos */
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--logo-gap);
  margin-top: 44px;
}

/* Em 5 colunas não cabe ícone e nome lado a lado: empilha e centraliza */
.logo-cell {
  flex: 0 0 calc((100% - (var(--logo-cols) - 1) * var(--logo-gap)) / var(--logo-cols));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 132px;
  padding: 18px 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.logo-mark {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
}

/* Arte que sangra até a borda do quadrado: arredondar cortaria o desenho */
.logo-mark--square { border-radius: 0; }

.logo-name {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  color: var(--ink-900);
}

/* ---------------- Faixa de CTA ---------------- */
.cta-band {
  background: var(--brand);
  color: var(--white);
  padding-block: 44px;
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}

.cta-copy h2 {
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cta-copy p {
  margin-top: 8px;
  max-width: 620px;
  font-size: 15.5px;
  color: rgba(255, 255, 255, .92);
}

/* ---------------- Footer ---------------- */
.site-footer {
  background: var(--footer);
  color: rgba(255, 255, 255, .78);
  padding-block: 40px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px 32px;
  flex-wrap: wrap;
  padding-bottom: 32px;
}

/* Mesmo logo do header, recolorido em branco pela máscara para contrastar no rodapé */
.footer-brand {
  width: 135px;
  height: 62px;
  flex-shrink: 0;
  background-color: var(--white);
  -webkit-mask: url("../assets/sgr-logo.svg") left center / contain no-repeat;
  mask: url("../assets/sgr-logo.svg") left center / contain no-repeat;
}

.footer-place {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--white);
}

.footer-place-text span {
  display: block;
}

.footer-pin {
  width: 22px;
  height: 22px;
  color: rgba(255, 255, 255, .7);
}

.footer-place-text > span {
  font-size: 13.5px;
  color: rgba(255, 255, 255, .7);
}

.footer-legal {
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding-block: 20px 24px;
}

.footer-legal p {
  font-size: 13px;
  color: rgba(255, 255, 255, .6);
}

/* ---------------- Responsivo ---------------- */
@media (max-width: 1100px) {
  .ramos { grid-template-columns: repeat(2, 1fr); }
  .hero-visual { border-bottom-left-radius: 120px; }
}

@media (max-width: 900px) {
  :root { --hero-h: 520px; }

  .hero-copy { width: 56%; padding-right: 36px; }
  .hero-visual { width: 44%; }
  .hero-trust { font-size: 13px; gap: 8px 16px; }
  .hero-trust li { padding-right: 16px; }
  .logos-grid { --logo-cols: 2; }
}

@media (max-width: 768px) {
  :root { --gutter: 16px; }

  .header-inner { height: 68px; gap: 12px; }
  .brand img { height: 42px; }
  .site-header .btn { padding-inline: 16px; font-size: 14px; }
  .site-header .btn-icon { width: 18px; height: 18px; }

  .hero-grid {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 28px;
    min-height: 0;
    padding-block: 0 32px;
  }

  .hero-copy {
    width: 100%;
    padding: 0;
  }

  .hero h1 { margin-top: 14px; }
  .hero-sub { font-size: 16px; max-width: none; }

  .hero-actions {
    margin-top: 26px;
    gap: 12px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-trust {
    margin-top: 28px;
    gap: 14px 0;
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-trust li {
    width: 100%;
    padding-right: 0;
    border-right: 0;
  }

  .hero-trust li br { display: none; }

  /* Imagem passa a ocupar a largura total, acima do texto */
  .hero-visual {
    position: static;
    width: calc(100% + var(--gutter) * 2);
    margin-inline: calc(var(--gutter) * -1);
    height: 240px;
    border-bottom-left-radius: 0;
  }

  .ramos {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 8px;
  }

  .ramo-card { padding: 22px 20px; }

  .parceiros {
    margin-top: 56px;
    padding-block: 56px;
  }

  .logos-grid {
    --logo-gap: 12px;
    margin-top: 32px;
  }

  .logo-cell {
    gap: 10px;
    height: 118px;
    padding: 16px 12px;
  }

  .logo-mark { width: 38px; height: 38px; }

  .logo-name { font-size: 13.5px; }

  .cta-band { padding-block: 36px; }
  .cta-inner { gap: 22px; }
  .cta-band .btn { width: 100%; }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
  }
}

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