/* ============================================================
   Grilo & Filhos — folha de estilo principal
   Paleta industrial: betão, aço e o vermelho da marca.
   ============================================================ */

:root {
  /* Brand colours sampled from the GRILO BETÃO logo */
  --brand:        #cc282e;
  --brand-dark:   #a01d22;
  --brand-tint:   #fdf2f3;
  --navy:         #050c99;
  --navy-dark:    #03086b;
  --navy-tint:    #f1f2fd;

  --ink:          #14161a;
  --ink-2:        #23272e;
  --ink-3:        #4a515b;
  --concrete:     #6f7681;
  --line:         #e2e5e9;
  --line-dark:    #343a43;
  --paper:        #ffffff;
  --paper-2:      #f4f5f7;

  --wrap:         1180px;
  --gutter:       clamp(20px, 5vw, 48px);
  --radius:       4px;
  --header-h:     72px;

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

  --shadow-sm: 0 1px 2px rgba(20, 22, 26, .06), 0 2px 8px rgba(20, 22, 26, .04);
  --shadow-md: 0 4px 12px rgba(20, 22, 26, .08), 0 12px 32px rgba(20, 22, 26, .07);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  color: var(--ink);
  line-height: 1.12;
  letter-spacing: -.022em;
  margin: 0;
  font-weight: 800;
}

a { color: inherit; }

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

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--brand); color: #fff; padding: 12px 20px; font-weight: 700;
}
.skip:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}

/* ─── Botões ─────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 28px;
  font: inherit; font-weight: 700; font-size: 16px;
  letter-spacing: .01em;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color .18s, border-color .18s, color .18s, transform .18s;
}
.btn svg { width: 19px; height: 19px; flex: none; }
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }

.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.btn-ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; }

.btn-block { width: 100%; }

.link {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color .18s;
}
.link:hover { border-bottom-color: var(--brand); }
.link span { transition: transform .18s; }
.link:hover span { transform: translateX(3px); }

/* ─── Cabeçalho ──────────────────────────────────────────── */

.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: rgba(20, 22, 26, .92);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  transition: background-color .25s;
}
.site-header.is-scrolled { background: rgba(20, 22, 26, .98); }

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

/* On dark surfaces we use logo-light.svg: the signature red G/B is kept, while
   the navy letters and tagline are knocked out to white so they stay legible.
   img/logo.svg holds the full-colour original for light backgrounds and print. */
.brand {
  display: flex; align-items: center;
  text-decoration: none;
  flex: none;
  transition: opacity .18s ease;
}
.brand:hover { opacity: .82; }
.brand:focus-visible { outline: 3px solid var(--brand); outline-offset: 6px; border-radius: 2px; }

.brand-logo {
  display: block;
  width: auto; height: 40px;
  max-width: 100%;
}

@media (max-width: 560px) {
  .brand-logo { height: 29px; }
}

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 9px 14px;
  color: rgba(255,255,255,.78);
  font-size: 15px; font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  transition: color .18s, background-color .18s;
}
.nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav a.is-active { color: #fff; }

.nav .nav-cta {
  margin-left: 12px;
  padding: 10px 20px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  letter-spacing: .01em;
}
.nav .nav-cta:hover { background: var(--brand-dark); }

.burger {
  display: none;
  width: 44px; height: 44px;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  background: none; border: 0; cursor: pointer; padding: 0;
}
.burger span {
  display: block; width: 22px; height: 2px; background: #fff;
  transition: transform .22s, opacity .18s;
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── Hero ───────────────────────────────────────────────── */

.hero {
  position: relative;
  background: var(--ink);
  color: #fff;
  overflow: hidden;
}

/* A imagem real entra aqui (img/hero.jpg). O gradiente por baixo
   garante que a secção continua legível se a foto ainda não existir. */
.hero-media {
  position: absolute; inset: 0;
  background-color: #1b1f25;
  background-image:
    linear-gradient(105deg, rgba(20,22,26,.96) 0%, rgba(20,22,26,.86) 45%, rgba(20,22,26,.55) 100%),
    radial-gradient(1200px 600px at 78% 18%, rgba(204,40,46,.30), transparent 62%),
    url("../../img/hero.jpg");
  background-size: cover;
  background-position: center 62%;
}
.hero-media::after {
  /* textura fina, evoca granulado de betão */
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  opacity: .05;
  mix-blend-mode: overlay;
}

.hero-inner {
  position: relative;
  padding-block: clamp(80px, 13vw, 148px) clamp(72px, 11vw, 128px);
  max-width: calc(var(--wrap) - 0px);
}

.eyebrow {
  display: inline-flex; align-items: center;
  margin: 0 0 22px;
  padding: 7px 15px;
  background: rgba(200,16,46,.16);
  border-left: 3px solid var(--brand);
  color: #fff;
  font-size: 12.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .14em;
}

.hero h1 {
  max-width: 15ch;
  margin: 0 0 26px;
  color: #fff;
  font-size: clamp(2.6rem, 6.4vw, 4.6rem);
  letter-spacing: -.033em;
  line-height: 1.03;
}

.lede {
  max-width: 56ch;
  margin: 0 0 38px;
  color: rgba(255,255,255,.82);
  font-size: clamp(1.05rem, 1.7vw, 1.24rem);
  line-height: 1.62;
}
.lede strong { color: #fff; font-weight: 700; }

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

.hero-strip {
  position: relative;
  background: rgba(255,255,255,.045);
  border-top: 1px solid rgba(255,255,255,.10);
}
.strip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.strip-item {
  padding: 26px 28px 26px 0;
  border-left: 1px solid rgba(255,255,255,.10);
  padding-left: 28px;
}
.strip-item:first-child { border-left: 0; padding-left: 0; }
.strip-item strong {
  display: block; color: #fff;
  font-size: 15px; font-weight: 700; letter-spacing: -.01em;
  margin-bottom: 3px;
}
.strip-item span {
  color: rgba(255,255,255,.58);
  font-size: 14px; line-height: 1.45;
}

/* ─── Secções ────────────────────────────────────────────── */

.section { padding-block: clamp(64px, 9vw, 112px); }
.section-alt { background: var(--paper-2); border-block: 1px solid var(--line); }
.section-dark { background: var(--ink); color: rgba(255,255,255,.78); }
.section-dark h2, .section-dark h3 { color: #fff; }

.tag {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 18px;
  color: var(--brand);
  font-size: 12.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .15em;
}
.tag i {
  font-style: normal;
  padding: 3px 9px;
  background: var(--brand);
  color: #fff;
  font-size: 11.5px;
  letter-spacing: .06em;
}
.section-dark .tag { color: #ff8296; }

.section-head { max-width: 44rem; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  margin-bottom: 14px;
}
.section-sub {
  margin: 0;
  color: var(--concrete);
  font-size: 1.06rem;
}
.section-dark .section-sub { color: rgba(255,255,255,.6); }

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.grid-2 h2 { font-size: clamp(1.75rem, 3.1vw, 2.35rem); }

.prose p { margin: 0 0 20px; color: var(--ink-3); }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--ink); font-weight: 700; }

/* ─── Cartões de produto ─────────────────────────────────── */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  display: flex; flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #d3d7dd;
}

/* O cartão principal ocupa a largura toda da primeira linha. */
.card-lead {
  grid-column: 1 / -1;
  flex-direction: row;
}
.card-lead .card-media { flex: 0 0 46%; min-height: 260px; }
.card-lead .card-body { padding: clamp(28px, 4vw, 44px); align-self: center; }
.card-lead h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); }

.card-media {
  aspect-ratio: 16 / 10;
  background-color: #cfd3d8;
  background-size: cover;
  background-position: center;
  border-bottom: 3px solid var(--brand);
  position: relative;
}
.card-lead .card-media { aspect-ratio: auto; border-bottom: 0; border-right: 3px solid var(--brand); }

/* Fundos-base por produto — substituídos pela foto quando existir. */
.card-media[data-img="betao"]    { background-image: linear-gradient(140deg, rgba(20,22,26,.10), rgba(20,22,26,.38)), url("../../img/betao.jpg"); }
.card-media[data-img="cimento"]  { background-image: linear-gradient(140deg, rgba(20,22,26,.08), rgba(20,22,26,.34)), url("../../img/cimento.jpg"); }
.card-media[data-img="gravilha"] { background-image: linear-gradient(140deg, rgba(20,22,26,.08), rgba(20,22,26,.34)), url("../../img/gravilha.jpg"); }
.card-media[data-img="areia"]    { background-image: linear-gradient(140deg, rgba(20,22,26,.06), rgba(20,22,26,.30)), url("../../img/areia.jpg"); }

.card-body { padding: 26px 26px 30px; }
.card-body h3 { font-size: 1.3rem; margin-bottom: 10px; }
.card-body p { margin: 0 0 16px; color: var(--ink-3); font-size: .98rem; }
.card-body p:last-child { margin-bottom: 0; }

/* ─── Processo ───────────────────────────────────────────── */

.steps {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  counter-reset: step;
}
.steps li {
  padding: 34px 30px 32px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.10);
  border-top: 3px solid var(--brand);
  border-radius: var(--radius);
}
.step-n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px;
  margin-bottom: 18px;
  background: var(--brand);
  color: #fff;
  font-size: 19px; font-weight: 800;
  border-radius: var(--radius);
}
.steps h3 { font-size: 1.2rem; margin-bottom: 10px; }
.steps p { margin: 0; color: rgba(255,255,255,.68); font-size: .98rem; }
.steps strong { color: #fff; font-weight: 700; }

/* ─── Galeria ────────────────────────────────────────────── */

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.gallery figure {
  margin: 0;
  aspect-ratio: 4 / 3;
  background-color: #d5d9de;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .25s, filter .25s;
}
.gallery figure:hover { transform: scale(1.015); filter: saturate(1.08); }

.gallery figure[data-img="g1"] { background-image: linear-gradient(160deg, rgba(20,22,26,.10), rgba(20,22,26,.36)), url("../../img/galeria-1.jpg"); }
.gallery figure[data-img="g2"] { background-image: linear-gradient(160deg, rgba(20,22,26,.10), rgba(20,22,26,.36)), url("../../img/galeria-2.jpg"); }
.gallery figure[data-img="g3"] { background-image: linear-gradient(160deg, rgba(20,22,26,.10), rgba(20,22,26,.36)), url("../../img/galeria-3.jpg"); }
.gallery figure[data-img="g4"] { background-image: linear-gradient(160deg, rgba(20,22,26,.10), rgba(20,22,26,.36)), url("../../img/galeria-4.jpg"); }
.gallery figure[data-img="g5"] { background-image: linear-gradient(160deg, rgba(20,22,26,.10), rgba(20,22,26,.36)), url("../../img/galeria-5.jpg"); background-position: center 42%; }

/* ─── Contactos ──────────────────────────────────────────── */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

.contact-info { display: grid; gap: 30px; }

.info-block h3 {
  margin: 0 0 10px;
  color: var(--concrete);
  font-size: 12px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .14em;
}
.big-link {
  display: block;
  color: var(--ink);
  font-size: 1.3rem; font-weight: 700;
  letter-spacing: -.015em;
  text-decoration: none;
  margin-bottom: 4px;
  transition: color .18s;
}
.big-link:hover { color: var(--brand); }
.big-link em { color: var(--concrete); font-size: .95rem; font-style: normal; font-weight: 500; }

.info-block address {
  font-style: normal;
  color: var(--ink-3);
  margin-bottom: 10px;
  line-height: 1.6;
}

.hours { border-collapse: collapse; width: 100%; max-width: 360px; }
.hours th, .hours td {
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: .97rem;
}
.hours th { color: var(--ink-3); font-weight: 600; }
.hours td { color: var(--ink); font-weight: 700; text-align: right; }
.hours tr:last-child th, .hours tr:last-child td { border-bottom: 0; }

/* ─── Formulário ─────────────────────────────────────────── */

.contact-form {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--brand);
  border-radius: var(--radius);
  padding: clamp(26px, 4vw, 38px);
  box-shadow: var(--shadow-sm);
}

.field { margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.field label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 14px; font-weight: 700;
}
.field label em { color: var(--concrete); font-style: normal; font-weight: 500; }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 15px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .18s, box-shadow .18s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 0;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(200,16,46,.14);
}
.field input.is-invalid, .field textarea.is-invalid {
  border-color: var(--brand);
  background: var(--brand-tint);
}

.form-note {
  margin: 16px 0 0;
  color: var(--concrete);
  font-size: 14px;
  line-height: 1.5;
}
.form-note a { color: var(--brand); font-weight: 700; }
.form-note.is-error { color: var(--brand); font-weight: 600; }

/* ─── Rodapé ─────────────────────────────────────────────── */

.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,.62);
  padding-top: clamp(48px, 6vw, 72px);
  font-size: 15px;
}
.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr));
  gap: 40px;
  padding-bottom: 44px;
}
.footer-brand { color: var(--brand); }
.footer-logo {
  display: block;
  width: auto; height: 40px;
  margin-bottom: 18px;
}
.footer-brand p { margin: 0; color: rgba(255,255,255,.62); max-width: 34ch; }
.footer-brand strong { color: #fff; font-weight: 700; }

.footer-col { display: flex; flex-direction: column; gap: 9px; }
.footer-col h4 {
  margin: 0 0 6px;
  color: #fff;
  font-size: 12px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .14em;
}
.footer-col a, .footer-col span {
  color: rgba(255,255,255,.62);
  text-decoration: none;
  line-height: 1.5;
  transition: color .18s;
}
.footer-col a:hover { color: #fff; }

.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 8px 24px;
  justify-content: space-between; align-items: center;
  padding-block: 22px;
  border-top: 1px solid rgba(255,255,255,.10);
  font-size: 13.5px;
  color: rgba(255,255,255,.42);
}
.footer-bottom p { margin: 0; }

/* ─── Animação de entrada ────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s cubic-bezier(.22,.61,.36,1);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ─── Responsivo ─────────────────────────────────────────── */

@media (max-width: 980px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .card-lead { flex-direction: column; }
  .card-lead .card-media {
    flex: none; width: 100%; min-height: 0; aspect-ratio: 16 / 9;
    border-right: 0; border-bottom: 3px solid var(--brand);
  }
  .steps { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .strip-grid { grid-template-columns: repeat(2, 1fr); }
  .strip-item:nth-child(3) { border-left: 0; padding-left: 0; }
  .strip-item { padding-block: 20px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }

  .burger { display: flex; }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px var(--gutter) 24px;
    background: rgba(20,22,26,.99);
    border-bottom: 1px solid rgba(255,255,255,.10);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav a {
    padding: 15px 4px;
    font-size: 17px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    border-radius: 0;
  }
  .nav a:hover { background: none; }
  .nav .nav-cta {
    margin: 18px 0 0;
    padding: 15px;
    text-align: center;
    border-bottom: 0;
    border-radius: var(--radius);
  }

  .cards { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { justify-content: flex-start; }
  .hero-actions .btn { flex: 1 1 auto; }
}

@media (max-width: 460px) {
  .strip-grid { grid-template-columns: 1fr; }
  .strip-item { border-left: 0; padding-left: 0; padding-block: 16px; }
  .strip-item + .strip-item { border-top: 1px solid rgba(255,255,255,.10); }
}

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

@media print {
  .site-header, .burger, .hero-media, .contact-form, .gallery { display: none !important; }
  body { color: #000; font-size: 12pt; }
  .section { padding-block: 18pt; }
}

/* ── Facebook / social link ──────────────────────────────────────
   Deliberately a plain link, not the Facebook Page Plugin: the SDK
   sets tracking cookies before consent, which would oblige us to add
   a cookie banner under GDPR. This costs zero requests and zero KB. */
.social {
  display: inline-flex; align-items: center; gap: 13px;
  text-decoration: none;
  padding: 13px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.social:hover {
  border-color: #1877f2;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.social:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }

.social svg { width: 26px; height: 26px; color: #1877f2; flex: none; }

.social-text { display: flex; flex-direction: column; line-height: 1.25; }
.social-text strong { font-weight: 700; color: var(--ink); font-size: 15px; }
.social-text em {
  font-style: normal; font-size: 13px; color: var(--concrete);
}
