/**
 * Estilos base — Hotel Puerta Chichén
 *
 * Tipografía, enlaces, foco, superficies del navegador y utilidades propias.
 * Solo consume variables de tokens.css; aquí no se declaran colores literales.
 */

/* ------------------------------------------------------------------
   Documento
   ------------------------------------------------------------------ */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--pc-navbar-height) + var(--pc-space-md));
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  font-feature-settings: "kern", "liga";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  caret-color: var(--pc-gold-deep);
  accent-color: var(--pc-night);
}

::selection {
  background-color: var(--pc-gold-light);
  color: var(--pc-night);
}

/* Scrollbar en tonos de piedra (Firefox + Chromium/WebKit) */
html {
  scrollbar-color: var(--pc-border-control) var(--pc-sand);
}

/* ------------------------------------------------------------------
   Tipografía
   ------------------------------------------------------------------ */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.display, .headline, .title {
  font-family: var(--pc-font-serif);
  color: var(--bs-heading-color);
  text-wrap: balance;
  /* Títulos traducidos (alemán) traen palabras compuestas más anchas que la columna móvil */
  overflow-wrap: anywhere;
  margin-top: 0;
}

h1, .h1, .display {
  font-size: var(--pc-fs-display);
  font-weight: 500;
  line-height: var(--pc-lh-display);
  letter-spacing: var(--pc-tracking-display);
  margin-bottom: var(--pc-space-lg);
}

h2, .h2, .headline {
  font-size: var(--pc-fs-headline);
  font-weight: 500;
  line-height: var(--pc-lh-headline);
  margin-bottom: var(--pc-space-md);
}

h3, .h3, .title {
  font-size: var(--pc-fs-title);
  font-weight: 600;
  line-height: var(--pc-lh-title);
  margin-bottom: var(--pc-space-sm);
}

h4, .h4, h5, .h5, h6, .h6 {
  font-size: var(--pc-fs-body);
  font-weight: 600;
  line-height: var(--pc-lh-title);
  margin-bottom: var(--pc-space-sm);
}

p {
  margin-bottom: var(--pc-space-md);
}

/* Párrafos de lectura: medida máxima de 68ch */
p, .lead, li {
  text-wrap: pretty;
  overflow-wrap: break-word;
}

.prose p,
.prose li,
.lead {
  max-width: var(--pc-measure);
}

.lead {
  font-size: var(--pc-fs-lead);
  font-weight: 400;
  line-height: 1.6;
  color: var(--pc-ink);
}

small, .small, .text-small {
  font-size: var(--pc-fs-small);
  line-height: var(--pc-lh-small);
}

.text-muted-ink { color: var(--pc-ink-muted); }

/* Label: botones, eyebrows y etiquetas del booking bar */
.label {
  font-family: var(--pc-font-sans);
  font-size: var(--pc-fs-label);
  font-weight: 600;
  line-height: var(--pc-lh-title);
  letter-spacing: var(--pc-tracking-label);
  text-transform: uppercase;
}

/* Eyebrow con filete dorado de 40px encima (DESIGN.md › Shapes) */
.eyebrow {
  display: block;
  margin-bottom: var(--pc-space-md);
  font-family: var(--pc-font-sans);
  font-size: var(--pc-fs-label);
  font-weight: 600;
  line-height: var(--pc-lh-title);
  letter-spacing: var(--pc-tracking-label);
  text-transform: uppercase;
  color: var(--pc-gold-deep);
}

.eyebrow::before {
  content: "";
  display: block;
  width: 40px;
  height: 1px;
  margin-bottom: var(--pc-space-md);
  background-color: var(--pc-gold);
}

.text-center .eyebrow::before,
.eyebrow.text-center::before {
  margin-inline: auto;
}

/* Itálica anfitriona: una frase breve por sección, nunca párrafos enteros */
.host-quote {
  max-width: var(--pc-measure);
  font-family: var(--pc-font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: var(--pc-fs-lead);
  line-height: 1.5;
  color: var(--pc-night);
}

/* Cifras alineadas en precios, fechas y tablas */
.tabular-nums,
table {
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------
   Enlaces y foco
   ------------------------------------------------------------------ */
a {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color var(--pc-duration) var(--pc-ease-out);
}

a:hover {
  text-decoration-color: var(--pc-gold);
}

/* Foco visible solo con teclado; nunca se elimina sin reemplazo */
:focus-visible {
  outline: 3px solid var(--pc-gold-deep);
  outline-offset: 2px;
}

.on-night :focus-visible,
.on-night:focus-visible {
  outline-color: var(--pc-gold-light);
}

/* Enlace de salto al contenido */
.skip-link {
  position: absolute;
  top: var(--pc-space-sm);
  left: var(--pc-space-sm);
  z-index: 1080;
  padding: var(--pc-space-sm) var(--pc-space-md);
  background-color: var(--pc-surface);
  color: var(--pc-night);
  font-weight: 600;
  border-radius: var(--pc-radius-xs);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* ------------------------------------------------------------------
   Layout: contenedores y ritmo de secciones
   ------------------------------------------------------------------ */

/* Gutter lateral de 16px en móvil (Bootstrap usa 12px por defecto) */
.container,
.container-fluid,
.container-narrow {
  --bs-gutter-x: 2rem;
}

.container-narrow {
  width: 100%;
  max-width: calc(var(--pc-container-narrow) + var(--bs-gutter-x));
  margin-inline: auto;
  padding-inline: calc(var(--bs-gutter-x) * 0.5);
}

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

/* Encabezado de sección: 64px hasta el contenido */
.section-header {
  margin-bottom: var(--pc-space-2xl);
}

.section-header > :last-child {
  margin-bottom: 0;
}

.section-header.text-center .lead {
  margin-inline: auto;
}

/* ------------------------------------------------------------------
   Superficies (capas tonales)
   ------------------------------------------------------------------ */
.bg-limestone { background-color: var(--pc-limestone); }
.bg-sand      { background-color: var(--pc-sand); }
.bg-surface   { background-color: var(--pc-surface); }

/* Banda noche: una por página además del pie (regla de la noche como pausa) */
.bg-night,
.on-night {
  --bs-heading-color: var(--pc-limestone);
  --bs-body-color: var(--pc-on-night-muted);
  --bs-link-color-rgb: 217, 201, 154;
  --bs-link-hover-color-rgb: 246, 243, 238;
  color: var(--pc-on-night-muted);
}

.bg-night {
  background-color: var(--pc-night);
}

.bg-night-raised {
  background-color: var(--pc-night-raised);
}

.on-night ::selection {
  background-color: var(--pc-gold);
  color: var(--pc-night);
}

.on-night .eyebrow {
  color: var(--pc-gold-light);
}

.on-night .lead,
.on-night .host-quote {
  color: var(--pc-limestone);
}

/* Filete dorado de 1px */
.rule-gold {
  height: 1px;
  margin: 0;
  border: 0;
  background-color: var(--pc-gold);
  opacity: 1;
}

/* ------------------------------------------------------------------
   Medios
   ------------------------------------------------------------------ */
img,
picture,
video,
svg {
  max-width: 100%;
}

img {
  height: auto;
}

.media-cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ratio-4x3  { aspect-ratio: 4 / 3; }
.ratio-16x9 { aspect-ratio: 16 / 9; }
.ratio-3x4  { aspect-ratio: 3 / 4; }

/*
 * El arco (motivo firma): silueta del vano del isotipo, medida sobre
 * docs/assets/logo.png — remate trapezoidal, escalón en las impostas y
 * jambas rectas. Máximo una vez por página; nunca en fotos de habitación
 * ni en imágenes de tarjeta (DESIGN.md › Shapes).
 */
.media-arch {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  clip-path: polygon(33.3% 0, 66.7% 0, 89.3% 42.3%, 100% 42.3%, 100% 100%, 0 100%, 0 42.3%, 10.7% 42.3%);
}

/* ------------------------------------------------------------------
   Iconos (sprite SVG local de Tabler Icons, trazo de línea)
   El trazo fino (1.5) acompaña a los filetes de 1px de la marca.
   ------------------------------------------------------------------ */
.icon {
  display: inline-block;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.2em;
}

.icon-lg {
  width: 32px;
  height: 32px;
}

/* ------------------------------------------------------------------
   Movimiento reducido: sin transform ni scroll suave, transiciones a 0ms
   ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0ms !important;
    scroll-behavior: auto !important;
  }
}
