/* ============================================================
   Bandeiras Online — styles.css
   Pure CSS (no Tailwind). Mobile-first.
   ============================================================ */

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Fonte do sistema — Inter (self-hosted, static/fonts/inter/) ── */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/inter/inter-latin-400-normal.da03732a27e1.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/inter/inter-latin-500-normal.51205681a1ba.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/inter/inter-latin-600-normal.2ede57db1a3a.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/inter/inter-latin-700-normal.8ca0a5155296.woff2") format("woff2");
}

/* ── Base ────────────────────────────────────────────────── */
html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: #eef2f7;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #1a1a1a;
  line-height: 1.5;
}

a {
  color: #005a9e;
  text-decoration: none;
}

a:hover {
  color: #00447a;
}

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

/* ── Page wrapper ────────────────────────────────────────── */
.page-wrapper {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   HEADER / NAV / FOOTER
   Movidos para static/css/src/input.css (Tailwind, @layer components)
   — fonte única compartilhada com o catálogo. Ver CLAUDE.md do projeto.
   ============================================================ */

/* ============================================================
   BANNER GRANDE (hero)
   ============================================================ */
.banner-grande {
  position: relative;
  height: clamp(200px, 26vh, 300px);
  flex-shrink: 0;
  overflow: hidden;
  background: #003f6e;
}

.banner-grande__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.banner-grande__overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(0, 42, 74, .82) 0%,
    rgba(0, 42, 74, .5) 42%,
    rgba(0, 42, 74, 0) 78%
  );
}

.banner-grande__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 0 clamp(28px, 6vw, 90px);
  max-width: 640px;
  pointer-events: none;
}

.banner-grande__tag {
  align-self: flex-start;
  background: #ffd800;
  color: #1a1a1a;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 99px;
}

.banner-grande__title {
  color: #fff;
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.5px;
  text-wrap: balance;
}

.banner-grande__desc {
  color: rgba(255, 255, 255, .9);
  font-size: clamp(13px, 1.4vw, 16px);
  max-width: 480px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.banner-grande__cta {
  pointer-events: auto;
  align-self: flex-start;
  margin-top: 2px;
  background: #fff;
  color: #005a9e;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 20px;
  border-radius: 99px;
  transition: transform .2s ease;
}

.banner-grande__cta:hover {
  color: #005a9e;
  transform: translateY(-2px);
}

/* ============================================================
   BANNER FAIXA (strip)
   ============================================================ */
.banner-faixa {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  background: linear-gradient(90deg, #005a9e, #008830);
  color: #fff;
  padding: 16px 24px;
  font-size: 15px;
}

.banner-faixa:hover {
  color: #fff;
}

.banner-faixa__title {
  font-weight: 600;
}

.banner-faixa__desc {
  opacity: .85;
}

.banner-faixa__chip {
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 99px;
  padding: 5px 15px;
  font-size: 13px;
  white-space: nowrap;
}

/* ============================================================
   PAGE TITLE
   ============================================================ */
.page-title {
  position: relative;
  isolation: isolate;
  text-align: center;
  padding: 0;
  flex-shrink: 0;
}

/* Halo de personalidade: azul lidera, verde apoia — mesma hierarquia do brasão,
   só que como profundidade suave em vez de bloco de cor. Sem stripe, sem grid,
   sem sombra — só radial-gradient, por trás do headline. */
.page-title::before {
  content: "";
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1100px, 92vw);
  height: 320px;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 100% at 38% 40%, rgba(0, 90, 158, .12) 0%, rgba(0, 90, 158, 0) 70%),
    radial-gradient(ellipse 45% 90% at 68% 55%, rgba(0, 136, 48, .08) 0%, rgba(0, 136, 48, 0) 72%);
}

.page-title__h1 {
  margin: 0;
  font-size: clamp(26px, 3.6vw, 40px);
  font-weight: 600;
  letter-spacing: -1px;
  text-wrap: balance;
}

.page-title__sub {
  margin: 0;
  font-size: clamp(14px, 1.8vw, 18px);
  color: #6b6b70;
}

/* ============================================================
   CARDS SECTION
   ============================================================ */
.cards-section {
  flex: 1;
  display: flex;
  padding: clamp(16px, 3vh, 30px) clamp(16px, 4vw, 56px) clamp(28px, 5vh, 56px);
}

.cards-grid {
  max-width: 1360px;
  width: 100%;
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: minmax(580px, 1fr);
  gap: clamp(12px, 1.4vw, 20px);
}

/* ── Individual card ─────────────────────────────────────── */
/* ADR-001: overflow:hidden NUNCA no <a> focavel — fica so no .card__bg-wrapper
   interno. Assim o indicador de foco (outline) nao e clipado.                 */
.card {
  text-decoration: none;
  border-radius: 22px;
  position: relative;
  display: block;
  min-height: 580px;
}

/* ADR-002: outline contrasta com a superficie da pagina (#fbfbfd) ao redor
   do card, nao com a cor do proprio card.                                      */
.card:focus-visible {
  outline: 3px solid #005a9e;
  outline-offset: 3px;
}

/* Wrapper interno que faz o clip da imagem sem clipar o foco do <a> */
.card__bg-wrapper {
  position: absolute;
  inset: 0;
  border-radius: 22px;
  overflow: hidden;
}

/* Imagem full-bleed */
.card__bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: filter 0.35s ease;
}

/* Hover: clareamento da imagem de fundo */
.card:hover .card__bg-img {
  filter: brightness(1.18);
}

@media (prefers-reduced-motion: reduce) {
  .banner-grande__cta,
  .card__bg-img {
    transition: none;
  }
}

/* Card colour variants — fallback de fundo (imagem nao carregou) */
.card--blue { background: #005a9e; }
.card--green { background: #008830; }
.card--gold  { background: #ffd800; }

/* Overlay semi-transparente da cor de marca (identidade visual por card) */
.card__brand-overlay {
  position: absolute;
  inset: 0;
}

.card--blue .card__brand-overlay  { background: rgba(0, 90, 158, 0.18); }
.card--green .card__brand-overlay { background: rgba(0, 136, 48, 0.18); }
.card--gold .card__brand-overlay  { background: rgba(255, 216, 0, 0.15); }

/* Gradiente escuro na base para contraste do texto */
.card__gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 65%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0) 100%);
}

/* Conteudo textual em overlay, base do card */
.card__content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: clamp(20px, 3vw, 36px) clamp(20px, 2.5vw, 32px);
  z-index: 1;
  color: #fff;
}

/* ── Card internals ──────────────────────────────────────── */
.card__label {
  font-size: 12px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  opacity: .70;
  font-weight: 600;
}

.card__title {
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: 700;
  margin-top: 6px;
  letter-spacing: -.4px;
  line-height: 1.1;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  position: relative;
  padding: 22px clamp(20px, 5vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  flex-shrink: 0;
  gap: 12px;
  font-size: 12px;
  color: #86868b;
}

/* Faixa tricolor — assinatura de marca recorrente (literal pra uma fabrica
   de bandeiras, nao decoracao generica). Espelha static/css/src/input.css. */
.site-footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, #005a9e 0%, #005a9e 45%, #008830 45%, #008830 78%, #ffd800 78%, #ffd800 100%);
}

.site-footer__copy {
  flex-shrink: 0;
}

.site-footer__links {
  display: flex;
  gap: 20px;
}

.site-footer__link {
  color: #86868b;
}

.site-footer__link:hover {
  color: #1a1a1a;
}

/* ============================================================
   RESPONSIVE — max-width 880px
   ============================================================ */
@media (max-width: 880px) {
  .page-wrapper {
    height: auto;
    min-height: 100vh;
  }

  /* Header: menu de links vira dropdown por trás do hamburger */
  .site-header {
    position: relative;
    height: auto;
    min-height: 56px;
    padding: 10px clamp(16px, 5vw, 32px);
  }

  /* Menu de navegação — oculto por padrão, exibido via hamburger */
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 8px clamp(16px, 5vw, 32px) 14px;
    background: #eef2f7;
    border-bottom: 1px solid rgba(0, 0, 0, .07);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
    z-index: 10;
  }

  .site-nav.is-open {
    display: flex;
  }

  .nav-link {
    padding: 10px 4px;
  }

  /* Login + carrinho sempre visíveis; hamburger abre o menu */
  .nav-toggle {
    display: flex;
  }

  .site-actions__login span {
    display: none;
  }

  /* Banner grande: taller on mobile for readability */
  .banner-grande {
    height: clamp(280px, 55vw, 360px);
  }

  /* Cards: linha única (3 colunas) até 768px; abaixo disso empilha */
  .cards-section {
    height: auto;
    min-height: unset;
  }

  .cards-grid {
    height: auto;
  }
}

/* ============================================================
   RESPONSIVE — max-width 767px (empilha os cards)
   ============================================================ */
@media (max-width: 767px) {
  .cards-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .card {
    min-height: 200px;
  }
}
