/* Atavia Design — estilos globais
   O layout de cada seção está nos atributos style das páginas (convertidos do canvas).
   Aqui ficam o que é comum a todas as páginas e os ajustes para telas pequenas. */

:root {
  --ink: #2B2521;
  --paper: #F3F2F0;
  --paper-2: #EBEAE9;
  --taupe: #A99B8E;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: 'Jost', system-ui, sans-serif; font-weight: 300; }
img { max-width: 100%; }
[hidden] { display: none !important; }

a { color: var(--ink); }
a:hover { color: #000; }
.dk a { color: var(--paper); }
.dk a:hover { color: #FFFFFF; }

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

.skip-link { position: absolute; left: 16px; top: -60px; z-index: 200; padding: 12px 20px; background: var(--ink); color: var(--paper); border-radius: 999px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; }
.skip-link:focus { top: 16px; color: var(--paper); }

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

/* Cabeçalho */
.at-logo { display: block; aspect-ratio: 3.93 / 1; background: url(/assets/img/logo-atavia.png) center / contain no-repeat; }
.at-nav a { color: var(--ink); text-decoration: none; position: relative; }
.at-nav a:hover { color: #000; }
@media (max-width: 980px) { .at-nav { display: none !important; } }
a[aria-disabled="true"] { cursor: default; }

/* Cartões do portfólio na Home */
.at-card img { transition: transform .8s ease; }
.at-card:hover img { transform: scale(1.03); }

/* Menu em tela cheia */
.menu-overlay { position: fixed !important; inset: 0; z-index: 100; overflow-y: auto !important; min-height: 100vh; min-height: 100dvh; }
.at-mn a { color: var(--ink); text-decoration: none; }
.at-mn .mn-link:hover { color: #000; padding-left: 6px; transition: padding .3s ease; }
body.no-scroll { overflow: hidden; }
@media (max-height: 860px) {
  .menu-overlay .mn-link { font-size: clamp(36px, 8.4vh, 82px) !important; }
  .menu-overlay .mn-img img { height: 62vh !important; }
}

/* Janela de exemplos (Processo) */
.ex-modal { position: fixed; inset: 0; z-index: 120; background: rgba(43, 37, 33, .72); display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.ex-box { width: min(100%, 1200px); max-height: 92vh; max-height: 92dvh; display: flex; flex-direction: column; background: var(--paper); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.ex-head { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 22px 32px; border-bottom: 1px solid rgba(43, 37, 33, .2); }
.ex-etapa { margin: 0; font-size: 11px; letter-spacing: .24em; text-transform: uppercase; font-weight: 400; }
.ex-titulo { margin: 4px 0 0; font-family: 'Instrument Serif', serif; font-size: 30px; line-height: 1; text-transform: uppercase; }
.ex-close { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 1px solid var(--ink); border-radius: 999px; cursor: pointer; flex: none; }
.ex-body { overflow-y: auto; padding: 32px; display: flex; flex-direction: column; gap: 20px; background: var(--paper-2); }
.ex-body img { display: block; width: 100%; height: auto; background: #FFFFFF; box-shadow: 0 1px 0 rgba(43, 37, 33, .12); }
.ex-foot { padding: 18px 32px; border-top: 1px solid rgba(43, 37, 33, .2); display: flex; justify-content: center; }
.ex-cta { display: inline-flex; align-items: center; gap: 14px; padding: 14px 26px; background: var(--ink); color: var(--paper) !important; border-radius: 999px; text-decoration: none; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; font-weight: 400; }

/* Formulário de contato */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 0; padding: 14px 18px; font-size: 15px; line-height: 1.6; background: #FFFFFF; border-left: 3px solid var(--ink); }
.form-status.is-error { border-left-color: #9B2C2C; color: #7A1F1F; }
.at-f [aria-invalid="true"] { border-bottom-color: #9B2C2C !important; }
.at-f button[disabled] { opacity: .6; cursor: progress; }

/* ---------- Telas pequenas ---------- */
@media (max-width: 900px) {
  /* menu */
  .menu-overlay { padding: 20px 20px 32px !important; }
  .menu-overlay .mn-grid { grid-template-columns: 1fr !important; gap: 24px !important; align-items: start !important; margin-top: 24px; }
  .menu-overlay .mn-img { display: none; }
  .menu-overlay .mn-link { font-size: clamp(40px, 11vw, 64px) !important; }
  .menu-overlay .mn-foot { flex-direction: column; align-items: flex-start !important; gap: 20px; }
  .menu-overlay .mn-foot > div:last-child { text-align: left !important; }

  /* imagens que vazam para fora da coluna no desktop */
  [style*="left: -96px"] { left: 12px !important; width: 120px !important; }
  [style*="right: -40px"] { right: 12px !important; bottom: -32px !important; }

  /* iniciais gigantes das capas do portfólio */
  [aria-hidden="true"][style*="font-size: 210px"] { font-size: 120px !important; bottom: 40px !important; }
  [aria-hidden="true"][style*="font-size: 150px"] { font-size: 104px !important; bottom: 80px !important; }

  [style*="padding: 120px 4vw"] { padding-top: 72px !important; padding-bottom: 56px !important; }
  /* respiros verticais menores */
  section[style*="padding: 160px 4vw"], section[style*="padding: 140px 4vw"] { padding-top: 96px !important; padding-bottom: 96px !important; }

  /* formulário e caixas com muito recuo */
  form.at-f { padding: 36px 24px !important; }
  .ex-head, .ex-body, .ex-foot { padding-left: 16px; padding-right: 16px; }
}

@media (max-width: 600px) {
  /* cabeçalho em uma linha só no celular */
  body > div > header { flex-wrap: nowrap !important; gap: 12px !important; padding: 16px 20px !important; }
  body > div > header > a:first-child { width: 140px !important; }
  body > div > header > div { gap: 14px !important; }
}

@media (max-width: 560px) {
  /* recuo das capas do portfólio */
  [style*="padding-left: 64px"] { padding-left: 32px !important; }
  [style*="padding-right: 64px"] { padding-right: 32px !important; }
  [style*="padding-left: 56px"] { padding-left: 28px !important; }
  /* respostas das dúvidas */
  .at-q p[style*="margin: 0 0 32px 46px"] { margin-left: 0 !important; }
  .at-q h2 { font-size: 24px !important; }
  /* título que quebra em linhas com recuo */
  h1 [style*="padding-left"] { padding-left: 0 !important; }
}
