/* ==========================================================
   BASE — reset, tipografia, estrutura da página (mobile primeiro)
   ========================================================== */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--cream);
  color: var(--ink);
  font: 400 var(--fs-base)/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.1; letter-spacing: -.02em; font-weight: 700; }
h1 { font-size: var(--fs-h1); font-weight: 800; }
h2 { font-size: var(--fs-h2); }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
main:focus, main:focus-visible { outline: none; }          /* a página não é um controle: sem contorno */

.skip {
  position: absolute; left: var(--s2); top: -100px; z-index: 100;
  background: var(--yellow); border: var(--line); padding: var(--s2) var(--s4); border-radius: var(--r-pill);
}
.skip:focus { top: var(--s2); }

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

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
  height: calc(var(--topbar-h) + var(--safe-t));
  padding: var(--safe-t) var(--gutter) 0;
  background: var(--paper);
  border-bottom: var(--line);
}

.logo {
  font-weight: 800; font-size: 1.6rem; letter-spacing: -.04em; text-decoration: none;
  line-height: 1; display: inline-flex; align-items: baseline;
}
.logo span { font-weight: 300; color: #8FA3A1; }
.logo i { width: .42em; height: .42em; border-radius: 50%; background: var(--yellow); margin-left: .08em; }

/* ---------- Área de conteúdo ---------- */
main {
  /* espaço para a barra inferior fixa + área segura do iPhone */
  padding: var(--s5) var(--gutter) calc(var(--tabbar-h) + var(--safe-b) + var(--s8));
  max-width: 1200px;
  margin-inline: auto;
  outline: none;
}
main.is-in { animation: rise .35s ease both; }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

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

@media (min-width: 960px) {
  main { padding-block: var(--s8) var(--s10); }
}
