/* Ribera Viajes — hoja de estilos (sitio estático, mobile-first) */

@font-face {
  font-family: "Playfair Display";
  src: url("../fonts/playfair-display-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #021426;
  --navy-deep: #011223;
  --red: #c4202c;
  --red-bright: #e0362f;
  --steel: #8496b2;        /* subtítulos azul grisáceo del diseño */
  --text: rgba(255, 255, 255, .86);
  --white: #fff;
  --line: rgba(255, 255, 255, .28);

  --serif: "Playfair Display", "Times New Roman", Georgia, serif;
  --sans: "Montserrat", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;

  --header-h: 68px;
  --gutter: clamp(1.25rem, 6.5vw, 7rem);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);   /* única compensación del encabezado fijo al navegar por anclas */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--navy);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
p, h1, h2 { margin: 0; }

h1[tabindex="-1"], h2[tabindex="-1"] { outline: none; }  /* foco programático al elegir una sección */

:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -4rem;
  z-index: 200;
  background: var(--white);
  color: var(--navy);
  padding: .6rem 1rem;
  font-weight: 600;
  transition: top .15s;
}
.skip-link:focus { top: 1rem; }

/* ---------- Encabezado ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--navy);
  border-bottom: 1px solid var(--line);
}
.site-header__bar {
  height: 100%;
  display: flex;
  align-items: center;
  gap: .75rem;
  padding-inline: clamp(1rem, 3vw, 2.5rem);
}
.site-header__logo {
  display: block;
  height: 48px;
  width: 48px;
  margin-right: auto;
  flex: none;
}
.site-header__logo img { width: 100%; height: 100%; object-fit: contain; }

.header-cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1rem;
  border: 1px solid var(--red-bright);
  border-radius: 999px;
  background: var(--red);
  color: var(--white);
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-decoration: none;
}
.header-cta:hover { background: var(--red-bright); }

.nav-toggle {
  position: relative;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--white);
  cursor: pointer;
}
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  position: absolute;
  left: 50%;
  width: 20px;
  height: 2px;
  margin-left: -10px;
  background: currentColor;
  transition: transform .2s, opacity .2s;
}
.nav-toggle__bars { top: 50%; margin-top: -1px; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; left: 0; margin-left: 0; }
.nav-toggle__bars::before { top: -7px; }
.nav-toggle__bars::after  { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after  { transform: translateY(-7px) rotate(-45deg); }

/* Menú móvil: panel desplegable bajo el encabezado */
.site-nav {
  position: fixed;
  inset: var(--header-h) 0 auto 0;
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
  background: var(--navy);
  border-bottom: 1px solid var(--line);
  padding: .5rem var(--gutter) 1.5rem;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-.5rem);
  transition: opacity .2s, transform .2s, visibility 0s .2s;
}
.site-nav.is-open {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition: opacity .2s, transform .2s;
}
.site-nav a {
  display: flex;
  align-items: center;
  min-height: 52px;
  font-family: var(--serif);
  font-size: 1.35rem;
  text-decoration: none;
  color: var(--white);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.site-nav a[aria-current="true"] { color: var(--white); }
.site-nav a[aria-current="true"]::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--red-bright);
  margin-right: .75rem;
}

/* ---------- Secciones ---------- */
.sec {
  position: relative;
  isolation: isolate;
  background-color: var(--navy);
  padding-top: var(--header-h);   /* espacio de diseño bajo el encabezado; el desplazamiento por anclas lo compensa sólo html { scroll-padding-top } */
  overflow: clip;
}
.sec::before {            /* foto de fondo */
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: min(100vw, 560px);
  z-index: -2;
  background: var(--bg) 70% 30% / cover no-repeat;
  -webkit-mask-image: linear-gradient(#000 55%, transparent);
          mask-image: linear-gradient(#000 55%, transparent);
}
.sec__inner {
  position: relative;
  padding: min(54vw, 290px) var(--gutter) 3.5rem;
  max-width: 1680px;
  margin-inline: auto;
}

.sec--hero      { --bg: url("../img/bg-hero-m.jpg"); }
.sec--nosotros  { --bg: url("../img/bg-nosotros-m.jpg"); }
.sec--servicios { --bg: url("../img/bg-servicios-m.jpg"); }
.sec--contacto  { --bg: url("../img/bg-contacto-m.jpg"); }
.sec--equipo    { --bg: none; background-color: var(--navy-deep); }
.sec--equipo::before { display: none; }

.sec__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.6rem, 11.5vw, 5.6rem);
  line-height: 1.02;
  letter-spacing: -.015em;
  color: var(--white);
}
.rule {
  display: block;
  width: 86px;
  height: 2px;
  margin: 1.25rem 0 1.5rem;
  background: var(--red);
}
.sec__lead {
  font-weight: 500;
  font-size: clamp(1.1rem, 4.6vw, 1.6rem);
  line-height: 1.4;
  color: var(--steel);
  max-width: 34rem;
}
.sec__lead--plain { font-weight: 400; }
.sec__body {
  margin-top: 1.75rem;
  max-width: 46rem;
  font-size: 1.0625rem;
  display: grid;
  gap: 1rem;
}
.sec__list li { padding-left: 0; }

/* ---------- Hero ---------- */
.sec--hero {
  min-height: 100svh;
  display: flex;
}
.sec--hero::before {
  height: 100%;
  background-position: 68% center;
  -webkit-mask-image: none;
          mask-image: none;
}
.sec--hero::after {      /* velo para legibilidad del texto */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(2,20,38,.15) 0%, rgba(2,20,38,.55) 55%, rgba(2,20,38,.92) 100%);
}
.sec--hero .sec__inner {
  width: 100%;
  display: flex;
  flex-direction: column;
  padding-top: 1.5rem;
  padding-bottom: 2.25rem;
}
.hero__copy { order: 2; margin-top: auto; }
.hero__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3.6rem, 19vw, 7.5rem);
  line-height: .98;
  letter-spacing: -.02em;
  color: var(--white);
}
.rule--hero { margin: 1rem 0 1.25rem; }
.hero__tagline {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 5.4vw, 2rem);
  color: var(--steel);
  line-height: 1.25;
}
.hero__lead {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 5.8vw, 2.25rem);
  line-height: 1.25;
  color: var(--white);
  margin-top: .35rem;
  max-width: 36rem;
}
.hero__brand {
  order: 3;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}
.hero__logo { width: 84px; flex: none; }
.hero__brand p { font-size: .9375rem; font-weight: 500; color: var(--white); max-width: 16rem; }

/* ---------- Equipo ---------- */
.sec--equipo .sec__inner { padding-top: 2.5rem; }
.equipo { display: grid; gap: 2rem; }
.equipo__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem .85rem;
}
.equipo__grid figure { margin: 0; }
.equipo__grid img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #0b1d33;
}
.equipo__grid figcaption {
  margin-top: .5rem;
  text-align: center;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--white);
}

/* ---------- Contacto ---------- */
.sec--contacto .sec__inner { padding-top: min(46vw, 260px); }
.contact-cta {
  display: grid;
  gap: .75rem;
  margin-top: 1.75rem;
  max-width: 26rem;
}
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: .5rem 1.25rem;
  border: 1px solid var(--white);
  border-radius: 6px;
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
  text-align: center;
}
.btn:hover { background: rgba(255, 255, 255, .12); }
.btn--primary { background: var(--red); border-color: var(--red-bright); }
.btn--primary:hover { background: var(--red-bright); }

.contact-list { margin-top: 2rem; display: grid; gap: .7rem; font-size: 1.0625rem; color: var(--white); }
.contact-list span { font-weight: 500; }
.contact-list a { text-underline-offset: 4px; }
.contact-list li { overflow-wrap: anywhere; }
.site-footer {
  background: var(--navy-deep);
  border-top: 1px solid var(--line);
  padding: 1.25rem var(--gutter);
  text-align: center;
  font-size: .8125rem;
  color: rgba(255, 255, 255, .6);
}

/* ---------- Tablet (>= 600px) ---------- */
@media (min-width: 600px) {
  .equipo__grid { gap: 1.5rem 1.25rem; }
  .contact-cta { grid-template-columns: repeat(3, auto); max-width: none; justify-content: start; }
  .btn { padding-inline: 1.5rem; }
}

/* ---------- Escritorio (>= 860px): menú horizontal, foto a la derecha ---------- */
@media (min-width: 860px) {
  :root { --header-h: 92px; }

  .site-header__logo { height: 68px; width: 68px; opacity: 0; transition: opacity .25s; }
  body.is-scrolled .site-header__logo,
  .site-header__logo:focus-visible { opacity: 1; }
  .header-cta, .nav-toggle { display: none; }

  .site-nav {
    position: static;
    inset: auto;
    max-height: none;
    overflow: visible;
    background: none;
    border: 0;
    padding: 0;
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: none;
  }
  .site-nav ul { display: flex; align-items: center; }
  .site-nav li + li::before {
    content: "";
    display: inline-block;
    width: 4px; height: 4px; border-radius: 50%;
    background: var(--red-bright);
    vertical-align: middle;
    margin-inline: clamp(.75rem, 2.2vw, 2rem);
  }
  .site-nav li { display: flex; align-items: center; }
  .site-nav a {
    min-height: 44px;
    font-size: clamp(1.05rem, 1.35vw, 1.3rem);
    border: 0;
    position: relative;
  }
  .site-nav a[aria-current="true"]::before { display: none; }
  .site-nav a[aria-current="true"]::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 4px;
    height: 2px;
    background: var(--red-bright);
  }

  .sec {
    min-height: max(640px, min(56.25vw, 100svh));
    display: flex;
    align-items: center;
  }
  .sec::before {
    height: 100%;
    background: var(--bgd) right center / cover no-repeat;
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 12%, #000 88%, transparent);
            mask-image: linear-gradient(180deg, transparent, #000 12%, #000 88%, transparent);
  }
  .sec--hero::before {
    -webkit-mask-image: linear-gradient(180deg, #000 85%, transparent);
            mask-image: linear-gradient(180deg, #000 85%, transparent);
  }
  .sec--hero      { --bgd: url("../img/bg-hero.jpg"); }
  .sec--nosotros  { --bgd: url("../img/bg-nosotros.jpg"); }
  .sec--servicios { --bgd: url("../img/bg-servicios.jpg"); }
  .sec--contacto  { --bgd: url("../img/bg-contacto.jpg"); }

  .sec__inner,
  .sec--contacto .sec__inner,
  .sec--equipo .sec__inner { width: 100%; padding-top: 3.5rem; padding-bottom: 4rem; }

  .sec__title { font-size: clamp(3.4rem, 6.2vw, 6.25rem); }
  .sec__lead { font-size: clamp(1.25rem, 1.75vw, 1.7rem); }
  .sec__body { font-size: clamp(1rem, 1.25vw, 1.2rem); }

  /* Hero */
  .sec--hero::after { background: linear-gradient(90deg, rgba(2,20,38,.55), rgba(2,20,38,0) 55%); }
  .sec--hero .sec__inner { display: block; padding-block: 3rem; min-height: calc(100svh - var(--header-h)); }
  .hero__copy { margin-top: 0; position: absolute; left: var(--gutter); top: 50%; transform: translateY(-46%); }
  .hero__title { font-size: clamp(5rem, 9.4vw, 9rem); }
  .hero__tagline { font-size: clamp(1.6rem, 2.6vw, 2.6rem); }
  .hero__lead { font-size: clamp(1.5rem, 2.55vw, 2.5rem); max-width: none; white-space: nowrap; }
  .hero__brand {
    position: absolute;
    right: calc(var(--gutter) * .7);
    bottom: 3rem;
    flex-direction: column;
    gap: 1.25rem;
    margin: 0;
    text-align: center;
  }
  .hero__logo { width: clamp(180px, 16vw, 270px); }
  .hero__brand p { font-size: clamp(.95rem, 1.3vw, 1.2rem); max-width: none; text-shadow: 0 1px 8px rgba(0,0,0,.6); }

  /* Equipo */
  .equipo { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: start; gap: 3rem; }
  .equipo__intro { padding-top: 1rem; }
  .equipo__grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem 1.5rem; max-width: 46rem; margin-left: auto; width: 100%; }

  /* Contacto: botones sólo en móvil/tablet, en escritorio queda el listado del diseño */
  .contact-cta { display: none; }
  .contact-list { margin-top: 2.25rem; }
}

@media (min-width: 1680px) {
  .sec::before { background-position: right center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
