/* ============================================================
   POSADA DEL VIENTO — Design System
   design-system.css
   ============================================================ */

/* ------------------------------------------------------------
   GOOGLE FONTS
   ------------------------------------------------------------ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;1,400&family=DM+Sans:wght@300;400;500&display=swap');


/* ------------------------------------------------------------
   COLOR TOKENS
   ------------------------------------------------------------ */
:root {

  /* Verde sierra — primario */
  --color-green-50:  #EAF3DE;
  --color-green-100: #C0DD97;
  --color-green-200: #97C459;
  --color-green-400: #639922;
  --color-green-600: #3B6D11;   /* primario principal */
  --color-green-800: #27500A;
  --color-green-900: #173404;

  /* Ámbar — acento */
  --color-amber-50:  #FAEEDA;
  --color-amber-100: #FAC775;
  --color-amber-400: #EF9F27;   /* acento principal */
  --color-amber-600: #854F0B;
  --color-amber-800: #633806;

  /* Neutros cálidos */
  --color-neutral-50:  #F8F6F1;  /* fondo principal, crema muy suave */
  --color-neutral-100: #F1EFE8;  /* fondo secciones alternas */
  --color-neutral-200: #D3D1C7;  /* bordes */
  --color-neutral-400: #B4B2A9;  /* placeholder, disabled */
  --color-neutral-600: #5F5E5A;  /* texto secundario */
  --color-neutral-800: #2C2C2A;  /* texto principal */
  --color-neutral-900: #1A1A18;  /* títulos oscuros */

  /* Blanco y negro puros */
  --color-white: #FFFFFF;
  --color-black: #1A1A18;


  /* ------------------------------------------------------------
     ROLES SEMÁNTICOS DE COLOR
     ------------------------------------------------------------ */

  /* Fondos */
  --bg-base:        var(--color-neutral-50);   /* fondo del sitio */
  --bg-surface:     var(--color-white);        /* cards, paneles */
  --bg-muted:       var(--color-neutral-100);  /* secciones alternas */
  --bg-dark:        var(--color-green-800);    /* secciones oscuras */
  --bg-overlay:     rgba(26, 26, 24, 0.48);   /* overlay sobre imágenes */

  /* Texto */
  --text-primary:   var(--color-neutral-900);
  --text-secondary: var(--color-neutral-600);
  --text-muted:     var(--color-neutral-400);
  --text-inverse:   var(--color-white);
  --text-link:      var(--color-green-600);

  /* Marca */
  --brand-primary:  var(--color-green-600);
  --brand-dark:     var(--color-green-800);
  --brand-light:    var(--color-green-50);
  --accent:         var(--color-amber-400);
  --accent-dark:    var(--color-amber-600);
  --accent-light:   var(--color-amber-50);

  /* Bordes */
  --border-light:   var(--color-neutral-200);
  --border-medium:  var(--color-neutral-400);


  /* ------------------------------------------------------------
     TIPOGRAFÍA
     ------------------------------------------------------------ */

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  /* Escala de tamaños */
  --text-xs:   0.75rem;    /* 12px */
  --text-sm:   0.8125rem;  /* 13px */
  --text-base: 1rem;       /* 16px */
  --text-md:   1.125rem;   /* 18px */
  --text-lg:   1.25rem;    /* 20px */
  --text-xl:   1.5rem;     /* 24px */
  --text-2xl:  2rem;       /* 32px */
  --text-3xl:  2.5rem;     /* 40px */
  --text-4xl:  3rem;       /* 48px */
  --text-5xl:  3.75rem;    /* 60px */
  --text-6xl:  4.5rem;     /* 72px */

  /* Pesos */
  --weight-light:    300;
  --weight-regular:  400;
  --weight-medium:   500;
  --weight-semibold: 600;

  /* Alturas de línea */
  --leading-tight:  1.15;
  --leading-snug:   1.35;
  --leading-normal: 1.6;
  --leading-loose:  1.8;

  /* Letter spacing */
  --tracking-tight:  -0.02em;
  --tracking-normal:  0;
  --tracking-wide:    0.05em;
  --tracking-wider:   0.1em;
  --tracking-widest:  0.15em;


  /* ------------------------------------------------------------
     ESPACIADO
     ------------------------------------------------------------ */

  --space-1:  0.25rem;   /*  4px */
  --space-2:  0.5rem;    /*  8px */
  --space-3:  0.75rem;   /* 12px */
  --space-4:  1rem;      /* 16px */
  --space-5:  1.25rem;   /* 20px */
  --space-6:  1.5rem;    /* 24px */
  --space-8:  2rem;      /* 32px */
  --space-10: 2.5rem;    /* 40px */
  --space-12: 3rem;      /* 48px */
  --space-16: 4rem;      /* 64px */
  --space-20: 5rem;      /* 80px */
  --space-24: 6rem;      /* 96px */
  --space-32: 8rem;      /* 128px */


  /* ------------------------------------------------------------
     LAYOUT
     ------------------------------------------------------------ */

  --container-sm:  640px;
  --container-md:  768px;
  --container-lg:  1024px;
  --container-xl:  1280px;
  --container-2xl: 1440px;

  /* Padding horizontal del contenedor */
  --container-px: var(--space-6);


  /* ------------------------------------------------------------
     BORDES Y RADIOS
     ------------------------------------------------------------ */

  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-pill: 9999px;


  /* ------------------------------------------------------------
     SOMBRAS
     ------------------------------------------------------------ */

  --shadow-sm:  0 1px 3px rgba(26, 26, 24, 0.08);
  --shadow-md:  0 4px 16px rgba(26, 26, 24, 0.10);
  --shadow-lg:  0 8px 32px rgba(26, 26, 24, 0.14);
  --shadow-xl:  0 16px 48px rgba(26, 26, 24, 0.18);


  /* ------------------------------------------------------------
     TRANSICIONES
     ------------------------------------------------------------ */

  --transition-fast:   150ms ease;
  --transition-base:   250ms ease;
  --transition-slow:   400ms ease;


  /* ------------------------------------------------------------
     BREAKPOINTS (referencia — usar en media queries)
     mobile:  < 480px
     tablet:  480px – 1024px
     desktop: > 1024px
     ------------------------------------------------------------ */

  --bp-mobile:  480px;
  --bp-tablet:  1024px;

}


/* ------------------------------------------------------------
   RESET BÁSICO
   ------------------------------------------------------------ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--bg-base);
}

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

a {
  color: var(--text-link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul, ol {
  list-style: none;
}


/* ------------------------------------------------------------
   TIPOGRAFÍA — CLASES BASE
   ------------------------------------------------------------ */

/* Display / Hero */
.text-display {
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  font-size: var(--text-5xl);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
}

/* Headings */
h1, .h1 {
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);  /* 600 */
  font-size: var(--text-4xl);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
}

h2, .h2 {
  font-family: var(--font-display);
  font-weight: var(--weight-medium);    /* 500 */
  font-size: var(--text-3xl);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
}

h3, .h3 {
  font-family: var(--font-display);
  font-weight: var(--weight-medium);    /* 500 */
  font-size: var(--text-2xl);
  line-height: var(--leading-snug);
  color: var(--text-primary);
}

h4, .h4 {
  font-family: var(--font-body);
  font-weight: var(--weight-medium);
  font-size: var(--text-lg);
  line-height: var(--leading-snug);
  color: var(--text-primary);
}

h5, .h5 {
  font-family: var(--font-body);
  font-weight: var(--weight-medium);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-primary);
}

/* Cita / italic display */
.text-quote {
  font-family: var(--font-display);
  font-weight: var(--weight-regular);
  font-style: italic;
  font-size: var(--text-xl);
  line-height: var(--leading-snug);
  color: var(--text-secondary);
}

/* Eyebrow / label sobre títulos */
.text-eyebrow {
  font-family: var(--font-body);
  font-weight: var(--weight-medium);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--brand-primary);
}

/* Body */
.text-body     { font-size: var(--text-base); line-height: var(--leading-normal); }
.text-body-sm  { font-size: var(--text-sm);   line-height: var(--leading-normal); }
.text-body-lg  { font-size: var(--text-md);   line-height: var(--leading-loose); }

/* Utilidades */
.text-muted    { color: var(--text-secondary); }
.text-inverse  { color: var(--text-inverse); }
.text-accent   { color: var(--accent); }
.text-brand    { color: var(--brand-primary); }
.text-center   { text-align: center; }


/* ------------------------------------------------------------
   CONTENEDOR
   ------------------------------------------------------------ */

.container {
  width: 100%;
  max-width: var(--container-xl);
  margin-inline: auto;
  padding-inline: var(--container-px);
}

.container--sm  { max-width: var(--container-sm); }
.container--md  { max-width: var(--container-md); }
.container--lg  { max-width: var(--container-lg); }
.container--2xl { max-width: var(--container-2xl); }


/* ------------------------------------------------------------
   BOTONES
   ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: var(--weight-medium);
  font-size: var(--text-sm);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-8);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color var(--transition-base),
              color var(--transition-base),
              border-color var(--transition-base),
              transform var(--transition-fast);
}

.btn:hover  { text-decoration: none; }
.btn:active { transform: scale(0.98); }

/* Primario — verde */
.btn--primary {
  background-color: var(--brand-primary);
  color: var(--color-white);
  border-color: var(--brand-primary);
}
.btn--primary:hover {
  background-color: var(--brand-dark);
  border-color: var(--brand-dark);
  color: var(--color-white);
}

/* Secundario — outline verde */
.btn--secondary {
  background-color: transparent;
  color: var(--brand-primary);
  border-color: var(--brand-primary);
}
.btn--secondary:hover {
  background-color: var(--brand-light);
}

/* Acento — ámbar */
.btn--accent {
  background-color: var(--accent);
  color: var(--color-white);
  border-color: var(--accent);
}
.btn--accent:hover {
  background-color: var(--accent-dark);
  border-color: var(--accent-dark);
  color: var(--color-white);
}

/* Ghost — sobre fondos oscuros */
.btn--ghost {
  background-color: transparent;
  color: var(--color-white);
  border-color: var(--color-white);
}
.btn--ghost:hover {
  background-color: rgba(255, 255, 255, 0.12);
}

/* Tamaños */
.btn--sm { padding: var(--space-2) var(--space-5); font-size: var(--text-xs); border-radius: var(--radius-sm);}
.btn--lg { padding: var(--space-4) var(--space-10); font-size: var(--text-base); border-radius: var(--radius-md);}


/* ------------------------------------------------------------
   SECCIONES
   ------------------------------------------------------------ */

.section {
  padding-block: var(--space-24);
}

.section--sm {
  padding-block: var(--space-16);
}

.section--lg {
  padding-block: var(--space-32);
}

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

.section--dark {
  background-color: var(--bg-dark);
  color: var(--text-inverse);
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: var(--text-inverse);
}

.section-header {
  max-width: 640px;
  margin-inline: auto;
  text-align: center;
  margin-bottom: var(--space-16);
}

.section-header .text-eyebrow {
  margin-bottom: var(--space-3);
}

.section-header h2 {
  margin-bottom: var(--space-4);
}

.section-header p {
  color: var(--text-secondary);
  font-size: var(--text-md);
  line-height: var(--leading-loose);
}


/* ------------------------------------------------------------
   CARDS
   ------------------------------------------------------------ */

.card {
  background-color: var(--bg-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.card__body {
  padding: var(--space-6);
}

.card__eyebrow {
  margin-bottom: var(--space-2);
}

.card__title {
  font-family: var(--font-display);
  font-weight: var(--weight-medium);
  font-size: var(--text-xl);
  line-height: var(--leading-snug);
  margin-bottom: var(--space-3);
}

.card__text {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: var(--leading-loose);
  margin-bottom: var(--space-5);
}


/* ------------------------------------------------------------
   DIVISOR DECORATIVO
   ------------------------------------------------------------ */

.divider {
  border: none;
  border-top: 1px solid var(--border-light);
  margin-block: var(--space-8);
}

.divider--accent {
  border-top-color: var(--accent);
  width: 48px;
  margin-inline: 0;
}

.divider--center {
  margin-inline: auto;
}


/* ------------------------------------------------------------
   OVERLAY SOBRE IMÁGENES
   ------------------------------------------------------------ */

.overlay {
  position: relative;
  isolation: isolate;
}

.overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bg-overlay);
  z-index: 1;
}

.overlay > * {
  position: relative;
  z-index: 2;
}


/* ------------------------------------------------------------
   UTILIDADES
   ------------------------------------------------------------ */

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

.flex        { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between{ display: flex; align-items: center; justify-content: space-between; }
.gap-2       { gap: var(--space-2); }
.gap-4       { gap: var(--space-4); }
.gap-6       { gap: var(--space-6); }
.gap-8       { gap: var(--space-8); }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-8); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-8); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-6); }

.mt-4  { margin-top: var(--space-4); }
.mt-6  { margin-top: var(--space-6); }
.mt-8  { margin-top: var(--space-8); }
.mb-4  { margin-bottom: var(--space-4); }
.mb-6  { margin-bottom: var(--space-6); }
.mb-8  { margin-bottom: var(--space-8); }


/* ------------------------------------------------------------
   RESPONSIVE
   ------------------------------------------------------------ */

@media (max-width: 1024px) {
  :root {
    --container-px: var(--space-8);
  }

  h1, .h1          { font-size: var(--text-3xl); }
  h2, .h2          { font-size: var(--text-2xl); }
  .text-display    { font-size: var(--text-4xl); }

  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }

  .section       { padding-block: var(--space-16); }
  .section--lg   { padding-block: var(--space-20); }
}

@media (max-width: 480px) {
  :root {
    --container-px: var(--space-5);
  }

  h1, .h1          { font-size: var(--text-2xl); }
  h2, .h2          { font-size: var(--text-xl); }
  h3, .h3          { font-size: var(--text-lg); }
  .text-display    { font-size: var(--text-3xl); }

  .grid-4,
  .grid-3,
  .grid-2 { grid-template-columns: 1fr; }

  .section       { padding-block: var(--space-12); }
  .section--lg   { padding-block: var(--space-16); }

  .btn--lg { padding: var(--space-4) var(--space-8); }
}
