/* ---------- 1. BASE ---------- */
:root {
  --bg: #fff; --alt: #f3f6fa; --ink: #0b1f3a; --muted: #53647c;
  --primary: #0b4fd6; --navy: #071a3a; --card: #fff; --line: #dfe6ef;
  --shadow: 0 8px 28px rgba(11, 31, 58, .08);
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  scroll-padding-top: 80px; scroll-behavior: smooth;
}
* { box-sizing: border-box; margin: 0; }
body { font-family: Manrope, system-ui, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.6; overflow-x: hidden; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.5rem); font-weight: 800; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { color: var(--muted); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid #7fa7ff; outline-offset: 2px; }

.container { max-width: 1180px; margin: auto; padding: 0 20px; }
.section { padding: clamp(56px, 8vw, 100px) 0; }
.section--alt { background: var(--alt); }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head p { margin-top: 12px; }
.section-head--center { margin: 0 auto 36px; text-align: center; }
.eyebrow { display: inline-block; color: var(--primary); font-weight: 700; font-size: .9rem; margin-bottom: 10px; }

.grid { display: grid; gap: 22px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 960px) { .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-4, .grid-3 { grid-template-columns: 1fr; } }

/* ---------- 2. COMPONENTES ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 24px; font: 700 .95rem Manrope, sans-serif; border: 2px solid var(--primary); background: var(--primary); color: #fff; cursor: pointer; transition: .25s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(11, 79, 214, .3); }
.btn--white { background: #fff; color: #0a2f73; border-color: #fff; }
.btn--ghost { background: transparent; border-color: rgba(255, 255, 255, .6); }

.icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-box { width: 50px; height: 50px; background: rgba(11, 79, 214, .1); color: var(--primary); display: grid; place-items: center; flex: none; }

/* Cartões: cantos retos */
.card { background: var(--card); border: 1px solid var(--line); padding: 26px; display: flex; flex-direction: column; gap: 10px; transition: .3s; }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--primary); }
.card-link { color: var(--primary); font-weight: 700; font-size: .9rem; margin-top: auto; padding-top: 6px; }
.card-link:hover { text-decoration: underline; }

/* Aparecer ao entrar no ecrã (JS adiciona .visible) */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s, transform .7s; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- 3. HEADER ---------- */
#header { position: fixed; inset: 0 0 auto 0; z-index: 50; padding-top: env(safe-area-inset-top, 0px); color: #fff; transition: .3s; }
#header.scrolled { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; line-height: 1.1; }
.logo small { display: block; font-weight: 500; font-size: .7rem; opacity: .8; }
#menu ul { display: flex; gap: clamp(14px, 1.8vw, 26px); list-style: none; padding: 0; }
#menu a { font-weight: 500; font-size: .93rem; opacity: .9; }
#menu a:hover { opacity: 1; color: #7fb0ff; }
#header.scrolled #menu a:hover { color: var(--primary); }
.burger { display: none; background: none; border: 0; color: inherit; width: 44px; height: 44px; cursor: pointer; }
@media (max-width: 960px) {
  .burger { display: block; }
  .hide-mobile { display: none; }
  #menu { position: absolute; top: 100%; left: 0; right: 0; background: var(--card); color: var(--ink); max-height: 0; overflow: hidden; transition: max-height .35s; box-shadow: var(--shadow); }
  #menu.open { max-height: 480px; }
  #menu ul { flex-direction: column; gap: 0; padding: 8px 20px 16px; }
  #menu a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); }
}

/* ---------- 4. HERO + DESTAQUES + NÚMEROS ---------- */
.hero { position: relative; min-height: 100svh; color: #fff; overflow: hidden; }
.slide { position: absolute; inset: 0; display: flex; align-items: center; opacity: 0; transition: opacity 1s; }
.slide.active { opacity: 1; z-index: 1; }
.slide > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7, 26, 58, .75), rgba(7, 26, 58, .15)); }
.slide .container { position: relative; z-index: 2; padding-top: 90px; }
.slide h1 { max-width: 760px; }
.slide p { color: #cfe0ff; max-width: 560px; margin: 18px 0 28px; font-size: 1.1rem; }
.slide-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-dots { position: absolute; bottom: 32px; left: 0; right: 0; z-index: 5; display: flex; gap: 10px; justify-content: center; }
.hero-dots button { width: 34px; height: 6px; border: 0; border-radius: 4px; background: rgba(255, 255, 255, .4); cursor: pointer; padding: 0; }
.hero-dots button.active { background: #fff; }

.highlights { background: var(--navy); color: #fff; }
.highlights .container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.highlight { display: flex; align-items: center; gap: 14px; padding: 26px 12px; font-weight: 700; }
.highlight .icon { color: #6aa2ff; width: 30px; height: 30px; }
@media (max-width: 960px) { .highlights .container { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .highlights .container { grid-template-columns: 1fr; } }

.stat { text-align: center; padding: 10px; }
.stat b { display: block; font-size: clamp(2.2rem, 4.5vw, 3.4rem); font-weight: 800; color: var(--primary); }

/* ---------- 5. SECÇÕES ---------- */
/* Sobre: cartão da empresa (esquerda) + missão/visão/valores (direita) */
.about-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px; align-items: stretch; }
.about-card { padding: 0; overflow: hidden; gap: 0; }
.about-card:hover { transform: none; }
.about-card img { width: 100%; height: 360px; object-fit: cover; }
.about-body { padding: 28px 30px 32px; display: flex; flex-direction: column; gap: 12px; }
.mvv { display: grid; gap: 24px; }
.mvv-item { display: flex; gap: 18px; padding: 24px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--primary); box-shadow: var(--shadow); transition: .3s; }
.mvv-item:hover { transform: translateX(6px); }
.mvv-item span { font-size: .8rem; font-weight: 800; color: var(--primary); }
.mvv-item h3 { margin: 2px 0 6px; font-size: 1.25rem; }
.mvv-item p { font-size: .95rem; }
.values { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.values li { list-style: none; font-size: .78rem; font-weight: 600; padding: 3px 10px; border: 1px solid var(--line); background: var(--alt); }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; } .about-card img { height: 280px; } }

/* Porquê escolher-nos */
.why-item { display: flex; gap: 16px; padding: 22px; background: var(--card); border: 1px solid var(--line); }
.why-item h3 { font-size: 1rem; }
.why-item p { font-size: .9rem; }

/* Processo */
.timeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; position: relative; }
.timeline::before { content: ""; position: absolute; top: 24px; left: 5%; right: 5%; height: 2px; background: var(--line); }
.step { position: relative; text-align: center; }
.step b { width: 48px; height: 48px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; margin: 0 auto 14px; position: relative; font-weight: 800; box-shadow: 0 0 0 6px var(--alt); }
.step p { font-size: .9rem; }
@media (max-width: 860px) {
  .timeline { grid-template-columns: 1fr; gap: 26px; padding-left: 10px; }
  .timeline::before { top: 0; bottom: 0; left: 33px; right: auto; width: 2px; height: auto; }
  .step { text-align: left; padding-left: 70px; }
  .step b { position: absolute; left: 0; top: 0; margin: 0; }
}

/* Equipa */
.member { padding: 0; overflow: hidden; gap: 0; }
.member-photo { aspect-ratio: 1; display: grid; place-items: center; color: #fff; font-size: 3.2rem; font-weight: 800; background: linear-gradient(135deg, #0b4fd6, #071a3a); }
.member:nth-child(even) .member-photo { background: linear-gradient(135deg, #2f7bff, #0a2f73); }
.member-body { padding: 20px 22px 24px; }
.member-body small { color: var(--primary); font-weight: 700; }
.member-body p { font-size: .9rem; margin-top: 6px; }

/* Projetos */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filters button { border: 1px solid var(--line); background: var(--card); color: var(--ink); padding: 9px 18px; border-radius: 99px; font: 600 .88rem Manrope, sans-serif; cursor: pointer; min-height: 40px; transition: .2s; }
.filters button.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.project { padding: 0; overflow: hidden; gap: 0; animation: fade .4s; }
.project.hidden { display: none; }
.project img { aspect-ratio: 16/10; width: 100%; object-fit: cover; }
.project-body { padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.project-body small { color: var(--primary); font-weight: 700; }
@keyframes fade { from { opacity: 0; transform: scale(.96); } }

/* Clientes */
.clients-wrap { display: flex; align-items: center; gap: 12px; }
.clients { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; flex: 1; min-width: 0; }
.clients::-webkit-scrollbar { display: none; }
.client { flex: 0 0 calc((100% - 70px) / 6); height: 76px; display: grid; place-items: center; scroll-snap-align: start; border: 1px solid var(--line); background: var(--card); font-weight: 800; color: var(--muted); opacity: .6; filter: grayscale(1); transition: .3s; }
.client:hover { opacity: 1; filter: none; color: var(--primary); border-color: var(--primary); }
.client img { max-height: 48px; width: auto; }
.arrow { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border: 1px solid var(--line); background: var(--card); color: var(--primary); cursor: pointer; }
.arrow:hover:not(:disabled) { background: var(--primary); color: #fff; }
.arrow:disabled { opacity: .35; cursor: default; }
@media (max-width: 860px) { .client { flex-basis: calc((100% - 28px) / 3); } }
@media (max-width: 520px) { .client { flex-basis: calc((100% - 14px) / 2); } }

/* Testemunhos */
.testimonials { position: relative; max-width: 360px; margin: auto; min-height: 250px; }
.testimonial { position: absolute; inset: 0; text-align: center; opacity: 0; pointer-events: none; transition: opacity .6s; }
.testimonial.active { position: relative; opacity: 1; pointer-events: auto; }
.testimonial blockquote { font-size: 1.2rem; font-weight: 500; margin: 14px 0 22px; }
.avatar { width: 56px; height: 56px; margin: 0 auto 8px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; background: linear-gradient(135deg, #2f7bff, #0a2f73); }
.stars { color: #f5b301; letter-spacing: 3px; }
.testimonial small { color: var(--muted); }
.test-dots { display: flex; gap: 8px; justify-content: center; margin-top: 20px; }
.test-dots button { width: 10px; height: 10px; border: 0; border-radius: 50%; background: var(--line); cursor: pointer; padding: 0; }
.test-dots button.active { background: var(--primary); }

/* FAQ */
.faq { max-width: 800px; margin: auto; }
.faq-item { border: 1px solid var(--line); background: var(--card); margin-bottom: 12px; overflow: hidden; }
.faq-item.open { border-color: var(--primary); }
.faq-q { width: 100%; min-height: 56px; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 22px; background: none; border: 0; color: var(--ink); font: 700 1rem Manrope, sans-serif; text-align: left; cursor: pointer; }
.faq-q span { font-size: 1.5rem; color: var(--primary); line-height: 1; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .4s; }
.faq-a p { padding: 0 22px 20px; }

/* Chamada para ação */
.cta { background: linear-gradient(135deg, #0b4fd6, #071a3a); color: #fff; text-align: center; position: relative; overflow: hidden; }
.cta::before, .cta::after { content: ""; position: absolute; border: 2px solid rgba(255, 255, 255, .12); border-radius: 50%; }
.cta::before { width: 420px; height: 420px; left: -140px; top: -180px; }
.cta::after { width: 300px; height: 300px; right: -80px; bottom: -140px; }
.cta .container { position: relative; }
.cta p { color: #cfe0ff; max-width: 620px; margin: 16px auto 28px; }
.cta .slide-actions { justify-content: center; }

/* ---------- 6. CONTACTOS ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field--full { grid-column: span 2; }
label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; }
input, select, textarea { width: 100%; min-height: 46px; padding: 12px 14px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: 500 1rem Manrope, sans-serif; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(11, 79, 214, .2); }
.invalid { border-color: #d93a3a; }
.valid { border-color: #1f9d62; }
.error { display: none; color: #d93a3a; font-size: .8rem; margin-top: 4px; }
.invalid + .error { display: block; }
.success { display: none; margin-top: 14px; padding: 14px; background: rgba(31, 157, 98, .12); color: #1f9d62; font-weight: 700; }
.info-list { display: grid; gap: 16px; }
.info-item { display: flex; gap: 14px; padding: 16px; border: 1px solid var(--line); background: var(--card); }
.info-item .icon { color: var(--primary); }
.info-item b { display: block; }

.visit { display: grid; grid-template-columns: 1fr 2fr; gap: 28px; margin-top: 56px; }
.map { position: relative; min-height: 320px; overflow: hidden; border: 1px solid var(--line); background: #dbe7fb; }
.map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-pin { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -100%); }
.map-pin .icon { width: 46px; height: 46px; color: var(--primary); fill: var(--primary); stroke: #fff; }
@media (max-width: 860px) {
  .contact-grid, .visit { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 620px) { .form { grid-template-columns: 1fr; } .field--full { grid-column: auto; } }

/* ---------- 7. FOOTER ---------- */
footer { background: var(--navy); padding: 64px 0 0; }
footer h3 { color: #fff; margin-bottom: 14px; font-size: 1rem; }
footer p, footer li, footer a { color: #aebfdc; font-size: .92rem; }
footer ul { list-style: none; padding: 0; display: grid; gap: 8px; }
footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr 1fr; gap: 32px; }
.socials { display: flex; gap: 10px; }
.socials a { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .2); font-weight: 800; font-size: .8rem; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 44px; padding: 20px 0; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .85rem; color: #aebfdc; }
.footer-bottom div { display: flex; gap: 18px; }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- 8. EXTRAS ---------- */
.top-btn { position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 60; width: 48px; height: 48px; display: grid; place-items: center; border: 0; background: var(--primary); color: #fff; cursor: pointer; box-shadow: 0 8px 22px rgba(11, 79, 214, .4); opacity: 0; visibility: hidden; transform: translateY(12px); transition: .3s; }
.top-btn.show { opacity: 1; visibility: visible; transform: none; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } .reveal { opacity: 1; transform: none; } }

/* ---------- 9. FORMULÁRIO DE TESTEMUNHO / ANTI-ROBÔS ---------- */
.hp { position: absolute; left: -9999px; }
.success.fail { background: rgba(217, 58, 58, .1); color: #d93a3a; }
.share { max-width: 760px; margin: 36px auto 0; border: 1px solid var(--line); background: var(--card); }
.share summary { padding: 16px 22px; font-weight: 700; color: var(--primary); cursor: pointer; }
.share .form { padding: 4px 22px 24px; }
.btn--sm { min-height: 38px; padding: 0 18px; font-size: .85rem; align-self: flex-start; margin-top: auto; }
