/* =========================================================
   main.css — Variables globales, reset y estilos base
   La Llar de Pometes
   ========================================================= */

/* ----- Variables de color y diseño ----- */
:root {
  --sky: #EAF4F8;
  --sky-mid: #D0E8F2;
  --white: #FFFFFF;
  --sage: #7BAE8E;
  --sage-light: #A8CCB5;
  --sage-pale: #E8F3EC;
  --teal: #2A9D8F;
  --teal-light: #52C4B8;
  --sand: #F5EDD8;
  --navy: #2C5F7A;
  --navy-light: #3A7A9C;
  --text: #1E3A4A;
  --text-mid: #5A7A8A;
  --text-light: #8AACBC;
  --border: rgba(44, 95, 122, 0.12);
  --occupied: #E07B54;

  /* Sombras */
  --shadow-sm: 0 2px 8px rgba(44, 95, 122, 0.08);
  --shadow-md: 0 8px 32px rgba(44, 95, 122, 0.12);
  --shadow-lg: 0 20px 60px rgba(44, 95, 122, 0.16);
  --shadow-blue: 0 20px 60px rgba(44, 95, 122, 0.25);

  /* Bordes */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-pill: 100px;

  /* Transiciones */
  --transition: 0.3s ease;
  --transition-slow: 0.6s ease;
}

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

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

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

ul, ol {
  list-style: none;
}

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

/* ----- Tipografía base ----- */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  line-height: 1.2;
  color: var(--text);
}

p {
  font-family: 'DM Sans', sans-serif;
  color: var(--text-mid);
  line-height: 1.7;
}

em, i {
  font-family: 'Playfair Display', serif;
  font-style: italic;
}

/* ----- Layout contenedor ----- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ----- Sección base ----- */
.section {
  padding: 96px 0;
}

/* ----- Etiquetas de sección ----- */
.section-label {
  display: inline-block;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 12px;
}

.section-label--light {
  color: var(--teal-light);
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}

.section-sub {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  color: var(--text-mid);
  max-width: 560px;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header .section-sub {
  margin: 0 auto;
}

/* ----- Botones ----- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.btn-teal {
  background: var(--teal);
  color: var(--white);
  border: 2px solid var(--teal);
}

.btn-teal:hover {
  background: var(--navy);
  border-color: var(--navy);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-ghost {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
}

.btn-ghost:hover {
  background: var(--navy);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-pill {
  border-radius: var(--radius-pill);
}

.btn-lg {
  padding: 15px 36px;
  font-size: 1rem;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* Spinner dentro de botón */
.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ----- Pills y chips ----- */
.pill {
  display: inline-block;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
}

.pill-sage {
  background: var(--sage-pale);
  color: var(--sage);
  border: 1px solid rgba(123, 174, 142, 0.25);
}

.pill-sand {
  background: var(--sand);
  color: var(--navy);
  border: 1px solid rgba(44, 95, 122, 0.15);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  color: var(--text-mid);
  font-weight: 500;
}

/* ----- Spinner de carga ----- */
.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--sky-mid);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ----- Animaciones de entrada (reveal) ----- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.reveal-right {
  transform: translateX(30px);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* Retrasos en cascada */
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }

/* ----- Utilidades ----- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}
