/* ============================================================
   Inglés 360 — Base styles
   Reset + tipografía + layout + utilidades.
   tokens.css se carga antes via <link> en el HTML.
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background-color: var(--i360-paper);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--i360-ink-900);
  background-color: var(--i360-paper);
  background-image:
    radial-gradient(ellipse at 15% 10%, rgba(43,230,224,0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 5%,  rgba(177,76,255,0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 95%, rgba(74,107,255,0.10) 0%, transparent 55%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

[data-theme="dark"] body {
  background-color: #0A0E1F;
  background-image:
    radial-gradient(ellipse at 15% 10%, rgba(43,230,224,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 5%,  rgba(177,76,255,0.07) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 95%, rgba(74,107,255,0.06) 0%, transparent 55%);
  background-attachment: fixed;
}

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

a {
  color: var(--i360-blue-600);
  text-decoration: none;
  transition: var(--transition-fast);
}
a:hover { color: var(--i360-blue-500); }

button {
  font-family: inherit;
  cursor: pointer;
  border: 0;
  background: transparent;
  color: inherit;
}

ul, ol { padding: 0; margin: 0; }

/* ----------  Headings  ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0;
  color: var(--i360-ink-900);
  text-wrap: balance;
}

h1 {
  font-size: clamp(36px, 8vw, var(--fs-h1));
  line-height: var(--lh-h1);
  font-weight: 700;
  letter-spacing: var(--tracking-h1);
}

h2 {
  font-size: clamp(28px, 5vw, var(--fs-h2));
  line-height: var(--lh-h2);
  font-weight: 700;
  letter-spacing: var(--tracking-h2);
}

h3 {
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  font-weight: 600;
}

h4 {
  font-size: var(--fs-h4);
  line-height: var(--lh-h4);
  font-weight: 600;
}

p { margin: 0 0 var(--sp-4); }
p:last-child { margin-bottom: 0; }

/* ----------  Text utilities  ---------- */
.eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--i360-blue-600);
  margin: 0 0 var(--sp-3);
  display: block;
}

.lead {
  font-size: clamp(16px, 2.5vw, var(--fs-lead));
  line-height: var(--lh-lead);
  color: var(--i360-ink-700);
}

.small { font-size: var(--fs-small); line-height: var(--lh-small); }
.meta  { font-size: var(--fs-meta);  letter-spacing: var(--tracking-meta); }

.text-grad {
  background: var(--i360-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.text-hand {
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: var(--fs-hand);
  line-height: 1;
}

.muted          { color: var(--i360-ink-500); }
.text-light     { color: #fff; }
.text-light-dim { color: var(--i360-ink-300); }

/* ----------  Layout  ---------- */
.container {
  width: min(100% - 32px, 1200px);
  margin-inline: auto;
}

.section {
  padding-block: var(--sp-12);
}

@media (min-width: 768px)  { .section { padding-block: 80px; } }
@media (min-width: 1024px) { .section { padding-block: 96px; } }

.section-paper {
  /* sin bg propio: deja que el patrón del body se vea */
  background: transparent;
}

.section-dark {
  background-color: var(--i360-navy-900);
  background-image: none;
  color: #fff;
}
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 { color: #fff; }
.section-dark .lead    { color: var(--i360-ink-300); }
.section-dark .eyebrow { color: var(--i360-cyan-400); }

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

:focus-visible {
  outline: 2px solid var(--i360-blue-600);
  outline-offset: 3px;
  /* No sobreescribir border-radius — el outline del browser sigue
     el border-radius del elemento, no necesita un override aquí. */
}

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