/* ==========================================================================
   Bedaril — Construção Civil e Obras Públicas
   Landing page única (PT + EN). Sem framework nem build step.
   Direção visual: sóbria e robusta (hero fotográfico, sans-serif forte),
   com a paleta azul do logótipo e os blocos do símbolo como motivo gráfico.
   ========================================================================== */

/* ---------- Tokens ------------------------------------------------------- */
:root {
  /* Marca (amostrada do logótipo original) */
  --navy:      #012765;
  --navy-900:  #00163D;
  --navy-950:  #000E28;
  --blue:      #1572B9;
  --sky:       #8AB7E3;
  --pale:      #BBD7F0;

  /* Neutros */
  --paper:     #FAF9F6;
  --stone:     #F1EFEA;
  --ink:       #0D1A2E;
  --muted:     #586377;
  --line:      rgba(1, 39, 101, .14);
  --line-inv:  rgba(255, 255, 255, .16);
  --white:     #fff;

  /* Tipografia */
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --sans:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --fs-hero: clamp(2.5rem, 5.6vw, 5.6rem);
  --fs-h2:   clamp(2rem, 4vw, 3.5rem);
  --fs-h3:   clamp(1.45rem, 2.3vw, 2rem);
  --fs-lead: clamp(1.08rem, 1.4vw, 1.25rem);
  --fs-body: 1.0625rem;
  --fs-small:.875rem;
  --fs-eyebrow: .75rem;

  /* Espaço */
  --gutter: clamp(1rem, 4vw, 3.5rem);
  --wrap:   1320px;
  --sect:   clamp(5rem, 11vw, 9.5rem);

  --radius: 2px;
  --ease:   cubic-bezier(.2, .7, .1, 1);
  --header-h: 92px;
}

/* ---------- Base --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
p { margin: 0 0 1.1em; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.06; letter-spacing: -.02em; }
h1, h2, h3 { font-family: var(--display); font-stretch: 108%; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; }
::selection { background: var(--pale); color: var(--navy); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 200;
  background: var(--white); color: var(--navy); padding: .7rem 1rem;
}
.skip-link:focus { top: 1rem; }

/* Etiqueta pequena em maiúsculas espaçadas (como na referência) */
.eyebrow {
  display: inline-flex; align-items: center; gap: .9rem;
  font-family: var(--sans); font-size: var(--fs-eyebrow); font-weight: 500;
  letter-spacing: .28em; text-transform: uppercase; color: var(--blue);
  margin-bottom: 1.6rem;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; background: currentColor; flex: none; }
.on-dark .eyebrow, .eyebrow--light { color: var(--sky); }

.lead { font-size: var(--fs-lead); line-height: 1.6; color: var(--muted); font-weight: 300; }
.on-dark .lead { color: rgba(255,255,255,.74); }
.on-dark { color: var(--white); }

/* ---------- Botões -------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .7rem;
  min-height: 54px; padding: .9rem 1.9rem;
  font-family: var(--sans); font-size: .8rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; line-height: 1;
  border: 1px solid currentColor; border-radius: var(--radius); background: transparent;
  transition: background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn--ghost-light { color: var(--white); border-color: rgba(255,255,255,.75); }
.btn--ghost-light:hover { background: var(--white); color: var(--navy); border-color: var(--white); }
.btn--solid { background: var(--navy); color: var(--white); border-color: var(--navy); }
.btn--solid:hover { background: var(--blue); border-color: var(--blue); }
.btn--light { background: var(--white); color: var(--navy); border-color: var(--white); }
.btn--light:hover { background: var(--pale); border-color: var(--pale); }
.btn--ghost { color: var(--navy); border-color: var(--navy); }
.btn--ghost:hover { background: var(--navy); color: var(--white); }

.link-arrow {
  display: inline-flex; align-items: center; gap: .65rem;
  font-size: .78rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase;
  color: var(--navy); padding-bottom: .35rem; border-bottom: 1px solid var(--line);
  transition: gap .3s var(--ease), border-color .3s var(--ease);
}
.link-arrow:hover { gap: 1rem; border-color: var(--navy); }
.link-arrow svg { width: 15px; height: 15px; }

/* ---------- Abertura (só na página inicial, uma vez por sessão) ----------
   1. Contador 1981 → 2026 com uma linha de 45 blocos, um por ano.
   2. Os blocos juntam-se e formam o símbolo do logótipo.
   3. Os blocos do símbolo crescem como janelas e revelam o site por baixo.
   A coreografia está em main.js (intro). Sem JS, a rede de segurança abaixo
   esconde a abertura aos 7s. */
.intro {
  position: fixed; inset: 0; z-index: 1000; background: var(--navy-900); color: var(--white);
  overflow: hidden; cursor: default; user-select: none; -webkit-user-select: none;
  animation: intro-failsafe 0s linear 7s forwards;
}
.intro.is-running { animation: none; }
.intro.is-revealing { background: transparent; }
.intro.is-leaving { opacity: 0; transition: opacity .5s ease; pointer-events: none; }
@keyframes intro-failsafe { to { visibility: hidden; opacity: 0; } }

.intro__svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.intro__tiles rect { opacity: 0; transform-box: fill-box; transform-origin: center; }
.is-converging .intro__tiles rect { animation: tile-in .55s var(--ease) forwards; }
.is-converging .intro__tiles rect:nth-child(2) { animation-delay: .07s; }
.is-converging .intro__tiles rect:nth-child(3) { animation-delay: .14s; }
.is-converging .intro__tiles rect:nth-child(4) { animation-delay: .21s; }
.is-converging .intro__tiles rect:nth-child(5) { animation-delay: .28s; }
.is-converging .intro__tiles rect:nth-child(6) { animation-delay: .35s; }
.intro__tiles { transition: opacity .35s ease; }
.is-revealing .intro__tiles { opacity: 0; }

.intro__eyebrow {
  position: absolute; left: 0; right: 0; top: calc(50% - 9.5rem); margin: 0; text-align: center;
  font-size: .72rem; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: var(--sky);
  opacity: 0; animation: fade-up .7s var(--ease) .15s forwards; transition: opacity .35s ease;
}
.intro__count { position: absolute; left: 0; right: 0; top: calc(50% - 6.6rem); height: 8rem; text-align: center; transition: opacity .35s ease; }
.intro__year, .intro__label {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--display); font-weight: 800; font-stretch: 112%; line-height: 1; letter-spacing: -.04em;
  font-size: clamp(4.4rem, 13vw, 8.5rem); font-variant-numeric: tabular-nums;
  transition: opacity .45s ease, transform .6s var(--ease);
}
.intro__year { opacity: 0; animation: fade-up .6s var(--ease) .05s forwards; }
.intro__label { color: var(--sky); opacity: 0; transform: translateY(18px); text-transform: uppercase; }
.is-counted .intro__year { animation: none; opacity: 0; transform: translateY(-18px); }
.is-counted .intro__label { opacity: 1; transform: none; }

.intro__line {
  position: absolute; left: 0; right: 0; margin: 0 auto; top: calc(50% + 3.2rem);
  width: min(640px, 84vw); display: flex; gap: 3px;
  opacity: 0; animation: fade-up .6s var(--ease) .1s forwards;
}
.intro__line i {
  flex: 1; height: 9px; background: rgba(255, 255, 255, .1);
  transition: background-color .2s ease, transform .6s cubic-bezier(.7, 0, .3, 1), opacity .5s ease;
}
.intro__line i.is-on { background: var(--sky); }
.intro__line i.is-on:nth-child(3n) { background: var(--blue); }
.intro__line i.is-on:nth-child(5n) { background: var(--pale); }
.is-counted .intro__line i.is-on { background: var(--white); }
.is-converging .intro__line i { transform: translateX(var(--dx, 0)) scale(.3); opacity: 0; transition-delay: var(--d, 0s); }
.is-converging .intro__count, .is-converging .intro__eyebrow { opacity: 0; }

.intro__word { position: absolute; width: 190px; height: auto; opacity: 0; transition: opacity .5s ease .35s; transform-origin: 0 0; }
.is-converging .intro__word { opacity: 1; }
.is-revealing .intro__word { transition: transform 1s cubic-bezier(.7, 0, .2, 1), opacity .3s ease; }

.intro__skip {
  position: absolute; right: 1.4rem; bottom: calc(1.4rem + env(safe-area-inset-bottom));
  background: transparent; border: 1px solid var(--line-inv); color: rgba(255,255,255,.65);
  font-size: .68rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  padding: .6rem 1.1rem; border-radius: 40px; transition: color .3s, border-color .3s, opacity .3s;
}
.intro__skip:hover { color: var(--white); border-color: rgba(255,255,255,.5); }
.is-revealing .intro__skip { opacity: 0; }
@media (max-width: 640px) {
  .intro__eyebrow { top: calc(50% - 7.6rem); font-size: .62rem; letter-spacing: .22em; padding: 0 1rem; }
  .intro__count { top: calc(50% - 5.4rem); height: 6rem; }
  .intro__line { top: calc(50% + 1.8rem); gap: 2px; }
  .intro__line i { height: 7px; }
  .intro__word { width: 150px; }
}

/* Entrada do hero depois da abertura */
.hero__main > *, .hero__bar, .seal, .site-header .brand { transition: opacity 1s var(--ease), transform 1s var(--ease); }
.hero__main > :nth-child(2) { transition-delay: .08s; }
.hero__main > :nth-child(3) { transition-delay: .16s; }
.hero__main > :nth-child(4) { transition-delay: .24s; }
.hero__bar { transition-delay: .32s; }
.intro-running .hero__main > *, .intro-running .hero__bar, .intro-running .seal { opacity: 0; transform: translateY(26px); }
.intro-running .site-header .brand { opacity: 0; transition: none; }

@keyframes tile-in { from { opacity: 0; transform: translateY(14px) scale(.6); } to { opacity: 1; transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Cabeçalho ----------------------------------------------------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 100; color: var(--white);
  transition: background-color .4s var(--ease), padding .4s var(--ease), box-shadow .4s var(--ease);
  padding: 1.6rem 0;
}
.site-header.is-scrolled {
  background: rgba(0, 22, 61, .92);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  padding: .8rem 0; box-shadow: 0 1px 0 var(--line-inv);
}
.site-header__inner {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.5rem;
  max-width: 1600px; margin: 0 auto; padding: 0 var(--gutter);
}
.nav { display: flex; align-items: center; gap: clamp(1.25rem, 2.4vw, 2.6rem); }
.nav--right { justify-content: flex-end; }
.nav a {
  position: relative; font-size: .76rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  padding: .35rem 0; white-space: nowrap;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease);
}
.nav a:hover::after, .nav a[aria-current="true"]::after { transform: scaleX(1); transform-origin: left; }
.nav .nav__phone { letter-spacing: .1em; font-weight: 600; }
.langswitch { display: flex; gap: .8rem; font-size: .74rem; font-weight: 500; letter-spacing: .16em; }
.langswitch a { opacity: .55; padding: .35rem .15rem; }
.langswitch a[aria-current="page"] { opacity: 1; }
.langswitch a::after { display: none; }
.langswitch > span { display: none; }

.brand { display: grid; justify-items: center; gap: .45rem; line-height: 1; }
.brand__word { width: clamp(118px, 11vw, 158px); height: auto; transition: width .4s var(--ease); }
.is-scrolled .brand__word { width: clamp(108px, 9vw, 132px); }
.brand__sub { font-size: .58rem; letter-spacing: .5em; text-transform: uppercase; opacity: .78; padding-left: .5em; }

.nav-toggle {
  display: none; width: 46px; height: 46px; border: 0; background: transparent; padding: 0;
  align-items: center; justify-content: center; margin-left: auto;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 24px; height: 1.5px; background: currentColor; position: relative; content: "";
}
.nav-toggle span::before { position: absolute; top: -7px; }
.nav-toggle span::after  { position: absolute; top: 7px; width: 16px; }
.header-call { display: none; }

/* Menu mobile */
.mobile-nav {
  position: fixed; inset: 0; z-index: 300; background: var(--navy-900); color: var(--white);
  display: flex; flex-direction: column; padding: 1.4rem var(--gutter) 2rem; overflow-y: auto;
}
.mobile-nav[hidden] { display: none; }
.mobile-nav__top { display: flex; justify-content: space-between; align-items: center; }
.mobile-nav__close { width: 46px; height: 46px; border: 0; background: transparent; font-size: 2rem; line-height: 1; }
.mobile-nav ul { margin: 3rem 0 2rem; display: grid; gap: .3rem; }
.mobile-nav ul a { font-family: var(--display); font-weight: 700; font-stretch: 108%; font-size: 2rem; line-height: 1.4; display: block; letter-spacing: -.02em; }
.mobile-nav__foot { margin-top: auto; display: grid; gap: 1rem; font-size: .9rem; color: rgba(255,255,255,.7); }
.mobile-nav__foot .btn { width: 100%; }

/* ---------- Hero ---------------------------------------------------------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end; color: var(--white); overflow: hidden;
  background: var(--navy-950);
}
.hero__bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero__bg img, .hero__video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 68% 60%;
}
/* Ligeiramente mais sóbria e escura, para o texto e os botões ganharem destaque */
.hero__bg img { filter: saturate(.82) brightness(.9) contrast(1.05); animation: hero-zoom 14s ease-out both; }
.hero__video { opacity: 0; transition: opacity 1.2s ease; }
.hero__video.is-playing { opacity: 1; }
@keyframes hero-zoom { from { transform: scale(1.06); } to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .hero__bg img { animation: none; } }
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(0,14,40,.55) 0%, rgba(0,14,40,0) 22%),
    linear-gradient(90deg, rgba(0,22,61,.94) 0%, rgba(0,22,61,.82) 30%, rgba(0,22,61,.38) 56%, rgba(0,22,61,.05) 78%),
    linear-gradient(0deg, rgba(0,14,40,.75) 0%, rgba(0,14,40,0) 32%);
}
.hero__content {
  position: relative; z-index: 1; width: 100%; max-width: 1600px; margin: 0 auto;
  padding: calc(var(--header-h) + 3rem) var(--gutter) clamp(2.5rem, 6vh, 4rem);
}
.hero__main { max-width: 44rem; }
.hero__kicker {
  font-size: .76rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--pale);
  margin-bottom: 1.5rem; display: flex; align-items: center; gap: .8rem;
}
.hero__kicker::before { content: ""; width: 8px; height: 8px; background: var(--sky); flex: none; }
.hero h1 {
  font-family: var(--display); font-weight: 800; font-stretch: 112%; font-size: var(--fs-hero); line-height: .98;
  letter-spacing: -.025em; text-transform: uppercase; text-wrap: balance;
}
.hero h1 em { font-style: normal; color: var(--sky); }
.hero__lead {
  margin: 1.6rem 0 2.2rem; max-width: 36rem; font-size: clamp(1.02rem, 1.3vw, 1.18rem); line-height: 1.65;
  color: rgba(255,255,255,.88);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; }

/* Faixa de serviços na base do hero */
.hero__bar {
  position: relative; z-index: 1; width: 100%;
  background: rgba(0, 22, 61, .72); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line-inv);
}
.hero__bar ul { display: grid; grid-template-columns: repeat(5, 1fr); max-width: 1600px; margin: 0 auto; padding: 0 var(--gutter); }
.hero__bar li + li { border-left: 1px solid var(--line-inv); }
.hero__bar a { display: grid; gap: .25rem; padding: 1.35rem 1.4rem; transition: background-color .3s var(--ease); }
.hero__bar li:first-child a { padding-left: 0; }
.hero__bar a:hover { background: rgba(255,255,255,.06); }
.hero__bar b { font-family: var(--display); font-weight: 700; font-stretch: 108%; font-size: 1.02rem; letter-spacing: -.01em; }
.hero__bar span { font-size: .8rem; color: rgba(255,255,255,.66); }

/* Selo 45 anos */
.seal {
  position: absolute; z-index: 1; right: var(--gutter); top: calc(var(--header-h) + 3vh);
  background: rgba(0,22,61,.55); border-radius: 50%; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  width: clamp(104px, 10vw, 142px); aspect-ratio: 1; color: var(--white);
}
.seal svg { width: 100%; height: 100%; }
.seal__ring { animation: spin 38s linear infinite; transform-origin: 50% 50%; }
.seal text { font-family: var(--sans); font-weight: 600; font-size: 8px; letter-spacing: 2.6px; fill: currentColor; text-transform: uppercase; }
.seal__num { font-family: var(--display) !important; font-weight: 800; font-size: 34px !important; letter-spacing: -1px !important; }
.seal__lbl { font-size: 7px !important; letter-spacing: 3px !important; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .seal__ring { animation: none; } }

/* ---------- Faixa de números --------------------------------------------- */
.facts { background: var(--navy-900); color: var(--white); border-top: 1px solid var(--line-inv); }
.facts__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.fact { padding: clamp(2rem, 4vw, 3.2rem) clamp(1rem, 2.5vw, 2.4rem); border-left: 1px solid var(--line-inv); }
.fact:first-child { border-left: 0; padding-left: 0; }
.fact__num { font-family: var(--display); font-weight: 800; font-stretch: 110%; font-size: clamp(2.4rem, 4.2vw, 3.6rem); line-height: 1; letter-spacing: -.03em; display: block; margin-bottom: .7rem; }
.fact__num--text { font-size: clamp(1.4rem, 2.2vw, 1.9rem); line-height: 1.1; letter-spacing: -.02em; }
.fact__label { font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; color: var(--sky); }

/* ---------- Secções genéricas -------------------------------------------- */
.section { padding: var(--sect) 0; position: relative; }
.section--stone { background: var(--stone); }
.section--navy { background: var(--navy-900); color: var(--white); }
.section-head { max-width: 46rem; margin-bottom: clamp(3rem, 6vw, 5rem); }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head--center .eyebrow { justify-content: center; }
.section-head h2 { font-size: var(--fs-h2); margin-bottom: 1.4rem; text-wrap: balance; }
.section-head h2 em, .about h2 em { font-style: normal; color: var(--blue); }
.on-dark h2 em { color: var(--sky); font-style: normal; }

/* Motivo dos blocos do logótipo */
.blocks { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); gap: 3px; width: 64px; aspect-ratio: 588/558; }
.blocks i:nth-child(1) { grid-row: 1 / 3; background: var(--sky); }
.blocks i:nth-child(2) { background: var(--navy); }
.blocks i:nth-child(3) { background: var(--pale); }
.blocks i:nth-child(4) { grid-column: 2 / 4; background: var(--blue); }
.blocks i:nth-child(5) { background: var(--navy); }
.blocks i:nth-child(6) { grid-column: 2 / 4; background: var(--pale); }

/* ---------- Sobre / 45 anos ---------------------------------------------- */
.about__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(3rem, 7vw, 7rem); align-items: center; }
.about h2 { font-size: var(--fs-h2); margin-bottom: 1.8rem; }
.about__text p { color: var(--muted); }
.about__text p.lead { color: var(--ink); }
.about__sign { display: flex; align-items: center; gap: 1.2rem; margin-top: 2.2rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.about__sign strong { display: block; font-family: var(--display); font-size: 1.25rem; font-weight: 700; line-height: 1.1; color: var(--navy); }
.about__sign span { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.about__media { position: relative; padding: 0 0 18% 12%; }
.about__media .frame--main { aspect-ratio: 4 / 5; }
.about__media .frame--float {
  position: absolute; left: 0; bottom: 0; width: 52%; aspect-ratio: 1;
  border: 10px solid var(--paper); box-shadow: 0 30px 60px -30px rgba(0,22,61,.45);
}
.about__badge {
  position: absolute; right: -1rem; top: 9%; background: var(--navy); color: var(--white);
  padding: 1.3rem 1.5rem; text-align: center; box-shadow: 0 24px 50px -24px rgba(0,22,61,.6);
}
.about__badge b { display: block; font-family: var(--display); font-weight: 800; font-size: 3rem; line-height: .9; letter-spacing: -.03em; }
.about__badge span { font-size: .62rem; letter-spacing: .3em; text-transform: uppercase; color: var(--pale); }

.frame { position: relative; overflow: hidden; background: var(--navy-900); }
.frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }

/* Linha do tempo */
.timeline { margin-top: clamp(4.5rem, 9vw, 7.5rem); }
.timeline__head { display: flex; justify-content: space-between; align-items: end; gap: 2rem; margin-bottom: 3rem; flex-wrap: wrap; }
.timeline__head h3 { font-size: var(--fs-h3); max-width: 18ch; }
.timeline__list { display: grid; grid-template-columns: repeat(5, 1fr); position: relative; }
.timeline__list::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 1px; background: var(--line); }
.tl { position: relative; padding: 2.4rem 1.6rem 0 0; }
.tl::before {
  content: ""; position: absolute; top: 0; left: 0; width: 15px; height: 15px; background: var(--paper);
  border: 1px solid var(--navy); transform: rotate(45deg);
}
.tl--now::before { background: var(--blue); border-color: var(--blue); }
.tl__year { font-family: var(--display); font-weight: 800; font-stretch: 108%; font-size: clamp(1.7rem, 2.6vw, 2.4rem); line-height: 1; letter-spacing: -.03em; color: var(--navy); display: block; margin-bottom: .8rem; }
.tl h4 { font-family: var(--sans); font-size: .82rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; margin-bottom: .6rem; line-height: 1.4; }
.tl p { font-size: .95rem; color: var(--muted); margin: 0; }
.section--stone .tl::before { background: var(--stone); }
.section--stone .tl--now::before { background: var(--blue); }

/* ---------- Serviços ------------------------------------------------------ */
.services { display: grid; gap: clamp(5rem, 10vw, 8.5rem); }
.service { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: center; }
.service:nth-child(even) .service__media { order: 2; }
.service__media { position: relative; }
.service__media .frame { aspect-ratio: 5 / 4; }
.service__media:hover img { transform: scale(1.04); }
.service__num {
  position: absolute; top: -1.8rem; right: -1rem; z-index: 1;
  font-family: var(--display); font-weight: 800; font-size: clamp(4.5rem, 9vw, 8rem); line-height: 1; color: var(--pale);
  -webkit-text-stroke: 1px var(--blue); color: transparent; pointer-events: none;
}
.service:nth-child(even) .service__num { right: auto; left: -1rem; }
.service__body h3 { font-size: var(--fs-h3); margin-bottom: 1.2rem; color: var(--navy); }
.service__body > p { color: var(--muted); }
.service__list { margin: 1.6rem 0 2.2rem; display: grid; gap: .1rem; border-top: 1px solid var(--line); }
.service__list li {
  display: flex; gap: .9rem; align-items: baseline; padding: .8rem 0; border-bottom: 1px solid var(--line); font-size: .98rem;
}
.service__list li::before { content: ""; flex: none; width: 7px; height: 7px; background: var(--blue); transform: translateY(-2px); }
.service__body h3 { font-stretch: 108%; }

/* ---------- Obras --------------------------------------------------------- */
.works-head { display: flex; justify-content: space-between; align-items: end; gap: 2rem 3rem; flex-wrap: wrap; margin-bottom: 3rem; }
.works-head .section-head { margin-bottom: 0; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; }
.filters button {
  border: 1px solid var(--line-inv); background: transparent; color: rgba(255,255,255,.8);
  padding: .65rem 1.1rem; font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; border-radius: 40px;
  transition: all .3s var(--ease);
}
.filters button:hover { border-color: rgba(255,255,255,.5); color: var(--white); }
.filters button[aria-pressed="true"] { background: var(--white); border-color: var(--white); color: var(--navy); }

.works { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: clamp(150px, 17vw, 240px); gap: clamp(.5rem, 1vw, 1rem); }
.work { position: relative; overflow: hidden; grid-column: span 4; grid-row: span 2; background: var(--navy); }
.work--wide { grid-column: span 8; }
.work--tall { grid-row: span 3; }
.work.is-hidden { display: none; }
.work button { all: unset; display: block; position: absolute; inset: 0; cursor: zoom-in; }
.work button:focus-visible { outline: 2px solid var(--sky); outline-offset: -4px; }
.work img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease), opacity .5s; }
.work:hover img { transform: scale(1.05); }
.work__cap {
  position: absolute; inset: auto 0 0; padding: 3.5rem 1.4rem 1.2rem;
  background: linear-gradient(0deg, rgba(0,14,40,.88), transparent);
  display: grid; gap: .2rem;
}
.work__cap small { font-size: .66rem; letter-spacing: .22em; text-transform: uppercase; color: var(--sky); }
.work__cap strong { font-family: var(--display); font-weight: 700; font-size: 1.2rem; line-height: 1.2; }
/* Etiqueta temporária: retirar quando as fotos reais da Bedaril substituírem as ilustrativas */
.temp-tag {
  position: absolute; top: .8rem; left: .8rem; z-index: 1; font-size: .6rem; letter-spacing: .16em;
  text-transform: uppercase; background: rgba(0,14,40,.6); color: rgba(255,255,255,.85);
  padding: .3rem .6rem; border-radius: 30px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}

.refs { margin-top: clamp(4rem, 8vw, 6rem); display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 3rem; }
.refs h3 { font-size: var(--fs-h3); }
.refs__list { border-top: 1px solid var(--line-inv); }
.refs__list li { display: grid; grid-template-columns: 1fr auto; gap: .3rem 2rem; padding: 1.4rem 0; border-bottom: 1px solid var(--line-inv); }
.refs__list strong { font-weight: 400; font-size: 1.08rem; }
.refs__list span { color: rgba(255,255,255,.6); font-size: .88rem; }
.refs__list time { grid-row: 1 / 3; grid-column: 2; font-family: var(--display); font-weight: 700; font-size: 1.5rem; color: var(--sky); align-self: center; }

/* Lightbox */
.lightbox {
  border: 0; padding: 0; background: transparent; max-width: min(92vw, 1400px); max-height: 92vh; overflow: visible;
}
.lightbox::backdrop { background: rgba(0,10,28,.92); }
.lightbox img { max-width: min(92vw, 1400px); max-height: 82vh; width: auto; height: auto; margin: 0 auto; }
.lightbox p { color: rgba(255,255,255,.8); text-align: center; margin: 1rem 0 0; font-size: .9rem; letter-spacing: .06em; }
.lightbox__close {
  position: fixed; top: 1rem; right: 1rem; width: 48px; height: 48px; border: 1px solid var(--line-inv);
  border-radius: 50%; background: transparent; color: var(--white); font-size: 1.6rem; line-height: 1;
}

/* ---------- Processo ------------------------------------------------------ */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.step { padding: 2.4rem clamp(1rem, 2.4vw, 2.2rem) 0 0; border-right: 1px solid var(--line); padding-left: clamp(1rem, 2.4vw, 2.2rem); }
.step:first-child { padding-left: 0; }
.step:last-child { border-right: 0; }
.step__n { font-family: var(--display); font-weight: 800; font-size: 1.1rem; color: var(--blue); display: block; margin-bottom: 2.6rem; letter-spacing: .1em; }
.step h3 { font-size: 1.4rem; margin-bottom: .9rem; color: var(--navy); }
.step p { color: var(--muted); font-size: .98rem; margin: 0; }

/* ---------- Zonas --------------------------------------------------------- */
.areas { position: relative; color: var(--white); overflow: hidden; background: var(--navy-950); }
.areas__bg { position: absolute; inset: 0; }
.areas__bg img { width: 100%; height: 100%; object-fit: cover; opacity: .42; }
.areas__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,14,40,.95) 0%, rgba(0,14,40,.75) 45%, rgba(0,14,40,.35) 100%); }
.areas .wrap { position: relative; }
.areas__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(3rem, 6vw, 6rem); align-items: center; }
.areas h2 { font-size: var(--fs-h2); margin-bottom: 1.4rem; }
.towns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line-inv); border: 1px solid var(--line-inv); }
.towns li { background: rgba(0,14,40,.55); padding: 1.05rem 1rem; font-size: .92rem; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.towns li.is-hq { background: var(--blue); }
.towns li.is-hq small { display: block; font-size: .6rem; letter-spacing: .22em; text-transform: uppercase; color: var(--pale); }

/* ---------- FAQ ----------------------------------------------------------- */
.faq__grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(3rem, 6vw, 6rem); align-items: start; }
.faq__grid .section-head { position: sticky; top: 110px; }
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 1.5rem; align-items: center;
  padding: 1.5rem 0; font-family: var(--display); font-size: clamp(1.05rem, 1.5vw, 1.25rem); font-weight: 600; color: var(--navy); line-height: 1.35;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; flex: none; width: 14px; height: 14px; border-right: 1.5px solid var(--blue); border-bottom: 1.5px solid var(--blue);
  transform: rotate(45deg) translateY(-4px); transition: transform .35s var(--ease);
}
.faq-item[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.faq-item p { color: var(--muted); padding: 0 3rem 1.6rem 0; margin: 0; }

/* ---------- Contacto ------------------------------------------------------ */
.contact { background: var(--navy-900); color: var(--white); }
.contact__grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(3rem, 6vw, 6rem); }
.contact h2 { font-size: var(--fs-h2); margin-bottom: 1.4rem; }
.contact-list { margin-top: 2.6rem; border-top: 1px solid var(--line-inv); }
.contact-list li { display: grid; grid-template-columns: 2.6rem 1fr; gap: .2rem 1rem; padding: 1.2rem 0; border-bottom: 1px solid var(--line-inv); align-items: center; }
.contact-list svg { width: 20px; height: 20px; color: var(--sky); grid-row: 1 / 3; }
.contact-list small { font-size: .66rem; letter-spacing: .22em; text-transform: uppercase; color: var(--sky); }
.contact-list a, .contact-list span { font-size: 1.05rem; }
.contact-list a:hover { color: var(--pale); }

.form-card { background: var(--white); color: var(--ink); padding: clamp(1.8rem, 4vw, 3.4rem); position: relative; }
.form-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--navy) 0 33%, var(--blue) 33% 66%, var(--sky) 66%); }
.form-card h3 { font-size: 1.7rem; color: var(--navy); margin-bottom: .4rem; }
.form-card > p { color: var(--muted); font-size: .95rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.2rem; margin-top: 1.8rem; }
.field { display: grid; gap: .4rem; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 500; color: var(--navy); }
.field label .opt { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem; min-height: 50px;
  transition: border-color .25s, background-color .25s, box-shadow .25s; -webkit-appearance: none; appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23012765' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.6rem;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); background: var(--white); box-shadow: 0 0 0 3px rgba(21,114,185,.14); }
.field__error { display: none; margin: 0; font-size: .82rem; color: #B42318; }
.field.is-invalid input, .field.is-invalid select { border-color: #B42318; }
.field.is-invalid .field__error { display: block; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; margin-top: 1.6rem; }
.form-foot small { color: var(--muted); font-size: .8rem; max-width: 26rem; line-height: 1.5; }
.form-foot small a { text-decoration: underline; }
.form-error { display: none; color: #B42318; font-size: .9rem; margin: 1rem 0 0; }
.hp-field { position: absolute; left: -9999px; top: -9999px; }
.form-success { text-align: center; padding: 2rem 0; }
.form-success h3 { margin-bottom: .8rem; }
.form-success .blocks { margin: 0 auto 1.6rem; }

/* ---------- Rodapé -------------------------------------------------------- */
.site-footer { background: var(--navy-950); color: rgba(255,255,255,.72); padding: clamp(4rem, 8vw, 6rem) 0 calc(2rem + env(safe-area-inset-bottom)); font-size: .93rem; }
.footer__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 3rem; padding-bottom: 3.5rem; border-bottom: 1px solid var(--line-inv); }
.footer__brand { display: grid; gap: 1.4rem; align-content: start; }
.footer__logo { display: flex; align-items: center; gap: 1rem; }
.footer__logo .blocks { width: 46px; }
.footer__logo img { width: 150px; }
.footer__tagline { width: 230px; opacity: .85; }
.site-footer h4 { font-size: .7rem; letter-spacing: .24em; text-transform: uppercase; color: var(--sky); font-weight: 500; margin-bottom: 1.3rem; }
.site-footer li { margin-bottom: .55rem; }
.site-footer a:hover { color: var(--white); }
.footer__bottom { display: flex; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; padding-top: 2rem; font-size: .8rem; }
.footer__legal { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }

/* ---------- Barra fixa mobile -------------------------------------------- */
.callbar { display: none; }

/* ---------- Páginas de texto (legais / obrigado) -------------------------- */
.page-hero { background: var(--navy-900); color: var(--white); padding: calc(var(--header-h) + 4rem) 0 4rem; }
.page-hero h1 { font-family: var(--display); font-size: clamp(2rem, 4.4vw, 3.4rem); font-weight: 800; font-stretch: 108%; }
.page-hero p { color: rgba(255,255,255,.7); margin: 1rem 0 0; }
.prose { max-width: 46rem; padding: 4rem 0 6rem; }
.prose h2 { font-size: 1.9rem; color: var(--navy); margin: 2.6rem 0 1rem; }
.prose p, .prose li { color: #3d4757; }
.prose ul { list-style: disc; padding-left: 1.3rem; margin-bottom: 1.1em; }
.prose a { color: var(--blue); text-decoration: underline; }
.site-header--solid { background: var(--navy-900); }

/* ---------- Animações de entrada ----------------------------------------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-stagger > * { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal-stagger.is-visible > * { opacity: 1; transform: none; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: .08s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: .16s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: .24s; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: .32s; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: .40s; }
.reveal-stagger.is-visible > *:nth-child(n+7) { transition-delay: .46s; }
.reveal-mask > * { clip-path: inset(0 0 100% 0); transition: clip-path 1.3s var(--ease), transform 1.2s var(--ease); }
.reveal-mask.is-visible > * { clip-path: inset(0 0 0 0); }
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-stagger > *, .reveal-mask > * { opacity: 1 !important; transform: none !important; clip-path: none !important; transition: none !important; }
}
.no-js .reveal, .no-js .reveal-stagger > * { opacity: 1; transform: none; }
.no-js .reveal-mask > * { clip-path: none; }

/* ---------- Responsivo ---------------------------------------------------- */
@media (max-width: 1100px) {
  .nav { display: none; }
  .site-header__inner { grid-template-columns: auto 1fr auto; }
  .brand { justify-items: start; grid-column: 1; }
  .nav-toggle { display: inline-flex; grid-column: 3; }
  .header-call {
    display: inline-flex; grid-column: 2; justify-self: end; align-items: center; gap: .5rem;
    font-size: .74rem; letter-spacing: .16em; border: 1px solid rgba(255,255,255,.45); padding: .55rem .9rem; border-radius: 40px;
  }
  .header-call svg { width: 15px; height: 15px; }
  .hero__bar ul { grid-template-columns: repeat(3, 1fr); }
  .hero__bar li:nth-child(n+4) { display: none; }
  .timeline__list { grid-template-columns: repeat(3, 1fr); row-gap: 3rem; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step:nth-child(2) { border-right: 0; }
  .step:nth-child(3) { padding-left: 0; }
  .step:nth-child(n+3) { padding-top: 3rem; }
  .footer__top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  :root { --header-h: 76px; }
  .site-header { padding: 1rem 0; }
  .about__grid, .areas__grid, .faq__grid, .contact__grid, .refs { grid-template-columns: 1fr; }
  .faq__grid .section-head { position: static; }
  .service, .service:nth-child(even) { grid-template-columns: 1fr; }
  .service:nth-child(even) .service__media { order: 0; }
  .service__num { right: .5rem !important; left: auto !important; top: -2.4rem; }
  .facts__grid { grid-template-columns: 1fr 1fr; }
  .fact { padding-left: 1.2rem; }
  .fact:nth-child(3) { border-left: 0; padding-left: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid var(--line-inv); }
  .works { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 44vw; }
  .work, .work--wide, .work--tall { grid-column: span 1; grid-row: span 1; }
  .work--wide { grid-column: span 2; }
  .towns { grid-template-columns: repeat(2, 1fr); }
  .seal { width: 96px; }
  .hero__bg img { object-position: 62% 50%; }
  .hero__bg::after {
    background:
      linear-gradient(180deg, rgba(0,14,40,.6) 0%, rgba(0,14,40,.15) 28%, rgba(0,22,61,.78) 55%, rgba(0,22,61,.95) 100%);
  }
}
@media (max-width: 640px) {
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .header-call { display: none; }
  .brand__sub { font-size: .52rem; letter-spacing: .42em; }
  /* Telemóvel: a moradia fica visível em cima e o texto assenta em azul sólido por baixo */
  .hero { min-height: auto; background: var(--navy-900); }
  .hero__bg { bottom: auto; height: 60vh; }
  .hero__bg img { object-position: 72% 50%; }
  .hero__bg::after {
    background: linear-gradient(180deg, rgba(0,14,40,.55) 0%, rgba(0,14,40,0) 25%, rgba(0,22,61,0) 50%, var(--navy-900) 96%);
  }
  .hero__content { padding-top: calc(60vh - 5rem); padding-bottom: 2.4rem; }
  .hero h1 { font-size: clamp(2.2rem, 10.5vw, 3rem); }
  .hero__actions { width: 100%; }
  .hero__actions .btn { flex: 1 1 100%; }
  .hero__bar { display: none; }
  .seal { display: none; }
  .timeline__list { grid-template-columns: 1fr; row-gap: 0; }
  .timeline__list::before { left: 7px; right: auto; top: 0; bottom: 0; width: 1px; height: auto; }
  .tl { padding: 0 0 2.4rem 2.6rem; }
  .steps { grid-template-columns: 1fr; }
  .step, .step:nth-child(n) { border-right: 0; padding: 2rem 0; border-bottom: 1px solid var(--line); }
  .step__n { margin-bottom: 1rem; }
  .form-grid { grid-template-columns: 1fr; }
  .form-foot .btn { width: 100%; }
  .about__media { padding: 0 0 22% 8%; }
  .about__badge { right: 0; }
  .footer__top { grid-template-columns: 1fr; gap: 2.4rem; }
  .refs__list li { grid-template-columns: 1fr; }
  .refs__list time { grid-row: auto; grid-column: auto; font-size: 1.3rem; }
  .callbar {
    display: grid; grid-template-columns: 1fr 1fr 1fr; position: fixed; inset: auto 0 0; z-index: 90;
    background: var(--navy-900); border-top: 1px solid var(--line-inv); padding-bottom: env(safe-area-inset-bottom);
  }
  .callbar a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem;
    height: 64px; color: var(--white); font-size: .64rem; letter-spacing: .16em; text-transform: uppercase;
  }
  .callbar a + a { border-left: 1px solid var(--line-inv); }
  .callbar a.is-primary { background: var(--blue); }
  .callbar svg { width: 20px; height: 20px; }
}

/* Símbolo em fundo escuro: os blocos azul-marinho passam a branco (como na cortina) */
.site-footer .blocks i:nth-child(2), .site-footer .blocks i:nth-child(5) { background: var(--white); }
