/* Código Pétreo — site institucional
   Pedra e luz: superfície facetada, geometria octogonal do emblema, tipografia angular. */

@font-face { font-family: "Chakra Petch"; src: url("../fonts/chakra-petch-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Chakra Petch"; src: url("../fonts/chakra-petch-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --night: #1e1f19;     /* pedra-noite: fundo do topo e do rodapé */
  --dark: #2b2c22;      /* oliva escuro */
  --olive: #6c6b4b;     /* cor institucional */
  --olive-soft: #a9a784;/* texto secundário sobre escuro */
  --mist: #ecebe5;      /* pedra clara: secções alternadas */
  --brass: #c9a44c;     /* latão: único acento */
  --ink: #1c1d16;       /* títulos sobre claro */
  --text: #34352c;      /* texto corrido sobre claro */
  --paper: #ffffff;
  --on-dark: #e6e4da;
  --on-dark-strong: #f4f2ea;

  --display: "Chakra Petch", "Barlow", "Arial Narrow", sans-serif;
  --body: "Barlow", "Segoe UI", system-ui, -apple-system, sans-serif;

  --max: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  --header-h: 80px;
  --cut: 22px;                       /* chanfro dos painéis, como o emblema */
  --octagon: polygon(29.3% 0, 70.7% 0, 100% 29.3%, 100% 70.7%, 70.7% 100%, 29.3% 100%, 0 70.7%, 0 29.3%);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font-family: var(--body); font-size: 1.125rem; line-height: 1.6; color: var(--text); background: var(--paper); text-rendering: optimizeLegibility; }
img, svg { display: block; max-width: 100%; }
[id] { scroll-margin-top: calc(var(--header-h) + 8px); }

h1, h2, h3 { font-family: var(--display); font-weight: 600; color: var(--ink); line-height: 1.08; letter-spacing: -0.01em; margin: 0 0 0.5em; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 6.4vw, 5.4rem); }
h2 { font-size: clamp(2rem, 3.8vw, 3.1rem); }
h3 { font-size: 1.28rem; line-height: 1.22; letter-spacing: 0; margin-bottom: 0.35em; }
p { margin: 0 0 1em; max-width: 66ch; }
.lead { font-size: clamp(1.2rem, 1.6vw, 1.35rem); line-height: 1.5; color: var(--olive); }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; }
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.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 { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--brass); color: var(--night); padding: 10px 16px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

/* ------------------------------------------------------------ cabeçalho */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(30, 31, 25, 0.94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(169, 167, 132, 0.18); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 24px; }
.brand { display: block; flex: none; }
.brand img { height: 50px; width: auto; }
.nav { display: flex; gap: clamp(14px, 2vw, 30px); align-items: center; }
.nav a { color: var(--on-dark); text-decoration: none; font-weight: 500; font-size: 1rem; padding: 8px 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--brass); color: var(--on-dark-strong); }
.nav-toggle { display: none; background: none; border: 0; color: var(--on-dark-strong); padding: 8px; margin-right: -8px; cursor: pointer; }
.nav-toggle svg { width: 28px; height: 28px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .nav { position: absolute; top: var(--header-h); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--night); padding: 8px var(--gutter) 24px; border-bottom: 1px solid rgba(169, 167, 132, 0.25); display: none; }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 0; font-size: 1.1rem; border-bottom: 1px solid rgba(169, 167, 132, 0.15); }
  .brand img { height: 42px; }
}

/* ------------------------------------------------------------ topo: pedra facetada iluminada */
.hero { position: relative; isolation: isolate; min-height: calc(100svh - var(--header-h)); display: flex; align-items: center; background: var(--night) url("../img/facets-dark.jpg") center / cover no-repeat; color: var(--on-dark); overflow: hidden; }
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(30, 31, 25, 0.88) 0%, rgba(30, 31, 25, 0.62) 42%, rgba(30, 31, 25, 0.05) 78%); pointer-events: none; }
.hero__inner { padding-block: clamp(72px, 12vh, 140px); }
.hero h1 { color: var(--on-dark-strong); max-width: 12.5em; margin-bottom: 0.45em; }
.hero__lead { font-size: clamp(1.2rem, 1.7vw, 1.4rem); line-height: 1.5; color: #d3d1c3; max-width: 40ch; margin-bottom: 2.2em; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* botões chanfrados: o chanfro vive no ::before para o contorno de foco não ser cortado */
.btn { position: relative; isolation: isolate; display: inline-flex; align-items: center; gap: 0.6em; padding: 0.95em 1.55em; font-family: var(--display); font-weight: 600; font-size: 1.05rem; line-height: 1; text-decoration: none; color: var(--night); }
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--brass); clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px)); transition: background-color 0.15s ease; }
.btn:hover::before { background: #d9b863; }
.btn--ghost { color: var(--on-dark-strong); }
.btn--ghost::before { background: rgba(241, 239, 231, 0.13); }
.btn--ghost:hover::before { background: rgba(241, 239, 231, 0.22); }
.btn svg { width: 1.15em; height: 1.15em; }

/* ------------------------------------------------------------ secções */
.section { padding-block: clamp(72px, 10vw, 128px); }
.section--mist { background: var(--mist); }
.section--dark { background: var(--dark) url("../img/facets-dark.jpg") center / cover no-repeat; color: var(--on-dark); }
.section--dark h2, .section--dark h3 { color: var(--on-dark-strong); }
.section--dark .lead { color: #d3d1c3; }
.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head p:last-child { margin-bottom: 0; }

/* insígnia octogonal (geometria do emblema) */
.badge { flex: none; width: 56px; height: 56px; display: grid; place-items: center; background: var(--olive); color: #fff; clip-path: var(--octagon); }
.badge svg { width: 52%; height: 52%; }
.badge--lg { width: 72px; height: 72px; }
.badge--light { background: var(--mist); color: var(--dark); }
.badge--brass { background: var(--brass); color: var(--night); }

/* quem somos */
.about { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 88px); align-items: start; }
.verbs { list-style: none; margin: 0; padding: clamp(28px, 3vw, 40px); background: var(--mist); display: grid; gap: 28px; clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%); }
.verbs li { display: grid; grid-template-columns: 56px 1fr; gap: 20px; align-items: start; }
.verbs h3 { margin-top: 4px; }
.verbs p { margin: 0; font-size: 1.05rem; }

/* missão e visão */
.purpose { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.statement { position: relative; padding: clamp(32px, 4vw, 52px); color: var(--on-dark); background: var(--olive) url("../img/facets-olive.jpg") center / cover; clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%); min-height: 100%; }
.statement--dark { background: var(--dark) url("../img/facets-dark-panel.jpg") center / cover; }
.statement svg.statement__icon { width: 40px; height: 40px; color: var(--on-dark-strong); margin-bottom: 26px; }
.statement h3 { color: var(--on-dark-strong); font-size: 1.15rem; font-weight: 500; margin-bottom: 0.6em; opacity: 0.9; }
.statement p { font-size: clamp(1.2rem, 1.7vw, 1.42rem); line-height: 1.45; color: #fff; margin: 0; }

/* valores */
.values { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(20px, 2.5vw, 36px); }
.values li { display: flex; flex-direction: column; gap: 18px; }
.values h3 { margin: 0; }
.values p { margin: 0; font-size: 1.02rem; }

/* atividade */
.areas { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.panel { background: var(--paper); padding: clamp(28px, 3vw, 40px); display: grid; grid-template-columns: 56px 1fr; gap: 22px; clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%); }
.panel h3 { margin-top: 6px; }
.panel p { margin: 0; font-size: 1.05rem; }
.panel--focus { background: var(--dark); color: var(--on-dark); }
.panel--focus h3 { color: var(--on-dark-strong); }

/* dupla utilização */
.dual { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 80px); align-items: center; }
.venn { width: 100%; max-width: 540px; height: auto; }
.venn text { font-family: var(--body); }
.venn .venn__focus { font-family: var(--display); font-weight: 600; }
.points { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 22px; }
.points li { display: grid; grid-template-columns: 48px 1fr; gap: 18px; align-items: center; }
.points .badge { width: 48px; height: 48px; }
.points p { margin: 0; color: var(--on-dark); }

/* setores */
.sectors { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.sector { background: var(--mist); display: flex; flex-direction: column; }
.sector__media { position: relative; aspect-ratio: 16 / 9.25; background: var(--olive); }
.sector__media img { width: 100%; height: 100%; object-fit: cover; }
.sector__media svg { position: absolute; left: 22px; top: 50%; translate: 0 -50%; width: 44px; height: 44px; color: #fff; }
.sector__body { padding: 22px 22px 26px; }
.sector__body p { margin: 0; font-size: 1.02rem; }

/* como trabalhamos — a única sequência numerada do site */
.phases { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); column-gap: 10px; counter-reset: fase; }
.phase { counter-increment: fase; display: flex; flex-direction: column; }
.phase__bar { height: 88px; display: flex; align-items: center; gap: 14px; padding-left: 26px; color: #fff; margin-right: -28px; clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 50%, calc(100% - 28px) 100%, 0 100%, 28px 50%); }
.phase:first-child .phase__bar { clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 50%, calc(100% - 28px) 100%, 0 100%); padding-left: 22px; }
.phase:not(:first-child) .phase__bar { padding-left: 44px; }
.phase__bar::before { content: counter(fase, decimal-leading-zero); font-family: var(--display); font-weight: 600; font-size: 1.7rem; line-height: 1; }
.phase__bar svg { width: 30px; height: 30px; }
.phase:nth-child(1) .phase__bar { background: #8e8c68; }
.phase:nth-child(2) .phase__bar { background: #7d7b5a; }
.phase:nth-child(3) .phase__bar { background: #6c6b4b; }
.phase:nth-child(4) .phase__bar { background: #56563d; }
.phase:nth-child(5) .phase__bar { background: #3f402f; }
.phase:last-child .phase__bar { margin-right: 0; }
.phase h3 { margin: 24px 16px 0.4em 0; }
.phase p { margin: 0 16px 0 0; font-size: 1.02rem; }

/* compromissos */
.commit { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.25fr); gap: clamp(40px, 6vw, 80px); align-items: start; }
.commit__intro { padding: clamp(32px, 4vw, 52px); background: var(--dark) url("../img/facets-dark-panel.jpg") center / cover; color: var(--on-dark); clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%); }
.commit__intro h2 { color: var(--on-dark-strong); }
.commit__intro p { font-size: clamp(1.2rem, 1.7vw, 1.42rem); line-height: 1.45; color: #fff; margin: 0; }
.commit__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 30px; }
.commit__list li { display: grid; grid-template-columns: 56px 1fr; gap: 22px; }
.commit__list h3 { margin-top: 4px; }
.commit__list p { margin: 0; font-size: 1.05rem; }

/* contacto */
.contact { max-width: 860px; }
.contact p { color: #d3d1c3; }
.mail { display: inline-block; margin: 0.35em 0 0.9em; font-family: var(--display); font-weight: 600; font-size: clamp(1.7rem, 4.6vw, 3.3rem); line-height: 1.1; color: var(--on-dark-strong); text-decoration: underline; text-decoration-color: var(--brass); text-decoration-thickness: 3px; text-underline-offset: 10px; overflow-wrap: anywhere; }
.mail:hover { color: #fff; text-decoration-color: #d9b863; }

/* rodapé */
.site-footer { background: var(--night); color: var(--olive-soft); padding: 56px 0 40px; font-size: 0.95rem; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px 48px; padding-bottom: 32px; border-bottom: 1px solid rgba(169, 167, 132, 0.2); }
.footer-top img { height: 44px; width: auto; opacity: 0.82; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; }
.footer-nav a { color: var(--on-dark); text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; text-decoration-color: var(--brass); }
.legal-info { margin-top: 28px; font-size: 0.85rem; line-height: 1.6; max-width: 110ch; color: #8f8d6f; }
.legal-info p { max-width: none; margin: 0 0 0.6em; }
.legal-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 14px; font-size: 0.9rem; }
.legal-links a { color: var(--on-dark); }

/* páginas legais */
.legal { padding-block: clamp(56px, 8vw, 96px); }
.legal .wrap { max-width: 820px; }
.legal h1 { font-size: clamp(2.2rem, 4.4vw, 3.2rem); }
.legal h2 { font-size: 1.45rem; margin-top: 2em; }
.legal p, .legal li { max-width: 72ch; }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: 0.4em; }
.updated { color: var(--olive); font-size: 1rem; }

/* ------------------------------------------------------------ ecrãs menores */
@media (max-width: 1080px) {
  .values { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 40px; }
  .sectors { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .phases { grid-template-columns: 1fr; row-gap: 26px; }
  .phase__bar { margin-right: 0; height: 72px; }
  .phase:not(:first-child) .phase__bar { padding-left: 22px; clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 50%, calc(100% - 28px) 100%, 0 100%); }
  .phase h3 { margin-top: 16px; }
}
@media (max-width: 860px) {
  .about, .purpose, .areas, .dual, .commit { grid-template-columns: 1fr; }
  .venn { margin-inline: auto; max-width: 440px; }
  .values { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 1.0625rem; }
  .values, .sectors { grid-template-columns: 1fr; }
  .values li { display: grid; grid-template-columns: 56px 1fr; gap: 6px 20px; }
  .values li .badge { grid-row: span 2; }
  .panel, .verbs li, .commit__list li { grid-template-columns: 48px 1fr; gap: 18px; }
  .panel .badge, .verbs .badge, .commit__list .badge { width: 48px; height: 48px; }
  .hero::after { background: linear-gradient(180deg, rgba(30, 31, 25, 0.7) 0%, rgba(30, 31, 25, 0.82) 100%); }
}
