/* Travel Hub — base styles (Sprint 4.7a)
   Mobile-first. CSS custom properties para paleta editorial.
   Sprint 5.32 — Travel Premium aesthetic (AFAR / Condé Nast inspired). */

:root {
  /* Sprint 5.32 — Travel Premium palette */
  --color-bg: #FBFAF7;              /* warm cream off-white */
  --color-bg-elevated: #FFFFFF;
  --color-text: #1A1614;             /* warm near-black */
  --color-text-secondary: #6B635D;   /* warm gray (renamed semantic kept) */
  --color-text-muted: #6B635D;       /* alias del nombre nuevo */
  --color-text-subtle: #A89F97;
  --color-border: #E8E2DA;
  --color-accent: #A8451C;           /* terracotta editorial */
  --color-accent-hover: #8B3815;
  --color-accent-soft: #F4E8E0;     /* terracotta wash for tags */
  --color-link: #A8451C;             /* alineado con accent — feel editorial */
  --color-link-hover: #8B3815;
  --color-quote-bg: #F4E8E0;         /* alias terracotta soft */

  --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  /* Sprint 5.32 — scale 1.25 modular */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1.0625rem;            /* 17px body */
  --text-lg: 1.25rem;
  --text-xl: 1.5rem;
  --text-2xl: 2rem;
  --text-3xl: 2.625rem;
  --text-4xl: 3.5rem;
  --text-5xl: 4.5rem;

  /* Legacy step aliases (mantienen funcionando estilos preexistentes) */
  --size-step--1: var(--text-sm);
  --size-step-0:  var(--text-base);
  --size-step-1:  var(--text-lg);
  --size-step-2:  var(--text-xl);
  --size-step-3:  var(--text-3xl);
  --size-step-4:  var(--text-5xl);

  --content-width: 680px;
  --wide-width: 1200px;

  --space-2xs: 0.25rem;
  --space-xs:  0.5rem;
  --space-s:   1rem;
  --space-sm:  0.75rem;
  --space-m:   1.5rem;
  --space-md:  1rem;
  --space-l:   2.5rem;
  --space-lg:  1.5rem;
  --space-xl:  2.5rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;

  --line-height-tight: 1.15;
  --line-height-body: 1.7;
  --radius-sm: 4px;
  --radius-md: 8px;
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-card: 0 1px 3px rgba(26, 22, 20, 0.04), 0 4px 16px rgba(26, 22, 20, 0.06);
  --shadow-card-hover: 0 2px 8px rgba(26, 22, 20, 0.08), 0 12px 32px rgba(26, 22, 20, 0.10);
}

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

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

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  /* Sprint 5.32 — body sans (Inter), serif reservado para H1/H2/pull quotes */
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--line-height-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
a:hover, a:focus-visible { color: var(--color-link-hover); }

h1, h2, h3, h4, h5, h6 {
  /* Sprint 5.32 — editorial serif para todos los headings.
     Peso 500 (no 700) = más elegante, menos "bold blog" */
  font-family: var(--font-serif);
  line-height: var(--line-height-tight);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

p { margin: 0 0 var(--space-m); }

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--color-text);
  color: var(--color-bg);
  padding: var(--space-xs) var(--space-s);
  z-index: 1000;
  text-decoration: none;
}
.skip-link:focus { top: 0; }

/* Site header */
.site-header {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header__inner {
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: var(--space-s) var(--space-m);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-m);
}
.site-header__brand {
  text-decoration: none;
  color: var(--color-text);
}
.site-header__logo {
  /* Sprint 5.32 — logo en serif italic, look editorial */
  font-family: var(--font-serif);
  font-weight: 600;
  font-style: italic;
  font-size: var(--text-xl);
  letter-spacing: -0.01em;
}
.site-header__nav ul {
  display: flex;
  gap: var(--space-m);
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-header__nav a {
  font-family: var(--font-sans);
  font-size: var(--size-step--1);
  color: var(--color-text-secondary);
  text-decoration: none;
}
.site-header__nav a:hover { color: var(--color-text); }

/* Reading progress */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  z-index: 60;
}
.reading-progress__bar {
  height: 100%;
  width: 0%;
  background: var(--color-accent);
  transition: width 120ms linear;
}

/* Main */
main { display: block; }

/* Site footer */
.site-footer {
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-2xl);
  padding: var(--space-l) 0;
  background: var(--color-bg);
}
.site-footer__inner {
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 0 var(--space-m);
  text-align: center;
}
.site-footer__brand {
  font-family: var(--font-sans);
  font-weight: 700;
  margin-bottom: var(--space-xs);
}
.site-footer__line { color: var(--color-text-secondary); margin: var(--space-xs) 0; }
.site-footer__small { font-size: var(--size-step--1); }

/* Related articles */
.related {
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-xl);
  padding: var(--space-xl) 0 var(--space-l);
}
.related__inner {
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 0 var(--space-m);
}
.related__heading {
  /* Sprint 5.32 — serif para heading; tipo editorial section divider */
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: var(--text-xl);
  margin: 0 0 var(--space-l);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}
.related__list {
  display: grid;
  gap: var(--space-l);
  grid-template-columns: 1fr;
  list-style: none;
  padding: 0;
  margin: 0;
}
@media (min-width: 720px) {
  .related__list { grid-template-columns: repeat(3, 1fr); }
}
.related__link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.related__image {
  margin: 0 0 var(--space-s);
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: 4px;
}
.related__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 200ms ease;
}
.related__link:hover .related__image img { transform: scale(1.03); }
.related__title {
  /* Sprint 5.32 — serif para titles de related, peso 500 */
  display: block;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: var(--text-xl);
  line-height: 1.2;
  margin-bottom: var(--space-xs);
  color: var(--color-text);
}
.related__excerpt {
  display: block;
  color: var(--color-text-secondary);
  font-size: var(--size-step--1);
}
