/* DOMMA Strategy · site institucional
   Paleta e fontes do manual da marca (Visant):
   Cinza Cosmo #252627 · Marrom Estrutura #6D6B52 · Light Green #BABF93
   Off-White #C8C3B1 · Off-White Claro #E0E0E0
   Archivo (títulos, largura variável) · DM Serif Display (falas) · Host Grotesk (texto) */

:root {
  --cosmo: #252627;
  --olive: #6D6B52;
  --green: #BABF93;
  --off: #C8C3B1;
  --claro: #E0E0E0;
  --papel: #F0EDE2;

  --display: "Archivo", "Arial Narrow", Arial, sans-serif;
  --serif: "DM Serif Display", Georgia, "Times New Roman", serif;
  --body: "Host Grotesk", "Segoe UI", system-ui, sans-serif;

  --gut: clamp(1rem, 4.2vw, 4rem);
  --nav-h: 4.5rem;
  --pad: clamp(5rem, 13vh, 9.5rem);
  --max: 90rem;
  --edge: max(var(--gut), calc((100vw - var(--max)) / 2 + var(--gut)));
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--cosmo);
  color: var(--claro);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 4px; }

.skip {
  position: fixed; left: 1rem; top: -4rem; z-index: 30;
  padding: .7rem 1rem; border-radius: 999px;
  background: var(--papel); color: var(--cosmo); text-decoration: none;
}
.skip:focus { top: 1rem; }

/* ---------- Temas (cada seção escolhe o seu) ---------- */
.t-olive { --bg: var(--olive); --fg: var(--papel); --muted: rgba(240, 237, 226, .92); --rule: rgba(240, 237, 226, .3); --btn-bg: var(--papel); --btn-fg: var(--cosmo); --mark: var(--green); }
.t-cosmo { --bg: var(--cosmo); --fg: var(--claro); --muted: rgba(224, 224, 224, .74); --rule: rgba(224, 224, 224, .22); --btn-bg: var(--green); --btn-fg: var(--cosmo); --mark: var(--green); }
.t-off   { --bg: var(--off);   --fg: var(--cosmo); --muted: rgba(37, 38, 39, .8);  --rule: rgba(37, 38, 39, .28); --btn-bg: var(--cosmo); --btn-fg: var(--papel); --mark: #4b4a38; }
.t-claro { --bg: var(--claro); --fg: var(--cosmo); --muted: rgba(37, 38, 39, .78); --rule: rgba(37, 38, 39, .24); --btn-bg: var(--cosmo); --btn-fg: var(--papel); --mark: var(--olive); }

/* A cúpula é um canvas fixo que fica ACIMA dos fundos das seções e ABAIXO do texto.
   Uma .s pode ser position: relative (hoje .manifesto e .final são), mas NUNCA
   pode ganhar z-index: isso cria um contexto de empilhamento que leva o fundo da seção
   para cima do canvas e cobre a cúpula. */
#dome { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }

.s { background: var(--bg); color: var(--fg); }
.wrap {
  position: relative; z-index: 2;
  max-width: var(--max); margin-inline: auto;
  padding: var(--pad) var(--gut);
}
.stage { pointer-events: none; }

/* ---------- Tipografia ---------- */
.h2 {
  font-family: var(--display);
  font-stretch: 125%;
  font-weight: 620;
  font-size: clamp(2rem, 4.3vw, 3.75rem);
  line-height: 1.02;
  letter-spacing: -.022em;
  max-width: 16ch;
  text-wrap: balance;
}
.h2--menor { font-size: clamp(1.5rem, 2.4vw, 2.125rem); max-width: none; }
.lead {
  font-size: clamp(1.125rem, 1.5vw, 1.3125rem);
  line-height: 1.5;
  color: var(--muted);
  max-width: 36rem;
  margin-top: 1.5rem;
}

/* ---------- Botões e links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.25rem; padding: .9rem 1.7rem;
  border: 1.5px solid var(--btn-bg); border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-fg);
  font-family: var(--display); font-stretch: 105%; font-weight: 600; font-size: .9375rem; letter-spacing: -.005em;
  text-decoration: none; text-align: center; cursor: pointer;
  transition: background-color .2s, color .2s;
}
.btn:hover { background: transparent; color: var(--btn-bg); }
.btn--ghost { background: transparent; color: var(--fg); border-color: var(--fg); }
.btn--ghost:hover, .btn--ghost[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.btn--small { min-height: 2.5rem; padding: .5rem 1.15rem; font-size: .875rem; white-space: nowrap; }
.link { text-underline-offset: .28em; text-decoration-thickness: 1px; }
.link:hover { text-decoration-thickness: 2px; }

.logo {
  display: block; height: 1.375rem; aspect-ratio: 7309 / 968;
  background: currentColor;
  -webkit-mask: url(../img/logo-domma.svg) center / contain no-repeat;
          mask: url(../img/logo-domma.svg) center / contain no-repeat;
}

/* ---------- Navegação ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  height: var(--nav-h);
  display: flex; align-items: center; gap: 2rem;
  padding-inline: var(--edge);
  color: var(--fg);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: background-color .35s, color .35s;
}
.nav[data-theme="olive"] { --bg: #62604a; --fg: var(--papel); --btn-bg: var(--papel); --btn-fg: var(--cosmo); }
.nav[data-theme="cosmo"] { --bg: var(--cosmo); --fg: var(--claro); --btn-bg: var(--green); --btn-fg: var(--cosmo); }
.nav[data-theme="off"]   { --bg: var(--off);   --fg: var(--cosmo); --btn-bg: var(--cosmo); --btn-fg: var(--papel); }
.nav[data-theme="claro"] { --bg: var(--claro); --fg: var(--cosmo); --btn-bg: var(--cosmo); --btn-fg: var(--papel); }
.nav.is-top { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.nav__logo { text-decoration: none; margin-right: auto; padding-block: .5rem; }
.nav__links { display: flex; gap: clamp(1.25rem, 2.4vw, 2.25rem); }
.nav__links a { text-decoration: none; font-size: .9375rem; padding-block: .5rem; }
.nav__links a:hover { text-decoration: underline; text-underline-offset: .4em; }

/* ---------- 1. Abertura ---------- */
.hero {
  background:
    radial-gradient(85% 70% at 70% -8%, rgba(232, 228, 205, .42) 0%, rgba(232, 228, 205, 0) 62%),
    linear-gradient(180deg, #6D6B52 0%, #5d5b45 58%, #4c4a38 100%);
}
.hero__grid {
  position: relative; z-index: 2;
  min-height: 100vh; min-height: 100svh;
  max-width: var(--max); margin-inline: auto;
  padding: calc(var(--nav-h) + clamp(2rem, 9vh, 6rem)) var(--gut) clamp(2.5rem, 7vh, 5rem);
  display: flex; flex-direction: column; justify-content: space-between; gap: 2rem;
}
.hero__title {
  font-family: var(--display);
  font-stretch: 125%;
  font-weight: 640;
  font-size: clamp(2.6rem, 6.5vw, 6.6rem);
  line-height: .96;
  letter-spacing: -.03em;
}
.hero__title .l { white-space: nowrap; }
.hero__title .l--brk { display: block; }
.hero__sub {
  font-size: clamp(1.125rem, 1.45vw, 1.3125rem);
  line-height: 1.5;
  color: var(--muted);
  max-width: 31rem;
}
.hero__text { display: flex; flex-direction: column; gap: clamp(1.75rem, 5vh, 3.25rem); flex: 1; justify-content: space-between; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 1.75rem; margin-top: 2rem; }
.hero__stage {
  position: absolute; right: 0; bottom: 0;
  width: 60%; height: 80%;
}

.js .hero__title { animation: abrir 1.5s cubic-bezier(.2, .7, .1, 1) .1s both; }
.js .hero__sub, .js .hero__actions { animation: surgir .8s ease 1.15s both; }
@keyframes abrir {
  from { font-stretch: 62%; opacity: 0; }
  18%  { opacity: 1; }
  to   { font-stretch: 125%; opacity: 1; }
}
@keyframes surgir { from { opacity: 0; } to { opacity: 1; } }

/* ---------- 2. Por dentro da cúpula ---------- */
.manifesto { padding: var(--pad) var(--edge); }
.manifesto__line {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 4.5vw, 4.25rem);
  line-height: 1.08;
  letter-spacing: -.01em;
  text-wrap: balance;
  max-width: 21ch;
  margin: 0 auto 2.5rem;
  text-align: center;
}
.manifesto__pin { position: relative; z-index: 2; }

.js .manifesto { padding: 0; height: 360vh; }
.js .manifesto__pin {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  display: grid; place-items: end center;
  padding: 0 var(--gut) 16vh;
}
.js .manifesto__stage { position: absolute; inset: 0; }
.js .manifesto__lines { display: grid; position: relative; }
.js .manifesto__line {
  grid-area: 1 / 1; align-self: end; margin: 0;
  opacity: 0; transform: translateY(14px);
  transition: opacity .55s ease, transform .55s ease;
}
.js .manifesto__line.is-on { opacity: 1; transform: none; }

/* ---------- 3. A estrutura ---------- */
.estrutura__grid {
  display: grid; gap: 2.5rem var(--gut);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "intro side" "lista side";
}
.estrutura__intro { grid-area: intro; }
.estrutura__lista { grid-area: lista; }
.estrutura__side {
  grid-area: side; align-self: start;
  position: sticky; top: calc(var(--nav-h) + 1rem);
  height: calc(100vh - var(--nav-h) - 2rem);
  display: flex; flex-direction: column;
}
.estrutura__stage { flex: 1; min-height: 0; }
.estrutura__ctrl { display: flex; flex-direction: column; align-items: center; gap: .75rem; pointer-events: auto; }
.estrutura__nota { font-size: .9375rem; color: var(--muted); min-height: 1.5em; text-align: center; }

.origem {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2vw, 1.75rem);
  line-height: 1.25;
  max-width: 30rem;
  margin-bottom: clamp(3.5rem, 9vh, 6rem);
  padding-left: 1.25rem;
  border-left: 1.5px solid var(--fg);
}

.frentes { border-bottom: 1px solid var(--rule); }
.frente {
  display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: 1.1rem;
  width: 100%; padding: 1.35rem .75rem 1.35rem 0;
  border: 0; border-top: 1px solid var(--rule); border-radius: 0;
  background: transparent; text-align: left; cursor: pointer;
  transition: background-color .2s, padding-left .25s;
}
.frente__glyph { width: 2.25rem; height: 2.25rem; margin-top: .1rem; color: var(--fg); }
.frente__glyph svg { display: block; width: 100%; height: 100%; }
.frente__glyph .g-all { opacity: .28; }
.frente__glyph .g-on { stroke-width: 1.4; transition: stroke-width .2s; }
.frente__body { display: block; }
.frente__nome {
  display: block;
  font-family: var(--display); font-stretch: 118%; font-weight: 620;
  font-size: clamp(1.15rem, 1.65vw, 1.4rem); line-height: 1.15; letter-spacing: -.015em;
}
.frente__desc { display: block; margin-top: .4rem; color: var(--muted); max-width: 30rem; }
.frente:hover, .frente:focus-visible, .frente[aria-pressed="true"] {
  background: rgba(37, 38, 39, .07); padding-left: .75rem;
}
.frente:focus-visible { outline-offset: -2px; border-radius: 0; }
.frente:hover .g-on, .frente:focus-visible .g-on, .frente[aria-pressed="true"] .g-on { stroke-width: 3.2; }

.base {
  display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: 1.1rem; align-items: start;
  margin-top: 1.75rem; max-width: 34rem; color: var(--muted);
}
.base__ring { width: 2.25rem; height: 1.1rem; margin-top: .3rem; border: 1.6px solid var(--fg); border-radius: 50%; }

/* ---------- 4. Carteira: números gerais + planta de setores ---------- */
.carteira__grid {
  display: grid; gap: 2rem;
  grid-template-columns: minmax(0, 1fr) minmax(0, 50rem) minmax(0, 1fr);
  align-items: stretch;
  margin-top: clamp(2.5rem, 6vh, 4rem);
}
.nums { display: flex; flex-direction: column; justify-content: space-between; gap: 2.5rem; padding-block: 1rem; }
.nums--b { text-align: right; align-items: flex-end; }
.num { display: grid; gap: .6rem; max-width: 15.5rem; }
.num__valor {
  font-family: var(--display); font-stretch: 62%; font-weight: 300;
  font-size: clamp(4rem, 7vw, 6.75rem); line-height: .84; letter-spacing: -.02em;
}
.num__texto { color: var(--muted); font-size: .9375rem; line-height: 1.45; }

/* A cúpula vista de cima: cada nervura aponta para um setor */
.planta { position: relative; height: 35rem; --R: 14.2rem; }
.planta__stage { position: absolute; inset: 0; }
.setores { position: absolute; inset: 0; }
.setores li {
  position: absolute;
  left: calc(50% + cos(var(--a)) * var(--R));
  top: calc(50% + sin(var(--a)) * var(--R));
  transform: translate(calc(-50% + cos(var(--a)) * 50%), calc(-50% + sin(var(--a)) * 50%));
  padding: .3rem .55rem;
  white-space: nowrap;
  font-size: .9375rem; line-height: 1.2;
}

/* ---------- 5. Depoimentos: mural ---------- */
.mural { columns: 3; column-gap: var(--gut); margin-top: clamp(2.5rem, 6vh, 4rem); }
.fala {
  break-inside: avoid; margin: 0 0 2.75rem;
  padding-top: 1.4rem; border-top: 1.5px solid var(--fg);
}
.fala p { font-family: var(--serif); font-size: clamp(1.3rem, 1.75vw, 1.6rem); line-height: 1.22; }
.fala footer { margin-top: 1rem; font-size: .9375rem; line-height: 1.4; color: var(--muted); }
.fala footer strong { display: block; font-weight: 600; color: var(--fg); }

/* ---------- 6. Processo ---------- */
.passos {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.5rem var(--gut);
  margin-top: clamp(3rem, 8vh, 5rem);
  counter-reset: none;
}
.passo { position: relative; padding-top: 1.5rem; border-top: 1.5px solid var(--fg); }
.passo::before {
  content: ""; position: absolute; left: 0; top: -.4rem;
  width: .7rem; height: .7rem; border-radius: 50%; background: var(--fg);
}
.passo__n {
  display: block;
  font-family: var(--display); font-stretch: 62%; font-weight: 300;
  font-size: clamp(3rem, 5vw, 4.5rem); line-height: .9;
}
.passo__nome {
  font-family: var(--display); font-stretch: 118%; font-weight: 620;
  font-size: 1.25rem; line-height: 1.15; letter-spacing: -.015em;
  margin: 1.1rem 0 .5rem;
}
.passo p { color: var(--muted); }
.poucas {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.6vw, 2.25rem); line-height: 1.18;
  max-width: 26ch;
  margin-top: clamp(3.5rem, 9vh, 6rem);
}

/* ---------- 7. Dúvidas ---------- */
.duvidas__grid { display: grid; gap: 2.5rem var(--gut); grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); align-items: start; }
.faq { border-bottom: 1px solid var(--rule); }
.faq details { border-top: 1px solid var(--rule); }
.faq summary {
  display: grid; grid-template-columns: minmax(0, 1fr) 1.25rem; gap: 1.5rem; align-items: center;
  padding: 1.35rem 0; cursor: pointer; list-style: none;
  font-family: var(--display); font-stretch: 112%; font-weight: 600;
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem); line-height: 1.25; letter-spacing: -.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; width: 1.25rem; height: 1.25rem;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.5px 100% no-repeat;
  transition: transform .25s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 2.75rem 1.6rem 0; color: var(--muted); max-width: 38rem; }

/* ---------- 8. Chamada final + rodapé ---------- */
.final {
  background:
    radial-gradient(70% 55% at 50% 62%, rgba(186, 191, 147, .16) 0%, rgba(186, 191, 147, 0) 70%),
    var(--cosmo);
}
.final__inner {
  position: relative; z-index: 2;
  padding: clamp(6rem, 17vh, 11rem) var(--edge) 0;
  display: flex; flex-direction: column; align-items: center; gap: 1.75rem; text-align: center;
}
.final__title {
  font-family: var(--display); font-stretch: 125%; font-weight: 640;
  font-size: clamp(2.1rem, 5.2vw, 5rem); line-height: .98; letter-spacing: -.028em;
  max-width: 15ch; text-wrap: balance;
}
.final__sub { font-size: clamp(1.125rem, 1.45vw, 1.3125rem); color: var(--muted); }
.final__stage { height: clamp(15rem, 46vh, 30rem); margin-top: 2rem; }
.rodape {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 1.5rem var(--gut); align-items: end;
  padding: 2rem var(--edge) 2.25rem;
  border-top: 1px solid var(--rule);
  background: var(--cosmo);
  font-size: .9375rem;
}
.rodape__marca p { margin-top: .9rem; color: var(--muted); }
.rodape__links { display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; }
.rodape__links a { text-underline-offset: .3em; text-decoration-thickness: 1px; }
.rodape__legal { color: var(--muted); }

[id] { scroll-margin-top: var(--nav-h); }

/* ---------- Telas menores ---------- */
/* o mapa radial precisa de largura; abaixo de 75rem os setores viram lista */
@media (max-width: 74.99rem) {
  .carteira__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .planta { grid-column: 1 / -1; order: -1; height: auto; }
  .planta__stage { position: static; height: min(24rem, 78vw); }
  .setores {
    position: static; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 1.5rem;
    margin-top: 1rem; border-bottom: 1px solid var(--rule);
  }
  .setores li { position: static; transform: none; white-space: normal; padding: .7rem 0; border-top: 1px solid var(--rule); }
  .nums { padding-block: 0; }
  .nums--b { text-align: left; align-items: flex-start; }
}

@media (max-width: 60rem) {
  .nav__links { display: none; }

  .hero__grid { justify-content: flex-start; padding-top: calc(var(--nav-h) + clamp(1.25rem, 5vh, 3rem)); padding-bottom: 0; gap: 1.5rem; }
  .hero__text { flex: 0 0 auto; justify-content: flex-start; }
  .hero__title { font-size: clamp(2.5rem, 12.2vw, 5.5rem); }
  .hero__title .l { display: block; }
  .hero__actions { margin-top: 0; }
  .hero__stage { position: static; width: auto; height: auto; flex: 1 1 auto; min-height: 13.5rem; margin-inline: calc(var(--gut) * -1); }

  .estrutura__grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "intro" "side" "lista"; }
  .estrutura__side { position: static; height: auto; }
  .estrutura__stage { flex: none; height: 17.5rem; }
  .final__stage { height: 14rem; }

  .duvidas__grid { grid-template-columns: minmax(0, 1fr); }
  .mural { columns: 2; }
  .passos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rodape { grid-template-columns: minmax(0, 1fr); align-items: start; }
}

@media (max-width: 34rem) {
  .nav { gap: 1rem; }
  .logo { height: 1.2rem; }
  .passos { grid-template-columns: minmax(0, 1fr); }
  .setores { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .carteira__grid { grid-template-columns: minmax(0, 1fr); }
  .btn { width: 100%; }
  .btn--small, .btn--ghost { width: auto; }
  .hero__actions { flex-direction: column; align-items: flex-start; }
  .mural { columns: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .hero__title, .js .hero__sub, .js .hero__actions { animation: none; }
  .js .manifesto__line { transition: none; transform: none; }
  .frente, .btn, .nav, .faq summary::after { transition: none; }
}

/* ---------- Fotos de banco como fundo tratado (Task 9) ----------
   A foto fica na camada 0, abaixo do canvas da cúpula (z-index 1) e do texto (z-index 2).
   O tratamento tira a cor viva: foto em tons de cinza, tingida de oliva e coberta por Cinza Cosmo. */
.foto-fundo { margin: 0; overflow: hidden; pointer-events: none; z-index: 0; background: var(--cosmo); }
.foto-fundo img { display: block; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.08); }
.foto-fundo::after { content: ""; position: absolute; inset: 0; }

/* Manifesto: a foto acompanha a tela fixa e quase some, só dá textura para a cúpula.
   A seção vira referência de posição (fica abaixo do canvas, z-index 1) e a foto fica presa dentro dela. */
.manifesto { position: relative; }
.manifesto__foto { position: absolute; inset: 0; overflow: clip; }
.manifesto__foto::after { background: rgba(37, 38, 39, .84); }
.js .manifesto__foto img { position: sticky; top: 0; height: 100vh; height: 100svh; }

/* Chamada final: a foto ocupa só a parte de cima e some antes da cúpula do rodapé */
.final { position: relative; }
.final__foto { position: absolute; inset: 0 0 auto 0; height: 78%; }
.final__foto::after {
  background:
    linear-gradient(180deg, rgba(37, 38, 39, .93) 0%, rgba(37, 38, 39, .9) 55%, var(--cosmo) 100%),
    rgba(109, 107, 82, .35);
}
