/* ===================================================================
   PATA+ BASE STYLES
   Reset, tipografia global, utilities
   =================================================================== */

/* ── Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  color: var(--text-primary);
  background-color: var(--background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

picture {
  display: contents;
}

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

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

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* ── Tipografia ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--primary);
}

h1 { font-size: var(--fs-display); }
h2 { font-size: var(--fs-h1); }
h3 { font-size: var(--fs-h2); }
h4 { font-size: var(--fs-h3); }

p {
  margin-bottom: var(--space-sm);
  line-height: var(--lh-relaxed);
}

p:last-child {
  margin-bottom: 0;
}

strong {
  font-weight: var(--fw-semibold);
}

/* ── Layout ── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-px);
  padding-right: var(--container-px);
}

.container--narrow {
  max-width: 800px;
}

.container--wide {
  max-width: 1400px;
}

section {
  padding-top: var(--section-py);
  padding-bottom: var(--section-py);
  position: relative;
}

/* ── Section Backgrounds ── */
.bg-white { background-color: var(--background-alt); }
.bg-base { background-color: var(--background); }
.bg-surface { background-color: var(--surface); }
.bg-warm { background-color: var(--accent-warm); }
.bg-primary { background-color: var(--primary); }

/* ── Utilities ── */
.text-center { text-align: center; }
.text-left { text-align: left; }

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-light { color: var(--text-light); }
.text-white { color: var(--text-on-dark); }
.text-green { color: var(--primary); }

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

/* ── Animations (base states) ── */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--duration-anim) var(--ease-out),
              transform var(--duration-anim) var(--ease-out);
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 100ms; }
.fade-in-delay-2 { transition-delay: 200ms; }
.fade-in-delay-3 { transition-delay: 300ms; }
.fade-in-delay-4 { transition-delay: 400ms; }

/* ── Reduced Motion ── */
@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;
  }

  .fade-in {
    opacity: 1;
    transform: none;
  }
}

/* ── Selection ── */
::selection {
  background-color: var(--primary-soft);
  color: var(--primary-dark);
}

/* ── Focus Visible ── */
:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--background);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-light);
}
