/* =====================================================================
   Atlas Studio · studio.css · tokens + base (camada c1, 29/09/2026)
   Direção completa e justificativa: DIRECAO.md (mesma pasta).
   Identidade própria do Studio: NÃO usa atlas-tokens.css do Lab
   nem o par Inter + Plus Jakarta Sans.
   Fontes (Google Fonts), carregar no <head> de cada página:
   <link rel="preconnect" href="https://fonts.googleapis.com">
   <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
   <link href="https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..800;1,9..144,300..800&family=Geist:wght@400..700&family=Geist+Mono:wght@400;500&display=swap" rel="stylesheet">
   Contraste: python3 _trabalho/checar_contraste_studio.py studio.css
   ===================================================================== */

:root {
  /* ---------- Cor: 1 cor de marca (brasa) + neutros quentes ---------- */
  --cor-tinta: #0f0c09;          /* fundo padrão, preto quente */
  --cor-tinta-2: #1a1511;        /* card sobre tinta */
  --cor-tinta-3: #2a231c;        /* selo, moldura interna */
  --cor-papel: #f3ece0;          /* seção clara editorial */
  --cor-papel-2: #e8dfcf;        /* card sobre papel */

  --cor-texto-tinta: #f3ece0;    /* texto principal sobre tinta */
  --cor-texto-tinta-2: #c2b6a3;  /* texto secundário sobre tinta */
  --cor-texto-papel: #17120d;    /* texto principal sobre papel */
  --cor-texto-papel-2: #564a3d;  /* texto secundário sobre papel */

  --cor-brasa: #f2a541;          /* cor de assinatura (rastro de luz da vinheta) */
  --cor-brasa-clara: #f7c27a;    /* hover do botão, link em hover sobre tinta */
  --cor-brasa-funda: #8f4a0e;    /* brasa usada como TEXTO sobre papel */
  --cor-texto-sobre-brasa: #17120d;

  --cor-borda-tinta: #7a6c5a;    /* contorno de campo/botão sobre tinta (ui >= 3) */
  --cor-borda-papel: #8a7a66;    /* contorno de campo sobre papel (ui >= 3) */
  --cor-linha-tinta: #3a3027;    /* fio decorativo, não carrega significado */
  --cor-linha-papel: #d3c7b3;    /* fio decorativo, não carrega significado */
  --cor-foco-tinta: #f7c27a;
  --cor-foco-papel: #8f4a0e;
  --cor-moldura-borda: #7a6c5a;  /* aro visível do celular/notebook */
  --cor-moldura-corpo: #050403;  /* corpo do aparelho */

  /* estados: sempre acompanhados de ícone e texto, nunca só cor */
  --cor-ok-texto: #9fd3a0;
  --cor-erro-texto: #f0a39a;
  --cor-ok-texto-papel: #2f6a33;
  --cor-erro-texto-papel: #9c2f22;

  /* ---------- Tipografia ---------- */
  --fonte-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --fonte-texto: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fonte-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* escala fluida (min em 360px, max em 1440px) */
  --t-mega: clamp(3rem, 1.4rem + 7.2vw, 7.75rem);     /* 48 → 124 px · frase da abertura */
  --t-h1: clamp(2.5rem, 1.5rem + 4.4vw, 5.5rem);      /* 40 → 88 */
  --t-h2: clamp(2rem, 1.35rem + 2.9vw, 4rem);         /* 32 → 64 */
  --t-h3: clamp(1.375rem, 1.15rem + 1vw, 2rem);       /* 22 → 32 */
  --t-lead: clamp(1.125rem, 1.03rem + 0.42vw, 1.4rem);/* 18 → 22.4 */
  --t-corpo: clamp(1rem, 0.96rem + 0.18vw, 1.125rem); /* 16 → 18 */
  --t-mini: 0.875rem;                                  /* 14, rótulo mono */
  --t-micro: 0.8125rem;                                /* 13, legenda mono, nunca parágrafo */

  --lh-display: 0.98;
  --lh-titulo: 1.08;
  --lh-corpo: 1.6;
  --track-display: -0.02em;
  --track-mono: 0.06em;

  /* ---------- Espaço (base 4px) ---------- */
  --e-1: 0.25rem;  --e-2: 0.5rem;  --e-3: 0.75rem; --e-4: 1rem;
  --e-5: 1.5rem;   --e-6: 2rem;    --e-7: 3rem;    --e-8: 4rem;
  --e-9: 6rem;     --e-10: 8rem;
  --secao: clamp(4rem, 2.6rem + 6vw, 8rem);  /* respiro vertical entre seções */

  /* ---------- Grid ---------- */
  --largura-max: 1320px;
  --largura-texto: 64ch;
  --gutter: clamp(1rem, 0.6rem + 1.8vw, 2rem);   /* 16px no celular */
  --colunas: 4;                                   /* 4 no celular, 8 no tablet, 12 no desktop */

  /* ---------- Forma ---------- */
  --raio-0: 0;
  --raio-1: 6px;       /* campo, selo */
  --raio-2: 14px;      /* card, tela do notebook */
  --raio-pilula: 999px;/* botão */
  --raio-celular: 44px;
  --borda: 1px solid var(--cor-linha-tinta);

  /* ---------- Movimento ---------- */
  --dur-micro: 180ms;   /* hover, foco, cor */
  --dur-curta: 320ms;   /* botão, menu */
  --dur-reveal: 640ms;  /* entrada de título e bloco */
  --dur-intro: 1100ms;  /* abertura inteira, teto */
  --ease-luz: cubic-bezier(0.16, 1, 0.3, 1);      /* saída longa, equivale a expo.out */
  --ease-padrao: cubic-bezier(0.33, 1, 0.68, 1);  /* equivale a power3.out */
  --ease-entrada: cubic-bezier(0.32, 0, 0.67, 0); /* saída de cena, power3.in */
  --desloca-reveal: 24px;
  --escalonar: 80ms;    /* stagger entre itens irmãos */
}

@media (min-width: 720px)  { :root { --colunas: 8; } }
@media (min-width: 1100px) { :root { --colunas: 12; } }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, figure, blockquote, ul, ol, dl, dd { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
img, video, svg, picture { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:where(a) { color: inherit; }

body {
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--cor-tinta);
  color: var(--cor-texto-tinta);
  font-family: var(--fonte-texto);
  font-size: var(--t-corpo);
  line-height: var(--lh-corpo);
  font-feature-settings: "ss01", "tnum" 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--cor-brasa); color: var(--cor-texto-sobre-brasa); }

/* ---------- Superfícies ---------- */
.tinta { background: var(--cor-tinta); color: var(--cor-texto-tinta); }
.papel {
  background: var(--cor-papel); color: var(--cor-texto-papel);
  --cor-foco: var(--cor-foco-papel);
}
.papel .sec, .papel .rotulo { color: var(--cor-texto-papel-2); }
.papel .acento { color: var(--cor-brasa-funda); }

/* ---------- Layout ---------- */
.moldura-pagina { width: 100%; max-width: var(--largura-max); margin-inline: auto; padding-inline: var(--gutter); }
.secao { padding-block: var(--secao); }
.grade { display: grid; grid-template-columns: repeat(var(--colunas), minmax(0, 1fr)); gap: var(--gutter); }

/* ---------- Tipografia ---------- */
.mega, h1, h2, h3, .h1, .h2, .h3 {
  font-family: var(--fonte-display);
  font-weight: 400;
  font-optical-sizing: auto;
  letter-spacing: var(--track-display);
  text-wrap: balance;
}
.mega { font-size: var(--t-mega); line-height: var(--lh-display); font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 0; }
h1, .h1 { font-size: var(--t-h1); line-height: var(--lh-display); }
h2, .h2 { font-size: var(--t-h2); line-height: var(--lh-titulo); }
h3, .h3 { font-size: var(--t-h3); line-height: var(--lh-titulo); letter-spacing: -0.01em; }
.mega em, h1 em, h2 em, h3 em, .h1 em, .h2 em, .h3 em { font-style: italic; color: var(--cor-brasa); }
.papel .mega em, .papel h1 em, .papel h2 em, .papel h3 em, .papel .h1 em, .papel .h2 em, .papel .h3 em { color: var(--cor-brasa-funda); }
.lead { font-size: var(--t-lead); line-height: 1.5; max-width: 40ch; }
p { max-width: var(--largura-texto); text-wrap: pretty; }
.sec { color: var(--cor-texto-tinta-2); }
.acento { color: var(--cor-brasa); }
.rotulo {
  font-family: var(--fonte-mono); font-size: var(--t-mini); font-weight: 500;
  letter-spacing: var(--track-mono); text-transform: uppercase; color: var(--cor-texto-tinta-2);
}
.legenda { font-family: var(--fonte-mono); font-size: var(--t-micro); letter-spacing: 0.02em; color: var(--cor-texto-tinta-2); }

a { text-decoration-thickness: 1px; text-underline-offset: 0.2em; transition: color var(--dur-micro) var(--ease-padrao); }
.link { color: var(--cor-brasa); }
.link:hover { color: var(--cor-brasa-clara); }
.papel .link { color: var(--cor-brasa-funda); }

/* ---------- Foco visível ---------- */
:root { --cor-foco: var(--cor-foco-tinta); }
:focus-visible { outline: 2px solid var(--cor-foco); outline-offset: 3px; border-radius: var(--raio-1); }

/* ---------- Botões ---------- */
.botao {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--e-2);
  min-height: 48px; padding: 0.8rem 1.5rem;
  border: 1px solid transparent; border-radius: var(--raio-pilula);
  font-family: var(--fonte-texto); font-size: 1rem; font-weight: 600; line-height: 1.2;
  text-decoration: none; white-space: nowrap;
  transition: background-color var(--dur-micro) var(--ease-padrao), color var(--dur-micro) var(--ease-padrao),
              border-color var(--dur-micro) var(--ease-padrao), transform var(--dur-curta) var(--ease-luz);
}
.botao:active { transform: scale(0.98); }
.botao-principal { background: var(--cor-brasa); color: var(--cor-texto-sobre-brasa); }
.botao-principal:hover { background: var(--cor-brasa-clara); }
.botao-contorno { background: transparent; color: var(--cor-texto-tinta); border-color: var(--cor-borda-tinta); }
.botao-contorno:hover { border-color: var(--cor-brasa); color: var(--cor-brasa); }
.papel .botao-contorno { color: var(--cor-texto-papel); border-color: var(--cor-borda-papel); }
.papel .botao-contorno:hover { color: var(--cor-brasa-funda); border-color: var(--cor-brasa-funda); }
.botao-tinta { background: var(--cor-tinta); color: var(--cor-papel); }
.botao-tinta:hover { background: var(--cor-tinta-3); }
.botao .seta { transition: transform var(--dur-curta) var(--ease-luz); }
.botao:hover .seta { transform: translateX(4px); }

/* ---------- Selo ---------- */
.selo {
  display: inline-flex; align-items: center; gap: var(--e-2);
  padding: 0.3rem 0.7rem; border-radius: var(--raio-1);
  background: var(--cor-tinta-3); color: var(--cor-texto-tinta);
  font-family: var(--fonte-mono); font-size: var(--t-micro); letter-spacing: var(--track-mono); text-transform: uppercase;
}
.papel .selo { background: var(--cor-brasa-funda); color: var(--cor-papel); }

/* =====================================================================
   Molduras de aparelho em CSS puro, para exibir vídeo do site rodando.
   Uso:
   <figure class="aparelho celular">
     <div class="corpo">
       <div class="tela"><video muted loop playsinline autoplay preload="none" poster="..." width="390" height="844">...</video></div>
     </div>
     <figcaption class="legenda">...</figcaption>
   </figure>
   <figure class="aparelho notebook">
     <div class="tela"><video ... width="1440" height="900"></video></div>
     <div class="base" aria-hidden="true"></div>
   </figure>
   ===================================================================== */
.aparelho { margin: 0; position: relative; }
.aparelho .tela { position: relative; overflow: hidden; background: var(--cor-tinta-2); }
.aparelho .tela > video, .aparelho .tela > img, .aparelho .tela > picture > img {
  width: 100%; height: 100%; object-fit: cover; object-position: top center;
}
.aparelho figcaption { margin-top: var(--e-3); }

/* O figure.celular só dá a largura; a moldura mora em .corpo, e a figcaption fica fora, abaixo do aro. */
.celular {
  width: var(--celular-largura, 280px);
  max-width: 100%;
}
.celular .corpo {
  padding: 10px;
  border-radius: var(--raio-celular);
  background: var(--cor-moldura-corpo);
  border: 1.5px solid var(--cor-moldura-borda);
  box-shadow: 0 30px 60px -30px rgb(0 0 0 / 0.7), inset 0 0 0 1px rgb(255 255 255 / 0.04);
}
.celular .tela { aspect-ratio: 390 / 844; border-radius: calc(var(--raio-celular) - 10px); }
.celular .tela::before { /* ilha do topo */
  content: ""; position: absolute; z-index: 2; top: 10px; left: 50%; translate: -50% 0;
  width: 30%; height: 22px; border-radius: var(--raio-pilula); background: var(--cor-moldura-corpo);
}

.notebook { width: 100%; max-width: var(--notebook-largura, 880px); }
.notebook .tela {
  aspect-ratio: 16 / 10;
  border: 10px solid var(--cor-moldura-corpo);
  border-bottom-width: 14px;
  border-radius: var(--raio-2) var(--raio-2) 4px 4px;
  outline: 1.5px solid var(--cor-moldura-borda);
  outline-offset: 0;
}
.notebook .base {
  position: relative; height: 14px; width: 112%; margin-left: -6%;
  background: linear-gradient(var(--cor-tinta-3), var(--cor-moldura-corpo));
  border: 1.5px solid var(--cor-moldura-borda); border-top: 0;
  border-radius: 0 0 18px 18px;
}
.notebook .base::after { /* recorte da tampa */
  content: ""; position: absolute; top: 0; left: 50%; translate: -50% 0;
  width: 16%; height: 5px; border-radius: 0 0 8px 8px; background: var(--cor-linha-tinta);
}
@media (max-width: 719px) { .notebook .base { width: 104%; margin-left: -2%; } }

/* ---------- Movimento (estado inicial; GSAP ou IntersectionObserver liga) ---------- */
.revela { opacity: 0; transform: translateY(var(--desloca-reveal)); }
.revela.visivel {
  opacity: 1; transform: none;
  transition: opacity var(--dur-reveal) var(--ease-luz), transform var(--dur-reveal) var(--ease-luz);
}
html.sem-js .revela { opacity: 1; transform: none; }

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

/* ---------- Utilitários mínimos ---------- */
.visualmente-oculto {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
