/* CAPEM — styles.css
   Identidade: documento normativo / diário oficial moderno.
   Papel institucional, fios duplos, § numerados, margem de anotações,
   selo dourado. Fontes: Libre Bodoni (display) · Varta (texto) ·
   Enriqueta (eyebrows/rótulos). Breakpoints vivem no responsive.css. */

:root {
    --ink: #0B1F3A;        /* azul institucional profundo */
    --blue: #2C6EAB;       /* azul código */
    --steel: #8C9BAB;      /* aço claro */
    --paper: #F4F7FA;      /* papel */
    --gold: #D98E04;       /* ouro do selo */

    --paper-2: #EBF0F5;    /* papel sombreado (faixa §2/§5) */
    --hairline: #C9D4DE;   /* fio fino */
    --ink-soft: #33506F;   /* texto de apoio sobre papel */
    --display: 'Libre Bodoni', Georgia, serif;
    --body: 'Varta', 'Segoe UI', sans-serif;
    --accent: 'Enriqueta', Georgia, serif;

    --rule-double: 3px double var(--ink);
    --lead-measure: 66ch;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--body);
    font-size: 17px;
    line-height: 1.68;
    -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

::selection { background: var(--gold); color: var(--paper); }

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: min(1160px, 92vw); margin-inline: auto; }

/* ---------- utilidades tipográficas ---------- */

.eyebrow, .doc-eyebrow, .masthead-edition, .gazette-line, .toc-head,
.faq-head, .card-tag, .seal-text, figcaption, .cover-links {
    font-family: var(--accent);
}

.doc-eyebrow {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 14px;
}
.doc-eyebrow::after {
    content: "";
    flex: 0 0 64px;
    border-top: 1px solid var(--gold);
    opacity: 0.6;
}

h1, h2, h3 {
    font-family: var(--display);
    font-weight: 700;
    line-height: 1.14;
    letter-spacing: -0.005em;
}

h2 { font-size: clamp(26px, 3.4vw, 40px); margin-bottom: 22px; }

h3 { font-size: 21px; margin-bottom: 10px; }

.doc-intro {
    max-width: var(--lead-measure);
    color: var(--ink-soft);
    margin-bottom: 34px;
}

.doc-text p + p { margin-top: 16px; }

.doc-text a, .doc-intro a {
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
    text-decoration-thickness: 1.5px;
}

/* ---------- reveal ---------- */

.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ---------- cabeçalho: folha de rosto ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: var(--paper);
    border-bottom: 1px solid var(--hairline);
    transition: box-shadow 0.25s ease;
}
.site-header.is-scrolled { box-shadow: 0 10px 28px -18px rgba(11, 31, 58, 0.45); }

.header-inner {
    width: min(1160px, 94vw);
    margin-inline: auto;
    display: flex;
    align-items: center;
    gap: 26px;
    padding-block: 12px;
}

.masthead { display: flex; flex-direction: column; gap: 2px; }

.masthead-edition {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--steel);
}

.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); }
.brand:hover { text-decoration: none; }

.brand-ring {
    width: 34px;
    height: 34px;
    border: 1.5px solid var(--gold);
    border-radius: 50%;
    display: grid;
    place-items: center;
    box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px var(--gold);
    flex: 0 0 auto;
}
.brand-ring i {
    width: 10px;
    height: 10px;
    background: var(--gold);
    border-radius: 50%;
}

.brand-block { display: flex; flex-direction: column; line-height: 1.1; }

.brand-name {
    font-family: var(--display);
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.brand-line {
    font-family: var(--accent);
    font-size: 10.5px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--steel);
    max-width: 46ch;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 38px;
    border: 1px solid var(--ink);
    background: transparent;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
}
.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--ink);
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 22px;
    font-family: var(--accent);
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.nav a {
    color: var(--ink-soft);
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding-block: 6px;
    border-bottom: 1px solid transparent;
}
.nav a b {
    font-family: var(--display);
    font-size: 11px;
    color: var(--gold);
    letter-spacing: 0.02em;
}
.nav a:hover { color: var(--ink); text-decoration: none; border-bottom-color: var(--gold); }

.header-rule {
    width: min(1160px, 94vw);
    margin-inline: auto;
    border-top: var(--rule-double);
    border-bottom: 1px solid var(--hairline);
    height: 3px;
}

/* ---------- capa do documento ---------- */

.cover {
    padding: 64px 0 72px;
    text-align: center;
    background:
        radial-gradient(1100px 320px at 50% -60px, rgba(44, 110, 171, 0.10), transparent 70%),
        var(--paper);
}

.gazette-line {
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.double-rule {
    width: min(520px, 70vw);
    margin: 14px auto 40px;
    border-top: var(--rule-double);
}

.cover-title {
    width: min(21ch, 92vw);
    margin-inline: auto;
    font-size: clamp(34px, 5.2vw, 62px);
}

.cover-lead {
    width: min(64ch, 90vw);
    margin: 22px auto 0;
    color: var(--ink-soft);
    font-size: 18.5px;
}

.cover-plate {
    position: relative;
    width: min(880px, 92vw);
    margin: 46px auto 0;
}

.cover-photo {
    border: 1px solid var(--hairline);
    outline: 1px solid var(--ink);
    outline-offset: 6px;
    background: #fff;
    padding: 10px;
}
.cover-photo img { filter: saturate(0.92); }
.cover-photo figcaption {
    padding-top: 12px;
    font-size: 12.5px;
    letter-spacing: 0.06em;
    color: var(--steel);
    font-style: italic;
}

.cover-seal {
    position: absolute;
    right: -18px;
    bottom: -30px;
    width: 118px;
    height: 118px;
    border-radius: 50%;
    border: 2px solid var(--gold);
    box-shadow: inset 0 0 0 5px var(--paper), inset 0 0 0 6.5px var(--gold);
    background: var(--paper);
    display: grid;
    place-items: center;
    transform: rotate(8deg);
    color: var(--gold);
}
.cover-seal small {
    font-family: var(--display);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-align: center;
    line-height: 1.5;
}

.cover-foot {
    width: min(760px, 92vw);
    margin: 58px auto 0;
    text-align: left;
}

.cover-links {
    font-size: 15px;
    color: var(--ink-soft);
    margin-bottom: 18px;
}
.xref {
    color: var(--blue);
    font-weight: 600;
    text-decoration: underline dotted;
    text-underline-offset: 3px;
}
.xref:hover { color: var(--gold); text-decoration-style: solid; }
.xref-solid {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 22px;
    border: 1.5px solid var(--gold);
    outline: 1px solid var(--gold);
    outline-offset: 3px;
    color: var(--gold);
    font-family: var(--accent);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}
.xref-solid:hover { background: var(--gold); color: var(--paper); text-decoration: none; }

.cover-facts { list-style: none; }
.cover-facts li {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-family: var(--accent);
    font-size: 15px;
    color: var(--ink);
    padding-block: 9px;
}
.cover-facts li::before {
    content: "§";
    color: var(--gold);
    font-family: var(--display);
    font-size: 14px;
}
.cover-facts li::after {
    content: "";
    order: 3;
    flex: 1;
    border-bottom: 1px dotted var(--steel);
    transform: translateY(-4px);
}
.cover-facts span { order: 2; }

/* ---------- sumário pontilhado ---------- */

.toc {
    width: min(760px, 92vw);
    margin: 0 auto 26px;
    border: 1px solid var(--hairline);
    border-top: var(--rule-double);
    background: #fff;
    padding: 26px 34px 20px;
}

.toc-head {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--steel);
    margin-bottom: 12px;
}

.toc ol { list-style: none; }

.toc a {
    display: flex;
    align-items: baseline;
    gap: 12px;
    color: var(--ink);
    padding-block: 8px;
    font-size: 16px;
}
.toc a:hover { text-decoration: none; color: var(--blue); }
.toc a b {
    font-family: var(--display);
    font-size: 13px;
    color: var(--gold);
    min-width: 34px;
}
.toc-dots {
    flex: 1;
    border-bottom: 1.5px dotted var(--steel);
    transform: translateY(-4px);
}
.toc-target { font-weight: 600; }

/* ---------- corpo do documento ---------- */

.doc { padding: 64px 0 70px; }
.doc-shaded {
    background: var(--paper-2);
    border-top: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
}
.doc-dark { background: var(--ink); color: #E8EEF4; }
.doc-dark h2, .doc-dark h3 { color: #fff; }
.doc-dark .doc-eyebrow { color: var(--gold); }
.doc-dark .doc-intro, .doc-dark .doc-text, .doc-dark .contact-list { color: #B9C7D6; }
.doc-dark a { color: #9CC3E8; }

.doc-grid {
    width: min(1160px, 92vw);
    margin-inline: auto;
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 44px;
    align-items: start;
}

.margin-note {
    position: sticky;
    top: 110px;
    border-left: 2px solid var(--gold);
    padding-left: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.margin-note b {
    font-family: var(--display);
    font-size: 30px;
    color: var(--gold);
    line-height: 1;
}
.margin-note small {
    font-family: var(--accent);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--steel);
    max-width: 14ch;
}
.margin-note-dark small { color: #7E93A9; }

.doc-head { margin-bottom: 30px; }

/* § 1 — texto + prancha */

.doc-columns {
    display: grid;
    grid-template-columns: minmax(0, 38fr) minmax(0, 62fr);
    gap: 40px;
    align-items: start;
}

.about-photo {
    background: #fff;
    padding: 9px;
    border: 1px solid var(--hairline);
    transform: rotate(-1.2deg);
    box-shadow: 8px 10px 0 -2px rgba(11, 31, 58, 0.08);
}
.about-photo figcaption {
    padding-top: 9px;
    font-size: 12px;
    font-style: italic;
    color: var(--steel);
}

.let-cap {
    float: left;
    font-family: var(--display);
    font-size: 64px;
    line-height: 0.78;
    padding: 6px 10px 0 0;
    color: var(--blue);
}

/* § 2 — artigos em livro-razão */

.articles { display: flex; flex-direction: column; }

.pillar-card {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 34px;
    padding: 6px 0 34px;
    align-items: start;
}
.article-rule {
    grid-column: 1 / -1;
    border-top: var(--rule-double);
    margin-bottom: 30px;
}

.card-media {
    background: #fff;
    padding: 8px;
    border: 1px solid var(--hairline);
}
.card-media img { filter: saturate(0.9); }

.card-tag {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--gold);
    border: 1px solid var(--gold);
    padding: 5px 12px;
    margin-bottom: 14px;
}

.alineas { list-style: none; margin-top: 14px; counter-reset: alinea; }
.alineas li {
    counter-increment: alinea;
    padding: 8px 0 8px 38px;
    position: relative;
    border-bottom: 1px dotted var(--hairline);
    color: var(--ink-soft);
    font-size: 15.5px;
}
.alineas li::before {
    content: counter(alinea, lower-alpha) ")";
    position: absolute;
    left: 6px;
    font-family: var(--display);
    color: var(--blue);
}

/* § 3 — pranchas na faixa escura */

.plates {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 34px;
}

.reading-photo {
    background: #fff;
    padding: 9px 9px 12px;
    box-shadow: 0 18px 34px -22px rgba(0, 0, 0, 0.7);
}
.reading-photo figcaption {
    padding-top: 10px;
    font-size: 12.5px;
    font-style: italic;
    color: #7E93A9;
}
.reading-photo figcaption b {
    font-style: normal;
    color: var(--gold);
    letter-spacing: 0.06em;
}

/* § 4 — índice de código (tabs como separadores de livro) */

.tabs {
    display: flex;
    gap: 6px;
    border-bottom: 1.5px solid var(--ink);
    margin-bottom: -1px;
    position: relative;
    z-index: 2;
    flex-wrap: wrap;
}

.tab {
    appearance: none;
    background: var(--paper-2);
    border: 1px solid var(--hairline);
    border-bottom: none;
    padding: 12px 22px 11px;
    font-family: var(--accent);
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-soft);
    cursor: pointer;
    transform: translateY(4px);
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.tab:hover { transform: translateY(1px); color: var(--ink); }
.tab.is-active {
    background: #fff;
    color: var(--ink);
    border-top: 2px solid var(--gold);
    transform: translateY(1px);
}
.tab:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.tab-panels { position: relative; z-index: 1; }

.tab-panel {
    background: #fff;
    border: 1px solid var(--hairline);
    padding: 36px 40px;
}
.tab-panel[hidden] { display: none; }
.tab-panel h3 {
    display: flex;
    align-items: baseline;
    gap: 12px;
    font-size: 22px;
}
.tab-panel h3::before {
    content: "¶";
    color: var(--gold);
    font-size: 18px;
}
.tab-panel p { margin-top: 10px; color: var(--ink-soft); }

/* § 5 — adesão: questionário + selo */

.adhesion {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 230px;
    gap: 40px;
    align-items: start;
    margin-bottom: 46px;
}

.audit-tool {
    background: #fff;
    border: 1px solid var(--hairline);
    border-top: var(--rule-double);
    padding: 30px 34px;
}

.audit-tool h3 { font-size: 22px; }

.audit-hint {
    font-size: 14.5px;
    color: var(--steel);
    font-style: italic;
    margin: 4px 0 18px;
}

.audit-items { display: flex; flex-direction: column; }

.audit-item {
    display: flex;
    align-items: baseline;
    gap: 14px;
    padding: 11px 2px;
    border-bottom: 1px dotted var(--hairline);
    cursor: pointer;
    font-size: 16px;
    color: var(--ink);
}
.audit-item:hover { background: var(--paper); }

.audit-item input[type="checkbox"] {
    appearance: none;
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    border: 1.5px solid var(--ink);
    background: #fff;
    cursor: pointer;
    position: relative;
    transform: translateY(2px);
}
.audit-item input[type="checkbox"]:checked { background: var(--gold); border-color: var(--gold); }
.audit-item input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 4.5px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid var(--paper);
    border-width: 0 2px 2px 0;
    transform: rotate(42deg);
}

.audit-result {
    margin-top: 20px;
    padding: 12px 16px;
    border-left: 4px solid var(--steel);
    background: var(--paper);
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
}

.adhesion-seal {
    position: sticky;
    top: 110px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.seal-check {
    width: 128px;
    height: 128px;
    border-radius: 50%;
    border: 2px solid var(--gold);
    box-shadow: inset 0 0 0 6px var(--paper-2), inset 0 0 0 7.5px var(--gold);
    display: grid;
    place-items: center;
    transform: rotate(-7deg);
    background: var(--paper-2);
}
.seal-check i {
    width: 44px;
    height: 22px;
    border-left: 5px solid var(--gold);
    border-bottom: 5px solid var(--gold);
    transform: rotate(-45deg) translate(2px, -4px);
}

.seal-text {
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--steel);
    max-width: 22ch;
}

/* FAQ — perguntas ao secretariado */

.faq-head {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--steel);
    margin-bottom: 14px;
}

.accordion { border-top: var(--rule-double); }

.accordion-item { border-bottom: 1px solid var(--hairline); }

.accordion-trigger {
    width: 100%;
    display: flex;
    align-items: baseline;
    gap: 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    padding: 18px 4px;
    font-family: var(--body);
    font-size: 17px;
    font-weight: 600;
    color: var(--ink);
}
.accordion-trigger:hover { color: var(--blue); }

.q-num {
    font-family: var(--display);
    font-size: 14px;
    color: var(--gold);
    letter-spacing: 0.04em;
    flex: 0 0 auto;
}

.acc-icon {
    margin-left: auto;
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    position: relative;
    transform: translateY(1px);
}
.acc-icon::before, .acc-icon::after {
    content: "";
    position: absolute;
    background: var(--blue);
    transition: transform 0.25s ease;
}
.acc-icon::before { left: 0; top: 6px; width: 14px; height: 2px; }
.acc-icon::after { left: 6px; top: 0; width: 2px; height: 14px; }
.accordion-trigger[aria-expanded="true"] .acc-icon::after { transform: scaleY(0); }

.accordion-panel { padding: 0 4px 22px 44px; }
.accordion-panel p { color: var(--ink-soft); font-size: 16px; }

/* atestados */

.voices { padding: 64px 0 70px; }

.voices-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 34px;
}

.voice {
    border-top: var(--rule-double);
    padding-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.voice blockquote p {
    font-family: var(--display);
    font-size: 18.5px;
    line-height: 1.5;
    font-style: italic;
    color: var(--ink);
}
.voice blockquote p::before { content: "“"; color: var(--gold); }
.voice blockquote p::after { content: "”"; color: var(--gold); }

.voice figcaption {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: auto;
}
.voice figcaption img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--gold);
    padding: 2px;
    background: var(--paper);
}
.voice figcaption span { display: flex; flex-direction: column; line-height: 1.35; }
.voice figcaption strong { font-size: 15px; }
.voice figcaption small { font-size: 12.5px; color: var(--steel); }

/* expediente (contato) */

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 46px;
    align-items: start;
}

.contact-list {
    list-style: none;
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.contact-list li {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 15.5px;
}
.contact-list li::before {
    content: "—";
    color: var(--gold);
}

.contact-card {
    background: rgba(244, 247, 250, 0.06);
    border: 1px solid rgba(140, 155, 171, 0.35);
    border-top: 3px double #9CC3E8;
    padding: 30px 32px;
}
.contact-card h3 { font-size: 20px; margin-bottom: 14px; }
.contact-card address { font-style: normal; color: #B9C7D6; }
.contact-card address p + p { margin-top: 6px; }
.contact-note {
    margin-top: 16px;
    font-family: var(--display);
    font-size: 17px;
    color: #9CC3E8;
}

/* colofão */

.site-footer {
    background: #081627;
    color: #B9C7D6;
    padding: 56px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 40px;
    padding-bottom: 34px;
    border-bottom: 1px solid rgba(140, 155, 171, 0.25);
}

.footer-brand strong {
    display: block;
    font-family: var(--display);
    font-size: 24px;
    letter-spacing: 0.16em;
    color: #fff;
    margin-bottom: 10px;
}
.footer-brand p { font-size: 14px; line-height: 1.7; }

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-family: var(--accent);
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.footer-nav a { color: #B9C7D6; }
.footer-nav a:hover { color: #fff; }

.footer-authority { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.footer-authority a { color: #9CC3E8; }

.footer-bottom {
    padding-top: 20px;
    font-size: 12.5px;
    letter-spacing: 0.04em;
    color: #7E93A9;
}

/* acessibilidade de foco */

a:focus-visible, button:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}
