/* ═══════════════════════════════════════════════════════════
   FABIM · "Uso de Modelos Digitais na Construção" — whitepaper.
   Conceito: documento técnico de planejamento / prancha de projeto.
   Substrato de grade de coordenadas, anotações em monoespaçada
   (título, referências, "FIG. 0X") e molduras de VIEWPORT com marcas
   de registro onde as imagens entram depois. Herda tokens globais.
   ═══════════════════════════════════════════════════════════ */

[data-page="conteudo-modelos-digitais"] {
  --ink: #060B16;          /* base navy (blueprint) */
  --graphite: #0E1A2B;     /* superfície/painel */
  --azure: #4FB6FF;        /* azul BIM claro (linhas, refs) */
  --azure-2: #2f9df4;      /* azul BIM */
  --signal: #F5A623;       /* âmbar — termos estratégicos (com parcimônia) */
  --paper: #EAF1F8;        /* texto claro */
  --paper-2: rgba(211, 226, 240, .74);  /* texto secundário */
  --paper-3: rgba(176, 196, 214, .62);  /* legendas/anotações */
  --edge: rgba(120, 170, 220, .14);     /* hairline */
  --edge-2: rgba(120, 170, 220, .3);
  --grid: rgba(79, 182, 255, .06);      /* grade de coordenadas */
  --azure-soft: rgba(79, 182, 255, .1);
  --signal-soft: rgba(245, 166, 35, .12);
  --fmono: var(--font-mono, ui-monospace, monospace);
  background:
    radial-gradient(1200px 700px at 88% -6%, rgba(47, 157, 244, .12), transparent 60%),
    linear-gradient(180deg, #070D1A, var(--ink) 60%);
  color: var(--paper);
}
[data-page="conteudo-modelos-digitais"] #scrollProgress { background: linear-gradient(90deg, var(--azure-2), var(--azure), var(--signal)); }

/* Grade de coordenadas — substrato sutil da página inteira */
.wp-grid-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, var(--grid) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(90deg, var(--grid) 0 1px, transparent 1px 64px);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.9), rgba(0,0,0,.25) 40%, rgba(0,0,0,.15));
  mask-image: linear-gradient(180deg, rgba(0,0,0,.9), rgba(0,0,0,.25) 40%, rgba(0,0,0,.15));
}
[data-page="conteudo-modelos-digitais"] main { position: relative; z-index: 1; }

/* Utilitário: só-leitor-de-tela */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Aviso de rascunho (fixo) */
.wp-draft { display: none; }
html.is-draft .wp-draft {
  display: block; position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 250; max-width: calc(100vw - 24px);
}
html.is-draft .wp-draft span {
  display: inline-flex; align-items: center; gap: 9px; padding: 9px 18px; border-radius: 4px;
  background: rgba(20, 16, 6, .85); backdrop-filter: blur(10px); border: 1px solid rgba(245, 166, 35, .4);
  color: #ffd68f; font-family: var(--fmono); font-size: .74rem; font-weight: 600; letter-spacing: .04em;
}

/* ── Monoespaçada de anotação (título de prancha) ───────── */
.wp-mono { font-family: var(--fmono); letter-spacing: .14em; text-transform: uppercase; font-size: .72rem; font-weight: 600; }

/* ── HERO / folha de rosto ──────────────────────────────── */
.wp-hero { position: relative; padding: clamp(122px, 15vh, 172px) 0 clamp(40px, 6vw, 66px); overflow: hidden; }
.wp-hero > .pg-wrap { position: relative; z-index: 1; }
/* Fundo em faixa larga (proporção da imagem) — imagem inteira, preenchendo, sumindo no navy. */
.wp-hero-bg { position: absolute; top: 0; left: 0; right: 0; z-index: 0; overflow: hidden; aspect-ratio: 1899 / 828; min-height: 300px; }
.wp-hero-img { width: 100%; height: 100%; object-fit: cover; object-position: center; opacity: .9; }
.wp-hero-veil { position: absolute; inset: 0; background:
  linear-gradient(90deg, rgba(6, 11, 22, .8) 0%, rgba(6, 11, 22, .54) 36%, rgba(6, 11, 22, .16) 68%, rgba(6, 11, 22, 0) 100%),
  linear-gradient(180deg, rgba(6, 11, 22, 0) 32%, rgba(6, 11, 22, .5) 76%, var(--ink) 100%); }
.wp-crumb { margin-bottom: 22px; }
.wp-hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(30px, 5vw, 72px); align-items: center; }
.wp-eyebrow {
  display: inline-flex; align-items: center; gap: 9px; padding: 7px 14px; border-radius: 3px;
  border: 1px solid var(--edge-2); color: var(--azure); font-family: var(--fmono);
  font-size: .7rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
}
.wp-eyebrow::before { content: ''; width: 7px; height: 7px; background: var(--azure); box-shadow: 0 0 8px var(--azure); }
.wp-h1 { font-size: clamp(2.3rem, 5.4vw, 4rem); font-weight: 800; line-height: 1.02; letter-spacing: -.035em; color: var(--paper); margin: 20px 0 0; max-width: 15ch; }
.wp-h1 em { font-style: normal; color: var(--azure); }
.wp-hero-sub { font-size: clamp(1.1rem, 2.2vw, 1.5rem); font-weight: 600; color: var(--paper-2); margin-top: 16px; max-width: 30ch; }

/* Bloco de título estilo prancha (campos AUTOR / REFERÊNCIA) */
.wp-titleblock { margin-top: 30px; border: 1px solid var(--edge); border-radius: 4px; overflow: hidden; max-width: 520px; }
.wp-tb-row { display: grid; grid-template-columns: 128px 1fr; }
.wp-tb-row + .wp-tb-row { border-top: 1px solid var(--edge); }
.wp-tb-k { padding: 12px 14px; border-right: 1px solid var(--edge); background: rgba(79, 182, 255, .04); color: var(--paper-3); font-family: var(--fmono); font-size: .64rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; display: flex; align-items: center; }
.wp-tb-v { padding: 12px 15px; color: var(--paper-2); font-size: .92rem; line-height: 1.4; }
.wp-tb-v strong { color: var(--paper); font-weight: 700; }

.wp-hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* ── VIEWPORT (moldura de imagem — elemento-assinatura) ──── */
.wp-vp {
  position: relative; border: 1px solid var(--edge-2); border-radius: 3px;
  background:
    repeating-linear-gradient(0deg, rgba(79,182,255,.05) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(90deg, rgba(79,182,255,.05) 0 1px, transparent 1px 28px),
    linear-gradient(150deg, #0c1727, #0a1420);
  overflow: hidden;
}
.wp-vp--cover { aspect-ratio: 16 / 9; }
.wp-vp--fig { aspect-ratio: 16 / 9; }
/* marcas de registro (cantos) */
.wp-vp::before, .wp-vp::after { content: ''; position: absolute; width: 16px; height: 16px; pointer-events: none; }
.wp-vp::before { top: 9px; left: 9px; border-top: 2px solid var(--azure); border-left: 2px solid var(--azure); }
.wp-vp::after { bottom: 9px; right: 9px; border-bottom: 2px solid var(--azure); border-right: 2px solid var(--azure); }
.wp-vp-tag { position: absolute; top: 9px; right: 9px; z-index: 2; font-family: var(--fmono); font-size: .62rem; font-weight: 700; letter-spacing: .1em; color: #061018; background: var(--azure); padding: 3px 8px; border-radius: 2px; }
.wp-vp-body { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; padding: 22px; }
.wp-vp-ic { width: 44px; height: 44px; color: var(--azure); opacity: .85; }
.wp-vp-lbl { font-family: var(--fmono); font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--paper-2); }
.wp-vp-sub { font-size: .8rem; color: var(--paper-3); max-width: 32ch; line-height: 1.45; }
.wp-vp-dim { position: absolute; left: 12px; bottom: 11px; font-family: var(--fmono); font-size: .6rem; letter-spacing: .08em; color: var(--paper-3); }
/* Moldura preenchida com a imagem real */
.wp-vp--filled img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── SEÇÃO / prancha ────────────────────────────────────── */
.wp-sheet { position: relative; padding: clamp(48px, 7vw, 96px) 0; border-top: 1px solid var(--edge); }
.wp-sheet-head { display: flex; align-items: flex-start; gap: clamp(16px, 3vw, 34px); margin-bottom: clamp(26px, 4vw, 42px); }
.wp-ref { flex: none; font-family: var(--fmono); font-weight: 700; letter-spacing: .02em; line-height: 1; padding-top: 6px; }
.wp-ref b { display: block; font-size: clamp(2rem, 4.4vw, 3.1rem); color: transparent; -webkit-text-stroke: 1.3px var(--edge-2); }
.wp-ref span { color: var(--paper-3); font-size: .74rem; }
.wp-sheet-titles { min-width: 0; }
.wp-kick { display: inline-block; margin-bottom: 10px; color: var(--azure); }
.wp-h2 { font-size: clamp(1.5rem, 3.2vw, 2.35rem); font-weight: 800; line-height: 1.12; letter-spacing: -.02em; color: var(--paper); max-width: 22ch; }
.wp-h2 mark { background: none; color: var(--signal); }

.wp-sheet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(26px, 4.5vw, 60px); align-items: start; }
.wp-sheet--rev .wp-sheet-grid > .wp-sheet-media { order: -1; }
.wp-sheet--wide .wp-sheet-grid { grid-template-columns: 1fr; }

/* Blocos de conteúdo (texto exato da apresentação) */
.wp-lead { font-size: clamp(1.02rem, 1.5vw, 1.15rem); color: var(--paper-2); line-height: 1.6; }
.wp-blocks { display: flex; flex-direction: column; gap: 14px; }
.wp-block { position: relative; padding: 18px 20px 18px 22px; border-radius: 4px; background: rgba(255, 255, 255, .025); border: 1px solid var(--edge); }
.wp-block::before { content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: var(--azure); }
.wp-block--signal::before { background: var(--signal); }
.wp-block h3 { font-size: 1rem; font-weight: 800; color: var(--paper); margin-bottom: 5px; }
.wp-block--signal h3 { color: var(--signal); }
.wp-block p { color: var(--paper-2); font-size: .96rem; line-height: 1.55; }

.wp-sheet-media { position: relative; }
.wp-figcap { margin-top: 10px; font-family: var(--fmono); font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; color: var(--paper-3); }

/* ── Botões ─────────────────────────────────────────────── */
.wp-btn { display: inline-flex; align-items: center; gap: 9px; padding: 13px 22px; border-radius: 4px; font-weight: 700; font-size: .95rem; min-height: 46px; border: 1px solid transparent; transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast), background var(--t-fast); line-height: 1; }
.wp-btn svg { width: 17px; height: 17px; }
.wp-btn--primary { background: linear-gradient(135deg, var(--azure), var(--azure-2)); color: #04121f; box-shadow: 0 0 34px rgba(79, 182, 255, .28); }
.wp-btn--primary:hover { transform: translateY(-2px); box-shadow: 0 0 50px rgba(79, 182, 255, .42); }
.wp-btn--cta { background: var(--grad-cta); color: var(--cta-ink); box-shadow: var(--glow-green); }
.wp-btn--cta:hover { transform: translateY(-2px); box-shadow: 0 0 40px rgba(34, 197, 94, .45); }
.wp-btn--ghost { background: rgba(255, 255, 255, .03); border-color: var(--edge-2); color: var(--paper); }
.wp-btn--ghost:hover { border-color: var(--azure); background: rgba(255, 255, 255, .06); transform: translateY(-2px); }

/* ── Passos numerados (metodologia / fluxo) ─────────────── */
.wp-steps { list-style: none; display: flex; flex-direction: column; }
.wp-step { display: grid; grid-template-columns: 42px 1fr; gap: 14px; padding: 15px 0; border-top: 1px solid var(--edge); }
.wp-step:first-child { border-top: 0; padding-top: 0; }
.wp-step-n { font-family: var(--fmono); font-weight: 700; font-size: 1.2rem; color: var(--azure); line-height: 1.35; }
.wp-step--signal .wp-step-n { color: var(--signal); }
.wp-step h3 { font-size: 1.04rem; font-weight: 800; color: var(--paper); }
.wp-step h3 em { font-style: normal; font-family: var(--fmono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--paper-3); margin-left: 8px; }
.wp-step p { color: var(--paper-2); font-size: .93rem; line-height: 1.5; margin-top: 4px; }

/* ── Chips ──────────────────────────────────────────────── */
.wp-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.wp-tag { font-family: var(--fmono); font-size: .66rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--paper-2); padding: 7px 12px; border: 1px solid var(--edge-2); border-radius: 3px; }
.wp-tag--signal { color: var(--signal); border-color: rgba(245, 166, 35, .4); }
.wp-tag--flow { color: var(--azure); }

/* ── Faixa de resultado ─────────────────────────────────── */
.wp-strip { display: flex; gap: 12px; align-items: flex-start; margin-top: 22px; padding: 16px 20px; border-radius: 4px; background: var(--signal-soft); border: 1px solid rgba(245, 166, 35, .3); }
.wp-strip svg { width: 20px; height: 20px; color: var(--signal); flex: none; margin-top: 1px; }
.wp-strip p { color: var(--paper-2); font-size: .96rem; line-height: 1.55; }
.wp-strip b { color: var(--paper); font-weight: 800; }

/* ── Grade de blocos (taxonomia / critérios / múltiplos) ── */
.wp-blocks--grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }

/* ── Faixa de imagem (seções largas) ────────────────────── */
.wp-vp--band { aspect-ratio: 16 / 9; margin-top: 26px; }

/* ── Notas de figura (legendas do slide) ────────────────── */
.wp-notes { list-style: none; margin-top: 14px; display: grid; gap: 6px; }
.wp-notes li { font-family: var(--fmono); font-size: .68rem; letter-spacing: .03em; color: var(--paper-3); padding-left: 15px; position: relative; line-height: 1.45; }
.wp-notes li::before { content: '›'; position: absolute; left: 2px; color: var(--azure); }

/* ── Fecho ──────────────────────────────────────────────── */
.wp-close { text-align: center; }
.wp-close .wp-sheet-head { justify-content: center; }
.wp-close .wp-h2 { max-width: 26ch; margin-inline: auto; }
.wp-close-body { max-width: 760px; margin: 0 auto; }
.wp-close-tagline { margin-top: 30px; font-family: var(--fmono); font-size: clamp(1.05rem, 2.6vw, 1.7rem); font-weight: 700; letter-spacing: .08em; color: var(--signal); text-transform: uppercase; }

/* ── CTA (comercial FABIM) ──────────────────────────────── */
.wp-cta { text-align: center; border-top: 1px solid var(--edge); padding: clamp(48px, 7vw, 88px) 0; }
.wp-cta h2 { font-size: clamp(1.5rem, 3.2vw, 2.2rem); font-weight: 800; color: var(--paper); letter-spacing: -.02em; }
.wp-cta p { color: var(--paper-2); margin-top: 10px; max-width: 60ch; margin-left: auto; margin-right: auto; }
.wp-cta-btns { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 24px; }
.wp-source { max-width: 780px; margin: 34px auto 0; padding-top: 18px; border-top: 1px solid var(--edge); font-size: .78rem; color: var(--paper-3); line-height: 1.55; text-align: left; }

/* ── RESPONSIVO ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .wp-hero-grid { grid-template-columns: 1fr; }
  .wp-hero-grid .wp-sheet-media, .wp-hero-grid .wp-vp--cover { max-width: 560px; }
  .wp-sheet-grid { grid-template-columns: 1fr; }
  .wp-sheet--rev .wp-sheet-grid > .wp-sheet-media { order: 0; }
  .wp-h1 { max-width: 100%; }
}
@media (max-width: 560px) {
  .wp-sheet-head { gap: 14px; }
  .wp-ref b { font-size: 1.7rem; }
  .wp-tb-row { grid-template-columns: 104px 1fr; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
