/* ==========================================================================
   Base, Reset, Grid, Botões, Estrutura de Seções e Reduced Motion
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 0;
  scroll-behavior: auto;
  margin: 0;
  background: var(--au-bg);
  color: var(--au-ink);
}

body {
  margin: 0;
  background: var(--au-bg);
  color: var(--au-ink);
  font: 400 var(--t-body)/1.55 var(--font-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

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

[hidden] {
  display: none !important;
}

img,
video {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
}

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

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

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  text-wrap: balance;
  overflow-wrap: break-word;
  hyphens: auto;
  -webkit-hyphens: auto;
  hyphenate-limit-chars: 10 4 4;
}

h1 {
  font-size: var(--t-h1);
  line-height: 1.04;
}

h2 {
  font-size: var(--t-h2);
  line-height: 1.1;
}

h3 {
  font-size: var(--t-h3);
  line-height: 1.2;
}

h4 {
  font-family: var(--font-text);
  font-weight: 500;
  font-size: var(--t-card);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

p {
  text-wrap: pretty;
}

.t-label {
  font-size: var(--t-label);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

/* Foco visível acessível em dourado */
:focus-visible {
  outline: 2px solid var(--au-gold-light);
  outline-offset: 2px;
  border-radius: 2px;
}

::selection {
  background: color-mix(in oklab, var(--accent) 30%, transparent);
}

[role="tabpanel"][hidden] {
  display: none;
}

/* ---- Skip Link ---- */
.skip-link {
  position: absolute;
  left: max(var(--gut), (100% - var(--container)) / 2);
  top: 50%;
  z-index: 2;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link:focus {
  width: auto;
  height: var(--btn-h);
  padding: 0 var(--s-5);
  clip-path: none;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-btn);
  font: 500 var(--t-body)/1 var(--font-text);
}

/* ---- Container e Grid ---- */
.wrap {
  width: min(100% - 2 * var(--gut), var(--container));
  margin-inline: auto;
  padding-inline: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: var(--card-gap);
}

.grid > * {
  min-width: 0;
  grid-column: 1 / -1;
}

@media (min-width: 1024px) {
  .span-3 {
    grid-column: auto / span 3;
  }
}

/* ---- Botões: cantos arquitetônicos 4px, alto contraste ---- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  height: var(--btn-h);
  padding: 0 var(--s-5);
  border-radius: var(--r-btn);
  border: 1px solid transparent;
  font: 600 var(--t-body)/1 var(--font-text);
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition:
    transform 160ms var(--au-ease),
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

.btn--primary {
  background: var(--au-gold);
  color: #090a0c;
  border: 1px solid var(--au-gold);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--au-gold-light);
  border-color: var(--au-gold-light);
  color: #090a0c;
}

.btn:active,
.btn--primary:active {
  transform: translateY(1px) scale(0.985);
}

@media (hover: hover) and (pointer: fine) {
  .btn:hover {
    transform: translateY(-1px);
  }
  .btn:active {
    transform: translateY(1px) scale(0.985);
  }
}

.au-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  color: var(--au-ink);
  border: 1px solid var(--au-line-strong);
  text-decoration: none;
}

.au-btn-outline:hover,
.au-btn-outline:focus-visible {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--au-gold-line);
  color: var(--au-gold-light);
}

.au-btn-lg {
  min-height: 46px;
  padding: 0 22px;
  font-size: 14.5px;
}

/* ---- Estrutura de Seções & Cabeçalhos ---- */
.au-section {
  position: relative;
  background: var(--au-bg);
  color: var(--au-ink);
  border-top: 1px solid var(--au-line);
  padding-block: clamp(72px, 8vw, 116px);
}

.au-section--alt {
  background: var(--au-bg-alt);
}

.au-head {
  display: grid;
  gap: 14px;
  max-width: 64ch;
  margin-bottom: clamp(36px, 4.5vw, 56px);
}

.au-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 32px;
  margin-bottom: clamp(36px, 4.5vw, 56px);
}

.au-head-row .au-head {
  margin-bottom: 0;
}

.au-index {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--au-gold);
}

.au-h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 3.2vw, 44px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--au-ink);
}

.au-lead {
  margin: 0;
  font-size: clamp(15.5px, 1.1vw, 17.5px);
  line-height: 1.58;
  color: var(--au-muted);
}

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

  .btn:is(:hover, :active) {
    transform: none !important;
  }

  .btn--primary:active {
    background: color-mix(in oklab, var(--action) 74%, var(--bg));
  }

  .nav__menu {
    transform: none !important;
  }

  .au-n8n__pulse {
    animation: none;
  }

  .au-work .shot__img {
    transition: opacity 200ms ease;
    transform: none;
  }
}
