/* Risitola — folha de estilo comum a todas as páginas */

:root {
  --bg: #f4f0e8;
  --bg-alt: #e7e1d5;
  --bg-dark: #20242a;
  --ink: #22201b;
  --ink-soft: #776f62;
  --ink-light: #f4f0e8;
  --accent: #2c4668;
  --accent-2: #a06a2c;
  --rule: rgba(34, 32, 27, 0.28);
  --rule-dark: rgba(244, 240, 232, 0.3);
  --gap: 72px;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.9;
  overflow-x: hidden;
}

.wrap {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- tipografia ---------- */

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

h1 { font-size: clamp(1.95rem, 4.1vw, 3rem); }
h2 { font-size: clamp(1.45rem, 2.5vw, 1.95rem); margin-bottom: 18px; }
h3 { font-size: 1.2rem; margin: 34px 0 10px; }

p { margin: 0 0 26px; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.dark :focus-visible { outline-color: var(--ink-light); }

.label {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-2);
  line-height: 1.6;
  margin: 0 0 12px;
}

.caption {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0;
}

.dark .caption { color: rgba(244, 240, 232, 0.72); }

/* ---------- ritmo de linhas (separador entrelaçado) ---------- */

.weave { margin: var(--gap) 0; }
.weave::before { content: ""; display: block; height: 2px; background: var(--accent); }
.weave::after { content: ""; display: block; height: 1px; background: var(--accent-2); margin-top: 6px; }

.weave-tight { margin: 34px 0; }
.weave-head { margin: 0 0 40px; }

.dark .weave::before { background: rgba(244, 240, 232, 0.65); }

/* ---------- grelha de células ---------- */

.cells {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}

.cells > * {
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 26px 28px;
  min-width: 0;
}

.dark .cells { border-color: var(--rule-dark); }
.dark .cells > * { border-color: var(--rule-dark); }

.c3 { grid-column: span 3; }
.c4 { grid-column: span 4; }
.c5 { grid-column: span 5; }
.c6 { grid-column: span 6; }
.c7 { grid-column: span 7; }
.c8 { grid-column: span 8; }
.c9 { grid-column: span 9; }
.c12 { grid-column: span 12; }

.pause { background: transparent; }

/* ---------- cabeçalho e navegação ---------- */

.site-head {
  border-bottom: 2px solid var(--accent);
  padding: 22px 0 0;
}

.head-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 28px;
  padding-bottom: 14px;
}

.brand {
  font-family: var(--serif);
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover { text-decoration: underline; }

.brand-note {
  display: block;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-2);
  line-height: 1.8;
}

.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin: 0;
  padding: 0;
}

.site-nav a {
  font-size: 15px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  border-bottom-color: var(--accent);
  color: var(--accent);
}

/* ---------- hero ---------- */

.hero { padding: 58px 0 0; }

.hero-title {
  border-top: 2px solid var(--accent);
  border-bottom: 1px solid var(--accent-2);
  padding: 34px 0;
}

.hero-title h1 {
  max-width: 75%;
}

.hero-cells { margin-top: 0; }

.topics {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 16px;
  line-height: 1.8;
}

.topics li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
}

.topics li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 8px;
  height: 8px;
  background: var(--accent);
}

/* ---------- secções ---------- */

section { padding: var(--gap) 0; }

.band-alt { background: var(--bg-alt); }

.dark {
  background: var(--bg-dark);
  color: var(--ink-light);
}

.dark h2, .dark h3 { color: var(--ink-light); }
.dark .label { color: #c79a5f; }
.dark a { color: #c3d2e8; }

.measure { max-width: 68ch; }

.two-col {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0 40px;
}

.two-col > .c4 { grid-column: span 4; }
.two-col > .c8 { grid-column: span 8; }

/* ---------- listas de verificação ---------- */

.checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
  list-style: none;
  margin: 30px 0 0;
  padding: 0;
}

.checks li {
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 18px 22px 18px 44px;
  position: relative;
  font-size: 16px;
  line-height: 1.75;
}

.checks li::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 1.55em;
  width: 9px;
  height: 9px;
  border: 1px solid var(--accent);
  background: var(--accent-2);
}

.dark .checks { border-color: var(--rule-dark); }
.dark .checks li { border-color: var(--rule-dark); }
.dark .checks li::before { border-color: rgba(244, 240, 232, 0.8); }

/* ---------- imagens ---------- */

figure { margin: 0; }

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

.fig-cell { padding: 0; }

.fig-side {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 14px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0 44px;
  align-items: start;
}

.detail-figure {
  grid-column: 2 / span 4;
  border: 1px solid var(--rule-dark);
  padding: 10px 10px 16px;
}

.detail-figure figcaption {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(244, 240, 232, 0.72);
}

.detail-text { grid-column: 7 / span 6; }

/* ---------- página "sobre" ---------- */

.about-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0 44px;
}

.about-side {
  grid-column: span 3;
  border-right: 1px solid var(--rule);
  padding-right: 24px;
}

.about-side ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 15px;
  line-height: 1.7;
}

.about-side li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 16px;
  color: var(--ink-soft);
}

.about-side li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 8px;
  height: 8px;
  background: var(--accent-2);
}

.about-main { grid-column: 4 / span 9; }

/* ---------- páginas de texto legal ---------- */

.doc-head {
  border-top: 2px solid var(--accent);
  border-bottom: 1px solid var(--accent-2);
  padding: 30px 0;
  margin-top: 46px;
}

.doc-body { padding: var(--gap) 0; }
.doc-body .measure h2 { margin-top: 46px; }
.doc-body .measure h2:first-of-type { margin-top: 0; }

/* ---------- rodapé ---------- */

.site-foot {
  border-top: 2px solid var(--accent);
  padding-top: 6px;
  margin-top: 0;
}

.site-foot .inner-line {
  height: 1px;
  background: var(--accent-2);
  margin-bottom: 40px;
}

.foot-cells { margin-bottom: 40px; }

.foot-cells > div { font-size: 15px; line-height: 1.8; }

.foot-cells .foot-name {
  font-family: var(--serif);
  font-size: 1.25rem;
}

.foot-cells ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.foot-cells li { margin-bottom: 6px; }

.foot-cells a { color: var(--accent); }

.foot-note {
  font-size: 14px;
  color: var(--ink-soft);
  padding-bottom: 40px;
  margin: 0;
}

/* ---------- comportamento responsivo ---------- */

@media (max-width: 960px) {
  :root { --gap: 52px; }

  .hero-title h1 { max-width: 100%; }

  .c3, .c4, .c5, .c6, .c7, .c8, .c9 { grid-column: span 6; }
  .pause { display: none; }

  .two-col > .c4,
  .two-col > .c8 { grid-column: span 12; }

  .two-col > .c4 { margin-bottom: 18px; }

  .detail-figure { grid-column: span 6; }
  .detail-text { grid-column: span 6; }

  .about-side {
    grid-column: span 12;
    border-right: 0;
    border-bottom: 1px solid var(--rule);
    padding-right: 0;
    padding-bottom: 22px;
    margin-bottom: 32px;
  }

  .about-side ul { display: flex; flex-wrap: wrap; gap: 0 28px; }
  .about-main { grid-column: span 12; }
}

@media (max-width: 680px) {
  :root { --gap: 44px; }

  body { font-size: 17px; line-height: 1.85; }

  .wrap { padding: 0 18px; }

  .head-inner { flex-direction: column; align-items: flex-start; }

  .site-nav ul { gap: 4px 18px; }

  .hero { padding-top: 34px; }

  .cells { grid-template-columns: 1fr; }
  .cells > * { grid-column: span 1 !important; padding: 22px 20px; }

  .checks { grid-template-columns: 1fr; }

  .detail-grid { gap: 0; }
  .detail-figure,
  .detail-text { grid-column: span 12; }
  .detail-text { margin-top: 30px; }
}
