/* ============================================================
   Flex Pisos — styles.css
   Mobile-first, acessível e responsivo.
   Paleta: branco (#fff), cinza claro (#f5f5f4),
   carvão (#1D1D1B), amarelo (#FFD400), vermelho (#E63946).
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --color-bg: #ffffff;
  --color-bg-alt: #f5f5f4;
  --color-text: #1d1d1b;
  --color-muted: #5c5c58;
  --color-yellow: #ffd400;
  --color-yellow-dark: #e6be00;
  --color-red: #1d1d1b;
  --color-red-dark: #111111;
  --color-border: #e4e4e1;

  --maxw: 1140px;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.08);

  --font-display: "Poppins", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --space: 1rem;
  --header-h: 64px;
}

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

html {
  scroll-behavior: smooth;
  /* Compensa o header fixo nos links de âncora */
  scroll-padding-top: var(--header-h);
}

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

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 700;
}

p {
  margin: 0 0 1rem;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

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

.section {
  padding-block: 3.5rem;
}

.section-light {
  background: var(--color-bg-alt);
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 2.5rem;
}

.section-lead {
  color: var(--color-muted);
  font-size: 1.05rem;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-red);
  margin-bottom: 0.5rem;
}

.eyebrow-red {
  color: var(--color-red);
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease,
    border-color 0.15s ease, color 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-red {
  background: var(--color-yellow);
  color: #1d1d1b;
}

.btn-red:hover {
  background: var(--color-red);
  color: var(--color-yellow);
}

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

.btn-outline:hover {
  background: var(--color-text);
  color: #fff;
}

.btn-lg {
  padding: 0.9rem 1.8rem;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

/* Foco visível e acessível em todos os elementos interativos */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--color-yellow);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Logo ---------- */
.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}

.logo-flex {
  color: var(--color-red);
}

.logo-pisos {
  color: var(--color-yellow);
  /* Contorno sutil para legibilidade do amarelo sobre fundo claro */
  text-shadow: 0 0 1px rgba(0, 0, 0, 0.25);
}

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--color-border);
}

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

.primary-nav .nav-list {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding-block: 0.25rem;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--color-red);
  transition: width 0.2s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-cta-item .btn {
  padding: 0.55rem 1.2rem;
}

/* Hamburger (escondido no desktop) */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
}

.hamburger-bar {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

/* Estado "aberto" do hamburger */
.hamburger[aria-expanded="true"] .hamburger-bar:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
.hamburger[aria-expanded="true"] .hamburger-bar:nth-child(2) {
  opacity: 0;
}
.hamburger[aria-expanded="true"] .hamburger-bar:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding-block: 3.5rem 4rem;
  background:
    radial-gradient(1200px 400px at 80% -10%, rgba(255, 212, 0, 0.14), transparent 60%),
    radial-gradient(900px 400px at 0% 110%, rgba(29, 29, 27, 0.06), transparent 55%);
}

.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(2rem, 6vw, 3.25rem);
  font-weight: 800;
}

.hero-sub {
  color: var(--color-muted);
  font-size: 1.1rem;
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

/* Bloco visual decorativo (sem imagem externa) */
.hero-visual {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: grid;
  place-items: center;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}

/* ============================================================
   SOBRE
   ============================================================ */
.sobre-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.sobre-copy h2 {
  font-size: clamp(1.6rem, 4vw, 2.25rem);
}

.stats {
  display: grid;
  gap: 1rem;
}

.stat {
  background: #fff;
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-yellow);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow-sm);
}

.stat-number {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.9rem;
  color: var(--color-text);
}

.stat-label {
  color: var(--color-muted);
  font-size: 0.95rem;
}

/* ============================================================
   SERVIÇOS (cards)
   ============================================================ */
.card-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-yellow);
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(255, 212, 0, 0.15);
  color: var(--color-red);
  margin-bottom: 1rem;
}

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

.card-title {
  font-size: 1.2rem;
  margin-bottom: 0.4rem;
}

.card-text {
  color: var(--color-muted);
  margin: 0;
  font-size: 0.97rem;
}

/* ============================================================
   DIFERENCIAIS
   ============================================================ */
.diff-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

.diff {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.diff-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--color-yellow);
  color: var(--color-text);
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.diff-title {
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.diff-text {
  color: var(--color-muted);
  margin: 0;
  font-size: 0.97rem;
}

/* ============================================================
   GALERIA
   ============================================================ */
.gallery-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
}

.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--color-bg-alt);
  box-shadow: var(--shadow-sm);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.gallery-item:hover img {
  transform: scale(1.06);
}

/* ============================================================
   CONTATO
   ============================================================ */
.contato-grid {
  display: grid;
  gap: 2.5rem;
  align-items: start;
}

.contato-info h2 {
  font-size: clamp(1.6rem, 4vw, 2.25rem);
}

.contact-list {
  margin-top: 1.5rem;
  display: grid;
  gap: 1rem;
}

.contact-list li {
  display: grid;
  gap: 0.15rem;
}

.contact-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-red);
  font-weight: 600;
}

.contact-value {
  font-weight: 500;
}

.contact-value:hover {
  color: var(--color-red);
}

/* Formulário */
.contato-form {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.field {
  margin-bottom: 1.1rem;
}

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.req {
  color: var(--color-red);
}

.field input,
.field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  color: var(--color-text);
  padding: 0.7rem 0.85rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--color-red);
  box-shadow: 0 0 0 3px rgba(29, 29, 27, 0.15);
}

.field textarea {
  resize: vertical;
}

/* Estado de erro (adicionado via JS) */
.field.has-error input,
.field.has-error textarea {
  border-color: var(--color-red);
  box-shadow: 0 0 0 3px rgba(29, 29, 27, 0.15);
}

.field-error {
  color: var(--color-red);
  font-size: 0.85rem;
  margin: 0.35rem 0 0;
}

.form-success {
  margin: 1rem 0 0;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 212, 0, 0.18);
  border: 1px solid var(--color-yellow);
  color: var(--color-text);
  font-weight: 500;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--color-text);
  color: #f3f3f1;
  padding-top: 3rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  padding-bottom: 2.5rem;
}
.footer-brand .logo-flex {
  color: #fff;
}

.footer-brand .logo-pisos {
  text-shadow: none;
}

.footer-tagline {
  color: #b9b9b4;
  margin-top: 0.75rem;
  max-width: 30ch;
}

.footer-heading {
  font-size: 1rem;
  margin-bottom: 0.85rem;
  color: #fff;
}

.footer-nav ul,
.social-list {
  display: grid;
  gap: 0.6rem;
}

.footer-nav a,
.social-list a {
  color: #b9b9b4;
  transition: color 0.15s ease;
}

.footer-nav a:hover,
.social-list a:hover {
  color: var(--color-yellow);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-block: 1.25rem;
  font-size: 0.9rem;
  color: #9a9a95;
}

.footer-bottom p {
  margin: 0;
}

/* ============================================================
   RESPONSIVE — breakpoints
   ============================================================ */

/* Tablet: 2 colunas em cards/diferenciais */
@media (min-width: 600px) {
  .card-grid,
  .diff-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

/* Desktop */
@media (min-width: 900px) {
  .section {
    padding-block: 5rem;
  }

  .hero {
    padding-block: 5rem 6rem;
  }

  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
  }

  .sobre-grid {
    grid-template-columns: 1.2fr 0.8fr;
  }

  .contato-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }

  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr;
  }
}

/* Desktop: nav visível, hamburger escondido */
@media (min-width: 820px) {
  .hamburger {
    display: none;
  }

  .primary-nav .nav-list {
    flex-direction: row;
  }
}

/* Mobile: nav vira menu dropdown */
@media (max-width: 819px) {
  .hamburger {
    display: flex;
  }

  .primary-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    /* Escondido por padrão */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .primary-nav.is-open {
    max-height: 420px;
  }

  .primary-nav .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 1.25rem 1.25rem;
  }

  .primary-nav .nav-link {
    display: block;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--color-border);
  }

  .primary-nav .nav-link::after {
    display: none;
  }

  .nav-cta-item {
    margin-top: 0.85rem;
  }

  .nav-cta-item .btn {
    width: 100%;
  }
}

/* Respeita usuários que pedem menos movimento */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}
