.sobre-page {
  background:
    radial-gradient(circle at top left, rgba(227, 6, 19, 0.12), transparent 30%),
    linear-gradient(180deg, #050505 0%, #0a0a0a 45%, #030303 100%);
}

/* Só a folga da barra fixa — cada secção trata do seu próprio
   espaçamento vertical (ver .sobre-section), tal como na referência. */
.sobre-main {
  padding-top: var(--header-offset, 92px);
  color: #f8fafc;
}

/* O rodapé partilhado (style.css) tem margin-top:50px — nesta página
   isso deixava aparecer uma barra clara do fundo da página entre a
   última secção e o rodapé. Anula-se só aqui. */
body.sobre-page #site-footer {
  margin-top: -50px;
}

/* Container: largura máxima 1280px + padding lateral 24px (64px a
   partir do tablet) — os mesmos valores usados na referência para
   max-w-container-max + px-margin-mobile/md:px-margin-desktop. */
.sobre-hero,
.sobre-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (min-width: 768px) {
  .sobre-hero,
  .sobre-wrap {
    padding: 0 64px;
  }
}

/* Secções de conteúdo com a mesma respiração vertical generosa
   (~120px), como na referência. As de fundo alternado ocupam a largura
   toda do ecrã — daí ficarem fora do .sobre-wrap. */
.sobre-section {
  padding-top: clamp(56px, 9vw, 120px);
  padding-bottom: clamp(56px, 9vw, 120px);
}

/* O Hero fica mais colado à barra de navegação — só precisa de folga
   por baixo, antes da secção seguinte. */
.sobre-hero {
  padding-top: clamp(16px, 3vw, 32px);
  padding-bottom: clamp(56px, 9vw, 120px);
}

.sobre-section.sobre-band {
  background: rgba(255, 255, 255, 0.045);
}

.sobre-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr);
  gap: 32px;
  align-items: center;
}

/* Hero: texto solto, sem cartão — só a imagem tem caixa (tal como na
   referência). */
.sobre-copy h1 {
  margin: 0 0 24px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.sobre-highlight {
  color: #E30613;
}

.sobre-copy p {
  max-width: 42ch;
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  line-height: 1.6;
  color: rgba(226, 232, 240, 0.84);
}

.sobre-hero-visual {
  aspect-ratio: 1 / 1;
  width: calc(100% - clamp(12px, 2.5vw, 28px));
  margin-left: clamp(12px, 2.5vw, 28px);
  border-radius: 16px;
  overflow: hidden;
  background: #f4f4f4;
}

.sobre-hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Kicker: legenda simples em maiúsculas por cima de cada secção — sem
   pílula/borda (Quem Somos, História, Valores, Contacto usam todas o
   mesmo estilo, tal como na referência). */
.sobre-kicker {
  display: block;
  margin-bottom: 24px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.75rem;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted, #9ca3af);
}

.sobre-info-grid,
.sobre-contacto-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 32px;
  align-items: start;
}

/* Quem Somos e "Fala connosco." usam o título grande (headline-lg,
   48px); História, Propósito/Missão/Visão e Valores usam o título
   médio (headline-md, 32px) — como na referência. */
.sobre-info-body h2,
.contacto-copy h2 {
  margin: 0 0 24px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.sobre-info-body .sobre-info-quote,
.sobre-pmv-grid h3,
.sobre-valores-list h4 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.3;
  color: #ffffff;
}

.sobre-info-body .sobre-info-quote {
  max-width: 32ch;
  margin: 0;
}

.sobre-info-divider {
  height: 1px;
  margin: 0 0 24px;
  background: rgba(255, 255, 255, 0.1);
}

.sobre-info-body p,
.sobre-pmv-grid p,
.contacto-copy p,
.info-contacto p {
  max-width: 48ch;
  margin: 0 0 24px;
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(226, 232, 240, 0.84);
}

.sobre-info-body p:last-child {
  margin-bottom: 0;
}

/* História e Visão: um só parágrafo, em bloco compacto. */
.sobre-info-body .sobre-info-lead {
  max-width: 52ch;
  font-size: clamp(1.02rem, 1.4vw, 1.12rem);
  line-height: 1.6;
}

/* Quem Somos: parágrafo único logo abaixo do título, com a mesma
   largura que o título. */
#quem-somos .sobre-info-body h2 {
  margin-bottom: 16px;
}

#quem-somos .sobre-quem-texto {
  max-width: 78ch;
  font-size: 0.95rem;
  line-height: 1.65;
}

.sobre-info-grid--center {
  align-items: center;
}

.sobre-pmv-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.sobre-pmv-grid h3 {
  margin: 0 0 8px;
}

.sobre-pmv-grid p {
  margin: 0;
  max-width: none;
}

/* Valores: 2 colunas lidas de cima para baixo (01/02 à esquerda,
   03/04 à direita), cada um com número, título e descrição. */
.sobre-valores-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, auto);
  grid-auto-flow: column;
  column-gap: 48px;
  row-gap: 40px;
}

.sobre-valores-list li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: baseline;
  gap: 12px;
}

.sobre-valores-list .valor-num {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: #E30613;
}

.sobre-valores-list h4 {
  margin: 0 0 8px;
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  line-height: 1.25;
}

.sobre-valores-list p {
  max-width: 40ch;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(226, 232, 240, 0.84);
}

/* Contacto: coluna de texto solta (sem cartão); só o formulário tem
   caixa própria — igual à referência. */
.contacto-copy {
  display: block;
}

.contacto-copy h2 {
  margin-bottom: 16px;
  font-size: clamp(1.3rem, 1.9vw, 1.6rem);
}

/* Contacto: coluna de texto um pouco mais larga para o título caber
   numa só linha. */
.sobre-contacto-grid {
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 48px;
}

.contacto-copy p {
  margin-bottom: 20px;
}

@media (min-width: 981px) {
  .contacto-copy h2 {
    white-space: nowrap;
  }

  /* "Contacto" alinhado com o topo da caixa do formulário. */
  .contacto-copy .sobre-kicker {
    margin-bottom: 20px;
  }

  /* Quem Somos: o topo das letras do rótulo alinha com o topo das
     maiúsculas da primeira linha do título (Montserrat, line-height
     1.2 → as maiúsculas começam a ~0.26em do topo da linha). */
  #quem-somos .sobre-kicker {
    margin-bottom: 0;
    padding-top: calc(clamp(1.6rem, 3vw, 2.4rem) * 0.258 - 1.6px);
  }

  /* História, Visão e Valores: o rótulo não leva margem por baixo, para
     ficar exactamente a meio do conteúdo. */
  .sobre-info-grid--center .sobre-kicker {
    margin-bottom: 0;
  }
}

/* Quem Somos: título em duas linhas, como no PDF. */
#quem-somos .sobre-info-body h2 {
  max-width: 26ch;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.2;
}

.sobre-page .nowrap {
  white-space: nowrap;
}

.info-contacto p {
  margin: 0;
}

.info-contacto {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.contacto-form {
  display: grid;
  gap: 16px;
  padding: clamp(20px, 3vw, 32px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
}

/* Formulário em grelha de 2 colunas: nome e mensagem ocupam a linha
   toda; contacto e e-mail ficam lado a lado. */
.contacto-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 16px;
  row-gap: 18px;
}

.form-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.form-field--full {
  grid-column: 1 / -1;
}

.form-field label {
  line-height: 1.2;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  color: rgba(226, 232, 240, 0.9);
}

.form-actions {
  display: flex;
  margin-top: 4px;
}

.contacto-form input,
.contacto-form textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
  padding: 14px 16px;
  font-size: 0.96rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contacto-form input:focus,
.contacto-form textarea:focus {
  border-color: rgba(227, 6, 19, 0.6);
  box-shadow: 0 0 0 3px rgba(227, 6, 19, 0.15);
}

.contacto-form textarea {
  min-height: 160px;
  resize: vertical;
}

.contacto-form input::placeholder,
.contacto-form textarea::placeholder {
  color: rgba(203, 213, 225, 0.58);
}

.contacto-form button {
  justify-self: start;
  border: none;
  border-radius: 999px;
  min-height: 46px;
  padding: 0 22px;
  background: #E30613;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.contacto-form button:hover {
  background: #c00511;
}

.contacto-form button:disabled {
  opacity: 0.7;
  cursor: progress;
}

.contacto-feedback {
  display: none;
  align-items: flex-start;
  gap: 10px;
  grid-column: 1 / -1;
  margin-top: 4px;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.5;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(226, 232, 240, 0.92);
  animation: contacto-feedback-in 0.2s ease;
}

.contacto-feedback.is-visible {
  display: flex;
}

.contacto-feedback i {
  margin-top: 2px;
  font-size: 1rem;
  flex-shrink: 0;
}

.contacto-feedback[data-state="pending"] {
  color: rgba(226, 232, 240, 0.88);
}

.contacto-feedback[data-state="success"] {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.1);
  color: #86efac;
}

.contacto-feedback[data-state="warning"] {
  border-color: rgba(250, 204, 21, 0.35);
  background: rgba(250, 204, 21, 0.1);
  color: #fde68a;
}

.contacto-feedback[data-state="error"] {
  border-color: rgba(227, 6, 19, 0.35);
  background: rgba(227, 6, 19, 0.1);
  color: #ff9ca3;
}

@keyframes contacto-feedback-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body.theme-light.sobre-page {
  background:
    radial-gradient(circle at top left, rgba(227, 6, 19, 0.1), transparent 30%),
    linear-gradient(180deg, #f7f8fb 0%, #eef2f7 100%);
}

body.theme-light .sobre-main {
  color: #0f172a;
}

body.theme-light .sobre-section.sobre-band {
  background: rgba(15, 23, 42, 0.06);
}

body.theme-light .sobre-copy p {
  color: #334155;
}

body.theme-light .sobre-info-body h2,
body.theme-light .contacto-copy h2,
body.theme-light .sobre-info-body .sobre-info-quote,
body.theme-light .sobre-pmv-grid h3,
body.theme-light .sobre-valores-list h4 {
  color: #0f172a;
}

body.theme-light .sobre-info-body p,
body.theme-light .sobre-valores-list p,
body.theme-light .sobre-pmv-grid p,
body.theme-light .contacto-copy p,
body.theme-light .info-contacto p {
  color: #334155;
}

body.theme-light .sobre-info-divider,
body.theme-light .sobre-valores-list li {
  border-color: rgba(15, 23, 42, 0.1);
}

body.theme-light .sobre-info-divider {
  background: rgba(15, 23, 42, 0.1);
}

body.theme-light .contacto-form {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.1);
}

body.theme-light .contacto-feedback {
  border-color: rgba(15, 23, 42, 0.1);
  background: rgba(15, 23, 42, 0.03);
  color: #334155;
}

body.theme-light .contacto-feedback[data-state="success"] {
  border-color: rgba(21, 128, 61, 0.25);
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}

body.theme-light .contacto-feedback[data-state="warning"] {
  border-color: rgba(161, 98, 7, 0.25);
  background: rgba(250, 204, 21, 0.16);
  color: #a16207;
}

body.theme-light .contacto-feedback[data-state="error"] {
  border-color: rgba(227, 6, 19, 0.25);
  background: rgba(227, 6, 19, 0.08);
  color: #b8050f;
}

body.theme-light .contacto-form input,
body.theme-light .contacto-form textarea {
  background: rgba(15, 23, 42, 0.03);
  border-color: rgba(15, 23, 42, 0.1);
  color: #0f172a;
}

body.theme-light .form-field label {
  color: #0f172a;
}

body.theme-light .contacto-form input::placeholder,
body.theme-light .contacto-form textarea::placeholder {
  color: #64748b;
}

@media (max-width: 980px) {
  .sobre-hero-grid,
  .sobre-info-grid,
  .sobre-pmv-grid,
  .sobre-contacto-grid {
    grid-template-columns: 1fr;
  }

  .sobre-kicker {
    margin-bottom: 8px;
  }

  .sobre-hero-visual {
    width: 100%;
    margin-left: 0;
  }
}

@media (max-width: 720px) {
  .sobre-main {
    padding-top: calc(var(--header-offset, 92px) - 6px);
  }

  .sobre-hero-visual {
    aspect-ratio: 16 / 10;
  }

  .sobre-valores-list {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    grid-auto-flow: row;
    row-gap: 32px;
  }

  .contacto-form {
    grid-template-columns: 1fr;
  }

  .contacto-form button {
    width: 100%;
  }
}

/* ------------------------------------------------------------------
   Coluna da direita: todos os blocos (título, parágrafos e valores)
   partilham a mesma largura de leitura, para começarem e terminarem
   nas mesmas linhas verticais, com o mesmo ritmo de espaçamento.
   ------------------------------------------------------------------ */
.sobre-page {
  --sobre-measure: 680px;
}

.sobre-section {
  padding-top: clamp(64px, 8vw, 104px);
  padding-bottom: clamp(64px, 8vw, 104px);
}

.sobre-info-body {
  width: 100%;
  max-width: var(--sobre-measure);
}

#quem-somos .sobre-info-body h2 {
  max-width: none;
  margin-bottom: 20px;
}

.sobre-info-body p,
.sobre-info-body .sobre-info-lead,
#quem-somos .sobre-quem-texto {
  max-width: none;
  text-wrap: pretty;
}

/* Corpo de texto: Quem Somos (abaixo do título) e os parágrafos de
   História e Visão usam o mesmo tamanho e entrelinha. */
#quem-somos .sobre-quem-texto,
.sobre-info-body .sobre-info-lead {
  font-size: clamp(1rem, 1.25vw, 1.0625rem);
  line-height: 1.75;
}

/* Valores: mesma largura que os restantes blocos; número alinhado com
   a primeira linha do título de cada valor. */
.sobre-valores-list {
  column-gap: 56px;
  row-gap: 44px;
}

.sobre-valores-list li {
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 14px;
}

.sobre-valores-list .valor-num {
  line-height: 1.25;
  font-size: clamp(0.75rem, 1vw, 0.8rem);
}

.sobre-valores-list h4 {
  font-size: clamp(1.2rem, 1.8vw, 1.4rem);
  margin-bottom: 10px;
}

.sobre-valores-list p {
  max-width: none;
  font-size: 0.95rem;
  line-height: 1.65;
  text-wrap: wrap;
}

@media (max-width: 980px) {
  .sobre-info-body {
    max-width: none;
  }
}

/* ------------------------------------------------------------------
   Telemóvel e tablet: uma só coluna, por isso os textos ocupam a
   largura toda com quebra de linha normal — o text-wrap: pretty
   encurtava as últimas linhas e deixava a margem direita irregular.
   ------------------------------------------------------------------ */
@media (max-width: 980px) {
  .sobre-section {
    padding-top: clamp(48px, 8vw, 72px);
    padding-bottom: clamp(48px, 8vw, 72px);
  }

  .sobre-hero {
    padding-bottom: clamp(48px, 8vw, 72px);
  }

  .sobre-hero-grid {
    gap: 28px;
  }

  .sobre-copy h1 {
    margin-bottom: 16px;
  }

  .sobre-copy p {
    max-width: none;
    margin: 0;
  }

  /* A imagem deixa de ser quadrada: em tablet ocupava quase um ecrã. */
  .sobre-hero-visual {
    aspect-ratio: 16 / 9;
    max-height: 420px;
  }

  .sobre-kicker,
  #quem-somos .sobre-kicker,
  .sobre-info-grid--center .sobre-kicker,
  .contacto-copy .sobre-kicker {
    margin-bottom: 12px;
    padding-top: 0;
  }

  .sobre-info-grid,
  .sobre-contacto-grid {
    gap: 0;
  }

  .sobre-contacto-grid {
    row-gap: 32px;
  }

  #quem-somos .sobre-info-body h2 {
    font-size: clamp(1.5rem, 4.6vw, 2rem);
    margin-bottom: 16px;
  }

  .sobre-info-body p,
  .sobre-info-body .sobre-info-lead,
  #quem-somos .sobre-quem-texto,
  .sobre-valores-list p,
  .contacto-copy p {
    max-width: none;
    text-wrap: wrap;
    hyphens: manual;
  }

  #quem-somos .sobre-quem-texto,
  .sobre-info-body .sobre-info-lead {
    font-size: 1.0625rem;
    line-height: 1.7;
  }

  .sobre-valores-list {
    column-gap: 40px;
    row-gap: 32px;
  }

  .contacto-copy h2 {
    font-size: clamp(1.4rem, 4vw, 1.75rem);
  }
}

@media (max-width: 720px) {
  .sobre-hero-visual {
    aspect-ratio: 16 / 10;
  }

  #quem-somos .sobre-quem-texto,
  .sobre-info-body .sobre-info-lead {
    font-size: 1rem;
    line-height: 1.7;
  }

  /* Valores: número por cima do título, para o texto usar a largura
     toda em vez de ficar recuado. */
  .sobre-valores-list li {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .sobre-valores-list h4 {
    font-size: 1.2rem;
    margin-bottom: 6px;
  }

  .sobre-valores-list p {
    font-size: 0.975rem;
  }
}
