/* ============================================================
   main.css — Estilos globales, variables CSS y reset
   Daisad Web · daisad.es
   ============================================================ */

/* ── Google Fonts import backup (también en <head>) ─────── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@700;800&family=DM+Sans:wght@300;400;500&display=swap');

/* ── Variables CSS ─────────────────────────────────────── */
:root {
  /* Colores corporativos Daisad */
  --color-pink:       #f86089;
  --color-pink-dark:  #d94d72;
  --color-pink-light: rgba(248, 96, 137, 0.12);
  --color-blue:       #525eff;
  --color-blue-dark:  #3a45e0;
  --color-blue-light: rgba(82, 94, 255, 0.12);

  /* Gradientes de marca */
  --gradient-brand:       linear-gradient(135deg, #f86089 0%, #525eff 100%);
  --gradient-brand-soft:  linear-gradient(135deg, rgba(248,96,137,0.15) 0%, rgba(82,94,255,0.15) 100%);
  --gradient-brand-text:  linear-gradient(120deg, #f86089 0%, #a07aff 55%, #525eff 100%);

  /* Fondos dark */
  --bg-dark:          #0d0d1a;
  --bg-dark-2:        #141428;
  --bg-dark-card:     rgba(255, 255, 255, 0.04);

  /* Fondos light */
  --bg-light:         #ffffff;
  --bg-light-2:       #f8f8ff;
  --bg-light-3:       #f0f0fa;

  /* Texto */
  --text-white:       #ffffff;
  --text-white-70:    rgba(255, 255, 255, 0.70);
  --text-white-50:    rgba(255, 255, 255, 0.50);
  --text-white-30:    rgba(255, 255, 255, 0.30);
  --text-dark:        #0d0d1a;
  --text-dark-60:     rgba(13, 13, 26, 0.60);

  /* Bordes */
  --border-dark:      rgba(255, 255, 255, 0.08);
  --border-light:     rgba(13, 13, 26, 0.10);
  --border-pink:      rgba(248, 96, 137, 0.30);
  --border-blue:      rgba(82, 94, 255, 0.30);

  /* Funcionales */
  --color-success:    #1D9E75;
  --color-amber:      #EF9F27;

  /* Tipografía */
  --font-display:     'Plus Jakarta Sans', sans-serif;
  --font-body:        'DM Sans', sans-serif;

  /* Espaciado */
  --section-padding:  96px;
  --container-max:    1200px;
  --radius-sm:        8px;
  --radius-md:        12px;
  --radius-lg:        16px;
  --radius-xl:        24px;

  /* Transiciones */
  --transition:       all 0.25s ease;
  --transition-slow:  all 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-dark);
  background-color: var(--bg-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* ── Tipografía ─────────────────────────────────────────── */
h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.03em;
}

h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3.5vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.025em;
}

h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(20px, 2.5vw, 26px);
  line-height: 1.2;
}

h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.3;
}

p {
  line-height: 1.65;
}

.text-sm  { font-size: 14px; }
.text-xs  { font-size: 12px; }
.text-lg  { font-size: 18px; }

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

/* ── Skip link accesibilidad ────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--color-pink);
  color: #fff;
  padding: 8px 16px;
  z-index: 9999;
  font-size: 14px;
  font-weight: 500;
  border-radius: 0 0 var(--radius-sm) 0;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
}

/* ── Utilidades generales ───────────────────────────────── */
.text-center  { text-align: center; }
.text-left    { text-align: left; }
.text-right   { text-align: right; }
.text-white   { color: var(--text-white); }
.text-pink    { color: var(--color-pink); }
.text-blue    { color: var(--color-blue); }
.text-muted   { color: var(--text-dark-60); }
.text-muted-white { color: var(--text-white-70); }

.d-flex       { display: flex; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-8        { gap: 8px; }
.gap-12       { gap: 12px; }
.gap-16       { gap: 16px; }

.mt-8   { margin-top: 8px; }
.mt-16  { margin-top: 16px; }
.mt-24  { margin-top: 24px; }
.mt-32  { margin-top: 32px; }
.mt-48  { margin-top: 48px; }

.mb-8   { margin-bottom: 8px; }
.mb-16  { margin-bottom: 16px; }
.mb-24  { margin-bottom: 24px; }
.mb-32  { margin-bottom: 32px; }
.mb-48  { margin-bottom: 48px; }

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

/* ── Focus visible ──────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--color-pink);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Scrollbar personalizado (Webkit) ───────────────────── */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: var(--color-pink);
  border-radius: 3px;
}

/* ── Selección de texto ─────────────────────────────────── */
::selection {
  background: var(--color-pink);
  color: #fff;
}

/* ── Botón volver al inicio ─────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 990;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 20px rgba(248, 96, 137, 0.35);
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(248, 96, 137, 0.5);
}

.back-to-top:active {
  transform: translateY(0);
}

@media (max-width: 480px) {
  .back-to-top {
    bottom: 20px;
    right: 16px;
    width: 44px;
    height: 44px;
  }
}

/* ── Banner de cookies ──────────────────────────────────── */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: 0 16px 16px;
  transform: translateY(120%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

#cookie-banner.cookie-banner--visible {
  transform: translateY(0);
  pointer-events: all;
}

#cookie-banner.cookie-banner--hiding {
  transform: translateY(120%);
  pointer-events: none;
}

.cookie-banner__inner {
  max-width: 900px;
  margin: 0 auto;
  background: var(--bg-dark);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-xl);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: 0 -4px 40px rgba(0,0,0,0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.cookie-banner__content {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.cookie-banner__icon {
  width: 40px;
  height: 40px;
  background: var(--color-pink-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-pink);
  flex-shrink: 0;
}

.cookie-banner__text strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-white);
  margin-bottom: 4px;
}

.cookie-banner__text p {
  font-size: 13px;
  color: var(--text-white-50);
  line-height: 1.5;
  margin: 0 0 6px;
}

.cookie-banner__link {
  font-size: 12px;
  color: var(--color-pink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner__actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.cookie-btn {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
}

.cookie-btn--outline {
  background: transparent;
  color: var(--text-white-70);
  border: 1px solid var(--border-dark);
}

.cookie-btn--outline:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text-white);
}

.cookie-btn--primary {
  background: var(--gradient-brand);
  color: #fff;
}

.cookie-btn--primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .cookie-banner__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 18px 18px;
  }

  .cookie-banner__actions {
    justify-content: stretch;
  }

  .cookie-btn {
    flex: 1;
    text-align: center;
  }
}
