/* ============================================
   GOTITAS.CL — Base Styles
   Reset + Global Styles + Grain Overlay
   ============================================ */

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

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: 1.7;
  color: var(--color-carbon);
  background-color: var(--color-crema);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ── Grain Overlay (editorial paper feel) ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: var(--z-grain);
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* ── Typography Globals ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--weight-semi);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--color-carbon);
}

h1 {
  font-size: var(--text-hero);
}

h2 {
  font-size: clamp(1.75rem, 3vw + 0.5rem, 3rem);
}

h3 {
  font-size: var(--text-xl);
  font-weight: var(--weight-medium);
}

p {
  max-width: 65ch;
  color: var(--color-texto);
}

a {
  color: var(--color-tierra);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out-expo);
}

a:hover {
  color: var(--color-tierra-hover);
}

/* ── Focus Visible (accessibility) ── */
:focus-visible {
  outline: 3px solid var(--color-tierra);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ── Images ── */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── Lists ── */
ul, ol {
  list-style: none;
}

/* ── Buttons ── */
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ── Inputs ── */
input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* ── Utility Classes ── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--content-padding);
}

.container--wide {
  max-width: var(--max-width-lg);
}

.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;
}

/* ── Section Base ── */
.section {
  padding: var(--space-24) 0;
  position: relative;
}

.section--arena {
  background-color: var(--color-arena);
}

.section--crema {
  background-color: var(--color-crema);
}

.section--white {
  background-color: var(--color-blanco);
}

.section--dark {
  background-color: var(--color-carbon);
  color: rgba(255, 255, 255, 0.85);
}

.section--dark h2,
.section--dark h3 {
  color: var(--color-crema);
}

.section--dark p {
  color: rgba(255, 255, 255, 0.7);
}

/* ── Eyebrow Tag (taste-skill: pill-shaped badge) ── */
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-tierra);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--color-tierra-light);
  margin-bottom: var(--space-4);
}

/* ── Section Title ── */
.section__title {
  margin-bottom: var(--space-4);
}

.section__subtitle {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: var(--weight-regular);
  color: var(--color-texto);
  max-width: 55ch;
  margin-bottom: var(--space-12);
  line-height: 1.6;
}

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

/* ── Lang ── */
html {
  lang: es-CL;
}
