/* =====================================================================
   DS Seguros Figueira da Foz — folha de estilos única
   Substitui: Bootstrap, BizPage style.css, animate, owl, lightbox, ionicons, font-awesome.
   Ideia: "a parede verde da loja" — o verde DS (#4CB847) usado como a parede
   dos retratos e do escritório; o resto é papel claro e tinta quase preta.
   ===================================================================== */

/* ---------- Fonte: Montserrat (requisito da empresa; era a do rodapé do site antigo).
   Alojada no servidor, SIL OFL. ---------- */
@font-face { font-family: "Montserrat"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/montserrat-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/montserrat-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/montserrat-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 800; font-style: normal; font-display: swap; src: url("../fonts/montserrat-latin-800-normal.woff2") format("woff2"); }

/* ---------- Tokens ---------- */
:root {
  --green: #4CB847;        /* verde DS (píxel do logótipo) — superfícies e destaque */
  --green-ink: #2F7A2C;    /* botões com texto branco: 5,3:1 */
  --green-deep: #245F22;   /* hover dos botões */
  --green-tint: #EEF7ED;
  --ink: #161A17;          /* texto: 17,4:1 em papel */
  --muted: #565D57;        /* texto secundário: 6,6:1 em papel */
  --paper: #FAFAF7;
  --white: #FFFFFF;
  --line: #E1E4DE;
  --field: #767E77;        /* contorno de campos: 4,2:1 */
  --error: #B3261E;
  --mark: #FFE58A;

  --f-head: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --f-body: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --wrap: 1240px;
  --gut: clamp(1rem, 4vw, 2.5rem);
  --sec: clamp(4rem, 9vw, 7.5rem);
  --r: 6px;
  --header-h: 72px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.65 var(--f-body); }
img, picture, svg { display: block; max-width: 100%; height: auto; }
/* As animações de entrada deslocam blocos para fora do ecrã: cortar sem criar scroll horizontal (clip não quebra o position: sticky). */
main, .site-footer { overflow-x: clip; }
h1, h2, h3 { font-family: var(--f-head); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 .5em; text-wrap: balance; }
p { margin: 0 0 1em; }
a { color: var(--green-ink); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--green-deep); text-decoration-thickness: 2px; }
small { font-size: .8125rem; color: var(--muted); }
address { font-style: normal; }
mark.confirmar { background: var(--mark); color: var(--ink); padding: 0 .25em; font: 700 .85em/1.4 var(--f-body); }
ul.plain { list-style: none; padding: 0; margin: 0; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }
.muted { color: var(--muted); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

:focus-visible { outline: 3px solid var(--green-ink); outline-offset: 3px; border-radius: 2px; }
.equipa :focus-visible, .site-footer :focus-visible { outline-color: var(--ink); }
.site-footer :focus-visible { outline-color: var(--green); }

.skip { position: absolute; left: 1rem; top: -100px; z-index: 100; background: var(--ink); color: #fff; padding: .75rem 1rem; border-radius: var(--r); }
.skip:focus { top: 1rem; color: #fff; }

/* ---------- Botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 48px; padding: .7rem 1.4rem;
  border: 2px solid transparent; border-radius: var(--r); font: 700 1rem/1.2 var(--f-head); letter-spacing: .01em; text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s; }
.btn--primary { background: var(--green-ink); color: #fff; }
.btn--primary:hover { background: var(--green-deep); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--lg { min-height: 56px; padding: .9rem 1.6rem; font-size: 1.0625rem; }
.btn--sm { min-height: 44px; padding: .5rem 1rem; font-size: .9375rem; }
.btn[disabled], .btn[aria-busy="true"] { opacity: .7; cursor: progress; }

/* ---------- Cabeçalho ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(250,250,247,.96); border-bottom: 1px solid var(--line); }
@supports (backdrop-filter: blur(1px)) { .site-header { background: rgba(250,250,247,.9); backdrop-filter: saturate(1.2) blur(8px); } }
.site-header__in { display: flex; align-items: center; gap: 1rem; min-height: var(--header-h); }
.brand { display: flex; flex: none; align-items: center; gap: .65rem; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand img { width: 52px; height: auto; }
.brand__place { font: 800 1rem/1.1 var(--f-head); white-space: nowrap; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; }
.nav a { display: block; white-space: nowrap; padding: .6rem .55rem; font: 700 .875rem/1.2 var(--f-head); color: var(--ink); text-decoration: none; border-radius: var(--r); }
.nav a:hover { background: var(--green-tint); color: var(--ink); }
.nav__ext a { color: var(--muted); }
.nav-toggle { display: none; }

@media (max-width: 1439px) {
  .nav-toggle { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: .5rem .75rem; background: none; border: 1.5px solid var(--ink); border-radius: var(--r); font: 700 .9375rem var(--f-head); color: var(--ink); cursor: pointer; }
  .nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { display: block; width: 18px; height: 2px; background: currentColor; position: relative; }
  .nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle__bars::before { top: -6px; } .nav-toggle__bars::after { top: 6px; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); display: none; }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; padding: .5rem var(--gut) 1rem; }
  .nav a { padding: .85rem .5rem; font-size: 1.0625rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .header-cta { display: none; }
}
.header-cta { white-space: nowrap; }

/* ---------- Mensagens ---------- */
.flash { padding: 1rem 0; font-weight: 700; position: relative; overflow: hidden; }
.flash p { margin: 0; display: flex; gap: .75rem; align-items: flex-start; }
.flash__icon { flex: none; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.flash--ok { background: var(--green-tint); }
.flash--ok .flash__icon { stroke: var(--green-ink); }
.flash--erro { background: #FCEBEA; }
.flash--erro .flash__icon { stroke: var(--error); }
.flash::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--green); transform-origin: left; }
.flash--erro::after { background: var(--error); }
.flash:focus { outline: none; }

/* ---------- Secções ---------- */
.sec { padding-block: var(--sec); }
.sec__h { font-size: clamp(2rem, 4.4vw, 3.25rem); }
.sec__h--sm { font-size: clamp(1.5rem, 3vw, 2rem); }
.eyebrow { font: 700 .875rem/1.3 var(--f-body); letter-spacing: .06em; text-transform: uppercase; color: var(--green-ink); margin-bottom: 1.25rem; }

/* ---------- 1. Topo ---------- */
.hero { padding-top: clamp(2rem, 5vw, 4rem); overflow: hidden; }
.hero__grid { display: grid; gap: 2.5rem; }
.hero__photo { isolation: isolate; }
@media (max-width: 599px) {
  .hero__text { display: flex; flex-direction: column; }
  .hero .hero__addr { order: 3; margin-top: .25rem; padding-top: 0; border-top: 0; }
  .hero .hero__actions { order: 4; margin-top: 1.25rem; }
  .hero__lead { order: 2; margin-bottom: 1rem; }
  .hero h1 { order: 1; }
  .eyebrow { order: 0; }
}
.hero h1 { font-size: clamp(2rem, 5vw, 3.75rem); margin-bottom: .45em; }
.hero__lead { font-size: clamp(1.125rem, 1.6vw, 1.3rem); max-width: 34em; color: var(--ink); }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.hero__actions { align-items: flex-start; }
.hero__call { display: grid; gap: .35rem; }
.hero__addr { display: flex; gap: .75rem; margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: .975rem; max-width: 34em; }
.hero__pin { flex: none; width: 14px; height: 14px; margin-top: .35em; background: var(--green); border-radius: 50% 50% 50% 0; transform: rotate(-45deg); }
.hero__photo { margin: 0; position: relative; }
.hero__photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 30% 60%; border-radius: var(--r); }
@media (min-width: 1000px) {
  .hero__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; gap: 3.5rem; min-height: min(78vh, 760px); }
  .hero__photo { margin-right: calc(-1 * max(var(--gut), (100vw - var(--wrap)) / 2 + var(--gut))); }
  .hero__photo::before { content: ""; position: absolute; inset: 2rem 0 -2rem -2rem; background: var(--green); border-radius: var(--r) 0 0 var(--r); z-index: -1; transform-origin: right; }
  .hero__photo img { aspect-ratio: 5 / 4.4; border-radius: var(--r) 0 0 var(--r); }
  .hero { padding-bottom: 5rem; }
}

/* ---------- 2. Seguros (lista indexada) ---------- */
.seguros { border-top: 1px solid var(--line); }
.seguros__grid { display: grid; gap: 2rem; }
.seguros__head p { max-width: 26em; color: var(--muted); }
.seguros__list { list-style: none; margin: 0; padding: 0; counter-reset: s; border-top: 2px solid var(--ink); }
.seguros__list a { display: grid; grid-template-columns: 2.75rem 1fr auto; align-items: baseline; gap: .75rem; padding: 1.05rem 0; border-bottom: 1px solid var(--line);
  color: var(--ink); text-decoration: none; }
.seguros__list .idx { font: 700 .875rem/1 var(--f-body); color: var(--muted); font-variant-numeric: tabular-nums; }
.seguros__name { font: 700 clamp(1.25rem, 2.2vw, 1.8rem)/1.2 var(--f-head); letter-spacing: -0.01em; }
.seguros__name .pre { font-weight: 700; color: var(--muted); font-size: .62em; letter-spacing: 0; }
.seguros__list .arrow { font: 700 1.4rem/1 var(--f-head); color: var(--green-ink); transition: transform .2s; }
.seguros__list a:hover .seguros__name, .seguros__list a:focus-visible .seguros__name { color: var(--green-ink); }
.seguros__list a:hover .arrow, .seguros__list a:focus-visible .arrow { transform: translateX(6px); }
.seguros__preview { display: none; }
@media (min-width: 1000px) {
  .seguros__grid { grid-template-columns: 3fr 5fr 4fr; gap: 3rem; align-items: start; }
  .seguros__head { position: sticky; top: calc(var(--header-h) + 2rem); }
  .seguros__preview { display: block; position: sticky; top: calc(var(--header-h) + 2rem); aspect-ratio: 6 / 5; }
  .seguros__img { position: absolute; inset: 0; opacity: 0; transition: opacity .25s; }
  .seguros__img.is-on { opacity: 1; }
  .seguros__img img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r); }
}

/* ---------- 3. Sobre nós ---------- */
.sobre { background: var(--white); }
.sobre__grid { display: grid; gap: 2.5rem; }
.sobre__big { font: 800 clamp(1.5rem, 2.8vw, 2.25rem)/1.2 var(--f-head); color: var(--green-ink); max-width: 18em; }
.sobre__text p:not(.sobre__big) { max-width: 36em; }
.sobre__photo { margin: 0; }
.sobre__photo img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--r); }
@media (min-width: 1000px) {
  .sobre__grid { grid-template-columns: 5fr 6fr; gap: 4rem; align-items: center; }
  .sobre__photo { margin-right: calc(-1 * max(var(--gut), (100vw - var(--wrap)) / 2 + var(--gut))); }
  .sobre__photo img { border-radius: var(--r) 0 0 var(--r); aspect-ratio: 4 / 3; }
}

/* ---------- 4. Equipa (sobre o verde da parede) ---------- */
.equipa { background: rgb(76 184 71 / var(--eq, 1)); color: var(--ink); }
.equipa__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2rem; }
.pessoa figure { margin: 0; }
.pessoa img { width: 100%; aspect-ratio: 6 / 5; object-fit: cover; border-radius: var(--r) var(--r) 0 0; }
.pessoa figcaption { background: var(--white); padding: 1.1rem 1.25rem 1.25rem; border-radius: 0 0 var(--r) var(--r); }
.pessoa__nome { display: block; font: 800 clamp(1.4rem, 2.4vw, 1.9rem)/1.15 var(--f-head); }
.pessoa__cargo { display: block; color: var(--muted); margin-top: .2rem; }
@media (min-width: 800px) {
  .equipa__list { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
  .equipa__list li:nth-child(2) { margin-top: 4rem; }
}

/* ---------- 5. Seguradoras / protocolos ---------- */
.logos { background: var(--paper); }
.logos + .logos { padding-top: 0; }
.logos__head { display: grid; gap: .25rem 2rem; margin-bottom: 2rem; }
.logos__head p { color: var(--muted); margin: 0; }
@media (min-width: 800px) { .logos__head { grid-template-columns: auto 1fr; align-items: baseline; } .logos__head .sec__h { margin: 0; } }
.logo-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.logo-grid li { display: grid; place-items: center; min-height: 112px; padding: 1.25rem 1.5rem; background: var(--white); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.logo-grid img { max-height: 44px; width: auto; max-width: 100%; object-fit: contain; filter: grayscale(1); opacity: .82; }
@media (min-width: 640px) { .logo-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1100px) { .logo-grid li { min-height: 128px; } .logo-grid img { max-height: 52px; } }
.proto-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.proto-list li { min-width: 0; display: grid; gap: .75rem; align-content: start; }
.proto-list__logo { display: grid; place-items: center; height: 136px; min-width: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem; }
.proto-list__logo img { max-height: 96px; max-width: 100%; width: auto; object-fit: contain; }
.proto-list__name { font: 700 1rem/1.3 var(--f-head); }
@media (min-width: 800px) { .proto-list { grid-template-columns: repeat(4, 1fr); gap: 2rem; } }

/* ---------- 6. Testemunhos (citações tipográficas) ---------- */
.testemunhos { background: var(--white); border-top: 1px solid var(--line); }
.quotes { display: grid; gap: 3rem; margin-top: 1rem; }
.quote { margin: 0; position: relative; padding-top: 2.75rem; border-top: 2px solid var(--ink); }
.quote::before { content: "“"; position: absolute; top: .1rem; left: 0; font: 800 4.5rem/1 var(--f-head); color: var(--green); transform: translateY(var(--q-y, 0)); opacity: var(--q-o, 1); }
.quote blockquote { margin: 0 0 1.25rem; font-size: clamp(1.125rem, 1.5vw, 1.3rem); line-height: 1.55; }
.quote blockquote p { margin: 0 0 .6em; }
.quote blockquote > :last-child { margin-bottom: 0; }
.quote figcaption { display: flex; align-items: center; gap: .85rem; line-height: 1.35; }
.quote__img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; }
@media (min-width: 900px) { .quotes { grid-template-columns: 1fr 1fr; gap: 4rem 5rem; } .quote:nth-child(even) { margin-top: 3.5rem; } }

/* ---------- 7. Recrutamento ---------- */
.recrutamento__grid { display: grid; gap: 2.5rem; }
.recrutamento__role { font: 800 clamp(1.25rem, 2.2vw, 1.6rem)/1.25 var(--f-head); color: var(--green-ink); }
.recrutamento__text > p:not(.recrutamento__role) { max-width: 36em; }
.vaga { margin-top: 1.5rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.vaga summary { cursor: pointer; padding: 1rem 0; min-height: 44px; font: 700 1.0625rem var(--f-head); color: var(--green-ink); }
.vaga h3 { font-size: 1.0625rem; margin: 1.25rem 0 .4rem; }
.vaga ul { margin: 0 0 .5rem; padding-left: 1.2rem; }
.vaga[open] { padding-bottom: 1rem; }
@media (min-width: 1000px) { .recrutamento__grid { grid-template-columns: 6fr 5fr; gap: 4rem; align-items: start; } }

/* ---------- Formulários ---------- */
.card-form { background: var(--white); border: 1px solid var(--line); border-top: 6px solid var(--green); border-radius: var(--r); padding: clamp(1.25rem, 3vw, 2rem); }
.card-form__h { font-size: 1.5rem; }
.form-note { font-size: .875rem; color: var(--muted); }
.fields { display: grid; gap: 1rem 1.25rem; }
@media (min-width: 640px) { .fields { grid-template-columns: 1fr 1fr; } .field--wide { grid-column: 1 / -1; } }
.field { display: grid; gap: .3rem; align-content: start; }
.field label { font-weight: 700; font-size: .9375rem; }
.req { color: var(--error); }
.hint { font-size: .8125rem; color: var(--muted); margin-top: -.15rem; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: .65rem .8rem; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--white); border: 1.5px solid var(--field); border-radius: var(--r); }
.field textarea { resize: vertical; min-height: 120px; }
.field input[type="file"] { padding: .55rem; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--green-ink); outline-offset: 1px; border-color: var(--green-ink); }
.err { font-size: .875rem; color: var(--error); font-weight: 700; min-height: 0; }
.err:empty { display: none; }
.field--error input, .field--error select, .field--error textarea { border-color: var(--error); border-width: 2px; }
.form-errors:empty { display: none; }
.form-errors { background: #FCEBEA; border-left: 4px solid var(--error); padding: .75rem 1rem; margin-bottom: 1rem; font-weight: 700; }
.form-errors p { margin: 0; }
.form-errors:focus { outline: none; }
.consent { display: grid; grid-template-columns: auto 1fr; gap: .25rem .75rem; margin: 1.25rem 0; font-size: .9375rem; }
.consent input { width: 24px; height: 24px; margin: .1rem 0 0; accent-color: var(--green-ink); }
.consent .err { grid-column: 2; }
.sim-form button[type="submit"], .card-form button[type="submit"] { width: 100%; }
@media (min-width: 640px) { .sim-form button[type="submit"], .card-form button[type="submit"] { width: auto; } }

/* ---------- 8. Contactos ---------- */
.contacto { background: var(--white); border-top: 1px solid var(--line); }
.contacto__grid { display: grid; gap: 2.5rem; }
.contacto__fachada { margin: 0 0 1.5rem; }
.contacto__fachada img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 20%; border-radius: var(--r); }
.contacto__fachada figcaption { font-size: .875rem; color: var(--muted); margin-top: .5rem; }
.contacto__dl { margin: 0; display: grid; gap: 1.1rem; }
.contacto__dl > div { display: grid; gap: .2rem; padding-bottom: 1.1rem; border-bottom: 1px solid var(--line); }
.contacto__dl dt { font: 700 .8125rem/1.2 var(--f-body); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.contacto__dl dd { margin: 0; }
.big-link { font: 800 1.25rem/1.4 var(--f-head); color: var(--ink); text-decoration: none; display: inline-block; min-height: 44px; padding-top: .3rem; }
.big-link:hover { color: var(--green-ink); text-decoration: underline; }
@media (min-width: 1000px) { .contacto__grid { grid-template-columns: 5fr 6fr; gap: 4rem; align-items: start; } }

.mapa__frame { position: relative; height: clamp(320px, 45vw, 460px); background: var(--green-tint); }
.mapa__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.mapa__consent { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: .9rem; text-align: center; padding: 1.5rem; }
.mapa__consent p { max-width: 32em; margin: 0; }

/* ---------- Página de seguro ---------- */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem; margin: 0; padding: 1.25rem 0 0; font-size: .9375rem; }
.crumbs li + li::before { content: "/"; margin: 0 .4rem; color: var(--muted); }
.crumbs [aria-current] { color: var(--muted); }
.crumbs a { display: inline-block; padding: .4rem 0; }
.seguro { padding: 1.5rem 0 var(--sec); }
.seguro__grid { display: grid; gap: 2.5rem; }
.seguro h1 { font-size: clamp(2.1rem, 5vw, 3.75rem); }
.seguro__descr { font-size: 1.125rem; max-width: 34em; margin-bottom: 1rem; }
.seguro__descr p { margin: 0 0 .8em; }
.seguro__descr ul, .seguro__descr ol { padding-left: 1.2rem; }
.seguro__photo { margin: 1.5rem 0 0; }
.seguro__photo img { width: 100%; aspect-ratio: 6 / 5; object-fit: cover; border-radius: var(--r); }
.seguro__form { background: var(--white); border: 1px solid var(--line); border-top: 6px solid var(--green); border-radius: var(--r); padding: clamp(1.25rem, 3vw, 2rem); }
.seguro__form h2 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); }
@media (min-width: 1000px) { .seguro__grid { grid-template-columns: 5fr 6fr; gap: 4rem; align-items: start; } .seguro__head { position: sticky; top: calc(var(--header-h) + 1.5rem); } }
.seguro__more { background: var(--white); border-top: 1px solid var(--line); }
.more__grid { display: grid; gap: 2.5rem; }
@media (min-width: 900px) { .more__grid { grid-template-columns: 1fr 1fr; gap: 4rem; } }
.mini-list { list-style: none; padding: 0; margin: 0; columns: 2 12rem; column-gap: 2rem; }
.mini-list a { display: inline-block; padding: .5rem 0; min-height: 44px; font-weight: 700; }

.notfound { padding-block: var(--sec); }
.notfound h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
.notfound .mini-list { margin: 1.5rem 0 2rem; }

/* ---------- Simular (dialog em 2 passos) ---------- */
.sim { width: min(820px, 100vw - 2rem); max-height: min(92vh, 980px); padding: 0; border: 0; border-radius: var(--r); background: var(--paper); color: var(--ink); box-shadow: 0 30px 80px rgba(22,26,23,.35); }
.sim::backdrop { background: rgba(22,26,23,.6); }
.sim__bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: .75rem; padding: .5rem .5rem .5rem 1.25rem; background: var(--green); }
.sim__step { margin: 0 auto 0 0; font: 700 .9375rem var(--f-head); }
.sim__back:not([hidden]) + .sim__step { margin-left: 0; }
.sim__back { min-height: 44px; padding: .4rem .75rem; background: var(--white); color: var(--ink); border: 0; border-radius: var(--r); font: 700 .9375rem var(--f-head); cursor: pointer; }
.sim__close { width: 44px; height: 44px; margin-left: auto; background: transparent; border: 0; font: 400 2rem/1 var(--f-body); color: var(--ink); cursor: pointer; border-radius: var(--r); }
.sim__close:hover, .sim__back:hover { background: rgba(255,255,255,.6); }
.sim__close:focus-visible, .sim__back:focus-visible { outline-color: var(--ink); }
.sim__pane { padding: clamp(1.25rem, 3.5vw, 2.25rem); }
.sim__h { font-size: clamp(1.6rem, 3.5vw, 2.25rem); }
.sim__h:focus { outline: none; }
.sim__lead { color: var(--muted); }
.sim__choices { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; border-top: 2px solid var(--ink); }
@media (min-width: 640px) { .sim__choices { grid-template-columns: 1fr 1fr; column-gap: 2rem; } }
.sim__choices button { display: flex; align-items: baseline; gap: .85rem; width: 100%; min-height: 56px; padding: .9rem .25rem; background: none; border: 0; border-bottom: 1px solid var(--line); text-align: left; font: 800 1.125rem/1.25 var(--f-head); color: var(--ink); cursor: pointer; }
.sim__choices button:hover { color: var(--green-ink); }
.sim__choices .idx { font: 700 .8125rem/1 var(--f-body); color: var(--muted); font-variant-numeric: tabular-nums; }
.sim__alt { margin-top: 1.5rem; font-size: .9375rem; }
@media (max-width: 639px) { .sim { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; } }

/* ---------- Rodapé ---------- */
.site-footer { position: relative; background: var(--ink); color: #E8EBE7; padding: calc(4rem + 6px) 0 2rem; margin-top: 0; }
.site-footer::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px; background: var(--green); transform: scaleX(var(--ft, 1)); transform-origin: left; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--green); }
.site-footer small { color: #B9C0B9; display: block; }
.footer-grid { display: grid; gap: 2.5rem; }
.footer-id img { width: 96px; border-radius: var(--r); margin-bottom: 1rem; }
.footer-name { font: 800 1.25rem var(--f-head); margin-bottom: .5rem; }
.footer-h { font: 700 .8125rem/1.2 var(--f-body); letter-spacing: .06em; text-transform: uppercase; color: #B9C0B9; margin-bottom: 1rem; }
.footer-contact li, .footer-links li { margin-bottom: .6rem; }
.footer-contact a, .footer-links a { display: inline-block; padding: .2rem 0; }
.site-footer .livro { display: inline-block; margin-top: 1rem; padding: .7rem 1rem; background: #fff; color: var(--ink) !important; border-radius: var(--r); font-weight: 700; text-decoration: none; min-height: 44px; }
.livro img { height: 40px; width: auto; }
.legal { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid #3A403B; font-size: .875rem; color: #C9CFC8; display: grid; gap: .25rem; max-width: var(--wrap); }
.legal p { max-width: 70em; }
.ral ul { margin: 0 0 .75rem; }
.ral li { margin-bottom: .2rem; }
.copy { margin-top: 1rem; color: #9DA59E; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 4fr 4fr 5fr; gap: 3rem; } }

/* ---------- Barra fixa em telemóvel ---------- */
.mobile-bar { position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 1.4fr 1fr; gap: .5rem; padding: .5rem .5rem calc(.5rem + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(22,26,23,.08); }
.mobile-bar a { display: grid; place-content: center; text-align: center; min-height: 52px; padding: .3rem .5rem; border-radius: var(--r); font: 800 1rem/1.15 var(--f-head); text-decoration: none; }
.mobile-bar small { display: block; font: 400 .6875rem/1.2 var(--f-body); color: inherit; opacity: .9; }
.mobile-bar__call { border: 2px solid var(--ink); color: var(--ink); }
.mobile-bar__sim { background: var(--green-ink); color: #fff; }
.mobile-bar__sim:hover { color: #fff; }
@media (max-width: 899px) { body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); } }
@media (min-width: 900px) { .mobile-bar { display: none; } }


/* ---------- Impressão ---------- */
@media print {
  .site-header, .mobile-bar, .mapa, .sim, .hero__photo, .seguros__preview { display: none !important; }
  body { background: #fff; }
}
.logo-text { font: 800 1.15rem/1.2 var(--f-head); color: var(--muted); text-align: center; }

/* =====================================================================
   Movimento — só transform/opacity (sem CLS, sem atrasar o LCP).
   Tudo dentro de prefers-reduced-motion: no-preference.
   ===================================================================== */
@media (prefers-reduced-motion: no-preference) {
  :root { --ease-out: cubic-bezier(.16, 1, .3, 1); --ease-io: cubic-bezier(.65, 0, .35, 1); }

  /* Entrada do topo em CSS (corre logo, não espera pelo GSAP). O texto só se desloca:
     não começa invisível, para não atrasar o LCP. fill-mode "backwards" para o GSAP
     poder animar os mesmos elementos depois (parallax). */
  @keyframes rise   { from { transform: translateY(22px); } to { transform: none; } }
  @keyframes slideL { from { transform: translateX(60px); } to { transform: none; } }
  .hero__text > * { animation: rise .9s var(--ease-out) backwards; }
  .hero__text > :nth-child(2) { animation-delay: .06s; }
  .hero__text > :nth-child(3) { animation-delay: .12s; } /* parágrafo: só desloca (é o LCP em telemóvel com Montserrat) */
  .hero__text > :nth-child(4) { animation-name: fadeUp; animation-delay: .28s; }
  .hero__text > :nth-child(5) { animation-name: fadeUp; animation-delay: .38s; }
  .hero__photo img { animation: slideL 1.2s var(--ease-out) backwards; }
  .hero__photo::before { animation: wall 1s var(--ease-io) .15s backwards; }
  .hero__pin { animation: pin 1.2s var(--ease-out) .7s backwards; }
  @keyframes pin { 0% { transform: rotate(-45deg) translate(0, -12px); opacity: 0; } 55% { transform: rotate(-45deg); opacity: 1; } 75% { transform: rotate(-45deg) scale(1.2); } 100% { transform: rotate(-45deg); } }
  .seguro__head--enter > * { animation: rise .9s var(--ease-out) backwards; }
  .seguro__head--enter > :nth-child(2) { animation-delay: .08s; }
  .seguro__head--enter > :nth-child(3) { animation-delay: .16s; }
  .seguro__form--enter { animation: fadeUp 1s var(--ease-out) .12s backwards; }
  .page-404 .notfound > * { animation: fadeUp .8s var(--ease-out) backwards; }

  /* Revelações ao scroll e parallax: js/ds-motion.js (GSAP + ScrollTrigger + SplitText). */
  .seguros__list a { transition: padding-left .3s var(--ease-out); }
  .seguros__list a:hover, .seguros__list a:focus-visible { padding-left: .5rem; }
  .seguros__img { transform: scale(1.04); transition: opacity .45s var(--ease-out), transform 1.2s var(--ease-out); }
  .seguros__img.is-on { transform: none; }

  /* Equipa: os retratos aproximam-se ligeiramente ao passar o rato */
  .pessoa figure { overflow: hidden; border-radius: var(--r); }
  .pessoa img { transition: transform 1.2s var(--ease-out); }
  .pessoa:hover img { transform: scale(1.03); }

  @keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
  @keyframes wall   { from { transform: scaleX(0); } to { transform: scaleX(1); } }

  /* Botões e ligações */
  .btn { transition: background-color .2s, color .2s, border-color .2s, transform .2s var(--ease-out), box-shadow .2s; }
  .btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(22,26,23,.14); }
  .btn:active { transform: translateY(0); box-shadow: none; }
  .btn[aria-busy="true"] { position: relative; overflow: hidden; }
  .btn[aria-busy="true"]::after { content: ""; position: absolute; inset: auto 0 0 0; height: 3px; background: rgba(255,255,255,.7); transform-origin: left; animation: busy 1.1s var(--ease-io) infinite; }
  @keyframes busy { 0% { transform: scaleX(0); } 60% { transform: scaleX(1); } 100% { transform: scaleX(1); opacity: 0; } }
  .nav a { transition: background-color .2s; }

  /* Cabeçalho ganha sombra quando a página desce */
  .site-header { transition: box-shadow .3s; }
  .site-header.is-scrolled { box-shadow: 0 6px 24px rgba(22,26,23,.08); }
  .nav.is-open { animation: fadeUp .35s var(--ease-out) both; }

  /* Campos: erro "abana" uma vez; sucesso ao corrigir */
  .field--error input, .field--error select, .field--error textarea { animation: nudge .35s var(--ease-io); }
  @keyframes nudge { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
  .err:not(:empty) { animation: fadeUp .3s var(--ease-out); }
  .field input, .field select, .field textarea { transition: border-color .2s, box-shadow .2s; }
  .field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { box-shadow: 0 0 0 4px rgba(76,184,71,.22); }

  /* 3. Simular: abrir, mudar de passo, voltar */
  .sim[open] { animation: simIn .45s var(--ease-out); }
  .sim[open]::backdrop { animation: backIn .35s ease; }
  @keyframes simIn { from { opacity: 0; transform: translateY(24px) scale(.97); } to { opacity: 1; transform: none; } }
  @keyframes backIn { from { opacity: 0; } to { opacity: 1; } }
  .sim.is-closing { animation: simOut .22s ease both; }
  .sim.is-closing::backdrop { animation: backIn .22s ease reverse both; }
  @keyframes simOut { to { opacity: 0; transform: translateY(16px) scale(.98); } }
  .sim[data-dir="fwd"] .sim__pane:not([hidden]) { animation: paneFwd .45s var(--ease-out); }
  .sim[data-dir="back"] .sim__pane:not([hidden]) { animation: paneBack .45s var(--ease-out); }
  @keyframes paneFwd  { from { opacity: 0; transform: translateX(48px); } to { opacity: 1; transform: none; } }
  @keyframes paneBack { from { opacity: 0; transform: translateX(-48px); } to { opacity: 1; transform: none; } }
  .sim__choices li { animation: fadeUp .5s var(--ease-out) both; }
  .sim__choices li:nth-child(2) { animation-delay: .03s; } .sim__choices li:nth-child(3) { animation-delay: .06s; }
  .sim__choices li:nth-child(4) { animation-delay: .09s; } .sim__choices li:nth-child(5) { animation-delay: .12s; }
  .sim__choices li:nth-child(6) { animation-delay: .15s; } .sim__choices li:nth-child(7) { animation-delay: .18s; }
  .sim__choices li:nth-child(8) { animation-delay: .21s; } .sim__choices li:nth-child(9) { animation-delay: .24s; }
  .sim__choices li:nth-child(10) { animation-delay: .27s; }
  .sim__choices button { transition: color .2s, padding-left .3s var(--ease-out); }
  .sim__choices button:hover, .sim__choices button:focus-visible { padding-left: .75rem; }
  .sim .field { animation: fadeUp .5s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 35ms + 80ms); }

  /* 4. Confirmação de envio */
  .flash { animation: flashIn .6s var(--ease-out) both; }
  @keyframes flashIn { from { opacity: 0; transform: translateY(-100%); } to { opacity: 1; transform: none; } }
  .flash::after { animation: wall 1.1s var(--ease-io) .3s both; }
  .flash__icon circle { stroke-dasharray: 63; stroke-dashoffset: 63; animation: draw .6s var(--ease-out) .35s forwards; }
  .flash__icon path { stroke-dasharray: 20; stroke-dashoffset: 20; animation: draw .4s var(--ease-out) .8s forwards; }
  @keyframes draw { to { stroke-dashoffset: 0; } }

  /* Barra fixa em telemóvel sobe ao carregar */
  .mobile-bar { animation: barUp .6s var(--ease-out) .5s both; }
  @keyframes barUp { from { transform: translateY(100%); } to { transform: none; } }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Barra de progresso de leitura (criada pelo ds-motion.js) */
.read-progress { position: fixed; z-index: 60; top: 0; left: 0; right: 0; height: 3px; background: var(--green); transform: scaleX(0); transform-origin: left; pointer-events: none; }
/* SplitText: palavras em linha, sem quebrar o espaçamento */
.split-word { display: inline-block; will-change: transform; }
.parallax-frame { overflow: hidden; border-radius: var(--r); }