/* ============================================================
   FocusKids Lab — Estilos compartidos
   Variables de marca, reset, tipografía, botones, header, footer.
   ============================================================ */

/* ---------- Fuentes ---------- */
@import url("https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Nunito:wght@400;600;700;800&display=swap");

/* ---------- Variables de marca ---------- */
:root {
  /* Paleta */
  --background: #fdf7ee;
  --foreground: #3a2a1f;
  --card: #ffffff;
  --card-foreground: #3a2a1f;
  --muted: #f4ece0;
  --muted-foreground: #7a6a5c;
  --primary: #ef6a4a;
  --primary-2: #f28a5c;
  --primary-foreground: #ffffff;
  --mint: #b7ead9;
  --mint-foreground: #1f4d47;
  --sun: #ffd35a;
  --sun-foreground: #5a4315;
  --berry: #e46a99;
  --cream: #fbf3e6;
  --destructive: #d94848;
  --border: #ebdfcc;
  --ring: #ef6a4a;

  /* Tipografía */
  --font-display: "Fredoka", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "Nunito", ui-sans-serif, system-ui, sans-serif;

  /* Radios */
  --radius-sm: 0.5rem;
  --radius-md: 0.875rem;
  --radius-lg: 1.25rem;
  --radius-xl: 1.5rem;
  --radius-2xl: 2rem;

  /* Sombras */
  --shadow-card: 0 8px 24px -10px rgba(70, 40, 20, 0.18);
  --shadow-pop: 0 20px 50px -18px rgba(239, 106, 74, 0.45);

  /* Espaciados */
  --container: 1200px;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  margin: 0;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.0625rem);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}
button {
  background: none;
  border: 0;
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
ul,
ol {
  padding: 0;
  list-style: none;
}

/* ---------- Tipografía ---------- */
h1,
h2,
h3,
h4,
h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
h1 {
  font-size: clamp(2.25rem, 1.6rem + 3.5vw, 4.5rem);
}
h2 {
  font-size: clamp(1.875rem, 1.4rem + 2.2vw, 3rem);
}
h3 {
  font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.75rem);
}
p {
  color: var(--muted-foreground);
}

/* ---------- Contenedor ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.25rem;
}
@media (min-width: 640px) {
  .container {
    padding-inline: 1.75rem;
  }
}
@media (min-width: 1024px) {
  .container {
    padding-inline: 2rem;
  }
}

/* ---------- Botones reutilizables ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.9rem 1.75rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  border-radius: 999px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease,
    background 0.2s ease;
  will-change: transform;
}
.btn:hover {
  transform: translateY(-2px);
  filter: saturate(1.05);
}
.btn:active {
  transform: translateY(0);
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: var(--primary-foreground);
  box-shadow: var(--shadow-pop);
}
.btn-outline {
  background: var(--card);
  color: var(--foreground);
  border: 2px solid rgba(239, 106, 74, 0.4);
}
.btn-outline:hover {
  border-color: var(--primary);
}
.btn-block {
  width: 100%;
}

/* ---------- Header (barra superior sticky compartida) ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: var(--primary-foreground);
}
.topbar__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.35rem 1.5rem;
  padding: 0.55rem 1rem;
  font-weight: 700;
  font-size: 0.875rem;
  text-align: center;
}
.topbar__sep {
  display: none;
  width: 1px;
  height: 1rem;
  background: rgba(255, 255, 255, 0.5);
}
@media (min-width: 768px) {
  .topbar__sep {
    display: inline-block;
  }
}
.topbar__inner .mono {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-variant-numeric: tabular-nums;
}

/* ---------- Footer compartido ---------- */
.footer {
  border-top: 1px solid var(--border);
  background: var(--card);
}
.footer__inner {
  padding-block: 3rem;
}
.footer__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.footer__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.footer__logo {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: var(--shadow-card);
}
.footer__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}
.footer__tagline {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}
.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-size: 0.9rem;
  color: var(--muted-foreground);
}
.footer__nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: color 0.2s ease;
}
.footer__nav a:hover {
  color: var(--foreground);
}
.footer__copy {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* ---------- Utilidades de aparición (compartidas) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
