/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-16);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

h1, h2, h3, h4, p, ul, ol, figure, blockquote {
  margin: 0;
}

ul[class],
ol[class] {
  list-style: none;
  padding: 0;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--accent);
  color: #fff;
}

/* Utilitários */
.container {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  font-size: var(--fs-14);
  font-weight: 600;
  border-radius: var(--radius);
  transform: translateY(-200%);
  transition: transform var(--dur-1) var(--ease-out);
}

.skip-link:focus {
  transform: none;
}

/* Rótulo técnico em mono, acima dos títulos: "[ 03 ] Frentes" */
.label {
  font-family: var(--font-mono);
  font-size: var(--fs-13);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-2);
  text-transform: none;
}

.label--accent {
  color: var(--accent);
}

/* Botões */
.btn {
  --btn-h: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--btn-h);
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: var(--fs-14);
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color var(--dur-1) var(--ease-out),
    border-color var(--dur-1) var(--ease-out),
    color var(--dur-1) var(--ease-out),
    transform var(--dur-1) var(--ease-out);
}

.btn:active {
  transform: translateY(1px);
}

.btn--sm {
  --btn-h: 40px;
  padding: 0 18px;
  font-size: var(--fs-13);
}

.btn--lg {
  --btn-h: 56px;
  padding: 0 28px;
  font-size: var(--fs-16);
}

.btn--primary {
  background: var(--ink);
  color: #fff;
}

.btn--primary:hover {
  background: var(--accent);
}

.btn--ghost {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--ink);
}

/* Link de texto com seta */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
  transition: border-color var(--dur-1) var(--ease-out), gap var(--dur-2) var(--ease-out);
}

.link-arrow:hover {
  border-color: var(--ink);
  gap: 12px;
}

/* Seção e cabeçalho de seção */
.section {
  padding-block: var(--section-y);
  border-top: 1px solid var(--line);
}

.section-head {
  position: relative;
  display: grid;
  gap: 16px;
  margin-bottom: clamp(40px, 5vw, 72px);
  max-width: 900px;
}

/* Grid técnico sutil, só atrás do cabeçalho */
.section-head::before {
  content: "";
  position: absolute;
  inset: -40px 0 -40px calc(var(--gutter) * -1);
  z-index: -1;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 60% 70% at 20% 50%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 20% 50%, #000 0%, transparent 75%);
  opacity: 0.55;
  pointer-events: none;
}

.section-title {
  font-size: var(--fs-48);
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: var(--tracking-title);
  text-wrap: balance;
}

.section-lead {
  max-width: 56ch;
  font-size: var(--fs-18);
  color: var(--ink-2);
  text-wrap: pretty;
}

/* Hero de página interna */
.page-hero {
  padding-top: calc(var(--header-h) + clamp(56px, 8vw, 120px));
  padding-bottom: clamp(56px, 7vw, 104px);
}

.page-hero .label {
  margin-bottom: 20px;
}

.page-hero__title {
  max-width: 18ch;
  font-size: var(--fs-display);
  line-height: 0.98;
  font-weight: 600;
  letter-spacing: var(--tracking-display);
  text-wrap: balance;
}

.page-hero__lead {
  max-width: 54ch;
  margin-top: 28px;
  font-size: var(--fs-20);
  line-height: 1.5;
  color: var(--ink-2);
  text-wrap: pretty;
}

.page-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}

/* Migalha de pão */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
  font-family: var(--font-mono);
  font-size: var(--fs-13);
  color: var(--ink-2);
}

.breadcrumb a {
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.breadcrumb [aria-current] {
  color: var(--ink);
}

/* Texto corrido */
.prose {
  max-width: var(--max-text);
  font-size: var(--fs-18);
  line-height: 1.7;
}

.prose > * + * {
  margin-top: 1.1em;
}

@media (max-width: 640px) {
  .page-hero__actions .btn {
    flex: 1 1 100%;
  }
}

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