/* =========================================================================
   LUCIANO MAGALHÃES · PEÇAS JURÍDICAS
   Estrutura e comportamento: modelo "Portfolio Dark Premium" (referência)
   Paleta e tipografia: briefing v1.2 (minimalista, sóbria, pastel,
   Libre Baskerville + Jost). Logotipo em #020202 / branco prevalece.
   ========================================================================= */

:root {
  /* Base pastel */
  --bg-main: #f5f2ec;          /* papel quente */
  --bg-surface: #ece7df;       /* areia clara */
  --bg-card: rgba(2, 2, 2, 0.025);
  --bg-card-hover: rgba(2, 2, 2, 0.05);
  --pastel-sage: #dfe5db;      /* sálvia */
  --pastel-mist: #dde4ea;      /* névoa azul */
  --pastel-sand: #ebe2d2;      /* areia */
  --pastel-rose: #eee2dc;      /* rosé */

  /* Tinta (do logotipo) */
  --ink: #020202;
  --text-primary: #1d1e21;
  --text-secondary: rgba(29, 30, 33, 0.76);
  --text-muted: rgba(29, 30, 33, 0.54);
  --line-subtle: rgba(2, 2, 2, 0.12);
  --line-medium: rgba(2, 2, 2, 0.22);
  --line-strong: rgba(2, 2, 2, 0.45);

  /* Seção de contraste (escura, logotipo branco) */
  --night: #17181b;
  --night-2: #1f2024;
  --on-night: #f5f2ec;
  --on-night-2: rgba(245, 242, 236, 0.74);
  --on-night-muted: rgba(245, 242, 236, 0.5);
  --night-line: rgba(245, 242, 236, 0.14);

  --accent-dot: #4f7a5a;       /* único acento: estado de sucesso */
  --transition-smooth: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);

  --font-serif: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
  --font-sans: 'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --inset: 5vw;
  --header-h: 72px;
}

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

html { scroll-behavior: smooth; }

body {
  width: 100%;
  min-height: 100vh;
  background: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
::selection { background: var(--pastel-sage); color: var(--ink); }

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

.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 999;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 4px;
  font-size: 0.85rem; text-decoration: none;
}
.skip-link:focus { left: 8px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}

/* ---------- Tipos utilitários ---------- */
.mono {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  font-weight: 500;
}

/* =========================================================================
   HEADER
   ========================================================================= */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 0 var(--inset);
  transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-solid,
body:not(.home) .site-header {
  background: rgba(245, 242, 236, 0.86);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--line-subtle);
}
.header-logo { display: block; flex-shrink: 0; padding: 6px 0; transition: opacity 0.35s ease; }
.header-logo img { height: 40px; width: auto; }
body.home .site-header:not(.is-solid) .header-logo { opacity: 0; pointer-events: none; }

.main-nav { display: flex; align-items: center; gap: 30px; margin-left: auto; }
.main-nav a {
  text-decoration: none; font-size: 0.78rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.16em; color: var(--text-secondary);
  position: relative; padding: 6px 0;
}
.main-nav a::after {
  content: ''; position: absolute; left: 0; bottom: 0; width: 0; height: 1px;
  background: var(--ink); transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--ink); }
.main-nav a:hover::after, .main-nav a[aria-current="page"]::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 12px; }
.cart-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: transparent; border: 1px solid var(--line-medium); border-radius: 4px;
  padding: 9px 14px; color: var(--ink);
  font-size: 0.74rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  transition: var(--transition-smooth);
}
.cart-btn:hover { border-color: var(--ink); background: rgba(2,2,2,0.04); }
.cart-count {
  min-width: 22px; height: 22px; border-radius: 11px; padding: 0 6px;
  background: var(--ink); color: #fff; font-size: 0.7rem; letter-spacing: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.menu-toggle {
  display: none; background: transparent; border: 1px solid var(--line-medium);
  border-radius: 4px; width: 42px; height: 40px; position: relative;
}
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
  position: absolute; left: 11px; width: 18px; height: 1.5px; background: var(--ink); content: '';
  transition: var(--transition-smooth);
}
.menu-toggle span { top: 19px; }
.menu-toggle span::before { left: 0; top: -6px; }
.menu-toggle span::after { left: 0; top: 6px; }
.menu-toggle[aria-expanded="true"] span { background: transparent; }
.menu-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

/* =========================================================================
   HUD CORNER (retícula)
   ========================================================================= */
.hud-corner { position: absolute; width: 16px; height: 16px; pointer-events: none; }
.hud-corner::before {
  content: ''; position: absolute; top: 50%; left: 50%; width: 10px; height: 10px;
  transform: translate(-50%, -50%); border: 1px solid rgba(2, 2, 2, 0.45); border-radius: 50%;
}
.hud-corner::after {
  content: ''; position: absolute; top: 50%; left: 50%; width: 3px; height: 3px;
  transform: translate(-50%, -50%); background: rgba(2, 2, 2, 0.85); border-radius: 50%;
}
.hud-top-left { top: 0; left: 0; }
.hud-top-right { top: 0; right: 0; }
.hud-bottom-left { bottom: 0; left: 0; }
.hud-bottom-right { bottom: 0; right: 0; }
.on-photo .hud-corner::before { border-color: rgba(255,255,255,0.6); }
.on-photo .hud-corner::after { background: rgba(255,255,255,0.9); }

/* =========================================================================
   BOTÕES
   ========================================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  padding: 16px 26px; border-radius: 4px; text-decoration: none;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  border: 1px solid var(--ink); transition: var(--transition-smooth); white-space: nowrap;
}
.btn .arrow { transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
.btn:hover .arrow { transform: translateX(5px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #2a2b2f; border-color: #2a2b2f; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: rgba(2,2,2,0.05); }
.btn-light { background: var(--on-night); color: var(--ink); border-color: var(--on-night); }
.btn-light:hover { background: #fff; }
.btn-ghost-light { background: transparent; color: var(--on-night); border-color: rgba(245,242,236,0.45); }
.btn-ghost-light:hover { border-color: var(--on-night); background: rgba(245,242,236,0.06); }
.btn-block { width: 100%; }
.btn-sm { padding: 11px 16px; font-size: 0.72rem; }

.text-link {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink); transition: gap 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.text-link:hover { gap: 16px; }

/* =========================================================================
   HERO
   ========================================================================= */
.hero-viewport {
  position: relative; width: 100%; min-height: max(100vh, 760px);
  display: flex; overflow: hidden; background: var(--bg-main);
}
.hero-frame { position: absolute; inset: 18px; z-index: 40; pointer-events: none; }

.hero-grid { position: relative; z-index: 10; display: grid; grid-template-columns: 46% 54%; width: 100%; height: 100%; }

/* Coluna esquerda: retrato */
.hero-col-left { position: relative; overflow: hidden; background: #737373; z-index: 12; }
.hero-image {
  position: absolute; inset: -12px; width: calc(100% + 24px); height: calc(100% + 24px);
  object-fit: cover; object-position: 50% 18%;
  filter: grayscale(35%) contrast(1.04) brightness(0.98);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero-col-left::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(2,2,2,0) 55%, rgba(2,2,2,0.62) 100%);
}
.mentor-identity {
  position: absolute; left: var(--inset); right: 4vw; bottom: 64px; z-index: 2; color: #fff;
}
.mentor-name {
  font-family: var(--font-sans); font-weight: 500; text-transform: uppercase;
  font-size: clamp(1.5rem, 2.2vw, 2.4rem); line-height: 1.05; letter-spacing: 0.06em;
  margin-bottom: 8px; text-shadow: 0 2px 14px rgba(0,0,0,0.25);
}
.mentor-title {
  font-weight: 500; text-transform: uppercase; font-size: clamp(0.72rem, 0.85vw, 0.85rem);
  letter-spacing: 0.18em; color: rgba(255,255,255,0.82);
}

/* Coluna direita: painel com logotipo */
.hero-col-right {
  position: relative; display: flex; align-items: center;
  padding: calc(var(--header-h) + 3vh) 6vw 56px 5vw;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.55), rgba(255,255,255,0.15)),
    var(--bg-main);
  border-left: 1px solid var(--line-subtle);
  z-index: 15;
}
  position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; opacity: 0.05;
}

.right-content-wrapper { position: relative; z-index: 1; max-width: 600px; width: 100%; }
.hero-logo {
  width: min(100%, 380px); height: auto;
  /* margem livre mínima = altura das maiúsculas do nome (~ 9% da largura) */
  margin: 0 0 clamp(18px, 3vh, 34px) 0; padding: 3% 0;
}
.tag-experience {
  display: block; font-size: 0.76rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.22em; color: var(--text-muted); margin-bottom: 14px;
}
.headline-hero {
  font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(1.8rem, 2.6vw, 2.8rem); line-height: 1.18; letter-spacing: -0.01em;
  margin-bottom: 16px; color: var(--ink);
}
.headline-hero em { font-style: italic; }
.desc-hero {
  font-size: clamp(0.95rem, 1.05vw, 1.08rem); line-height: 1.65; color: var(--text-secondary);
  max-width: 520px; margin-bottom: 30px;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.metric-item { padding: 11px 0 !important; }

.metrics-list { border-top: 1px solid var(--line-subtle); }
.metric-item {
  display: flex; align-items: baseline; justify-content: space-between; gap: 18px;
  padding: 13px 0; border-bottom: 1px solid var(--line-subtle);
  transition: var(--transition-smooth);
}
.metric-item:hover { transform: translateX(4px); border-bottom-color: var(--line-strong); }
.metric-value {
  font-family: var(--font-serif); font-weight: 700; min-width: 90px;
  font-size: clamp(1.05rem, 1.3vw, 1.4rem); color: var(--ink);
}
.metric-label {
  font-weight: 500; text-transform: uppercase; text-align: right;
  font-size: clamp(0.7rem, 0.8vw, 0.8rem); letter-spacing: 0.1em; color: var(--text-secondary);
}

/* =========================================================================
   SEÇÕES PADRÃO
   ========================================================================= */
.portfolio-section {
  position: relative; padding: 140px var(--inset);
  border-bottom: 1px solid var(--line-subtle); background: var(--bg-main); overflow: hidden;
}
.portfolio-section.tone-surface { background: var(--bg-surface); }
.portfolio-section.tone-sage { background: var(--pastel-sage); }
.portfolio-section.tone-mist { background: var(--pastel-mist); }

.section-hud-header {
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px;
  padding-bottom: 18px; margin-bottom: 60px; border-bottom: 1px solid var(--line-subtle);
}
.section-code {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.2em; color: var(--text-muted);
  white-space: nowrap;
}
.section-title {
  font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(1.8rem, 2.8vw, 3.1rem); letter-spacing: -0.01em; line-height: 1.15;
  text-align: center;
}
.section-subinfo {
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-muted); white-space: nowrap;
}

/* ---------- 01 · Quebra de crença ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
/* Seção 01: citação centralizada na altura do bloco da direita */
#ruptura .about-grid { align-items: center; }
#ruptura .about-manifesto { padding: 10px 0 10px 32px; border-left: 1px solid var(--line-medium); }
.about-manifesto {
  font-family: var(--font-serif); font-size: clamp(1.35rem, 2vw, 2.1rem);
  font-weight: 400; line-height: 1.45; letter-spacing: -0.01em; color: var(--text-secondary);
}
.about-manifesto strong { font-weight: 700; color: var(--ink); }
.about-details { display: flex; flex-direction: column; gap: 36px; }
.about-paragraph { font-size: 1.02rem; line-height: 1.75; color: var(--text-secondary); }
.about-paragraph + .about-paragraph { margin-top: -20px; }
.pillars-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 10px; }
.pillar-card {
  background: var(--bg-card); border: 1px solid var(--line-subtle); border-radius: 4px;
  padding: 24px 20px; transition: var(--transition-smooth);
}
.pillar-card:hover { transform: translateY(-4px); background: var(--bg-card-hover); border-color: var(--line-medium); }
.pillar-num { font-size: 0.72rem; letter-spacing: 0.14em; color: var(--text-muted); margin-bottom: 12px; }
.pillar-title {
  font-size: 0.92rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 8px; color: var(--ink);
}
.pillar-desc { font-size: 0.86rem; line-height: 1.55; color: var(--text-muted); }

/* ---------- 02 · Quadrantes por perfil ---------- */
.skills-quadrant { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.quadrant-box {
  position: relative; padding: 34px 26px 30px; border: 1px solid var(--line-subtle);
  border-radius: 4px; background: rgba(255,255,255,0.35); transition: var(--transition-smooth);
  display: flex; flex-direction: column;
}
.quadrant-box:hover { border-color: var(--line-medium); background: rgba(255,255,255,0.6); }
.quadrant-box .hud-top-left { top: 8px; left: 8px; }
.quadrant-box .hud-bottom-right { bottom: 8px; right: 8px; }
.quad-code { font-size: 0.7rem; letter-spacing: 0.18em; color: var(--text-muted); margin-bottom: 18px; }
.quad-title {
  font-family: var(--font-serif); font-weight: 400; font-size: 1.28rem; line-height: 1.3;
  margin-bottom: 14px; color: var(--ink);
}
.quad-lead { font-size: 0.92rem; line-height: 1.6; color: var(--text-secondary); margin-bottom: 18px; }
.quad-items { list-style: none; margin-top: auto; border-top: 1px solid var(--line-subtle); }
.quad-item {
  font-size: 0.84rem; padding: 10px 0 10px 18px; border-bottom: 1px solid var(--line-subtle);
  color: var(--text-secondary); position: relative;
}
.quad-item::before {
  content: ''; position: absolute; left: 2px; top: 50%; width: 6px; height: 1px; background: var(--ink);
}
.quad-note {
  margin-top: 14px; font-size: 0.74rem; line-height: 1.5; color: var(--text-muted); font-style: italic;
}

/* ---------- 03 · Mecanismo (cards empilhados) ---------- */
#mecanismo.portfolio-section { padding: calc(var(--header-h) + 20px) var(--inset) 36px; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; }
#mecanismo .section-hud-header { margin-bottom: 24px; }
.projects-container {
  position: relative; width: 100%; height: clamp(520px, 68vh, 660px); overflow: hidden; border-radius: 8px;
}
.project-card {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 36px; align-items: center;
  background: var(--bg-surface); border: 1px solid var(--line-medium); border-radius: 8px;
  padding: 32px 36px; box-shadow: 0 -20px 40px rgba(60, 50, 35, 0.16);
  transition: border-color 0.35s ease;
}
.project-card:nth-child(2) { background: var(--pastel-sage); }
.project-card:nth-child(3) { background: var(--pastel-mist); }
.project-card:nth-child(4) { background: var(--pastel-sand); }
.project-card::before, .project-card::after {
  content: ''; position: absolute; width: 8px; height: 8px; pointer-events: none;
}
.project-card::before { top: 10px; left: 10px; border-top: 1.5px solid rgba(2,2,2,0.4); border-left: 1.5px solid rgba(2,2,2,0.4); }
.project-card::after { bottom: 10px; right: 10px; border-bottom: 1.5px solid rgba(2,2,2,0.4); border-right: 1.5px solid rgba(2,2,2,0.4); }
.project-card:hover { border-color: var(--line-strong); }
.project-card:hover .doc-mock { transform: scale(1.02); }

.project-media-wrap {
  position: relative; width: 100%; aspect-ratio: 16 / 10; border-radius: 4px; overflow: hidden;
  border: 1px solid var(--line-subtle); background: rgba(255,255,255,0.45);
  display: flex; align-items: center; justify-content: center; padding: 22px;
}
.project-info { display: flex; flex-direction: column; justify-content: space-between; height: 100%; padding: 6px 0; }
.project-header-meta { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.project-tag, .project-year { font-size: 0.72rem; letter-spacing: 0.14em; color: var(--text-muted); text-transform: uppercase; }
.project-name {
  font-family: var(--font-serif); font-weight: 400; font-size: clamp(1.7rem, 2.3vw, 2.6rem);
  letter-spacing: -0.01em; line-height: 1.15; margin-bottom: 14px; color: var(--ink);
}
.project-summary { font-size: 0.96rem; line-height: 1.65; color: var(--text-secondary); margin-bottom: 24px; }
.project-stats-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 16px 0;
  border-top: 1px solid var(--line-subtle); border-bottom: 1px solid var(--line-subtle); margin-bottom: 24px;
}
.stat-box-val { font-family: var(--font-serif); font-size: 1.05rem; font-weight: 700; color: var(--ink); }
.stat-box-lbl { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-top: 2px; }

/* Mockups de documento (substituem as artes HUD) */
.doc-mock {
  width: 78%; max-width: 420px; aspect-ratio: 210 / 297; max-height: 100%;
  background: #fffdf9; border: 1px solid var(--line-subtle); border-radius: 2px;
  box-shadow: 0 18px 40px rgba(60, 50, 35, 0.14);
  padding: 7% 8%; display: flex; flex-direction: column; gap: 7px; overflow: hidden;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: Arial, Helvetica, sans-serif; color: #333;
}
.doc-mock.landscape { aspect-ratio: auto; width: 92%; height: 92%; max-width: none; }
.doc-line { height: 5px; border-radius: 2px; background: rgba(2,2,2,0.12); }
.doc-line.w90 { width: 90%; } .doc-line.w80 { width: 80%; } .doc-line.w70 { width: 70%; }
.doc-line.w60 { width: 60%; } .doc-line.w40 { width: 40%; } .doc-line.w30 { width: 30%; }
.doc-line.strong { background: rgba(2,2,2,0.4); height: 6px; }
.doc-gap { height: 6px; }
.doc-field {
  display: inline-block; align-self: flex-start; font-size: 9px; font-weight: 700; letter-spacing: 0.04em;
  background: #fff3b8; border: 1px dashed rgba(2,2,2,0.3); padding: 2px 5px; border-radius: 2px;
}
.doc-note {
  border-left: 3px solid #6d8f78; background: rgba(223,229,219,0.8); padding: 6px 8px;
  font-size: 9px; line-height: 1.35; color: #2d3b31; border-radius: 0 2px 2px 0;
}
.doc-style { display: flex; align-items: center; gap: 8px; }
.doc-style b { font-family: var(--font-sans); font-size: 8px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); min-width: 64px; font-weight: 600; }
.doc-style .doc-line { flex: 1; }
.doc-table { width: 100%; border-collapse: collapse; font-family: var(--font-sans); font-size: 10.5px; }
.doc-table td { border-bottom: 1px solid var(--line-subtle); padding: 6px 4px; vertical-align: top; }
.doc-table td:first-child { color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; font-size: 8.5px; width: 42%; font-weight: 600; }
.doc-check { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; color: #2d4a36; }
.doc-check::before { content: '✓'; display: inline-flex; width: 13px; height: 13px; border-radius: 50%; background: #dfe5db; align-items: center; justify-content: center; font-size: 8px; }
.timeline-mock { list-style: none; font-family: var(--font-sans); width: 100%; }
.timeline-mock li { display: grid; grid-template-columns: 54px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-subtle); font-size: 11px; color: var(--text-secondary); }
.timeline-mock li b { font-family: var(--font-serif); color: var(--ink); font-size: 12px; }

/* ---------- 04 · Autor (seção de contraste escura) ---------- */
.portfolio-section.section-night { background: var(--night); color: var(--on-night); border-bottom-color: var(--night-line); }
.section-night .section-hud-header { border-bottom-color: var(--night-line); }
.section-night .section-code, .section-night .section-subinfo { color: var(--on-night-muted); }
.section-night .hud-corner::before { border-color: rgba(245,242,236,0.5); }
.section-night .hud-corner::after { background: rgba(245,242,236,0.9); }

.author-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 64px; align-items: stretch; }
.author-photo {
  position: relative; border-radius: 6px; overflow: hidden; border: 1px solid var(--night-line);
  min-height: 460px; background: #737373;
}
.author-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; filter: grayscale(100%) contrast(1.08); }
.author-photo .hud-corner { z-index: 2; }
.author-photo .hud-top-left { top: 12px; left: 12px; }
.author-photo .hud-bottom-right { bottom: 12px; right: 12px; }
.author-logo { width: min(100%, 360px); padding: 3% 0; margin-bottom: 34px; }
.author-lead { font-family: var(--font-serif); font-size: clamp(1.15rem, 1.6vw, 1.55rem); line-height: 1.55; color: var(--on-night); margin-bottom: 22px; }
.author-text { font-size: 1rem; line-height: 1.75; color: var(--on-night-2); margin-bottom: 28px; }
.facts-grid { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--night-line); }
.fact {
  padding: 16px 18px 16px 0; border-bottom: 1px solid var(--night-line);
}
.fact:nth-child(odd) { border-right: 1px solid var(--night-line); }
.fact:nth-child(even) { padding-left: 18px; }
.fact-lbl { font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--on-night-muted); margin-bottom: 4px; }
.fact-val { font-size: 0.95rem; color: var(--on-night); line-height: 1.45; }
.author-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* ---------- Áreas (grade) ---------- */
.areas-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line-subtle); border: 1px solid var(--line-subtle); border-radius: 6px; overflow: hidden; }
.area-tile {
  background: var(--bg-main); padding: 28px 24px 24px; text-decoration: none; display: flex; flex-direction: column; gap: 10px;
  min-height: 190px; transition: background 0.35s ease;
}
.area-tile:hover { background: #fff; }
.area-code { font-size: 0.7rem; letter-spacing: 0.18em; color: var(--text-muted); display: flex; justify-content: space-between; }
.area-name { font-family: var(--font-serif); font-size: 1.12rem; line-height: 1.35; color: var(--ink); }
.area-desc { font-size: 0.84rem; line-height: 1.5; color: var(--text-muted); }
.area-tile .text-link { margin-top: auto; font-size: 0.7rem; }

/* ---------- Cards de peça ---------- */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.product-card {
  position: relative; display: flex; flex-direction: column; background: rgba(255,255,255,0.5);
  border: 1px solid var(--line-subtle); border-radius: 6px; padding: 24px; transition: var(--transition-smooth);
}
.product-card:hover { border-color: var(--line-medium); background: #fff; transform: translateY(-3px); }
.pc-top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.pc-code { font-size: 0.7rem; letter-spacing: 0.12em; color: var(--text-muted); font-weight: 600; white-space: nowrap; }
.pc-area { font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-secondary); background: var(--pastel-sage); padding: 3px 8px; border-radius: 3px; text-align: right; }
.pc-title { font-family: var(--font-serif); font-weight: 400; font-size: 1.12rem; line-height: 1.35; color: var(--ink); margin-bottom: 14px; }
.pc-title a { text-decoration: none; }
.pc-title a::after { content: ''; position: absolute; inset: 0; }
.pc-meta { list-style: none; border-top: 1px solid var(--line-subtle); margin-bottom: 18px; }
.pc-meta li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-subtle); font-size: 0.82rem; }
.pc-meta li span:first-child { color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.68rem; padding-top: 2px; }
.pc-meta li span:last-child { text-align: right; color: var(--text-primary); }
.pc-bottom { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pc-price { font-family: var(--font-serif); font-size: 1.3rem; font-weight: 700; color: var(--ink); }
.pc-price small { display: block; font-family: var(--font-sans); font-weight: 400; font-size: 0.72rem; color: var(--text-muted); }
.pc-bottom .btn { position: relative; z-index: 2; }

/* ---------- Combos ---------- */
.combo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.combo-card {
  position: relative; border: 1px solid var(--line-medium); border-radius: 6px; padding: 32px;
  background: rgba(255,255,255,0.45); display: flex; flex-direction: column; transition: var(--transition-smooth);
}
.combo-card:hover { border-color: var(--line-strong); background: rgba(255,255,255,0.75); }
.combo-card.is-featured { background: var(--night); color: var(--on-night); border-color: var(--night); }
.combo-card.is-featured .combo-kind, .combo-card.is-featured .combo-items li span:last-child, .combo-card.is-featured .combo-sum { color: var(--on-night-muted); }
.combo-card.is-featured .combo-desc { color: var(--on-night-2); }
.combo-card.is-featured .combo-items, .combo-card.is-featured .combo-items li { border-color: var(--night-line); }
.combo-card.is-featured .combo-name, .combo-card.is-featured .combo-price { color: var(--on-night); }
.combo-card.is-featured .combo-save { background: rgba(245,242,236,0.12); color: var(--on-night); }
.combo-kind { font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 12px; display: flex; justify-content: space-between; gap: 12px; }
.combo-name { font-family: var(--font-serif); font-weight: 400; font-size: 1.6rem; line-height: 1.2; color: var(--ink); margin-bottom: 10px; }
.combo-desc { font-size: 0.94rem; line-height: 1.6; color: var(--text-secondary); margin-bottom: 20px; }
.combo-items { list-style: none; border-top: 1px solid var(--line-subtle); margin-bottom: 22px; }
.combo-items li { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line-subtle); font-size: 0.86rem; }
.combo-items li a { text-decoration: none; }
.combo-items li a:hover { text-decoration: underline; }
.combo-items li span:last-child { color: var(--text-muted); white-space: nowrap; font-size: 0.78rem; letter-spacing: 0.08em; }
.combo-items.is-collapsed li:nth-child(n+7) { display: none; }
.combo-more { background: none; border: none; font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: inherit; opacity: 0.7; margin: -12px 0 20px; text-align: left; text-decoration: underline; }
.combo-pricing { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.combo-sum { font-size: 0.8rem; color: var(--text-muted); }
.combo-price { font-family: var(--font-serif); font-size: 2rem; font-weight: 700; color: var(--ink); line-height: 1.1; }
.combo-save { display: inline-block; margin-top: 6px; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; background: var(--pastel-sage); padding: 4px 9px; border-radius: 3px; color: #2d3b31; font-weight: 600; }

/* ---------- Oferta / licença ---------- */
.offer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 60px; }
.offer-tier { border: 1px solid var(--line-subtle); border-radius: 6px; padding: 30px 26px; background: rgba(255,255,255,0.4); display: flex; flex-direction: column; gap: 12px; }
.offer-tier .tier-num { font-size: 0.7rem; letter-spacing: 0.18em; color: var(--text-muted); }
.offer-tier h3 { font-family: var(--font-serif); font-weight: 400; font-size: 1.35rem; color: var(--ink); }
.offer-tier p { font-size: 0.92rem; line-height: 1.6; color: var(--text-secondary); }
.offer-tier .tier-price { font-family: var(--font-serif); font-weight: 700; font-size: 1.15rem; color: var(--ink); margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line-subtle); }
.offer-tier .tier-price small { font-family: var(--font-sans); font-weight: 400; color: var(--text-muted); font-size: 0.78rem; }

.license-strip { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line-subtle); border-bottom: 1px solid var(--line-subtle); margin-bottom: 60px; }
.license-strip > div { padding: 22px 22px 22px 0; }
.license-strip > div + div { padding-left: 22px; border-left: 1px solid var(--line-subtle); }
.license-strip h4 { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; margin-bottom: 8px; }
.license-strip p { font-size: 0.9rem; line-height: 1.6; color: var(--text-secondary); }
.license-strip a { color: var(--ink); }

/* ---------- FAQ ---------- */
.faq-layout { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 60px; align-items: start; }
.faq-intro h3 { font-family: var(--font-serif); font-weight: 400; font-size: clamp(1.4rem, 2vw, 2rem); line-height: 1.3; margin-bottom: 16px; color: var(--ink); }
.faq-intro p { color: var(--text-secondary); line-height: 1.7; margin-bottom: 24px; }
.faq-list { border-top: 1px solid var(--line-medium); }
.faq-item { border-bottom: 1px solid var(--line-subtle); }
.faq-item summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: flex-start; gap: 20px;
  padding: 20px 0; font-size: 1.02rem; font-weight: 500; color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-weight: 300; font-size: 1.4rem; line-height: 1; transition: transform 0.3s ease; color: var(--text-muted); }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-a { padding: 0 40px 22px 0; color: var(--text-secondary); line-height: 1.7; font-size: 0.96rem; }
.faq-item .faq-a p + p { margin-top: 10px; }
.faq-cat { font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; margin: 44px 0 6px; }
.faq-cat:first-child { margin-top: 0; }

/* ---------- CTA final ---------- */
.final-cta { text-align: center; padding: 120px var(--inset); position: relative; overflow: hidden; }
.final-cta h2 { position: relative; font-family: var(--font-serif); font-weight: 400; font-size: clamp(1.9rem, 3.4vw, 3.4rem); line-height: 1.2; max-width: 880px; margin: 0 auto 20px; color: var(--ink); }
.final-cta p { position: relative; max-width: 560px; margin: 0 auto 34px; color: var(--text-secondary); line-height: 1.7; }
.final-cta .hero-ctas { position: relative; justify-content: center; margin-bottom: 0; }

/* ---------- Contato ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.contact-terminal-info { display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.contact-headline { font-family: var(--font-serif); font-weight: 400; font-size: clamp(1.6rem, 2.6vw, 2.6rem); line-height: 1.2; margin-bottom: 16px; color: var(--ink); }
.contact-desc { color: var(--text-secondary); line-height: 1.7; max-width: 480px; }
.direct-channels { border-top: 1px solid var(--line-subtle); }
.channel-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 15px 0; border-bottom: 1px solid var(--line-subtle); }
.channel-lbl { font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; }
.channel-val { text-decoration: none; font-size: 0.95rem; color: var(--ink); text-align: right; }
a.channel-val:hover { text-decoration: underline; }

.contact-form { display: flex; flex-direction: column; gap: 22px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-label { font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; }
.form-input, .form-textarea, .form-select {
  width: 100%; background: rgba(255,255,255,0.55); border: 1px solid var(--line-medium); border-radius: 4px;
  padding: 14px 16px; font: inherit; font-size: 0.96rem; color: var(--text-primary); transition: border-color 0.3s ease, background 0.3s ease;
}
.form-input:focus, .form-textarea:focus, .form-select:focus { outline: none; border-color: var(--ink); background: #fff; }
.form-textarea { min-height: 140px; resize: vertical; }
.form-hint { font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; }
.form-check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.84rem; color: var(--text-secondary); line-height: 1.5; }
.form-check input { margin-top: 4px; accent-color: var(--ink); }
.btn-submit.is-success { background: var(--accent-dot); border-color: var(--accent-dot); }

/* =========================================================================
   PÁGINAS INTERNAS
   ========================================================================= */
.page-hero {
  position: relative; padding: calc(var(--header-h) + 90px) var(--inset) 70px;
  border-bottom: 1px solid var(--line-subtle); overflow: hidden; background: var(--bg-surface);
}
.page-hero .hero-frame { inset: calc(var(--header-h) + 14px) 18px 14px; }
.breadcrumb { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 22px; position: relative; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); }
.page-title { position: relative; font-family: var(--font-serif); font-weight: 400; font-size: clamp(2.1rem, 4vw, 3.8rem); line-height: 1.12; letter-spacing: -0.01em; max-width: 900px; color: var(--ink); margin-bottom: 18px; }
.page-lead { position: relative; max-width: 640px; color: var(--text-secondary); font-size: 1.06rem; line-height: 1.7; }

/* Filtros do catálogo */
.catalog-toolbar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin-bottom: 34px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line-medium); background: transparent; border-radius: 40px; padding: 8px 15px;
  font-size: 0.76rem; letter-spacing: 0.06em; color: var(--text-secondary); transition: var(--transition-smooth);
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.search-input { min-width: 260px; flex: 0 1 320px; }
.catalog-count { font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 18px; }
.empty-state { padding: 60px 20px; text-align: center; color: var(--text-muted); border: 1px dashed var(--line-medium); border-radius: 6px; grid-column: 1 / -1; }

/* Página da peça */
.product-layout { display: grid; grid-template-columns: 1fr 380px; gap: 56px; align-items: start; }
.product-head .pc-area { display: inline-block; margin-bottom: 18px; }
.product-facts { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line-medium); border-left: 1px solid var(--line-subtle); margin: 34px 0 44px; }
.product-facts > div { padding: 16px 18px; border-right: 1px solid var(--line-subtle); border-bottom: 1px solid var(--line-subtle); }
.product-facts .fact-lbl { color: var(--text-muted); }
.product-facts .fact-val { color: var(--ink); font-size: 0.98rem; }
.block-title { font-size: 0.74rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line-subtle); }
.product-block { margin-bottom: 44px; }
.toc-list { list-style: none; counter-reset: toc; }
.toc-list li { counter-increment: toc; display: grid; grid-template-columns: 44px 1fr; padding: 11px 0; border-bottom: 1px solid var(--line-subtle); font-size: 0.98rem; color: var(--text-primary); }
.toc-list li::before { content: counter(toc, upper-roman) '.'; font-family: var(--font-serif); color: var(--text-muted); font-size: 0.9rem; }
.notes-list { list-style: none; }
.notes-list li { padding: 12px 0 12px 22px; border-bottom: 1px solid var(--line-subtle); color: var(--text-secondary); line-height: 1.6; position: relative; }
.notes-list li::before { content: ''; position: absolute; left: 0; top: 22px; width: 10px; height: 1px; background: var(--ink); }
.legal-base { font-size: 0.96rem; line-height: 1.7; color: var(--text-secondary); }
.disclaimer-box { background: var(--pastel-sand); border-radius: 6px; padding: 20px 22px; font-size: 0.88rem; line-height: 1.65; color: var(--text-secondary); }
.disclaimer-box strong { color: var(--ink); }

.buy-box { position: sticky; top: calc(var(--header-h) + 24px); border: 1px solid var(--line-medium); border-radius: 8px; background: #fffdf9; padding: 28px; }
.buy-box .hud-top-left { top: 8px; left: 8px; } .buy-box .hud-bottom-right { bottom: 8px; right: 8px; }
.buy-price { font-family: var(--font-serif); font-size: 2.3rem; font-weight: 700; color: var(--ink); line-height: 1.1; margin: 6px 0 4px; }
.buy-installments { font-size: 0.84rem; color: var(--text-muted); margin-bottom: 22px; }
.buy-box .btn + .btn { margin-top: 10px; }
.buy-includes { list-style: none; margin-top: 22px; border-top: 1px solid var(--line-subtle); }
.buy-includes li { font-size: 0.84rem; padding: 9px 0 9px 22px; border-bottom: 1px solid var(--line-subtle); color: var(--text-secondary); position: relative; }
.buy-includes li::before { content: '✓'; position: absolute; left: 0; color: #4f7a5a; font-size: 0.8rem; }
.buy-combo { margin-top: 18px; background: var(--pastel-sage); border-radius: 6px; padding: 14px 16px; font-size: 0.86rem; line-height: 1.5; }
.buy-combo a { color: var(--ink); font-weight: 600; }

/* Sobre */
.timeline { list-style: none; border-top: 1px solid var(--line-medium); }
.timeline li { display: grid; grid-template-columns: 200px 1fr; gap: 32px; padding: 26px 0; border-bottom: 1px solid var(--line-subtle); }
.tl-period { font-size: 0.76rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; padding-top: 4px; }
.tl-role { font-family: var(--font-serif); font-size: 1.25rem; color: var(--ink); margin-bottom: 4px; }
.tl-org { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 8px; }
.tl-desc { font-size: 0.94rem; line-height: 1.7; color: var(--text-secondary); max-width: 720px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud span { border: 1px solid var(--line-medium); border-radius: 40px; padding: 7px 14px; font-size: 0.84rem; color: var(--text-secondary); background: rgba(255,255,255,0.4); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }

/* Páginas legais */
.legal-wrap { display: grid; grid-template-columns: 240px 1fr; gap: 60px; align-items: start; }
.legal-nav { position: sticky; top: calc(var(--header-h) + 24px); list-style: none; border-top: 1px solid var(--line-medium); }
.legal-nav a { display: block; padding: 11px 0; border-bottom: 1px solid var(--line-subtle); text-decoration: none; font-size: 0.86rem; color: var(--text-secondary); }
.legal-nav a:hover, .legal-nav a[aria-current="page"] { color: var(--ink); font-weight: 500; }
.prose { max-width: 760px; }
.prose h2 { font-family: var(--font-serif); font-weight: 400; font-size: 1.45rem; margin: 40px 0 14px; color: var(--ink); }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--text-secondary); line-height: 1.8; font-size: 0.98rem; }
.prose p + p { margin-top: 12px; }
.prose ul { padding-left: 20px; margin: 10px 0; }
.prose li + li { margin-top: 6px; }
.pending-note { background: var(--pastel-rose); border: 1px dashed rgba(2,2,2,0.25); border-radius: 6px; padding: 16px 18px; font-size: 0.88rem; line-height: 1.6; color: var(--text-secondary); margin-bottom: 34px; }
.pending-note strong { color: var(--ink); }

/* =========================================================================
   FOOTER
   ========================================================================= */
.global-footer { background: var(--night); color: var(--on-night-2); padding: 80px var(--inset) 28px; }
.footer-top { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 50px; border-bottom: 1px solid var(--night-line); }
.footer-logo { width: 230px; padding: 3% 0; margin-bottom: 20px; }
.footer-about { font-size: 0.88rem; line-height: 1.7; max-width: 340px; }
.footer-col h4 { font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--on-night-muted); font-weight: 600; margin-bottom: 16px; }
.footer-col ul { list-style: none; }
.footer-col li + li { margin-top: 10px; }
.footer-col a { text-decoration: none; font-size: 0.9rem; color: var(--on-night-2); }
.footer-col a:hover { color: var(--on-night); }
.footer-legal { padding: 24px 0; border-bottom: 1px solid var(--night-line); font-size: 0.8rem; line-height: 1.7; color: var(--on-night-muted); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-top: 22px; flex-wrap: wrap; }
.footer-credits, .footer-clock { font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-night-muted); }
.btn-back-top { background: transparent; border: 1px solid var(--night-line); color: var(--on-night); padding: 10px 16px; border-radius: 4px; font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; transition: var(--transition-smooth); }
.btn-back-top:hover { border-color: var(--on-night); }

/* =========================================================================
   COMPONENTES FLUTUANTES
   ========================================================================= */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 90; width: 54px; height: 54px; border-radius: 50%;
  background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 28px rgba(2,2,2,0.22); transition: var(--transition-smooth);
}
.wa-float:hover { transform: translateY(-3px); background: #2a2b2f; }
.wa-float svg { width: 26px; height: 26px; }

.cookie-banner {
  position: fixed; left: 22px; bottom: 22px; z-index: 95; max-width: 460px;
  background: #fffdf9; border: 1px solid var(--line-medium); border-radius: 8px; padding: 22px;
  box-shadow: 0 18px 50px rgba(60, 50, 35, 0.18); display: none;
}
.cookie-banner.is-visible { display: block; }
.cookie-banner p { font-size: 0.86rem; line-height: 1.6; color: var(--text-secondary); margin-bottom: 16px; }
.cookie-banner .cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.drawer-backdrop { position: fixed; inset: 0; background: rgba(2,2,2,0.35); z-index: 150; opacity: 0; pointer-events: none; transition: opacity 0.35s ease; }
.drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }
.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); z-index: 160; background: var(--bg-main);
  border-left: 1px solid var(--line-medium); transform: translateX(100%); transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex; flex-direction: column;
}
.cart-drawer.is-open { transform: translateX(0); }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 22px 26px; border-bottom: 1px solid var(--line-subtle); }
.drawer-head h2 { font-family: var(--font-serif); font-weight: 400; font-size: 1.3rem; }
.icon-btn { background: transparent; border: 1px solid var(--line-medium); border-radius: 4px; width: 38px; height: 38px; font-size: 1.1rem; color: var(--ink); }
.icon-btn:hover { border-color: var(--ink); }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 26px; }
.cart-line { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; padding: 16px 0; border-bottom: 1px solid var(--line-subtle); }
.cart-line .cl-code { font-size: 0.68rem; letter-spacing: 0.14em; color: var(--text-muted); grid-column: 1 / -1; }
.cart-line .cl-title { font-size: 0.94rem; line-height: 1.4; color: var(--ink); }
.cart-line .cl-price { font-family: var(--font-serif); font-weight: 700; white-space: nowrap; }
.cart-line .cl-remove { grid-column: 1 / -1; justify-self: start; background: none; border: none; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); text-decoration: underline; }
.drawer-empty { padding: 50px 0; text-align: center; color: var(--text-muted); font-size: 0.94rem; }
.drawer-foot { padding: 22px 26px 26px; border-top: 1px solid var(--line-subtle); background: var(--bg-surface); }
.coupon-row { display: flex; gap: 8px; margin-bottom: 16px; }
.coupon-row .form-input { padding: 11px 13px; font-size: 0.86rem; }
.total-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.total-row span:first-child { font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-muted); }
.total-row strong { font-family: var(--font-serif); font-size: 1.6rem; }
.pay-methods { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 16px; }

.modal { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal.is-open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(2,2,2,0.45); }
.modal-panel { position: relative; background: var(--bg-main); border-radius: 8px; border: 1px solid var(--line-medium); width: min(760px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; padding: 30px; }
.modal-panel .icon-btn { position: absolute; top: 16px; right: 16px; }
.modal-panel h2 { font-family: var(--font-serif); font-weight: 400; font-size: 1.45rem; margin-bottom: 8px; padding-right: 50px; }
.modal-panel .modal-sub { font-size: 0.86rem; color: var(--text-muted); margin-bottom: 22px; }

.sample-sheet {
  position: relative; background: #fff; border: 1px solid var(--line-subtle); padding: 46px 50px; overflow: hidden;
  font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 1.7; color: #222; text-align: justify;
  -webkit-user-select: none; user-select: none;
}
.sample-sheet p { margin-bottom: 10px; }
.sample-sheet .s-center { text-align: center; font-weight: 700; margin: 16px 0; letter-spacing: 0.04em; }
.sample-sheet .doc-field { font-size: 10.5px; }
.sample-sheet .doc-note { font-size: 11px; margin: 12px 0; font-family: var(--font-sans); }
.sample-sheet .fade { position: absolute; left: 0; right: 0; bottom: 0; height: 120px; background: linear-gradient(180deg, rgba(255,255,255,0), #fff 80%); }
.watermark {
  position: absolute; inset: 0; pointer-events: none; display: flex; flex-wrap: wrap; align-content: space-around; justify-content: space-around;
  transform: rotate(-24deg) scale(1.4); opacity: 0.08; font-family: var(--font-sans); font-weight: 600; letter-spacing: 0.2em; font-size: 14px; color: #000;
}
.watermark span { padding: 18px 26px; white-space: nowrap; }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); z-index: 300; background: var(--ink); color: #fff;
  padding: 13px 20px; border-radius: 4px; font-size: 0.86rem; opacity: 0; pointer-events: none; transition: all 0.35s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* Revelação genérica (páginas internas) */
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
[data-reveal].is-in { opacity: 1; transform: none; }
.no-js [data-reveal] { opacity: 1; transform: none; }

/* =========================================================================
   RESPONSIVO
   ========================================================================= */
/* =========================================================================
   MOVIMENTO · transições de página e efeitos (effects.js)
   ========================================================================= */
/* Cortina de entrada: cobre a página no carregamento e sobe (CSS puro, sem flash) */
body::after {
  content: ''; position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  background: var(--night) url('../img/logo-branco.svg') center / min(300px, 62vw) auto no-repeat;
  animation: curtain-up 0.95s cubic-bezier(0.76, 0, 0.24, 1) 0.15s forwards;
}
@keyframes curtain-up { to { transform: translateY(-101%); } }

/* Cortina de saída: sobe de baixo ao clicar num link interno */
.page-curtain-out {
  position: fixed; inset: 0; z-index: 9998; pointer-events: none;
  background: var(--night) url('../img/logo-branco.svg') center / min(300px, 62vw) auto no-repeat;
  transform: translateY(101%); transition: transform 0.6s cubic-bezier(0.76, 0, 0.24, 1);
}
body.is-leaving .page-curtain-out { transform: translateY(0); pointer-events: auto; }

/* Barra de progresso de leitura */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 120; background: var(--ink);
  transform: scaleX(0); transform-origin: left center; pointer-events: none;
}

/* Header que se recolhe ao rolar para baixo */
.site-header { transition: background 0.35s ease, border-color 0.35s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
.site-header.is-hidden { transform: translateY(-100%); }

/* Palavras dos títulos */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.wi { display: inline-block; will-change: transform; }

/* Linha dos cabeçalhos de seção desenhada na rolagem */
.fx-on .section-hud-header { position: relative; border-bottom-color: transparent; }
.fx-on .section-hud-header::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--line-medium);
  transform: scaleX(0); transform-origin: left center; transition: transform 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.fx-on .section-night .section-hud-header::after { background: rgba(245, 242, 236, 0.28); }
.fx-on .section-hud-header.is-drawn::after { transform: scaleX(1); }

/* Com GSAP ativo, ele controla a revelação (sem transição CSS concorrente) */
.fx-on [data-reveal],
.fx-intro .hero-ctas .btn,
.fx-intro .metric-item { transition: none !important; }

/* Parallax da foto do autor */
.author-photo img { top: -8%; height: 116%; }

@media (prefers-reduced-motion: reduce) {
  body::after, .page-curtain-out { display: none; }
}

@media (max-width: 1180px) {
  .skills-quadrant { grid-template-columns: repeat(2, 1fr); }
  .areas-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .license-strip { grid-template-columns: repeat(2, 1fr); }
  .license-strip > div:nth-child(3) { padding-left: 0; border-left: none; border-top: 1px solid var(--line-subtle); }
  .license-strip > div:nth-child(4) { border-top: 1px solid var(--line-subtle); }
}

@media (max-width: 980px) {
  .main-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-main); border-bottom: 1px solid var(--line-subtle); padding: 8px var(--inset) 20px;
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: var(--transition-smooth);
  }
  .main-nav.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .main-nav a { padding: 15px 0; border-bottom: 1px solid var(--line-subtle); font-size: 0.82rem; }
  .main-nav a::after { display: none; }
  .menu-toggle { display: block; }
  body.home .site-header:not(.is-solid) { background: rgba(245, 242, 236, 0.0); }
  .product-layout { grid-template-columns: 1fr; }
  .buy-box { position: relative; top: 0; }
  .legal-wrap { grid-template-columns: 1fr; gap: 30px; }
  .legal-nav { position: relative; top: 0; }
  .author-grid { grid-template-columns: 1fr; gap: 40px; }
  .author-photo { min-height: 420px; }
  .faq-layout, .contact-grid, .about-grid, .two-col { grid-template-columns: 1fr; gap: 44px; }
  .offer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --header-h: 64px; }
  .header-logo img { height: 32px; }
  .cart-btn .cart-label { display: none; }

  .hero-viewport { height: auto; min-height: 0; flex-direction: column; }
  .hero-frame { inset: 10px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-col-left { height: 62vh; min-height: 420px; }
  .hero-image { object-position: 50% 12%; }
  .mentor-identity { bottom: 34px; }
  .hero-col-right { padding: 44px var(--inset) 56px; border-left: none; border-top: 1px solid var(--line-subtle); }
  .hero-logo { width: min(100%, 340px); }

  .portfolio-section { padding: 90px var(--inset); }
  .section-hud-header { flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 34px; }
  .section-title { font-size: clamp(1.55rem, 6vw, 2.1rem); text-align: left; }

  .pillars-grid { grid-template-columns: 1fr; }
  .skills-quadrant, .areas-grid, .product-grid, .combo-grid { grid-template-columns: 1fr; }

  #mecanismo.portfolio-section { min-height: 0; padding: 90px var(--inset); }
  .projects-container { height: auto; overflow: visible; display: flex; flex-direction: column; gap: 22px; }
  .project-card { position: sticky; top: calc(var(--header-h) + 12px); height: auto; grid-template-columns: 1fr; gap: 20px; padding: 20px; box-shadow: 0 -12px 30px rgba(60,50,35,0.12); }
  .project-media-wrap { aspect-ratio: auto; height: 190px; padding: 14px; }
  .doc-mock { width: auto; height: 100%; }
  .doc-mock.landscape { width: 100%; }
  .project-stats-row { gap: 10px; }

  .facts-grid { grid-template-columns: 1fr; }
  .fact:nth-child(odd) { border-right: none; }
  .fact:nth-child(even) { padding-left: 0; }

  .form-row { grid-template-columns: 1fr; }
  .product-facts { grid-template-columns: repeat(2, 1fr); }
  .timeline li { grid-template-columns: 1fr; gap: 8px; }
  .footer-top { grid-template-columns: 1fr; }
  .license-strip { grid-template-columns: 1fr; }
  .license-strip > div, .license-strip > div + div { padding: 18px 0; border-left: none; border-top: 1px solid var(--line-subtle); }
  .license-strip > div:first-child { border-top: none; }
  .search-input { min-width: 0; flex: 1 1 100%; }
  .chip-row { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(-1 * var(--inset)); padding: 2px var(--inset) 8px; scrollbar-width: none; width: calc(100% + 2 * var(--inset)); }
  .chip-row::-webkit-scrollbar { display: none; }
  .chip { white-space: nowrap; flex-shrink: 0; }
  .page-hero { padding: calc(var(--header-h) + 60px) var(--inset) 50px; }
  .page-hero .hero-frame { inset: calc(var(--header-h) + 8px) 10px 8px; }
  .sample-sheet { padding: 30px 24px; }
  .cookie-banner { left: 12px; right: 12px; bottom: 12px; max-width: none; }
  .wa-float { right: 14px; bottom: 14px; }
  .final-cta { padding: 90px var(--inset); }
}

@media (max-width: 420px) {
  .hero-frame { inset: 8px; }
  .project-media-wrap { height: 160px; }
  .hero-ctas .btn { width: 100%; }
  .metric-label { font-size: 0.66rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
