/* ==== Convento do Desagravo — Investor Summary ==== */

:root {
  --paper: #f6f1e7;
  --paper-2: #efe8d8;
  --ink: #1a1a17;
  --ink-soft: #2c2c28;
  --muted: #6b6962;
  --rule: #d9d1bd;
  --sage: #7d8a6f;
  --sage-deep: #4d5a44;
  --brass: #9a7a3e;
  --brass-soft: #b69556;
  --serif: "Cormorant Garamond", "Cormorant", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; }

/* ---- Type ---- */
.label {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--muted);
}
.label.brass { color: var(--brass); }
.label.ink { color: var(--ink); }

.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--brass);
}

.serif {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.005em;
}

h1, h2, h3, h4 { margin: 0; font-weight: 400; }

.display {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(48px, 7vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.headline {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(36px, 4.4vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-wrap: pretty;
  max-width: 22ch;
}

.subhead {
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.3;
  color: var(--ink-soft);
  max-width: 38ch;
  text-wrap: pretty;
}

.body {
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 62ch;
  text-wrap: pretty;
}

.body.lede {
  font-family: var(--serif);
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1.4;
  color: var(--ink);
  max-width: 36ch;
  font-weight: 400;
}

.tiny {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--muted);
  line-height: 1.5;
}

.numeral {
  font-family: var(--serif);
  font-weight: 300;
  letter-spacing: -0.02em;
}

/* ---- Layout shell ---- */
.shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 56px;
}
@media (max-width: 720px) {
  .shell { padding: 0 24px; }
}

section.chapter {
  position: relative;
  padding: 120px 0;
  border-top: 1px solid var(--rule);
}
section.chapter:first-of-type { border-top: 0; }

.ch-head {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 32px;
  align-items: baseline;
  margin-bottom: 56px;
}
.ch-num {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 56px;
  line-height: 1;
  color: var(--brass);
  letter-spacing: -0.02em;
}
.ch-eyebrow { display: block; margin-bottom: 14px; }

/* ---- Top nav (sticky chapter rail) ---- */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  height: 64px;
  padding: 0 32px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Brand column — left */
.top-bar-brand { display: flex; align-items: center; flex: 0 0 auto; }
.top-bar .brand {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 17px;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--ink);
  text-decoration: none;
  position: relative;
}
.top-bar .brand::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--brass);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.top-bar .brand:hover::after { transform: scaleX(1); }

/* Nav — absolutely centered in bar */
.top-bar .meta {
  display: flex;
  gap: 32px;
  align-items: center;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

/* Vertical rule separators via pseudo-elements */
.top-bar-brand::after {
  content: '';
  display: block;
  width: 1px;
  height: 28px;
  background: var(--rule);
  margin-left: 28px;
  flex-shrink: 0;
}
.top-bar-actions::before {
  content: '';
  display: block;
  width: 1px;
  height: 28px;
  background: var(--rule);
  margin-right: 28px;
  flex-shrink: 0;
}

.nav-menu { position: relative; }
.nav-group { position: relative; }
.nav-trigger {
  background: transparent;
  border: 0;
  padding: 8px 0;
  cursor: pointer;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s ease;
  position: relative;
}
.nav-trigger::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--brass);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-trigger:hover::after,
.nav-trigger[aria-expanded="true"]::after { transform: scaleX(1); }
.nav-trigger:hover, .nav-trigger[aria-expanded="true"] { color: var(--ink); }
.nav-trigger .caret {
  font-size: 8px;
  opacity: 0.6;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-trigger:hover .caret,
.nav-trigger[aria-expanded="true"] .caret { opacity: 1; }
.nav-trigger[aria-expanded="true"] .caret { transform: rotate(180deg); }

/* Dropdown */
.nav-drop {
  position: absolute;
  top: calc(100% + 16px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 210px;
  background: var(--paper);
  border: 1px solid var(--rule);
  box-shadow: 0 20px 48px -20px rgba(26,26,23,0.28);
  padding: 10px 0;
  display: none;
  flex-direction: column;
  z-index: 60;
}
.nav-drop::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 8px;
  height: 8px;
  background: var(--paper);
  border-left: 1px solid var(--rule);
  border-top: 1px solid var(--rule);
}
.nav-group.open .nav-drop { display: flex; }
.nav-drop a {
  text-decoration: none;
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 10px 22px;
  white-space: nowrap;
  transition: color 0.15s ease, padding-left 0.2s ease;
  border-left: 2px solid transparent;
}
.nav-drop a:hover {
  color: var(--brass);
  padding-left: 26px;
  border-left-color: var(--brass);
}

/* Actions column — right */
.top-bar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
}
.nav-action { position: relative; }
.nav-action::after { display: none; }
.nav-action:hover { color: var(--brass) !important; }

/* Mobile hamburger */
.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 1px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Scroll progress bar */
.nav-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 1px;
  width: 0%;
  background: var(--brass);
  transition: width 0.1s linear;
  pointer-events: none;
}

@media (max-width: 1100px) {
  .top-bar-inner { height: 56px; }
  .top-bar-brand::after { display: none; }
  .top-bar-actions::before { display: none; }
  .top-bar .nav-menu {
    position: absolute;
    top: 56px;
    left: 0; right: 0;
    transform: none;
    flex-direction: column;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: 12px 24px 20px;
    gap: 6px;
    align-items: stretch;
    display: none;
  }
  .top-bar .nav-menu.open { display: flex; }
  .top-bar-actions { gap: 4px; }
  .nav-toggle { display: flex; }
  .nav-action { display: none; }
  .nav-trigger { width: 100%; justify-content: space-between; padding: 12px 4px; }
  .nav-trigger::after { display: none; }
  .nav-drop {
    position: static;
    transform: none;
    box-shadow: none;
    border: 0;
    padding: 4px 0 12px 16px;
    min-width: 0;
    background: transparent;
  }
  .nav-drop::before { display: none; }
  .nav-group.open .nav-drop { display: flex; }
}

/* Centered helpers (per inline comments) */
.centered { margin-left: auto; margin-right: auto; text-align: center; }
.pullquote.centered {
  border-left: 0;
  padding-left: 0;
  padding-top: 24px;
  border-top: 1px solid var(--brass);
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
.body.lede.centered { max-width: 48ch; }
.body.centered { max-width: 60ch; }

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 92vh;
  background: #1a1a17 url("/images/cover.jpeg") center/cover no-repeat;
  color: var(--paper);
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(15,14,12,0.55) 0%, rgba(15,14,12,0) 30%, rgba(15,14,12,0) 60%, rgba(15,14,12,0.75) 100%);
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.hero-top, .hero-bottom {
  padding: 40px 56px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
}
.hero-top { align-items: flex-start; padding-top: 56px; }
.hero-top .label, .hero-bottom .label { color: rgba(246,241,231,0.75); }
.hero-title {
  padding: 40px 56px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.hero-title .display {
  color: var(--paper);
  font-style: italic;
  font-weight: 300;
}
.hero-title .display em {
  font-style: normal;
  display: block;
  letter-spacing: -0.01em;
}
.hero-tag {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 300;
  font-style: italic;
  color: rgba(246,241,231,0.85);
  margin-top: 24px;
  max-width: 36ch;
}
@media (max-width: 720px) {
  .hero-top, .hero-bottom, .hero-title { padding-left: 24px; padding-right: 24px; }
}

/* ---- Generic helpers ---- */
.rule { height: 1px; background: var(--rule); border: 0; margin: 0; }
.dot { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--brass); vertical-align: middle; margin: 0 10px 3px; }
.kbd-row { display: flex; gap: 8px; align-items: baseline; }

/* ---- Footer ---- */
footer {
  background: var(--ink);
  color: var(--paper);
  padding: 80px 0 56px;
  margin-top: 0;
}
footer .shell { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; }
footer .label { color: rgba(246,241,231,0.55); }
footer .footer-title {
  font-family: var(--serif);
  font-style: italic;
  font-size: 36px;
  font-weight: 300;
  margin-bottom: 16px;
}
@media (max-width: 720px) {
  footer .shell { grid-template-columns: 1fr; gap: 32px; }
}
