/* ============================================================
   NORMA — Associação para a Proteção dos Direitos Civis e Sociais
   Folha de estilos partilhada
   ============================================================ */

:root{
  --ink: #17181C;
  --paper: #FFFFFF;
  --paper-soft: #FAF9F7;
  --red: #A6192E;
  --red-deep: #7E1322;
  --red-soft: #F5E6E8;
  --stone: #63666A;
  --line: #E3E1DC;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --maxw: 1120px;
  --pad: clamp(1.25rem, 4vw, 3rem);
}

*,*::before,*::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *,*::before,*::after{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body{
  margin:0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,h2,h3{ font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0; }

a{ color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible{
  outline: 2px solid var(--red);
  outline-offset: 3px;
  border-radius: 2px;
}

.visually-hidden{
  position:absolute; width:1px; height:1px; margin:-1px; padding:0;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

.skip-link{
  position:absolute; left:1rem; top:-3rem;
  background:var(--ink); color:#fff; padding:0.6rem 1rem;
  text-decoration:none; font-size:0.9rem; z-index:200;
  transition: top .15s ease;
}
.skip-link:focus{ top:1rem; }

.wrap{ max-width: var(--maxw); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.wrap-narrow{ max-width: 760px; }

/* ---------- Header ---------- */
header.site{
  position: sticky; top:0; z-index:100;
  background: rgba(255,255,255,0.92);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.header-row{
  position: relative;
  display:flex; align-items:center; justify-content:space-between;
  gap: 1rem;
  padding-top: 1rem; padding-bottom: 1rem;
}
.wordmark{
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--red);
  text-decoration:none;
  display:flex; align-items:baseline; gap:0.05em;
}
.wordmark small{
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.55rem;
  letter-spacing: 0.06em;
  color: var(--stone);
  margin-left: 0.6rem;
  white-space: nowrap;
  display:none;
}
@media (min-width: 640px){ .wordmark small{ display:inline; } }

nav.primary ul{
  list-style:none; display:flex; gap: clamp(1rem, 2vw, 2rem);
  margin:0; padding:0;
}
nav.primary a{
  text-decoration:none; font-size: 0.95rem; color: var(--ink);
  padding: 0.3rem 0.1rem; border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
nav.primary a:hover{ color: var(--red); }
nav.primary a[aria-current]{ color: var(--red); border-bottom-color: var(--red); }

.menu-toggle{
  display:none;
  background:none; border: 1px solid var(--line); border-radius: 6px;
  padding: 0.5rem 0.7rem; font-size: 0.95rem; cursor:pointer;
  font-family: var(--sans);
}

@media (max-width: 760px){
  nav.primary{
    position: absolute; left:0; right:0; top: 100%;
    background: var(--paper); border-bottom: 1px solid var(--line);
    display:none;
  }
  nav.primary.open{ display:block; }
  nav.primary ul{ flex-direction: column; padding: 0.5rem var(--pad) 1.25rem; gap: 0.25rem; }
  nav.primary a{ display:block; padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
  .menu-toggle{ display:inline-block; }
}

/* ---------- Breadcrumb ---------- */
.breadcrumb{
  padding-top: 1.5rem; font-size: 0.85rem; color: var(--stone);
}
.breadcrumb a{ color: var(--stone); text-decoration: underline; text-underline-offset: 2px; }
.breadcrumb a:hover{ color: var(--red); }

/* ---------- Page header (non-home pages) ---------- */
.page-header{
  padding-top: clamp(1.5rem, 3vw, 2.25rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
}
.page-eyebrow{
  color: var(--red); font-family: var(--serif); font-style: italic;
  font-size: 1.05rem; margin: 0 0 0.75rem;
}
.page-title{
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  max-width: 24ch;
}
.page-lede{
  margin-top: 1.1rem; max-width: 62ch; color: var(--stone); font-size: 1.05rem;
}

/* ---------- Article layout (label + content) ---------- */
.article-section{
  padding-top: clamp(3rem, 6vw, 5rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
  border-bottom: 1px solid var(--line);
}
.article-section.soft{ background: var(--paper-soft); }
.article-section.tight{ padding-top: clamp(2rem, 4vw, 3rem); padding-bottom: clamp(2rem, 4vw, 3rem); }
.article-section.no-border{ border-bottom: none; }

.article-grid{
  display:flex; flex-wrap: wrap; gap: clamp(1.5rem, 4vw, 3.5rem);
}
.article-label{ flex: 0 0 auto; width: 100%; }
.article-body{ flex: 1 1 480px; min-width: 0; }
@media (min-width: 800px){
  .article-label{ width: 190px; }
}

.article-num{
  font-family: var(--serif); font-style: italic; font-weight: 500;
  color: var(--red); font-size: 1.05rem; margin: 0 0 0.35rem;
}
.article-caption{ color: var(--stone); font-size: 0.85rem; max-width: 20ch; }
.article-title{ font-size: clamp(1.4rem, 2.2vw, 1.85rem); margin-bottom: 1.1rem; }
.lede{ font-size: 1.05rem; max-width: 62ch; }
.lede + .lede, .lede + p, p + .lede{ margin-top: 1rem; }
.article-body h3.sub{
  font-family: var(--sans); font-weight: 700; font-size: 1.05rem;
  margin-top: 1.75rem; margin-bottom: 0.6rem;
}
.article-body p{ max-width: 62ch; }

/* ---------- Hero (home) ---------- */
.hero{
  padding-top: clamp(3rem, 7vw, 6rem);
  padding-bottom: clamp(3rem, 7vw, 5rem);
  border-bottom: 1px solid var(--line);
}
.hero-grid{ display:flex; flex-wrap:wrap; gap: clamp(1.5rem, 4vw, 3rem); }
.hero-rail{
  flex: 0 0 auto; width: 100%;
  display:flex; align-items:flex-start; gap: 1rem;
}
@media (min-width: 800px){
  .hero-rail{ width: 64px; flex-direction: column; align-self: stretch; position: relative; }
}
.hero-rule{ flex: 0 0 auto; width: 3px; background: var(--red); height: 2.2rem; }
@media (min-width: 800px){
  .hero-rule{
    position: absolute; top:0; left:0; width: 3px; height: 100%;
    transform-origin: top; transform: scaleY(0);
  }
  @media (prefers-reduced-motion: no-preference){
    .hero-rule{ animation: growRule 900ms 250ms cubic-bezier(.2,.7,.3,1) forwards; }
  }
  @media (prefers-reduced-motion: reduce){ .hero-rule{ transform: scaleY(1); } }
}
@keyframes growRule{ to{ transform: scaleY(1); } }

.hero-content{ flex: 1 1 520px; min-width:0; }
.hero-eyebrow{ color: var(--red); font-family: var(--serif); font-style: italic; font-size: 1.05rem; margin: 0 0 1rem; }
.hero-quote{
  margin: 0; font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.7rem, 3.6vw, 2.7rem); line-height: 1.28;
  max-width: 22ch; color: var(--ink);
}
.hero-cite{ display:block; margin-top: 1.1rem; font-family: var(--sans); font-size: 0.95rem; color: var(--stone); }
.hero-sub{ margin-top: 2rem; max-width: 56ch; color: var(--ink); }
.hero-facts{ margin-top: 1.5rem; color: var(--stone); font-size: 0.9rem; }
.hero-actions{ margin-top: 2rem; display:flex; flex-wrap:wrap; gap: 0.9rem; }

/* ---------- Buttons & links ---------- */
.btn{
  display:inline-block; text-decoration:none; font-family: var(--sans);
  font-weight: 600; font-size: 0.95rem; padding: 0.75rem 1.4rem;
  border-radius: 3px; border: 1px solid transparent; cursor:pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary{ background: var(--red); color:#fff; }
.btn-primary:hover{ background: var(--red-deep); }
.btn-secondary{ background: transparent; color: var(--ink); border-color: var(--line); }
.btn-secondary:hover{ border-color: var(--red); color: var(--red); }

.text-link{
  color: var(--red); text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: var(--red-soft);
}
.text-link:hover{ text-decoration-color: var(--red); }

.back-link{ display:inline-block; margin-top: 0.25rem; font-size: 0.92rem; }

/* ---------- Alíneas (lists of items) ---------- */
.alineas{ list-style:none; margin:0; padding:0; }
.alinea{ display:flex; gap: 1rem; padding: 1.35rem 0; border-top: 1px solid var(--line); }
.alinea:first-child{ border-top: none; padding-top: 0; }
.alinea-mark{ flex: 0 0 auto; width: 1.6rem; font-family: var(--serif); font-style: italic; color: var(--red); font-size: 1.05rem; padding-top: 0.1rem; }
.alinea-body h3{ font-family: var(--sans); font-weight: 700; font-size: 1.05rem; margin-bottom: 0.35rem; }
.alinea-body p{ margin:0; color: var(--stone); max-width: 58ch; }
.alinea-body .alinea-link{ display:inline-block; margin-top:0.5rem; font-size:0.9rem; }

/* ---------- Case entries (teasers) ---------- */
.cases{ display:flex; flex-direction:column; gap: 2.25rem; }
.case{ border-left: 3px solid var(--red); padding-left: 1.3rem; }
.case + .case{ margin-top: 2.25rem; }
.case-meta{ font-size: 0.85rem; color: var(--red); margin-bottom: 0.4rem; font-weight: 600; }
.case h3{ font-family: var(--sans); font-weight: 700; font-size: 1.15rem; margin-bottom: 0.5rem; }
.case p{ margin: 0 0 0.6rem; color: var(--ink); max-width: 62ch; }
.case .status{ color: var(--stone); font-size: 0.9rem; margin-bottom:0.6rem; }
.case a.readmore{ font-size: 0.92rem; }

/* ---------- Fact box ---------- */
.factbox{ border: 1px solid var(--line); padding: 1.25rem 1.4rem; margin-top: 1.75rem; max-width: 40ch; font-size: 0.92rem; }
.factbox dt{ color: var(--stone); margin-top: 0.7rem; }
.factbox dt:first-child{ margin-top:0; }
.factbox dd{ margin: 0.15rem 0 0; }

/* ---------- Stat row (figures) ---------- */
.stat-row{ display:flex; flex-wrap:wrap; gap: 2rem; margin: 2rem 0; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.stat{ flex: 1 1 180px; min-width: 150px; }
.stat .num{ font-family: var(--serif); font-weight: 600; font-size: clamp(1.6rem,3vw,2.1rem); color: var(--red); display:block; line-height:1.1; }
.stat .lbl{ display:block; margin-top: 0.35rem; color: var(--stone); font-size: 0.88rem; max-width: 26ch; }

/* ---------- Pull quote ---------- */
.pull{
  font-family: var(--serif); font-style: italic; font-size: clamp(1.15rem, 2vw, 1.4rem);
  color: var(--ink); border-left: 3px solid var(--red); padding: 0.2rem 0 0.2rem 1.3rem;
  margin: 2rem 0; max-width: 56ch; line-height: 1.45;
}
.pull cite{ display:block; font-style: normal; font-family: var(--sans); font-size: 0.85rem; color: var(--stone); margin-top: 0.6rem; }

/* ---------- Status timeline ---------- */
.timeline{ list-style:none; margin: 1.75rem 0; padding:0; max-width: 46ch; }
.timeline li{
  position: relative; padding: 0 0 1.5rem 1.75rem; border-left: 2px solid var(--line);
}
.timeline li:last-child{ border-color: transparent; padding-bottom: 0; }
.timeline li::before{
  content:""; position:absolute; left: -6.5px; top: 0.2rem;
  width: 11px; height: 11px; border-radius: 50%; background: var(--paper);
  border: 2px solid var(--stone);
}
.timeline li.done::before{ background: var(--red); border-color: var(--red); }
.timeline li.current::before{ background: var(--paper); border-color: var(--red); }
.timeline .t-label{ font-weight: 600; font-size: 0.95rem; }
.timeline .t-desc{ color: var(--stone); font-size: 0.88rem; margin-top: 0.15rem; }

/* ---------- Document cards ---------- */
.doc-list{ display:flex; flex-direction:column; gap: 1.1rem; margin-top: 1.5rem; }
.doc-card{
  display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap: 1rem;
  border: 1px solid var(--line); padding: 1.1rem 1.3rem;
}
.doc-card .doc-info h3{ font-family: var(--sans); font-weight:700; font-size: 1rem; margin-bottom: 0.25rem; }
.doc-card .doc-info p{ margin:0; color: var(--stone); font-size: 0.88rem; }
.doc-card .doc-meta{ color: var(--stone); font-size: 0.8rem; margin-top:0.35rem; }

/* ---------- Link list (external resources) ---------- */
.link-list{ list-style:none; margin: 1.5rem 0 0; padding:0; }
.link-list li{ padding: 0.9rem 0; border-top: 1px solid var(--line); }
.link-list li:first-child{ border-top: none; }
.link-list a.res-title{ font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.link-list .res-desc{ color: var(--stone); font-size: 0.88rem; margin-top: 0.25rem; max-width: 58ch; }

/* ---------- Contact ---------- */
.contact-actions{ margin-top: 1.5rem; display:flex; flex-wrap:wrap; gap:0.9rem; align-items:center; }
.contact-email{ font-size: 0.95rem; color: var(--stone); }

.contact-grid{ display:flex; flex-wrap:wrap; gap: clamp(2rem,4vw,3.5rem); margin-top:1rem; }
.contact-col{ flex:1 1 260px; min-width:240px; }
.contact-col h3{ font-family: var(--sans); font-weight:700; font-size:1rem; margin-bottom:0.6rem; }
.contact-col p{ color: var(--stone); font-size: 0.95rem; max-width: 40ch; }

/* ---------- 404 ---------- */
.notfound{ padding: clamp(4rem,10vw,7rem) 0; text-align:left; }
.notfound .article-num{ font-size:1.3rem; }

/* ---------- Footer ---------- */
footer.site{ padding: clamp(2rem, 4vw, 3rem) 0; color: var(--stone); font-size: 0.85rem; }
footer.site .foot-top{ display:flex; flex-wrap:wrap; gap: 2.5rem; justify-content:space-between; }
footer.site .wordmark-foot{ font-family: var(--sans); font-weight:700; color: var(--red); font-size:1.1rem; }
footer.site p{ margin: 0.5rem 0 0; max-width: 46ch; }
footer.site nav.foot-nav ul{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:0.5rem; }
footer.site nav.foot-nav a{ text-decoration:none; color: var(--stone); }
footer.site nav.foot-nav a:hover{ color: var(--red); }
footer.site .foot-row{
  display:flex; flex-wrap:wrap; justify-content:space-between; gap:1rem;
  margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line);
}
