/* ============================================================
   YACU RUNA — Transporte Fluvial · Amazonía de Pastaza
   Paleta: azul río + azul noche + rojo del logo + bruma
   Tipografía: Cormorant Garamond (display) · Lora (cuerpo)
   · Archivo (etiquetas y datos)
   ============================================================ */

:root {
  --rio: #1a7dc4;
  --rio-hondo: #10608f;
  --rio-claro: #8fd0ff;
  --noche: #0d2438;
  --noche-2: #12314c;
  --rojo: #d5251c;
  --arena: #e8b34b;
  --bg: #ffffff;
  --bruma: #eef3f7;
  --text: #22303c;
  --text-light: #5c6b78;
  --borde: #dde6ec;
  --heading: 'Cormorant Garamond', serif;
  --body: 'Lora', serif;
  --ui: 'Archivo', sans-serif;
  --sombra: 0 18px 40px rgba(13, 36, 56, .12);
  --radio: 8px;
}

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

html { color-scheme: light; scroll-behavior: smooth; }

body {
  font-family: var(--body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  overflow-x: hidden;
}

button, a, input, textarea, select { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; display: block; }

h1, h2, h3 { font-family: var(--heading); line-height: 1.15; font-weight: 600; text-wrap: balance; }
section[id] { scroll-margin-top: 84px; }
a { color: inherit; text-decoration: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.skip-link { position: absolute; top: -100%; left: 0; z-index: 9999; background: var(--rio); color: #fff; padding: 12px 20px; font-family: var(--ui); }
.skip-link:focus { top: 0; }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--rio); outline-offset: 2px;
}

/* ---------- etiquetas y cabeceras de sección ---------- */

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--ui); text-transform: uppercase;
  font-size: .72rem; letter-spacing: .24em; font-weight: 600;
  color: var(--rio); margin-bottom: 18px;
}
.eyebrow::before {
  content: ""; width: 11px; height: 11px; background: var(--rojo);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  display: inline-block; flex-shrink: 0;
}

.section-head { text-align: center; max-width: 660px; margin: 0 auto 64px; }
.section-head h2 { font-size: clamp(2.1rem, 4vw, 2.9rem); color: var(--noche); letter-spacing: .5px; }
.section-head p { color: var(--text-light); margin-top: 14px; font-size: 1.08rem; }

/* separador con forma de río — motivo de la marca */
.river-sep { height: 30px; overflow: hidden; background: var(--bg); }
.river-sep svg { width: 100%; height: 100%; display: block; }
.river-sep path {
  fill: none; stroke: var(--rio); stroke-width: 1.6; opacity: .35;
  stroke-dasharray: 8 10; stroke-linecap: round;
}

/* ---------- navegación ---------- */

header.nav { position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; transition: background .4s ease, box-shadow .4s ease; }
.nav-inner { max-width: 1200px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; }
.nav-logo { display: flex; align-items: center; gap: 12px; }
.nav-logo img { height: 52px; width: auto; background: #fff; border-radius: 6px; padding: 4px; }
.nav-logo span { font-family: var(--heading); font-size: 1.2rem; font-weight: 700; color: #fff; letter-spacing: 2px; line-height: 1.1; transition: color .4s; }
header.nav.scrolled { background: rgba(255, 255, 255, .96); box-shadow: 0 2px 24px rgba(13, 36, 56, .1); backdrop-filter: blur(8px); }
header.nav.scrolled .nav-logo span { color: var(--noche); }

.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a { color: #fff; font-family: var(--ui); font-weight: 500; font-size: .88rem; letter-spacing: .04em; transition: color .3s; position: relative; }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: -5px; width: 0; height: 2px; background: var(--rio-claro); transition: width .3s; }
.nav-links a:hover::after { width: 100%; }
header.nav.scrolled .nav-links a { color: var(--text); }
header.nav.scrolled .nav-links a::after { background: var(--rio); }
.nav-links a:hover { color: var(--rio-claro); }
header.nav.scrolled .nav-links a:hover { color: var(--rio); }

.nav-cta { background: var(--rio); color: #fff !important; padding: 11px 24px; border-radius: 3px; font-size: .85rem; }
.nav-cta:hover { background: var(--rio-hondo); }
.nav-cta::after { display: none; }

.burger { display: none; background: none; border: none; cursor: pointer; color: #fff; }
.burger .material-icons { font-size: 32px; }
header.nav.scrolled .burger { color: var(--noche); }

/* ---------- hero ---------- */

.hero { position: relative; height: 100vh; min-height: 640px; overflow: hidden; display: flex; align-items: center; justify-content: center; text-align: center; }
.hero-bg { position: absolute; inset: -10% 0; background: url('/assets/img/hero.jpg') center/cover; z-index: 0; will-change: transform; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(rgba(13, 36, 56, .45), rgba(13, 36, 56, .78)); z-index: 1; }
.hero-content { position: relative; z-index: 3; max-width: 920px; padding: 0 20px; color: #fff; }
.hero-content .eyebrow { color: var(--rio-claro); justify-content: center; }
.hero h1 { font-size: clamp(2.7rem, 6.4vw, 4.8rem); color: #fff; letter-spacing: 1px; font-weight: 600; margin-bottom: 22px; opacity: 0; animation: fadeUp 1s ease .1s forwards; }
.hero p { font-size: 1.18rem; color: rgba(255, 255, 255, .92); max-width: 640px; margin: 0 auto 34px; opacity: 0; animation: fadeUp 1s ease .35s forwards; }
.hero .btn-cta { opacity: 0; animation: fadeUp 1s ease .6s forwards, pulse 2.4s infinite 1.6s; }

.btn-cta {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--rio); color: #fff; padding: 16px 40px; border-radius: 3px;
  font-family: var(--ui); font-size: .98rem; letter-spacing: .06em; font-weight: 600;
  box-shadow: 0 0 0 0 rgba(26, 125, 196, .5);
  transition: background .3s, transform .3s;
}
.btn-cta:hover { background: var(--rio-hondo); transform: translateY(-3px); }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(26, 125, 196, .45); }
  50% { box-shadow: 0 0 22px 5px rgba(26, 125, 196, .16); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-river { position: absolute; bottom: 0; left: 0; width: 100%; z-index: 2; pointer-events: none; }
.hero-river path {
  fill: none; stroke: var(--rio-claro); stroke-width: 2; opacity: .5;
  stroke-dasharray: 1600; stroke-dashoffset: 1600;
  animation: drawRiver 4s ease forwards .8s;
}
@keyframes drawRiver { to { stroke-dashoffset: 0; } }

/* ---------- animación de aparición ---------- */

.reveal { opacity: 0; transform: translateY(30px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- valores ---------- */

.value { padding: 110px 0; background: var(--bg); }
.value-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.v-card {
  background: #fff; border: 1px solid var(--borde); border-radius: var(--radio);
  padding: 40px 26px; text-align: center;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.v-card:hover { transform: translateY(-8px); box-shadow: var(--sombra); border-color: var(--rio); }
.v-icon {
  width: 64px; height: 64px; margin: 0 auto 20px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(26, 125, 196, .09);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.v-icon .material-icons { color: var(--rio); font-size: 30px; }
.v-card h3 { font-size: 1.5rem; color: var(--noche); margin-bottom: 10px; }
.v-card p { color: var(--text-light); font-size: .98rem; }

/* ---------- contadores ---------- */

.counters { background: linear-gradient(135deg, var(--noche), var(--noche-2)); padding: 84px 0; position: relative; overflow: hidden; }
.counters::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(143, 208, 255, .14) 1px, transparent 1px);
  background-size: 26px 26px; opacity: .5;
}
.counter-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; position: relative; z-index: 2; text-align: center; }
.counter-grid .num { font-family: var(--heading); font-size: 3.4rem; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.counter-grid .num span { color: var(--rio-claro); }
.counter-grid .lbl { font-family: var(--ui); color: rgba(255, 255, 255, .6); text-transform: uppercase; letter-spacing: .18em; font-size: .74rem; font-weight: 500; margin-top: 8px; }

/* ---------- historia ---------- */

.history { padding: 110px 0; background: var(--bruma); }
.history-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.history-img { overflow: hidden; border-radius: var(--radio); box-shadow: var(--sombra); }
.history-img img { transition: transform .5s ease; width: 100%; height: 100%; object-fit: cover; }
.history-img:hover img { transform: scale(1.04); }
.history-text h2 { font-size: clamp(2.1rem, 4vw, 2.9rem); color: var(--noche); letter-spacing: .5px; margin-bottom: 20px; }
.history-text p { color: var(--text-light); margin-bottom: 18px; font-size: 1.05rem; }
.history-text .quote {
  border-left: 3px solid var(--rojo); padding-left: 20px;
  font-family: var(--heading); font-style: italic; font-size: 1.35rem;
  color: var(--noche); line-height: 1.4;
}

/* ---------- servicios ---------- */

.services { padding: 110px 0; background: var(--bg); }
.serv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.s-card {
  background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.s-card:hover { transform: translateY(-8px); box-shadow: var(--sombra); border-color: var(--rio); }
.s-media { overflow: hidden; height: 230px; }
.s-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.s-card:hover .s-media img { transform: scale(1.07); }
.s-body { padding: 30px 26px 32px; display: flex; flex-direction: column; flex: 1; }
.s-body h3 { font-size: 1.65rem; color: var(--noche); margin-bottom: 12px; }
.s-body p { color: var(--text-light); flex: 1; margin-bottom: 22px; }
.s-link { display: inline-flex; align-items: center; gap: 8px; color: var(--rio); font-family: var(--ui); font-weight: 600; font-size: .9rem; letter-spacing: .02em; transition: gap .3s; }
.s-link:hover { gap: 14px; }
.s-link .material-icons { font-size: 18px; }

/* ---------- tours (dinámico) ---------- */

.tours { padding: 110px 0; background: var(--bruma); position: relative; }
.tours::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 80% 20%, rgba(26, 125, 196, .06), transparent 55%);
  pointer-events: none;
}
.tours-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; position: relative; }
.tours-empty { grid-column: 1 / -1; text-align: center; color: var(--text-light); padding: 40px 0; }

.tour-card {
  background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); overflow: hidden;
  display: flex; flex-direction: column; position: relative;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.tour-card:hover { transform: translateY(-8px); box-shadow: var(--sombra); border-color: var(--rio); }
.tour-media { overflow: hidden; height: 210px; position: relative; }
.tour-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.tour-card:hover .tour-media img { transform: scale(1.07); }
.tour-price {
  position: absolute; right: 14px; bottom: -18px;
  background: var(--noche); color: #fff;
  font-family: var(--ui); font-weight: 700; font-size: 1rem;
  padding: 10px 16px; border-radius: 4px;
  box-shadow: 0 8px 20px rgba(13, 36, 56, .3);
}
.tour-price small { display: block; font-weight: 500; font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--rio-claro); }
.tour-body { padding: 30px 26px 28px; display: flex; flex-direction: column; flex: 1; }
.tour-body h3 { font-size: 1.6rem; color: var(--noche); margin-bottom: 8px; padding-right: 30px; }
.tour-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tour-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--ui); font-size: .72rem; font-weight: 600; letter-spacing: .04em;
  color: var(--rio-hondo); background: rgba(26, 125, 196, .1);
  padding: 5px 12px; border-radius: 999px;
}
.tour-chip .material-icons { font-size: 14px; }
.tour-body p { color: var(--text-light); font-size: .98rem; flex: 1; margin-bottom: 22px; }
.tour-body .s-link { margin-top: auto; }

/* ---------- galería ---------- */

.gallery { padding: 110px 0; background: var(--bg); }
.gal-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 240px; gap: 16px; }
.gal-item { overflow: hidden; border-radius: var(--radio); }
.gal-item:nth-child(1) { grid-row: span 2; }
.gal-item:nth-child(4) { grid-row: span 2; }
.gal-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease, filter .5s ease; }
.gal-item:hover img { transform: scale(1.08); filter: saturate(1.15); }

/* ---------- testimonios ---------- */

.testi { padding: 110px 0; background: var(--bruma); }
.testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.t-card {
  background: #fff; border: 1px solid var(--borde); border-radius: var(--radio);
  padding: 36px 30px; position: relative;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.t-card:hover { transform: translateY(-6px); box-shadow: var(--sombra); border-color: var(--rio); }
.t-card .qmark { font-family: var(--heading); font-size: 4rem; color: rgba(26, 125, 196, .18); line-height: .6; height: 34px; }
.t-stars .material-icons { color: var(--arena); font-size: 19px; }
.t-text { color: var(--text-light); font-style: italic; margin: 14px 0 22px; }
.t-user { display: flex; align-items: center; gap: 14px; }
.t-avatar {
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--rio), var(--noche-2));
  color: #fff; font-family: var(--ui); font-weight: 700; font-size: .95rem; letter-spacing: .05em;
}
.t-user strong { display: block; color: var(--noche); font-family: var(--heading); font-size: 1.15rem; }
.t-user span:not(.t-avatar) { font-size: .85rem; color: var(--text-light); }

/* ---------- contacto ---------- */

.contact { padding: 110px 0; background: var(--bg); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }
.contact-form label { display: block; font-family: var(--ui); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--noche); margin-bottom: 6px; font-weight: 600; }
.contact-form .field { margin-bottom: 20px; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 13px 16px; border: 1px solid var(--borde); border-radius: 4px;
  font-family: var(--body); font-size: 1rem; background: #fff; transition: border-color .3s, box-shadow .3s;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--rio); box-shadow: 0 0 0 3px rgba(26, 125, 196, .12); outline: none; }
.contact-form textarea { resize: vertical; min-height: 120px; }
.btn-submit {
  background: var(--rio); color: #fff; border: none; padding: 15px 40px; border-radius: 3px;
  font-family: var(--ui); font-size: .95rem; font-weight: 600; letter-spacing: .05em; cursor: pointer;
  transition: background .3s, transform .3s;
}
.btn-submit:hover { background: var(--rio-hondo); transform: translateY(-2px); }
.btn-submit:disabled { opacity: .6; cursor: wait; transform: none; }
.form-msg { display: none; margin-top: 18px; padding: 14px 18px; background: rgba(37, 211, 102, .12); border: 1px solid #25D366; border-radius: 4px; color: #1a7a45; }
.form-msg.show { display: block; }
.form-msg.error { background: rgba(213, 37, 28, .08); border-color: var(--rojo); color: #a01812; }

.contact-info { display: flex; flex-direction: column; gap: 26px; }
.ci-item { display: flex; gap: 16px; align-items: flex-start; }
.ci-icon {
  width: 48px; height: 48px; flex-shrink: 0;
  background: rgba(26, 125, 196, .09);
  display: flex; align-items: center; justify-content: center;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.ci-icon .material-icons, .ci-icon i { color: var(--rio); font-size: 22px; }
.ci-item h4 { font-family: var(--heading); font-size: 1.3rem; color: var(--noche); }
.ci-item p { color: var(--text-light); font-size: 1rem; }
.map-wrap { margin-top: 4px; }

/* ---------- preguntas frecuentes ---------- */

.faq { padding: 110px 0 120px; background: var(--bruma); }
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--borde); }
.faq-q {
  width: 100%; background: none; border: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 24px 0; font-family: var(--heading); font-size: 1.4rem; font-weight: 600;
  color: var(--noche); text-align: left;
}
.faq-q .material-icons { color: var(--rio); transition: transform .3s; flex-shrink: 0; }
.faq-q[aria-expanded="true"] .material-icons { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .4s ease; }
.faq-a p { padding: 0 0 24px; color: var(--text-light); }

/* ---------- pie ---------- */

footer { background: var(--noche); color: rgba(255, 255, 255, .75); padding: 70px 0 26px; position: relative; overflow: hidden; }
footer::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(143, 208, 255, .1) 1px, transparent 1px);
  background-size: 28px 28px; opacity: .4;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.4fr 1fr; gap: 40px; position: relative; z-index: 2; }
.footer-brand img { height: 64px; margin-bottom: 16px; background: #fff; border-radius: 6px; padding: 6px; }
.footer-brand p { font-size: .95rem; line-height: 1.7; }
.footer-col h4 { font-family: var(--heading); color: #fff; font-size: 1.35rem; margin-bottom: 18px; letter-spacing: .5px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { font-size: .95rem; transition: color .3s; }
.footer-col a:hover { color: var(--rio-claro); }
.footer-col p { font-size: .95rem; margin-bottom: 10px; display: flex; gap: 8px; align-items: flex-start; }
.footer-col p .material-icons { font-size: 18px; color: var(--rio); }
.social-icons { display: flex; gap: 12px; margin-top: 6px; }
.social-icons a {
  width: 40px; height: 40px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: #fff;
  transition: background .3s, border-color .3s;
}
.social-icons a:hover { background: var(--rio); border-color: var(--rio); }
.footer-bottom {
  position: relative; z-index: 2; text-align: center; margin-top: 50px; padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: .85rem; color: rgba(255, 255, 255, .55);
}
.footer-bottom a { color: var(--rio-claro); }

/* ---------- botón flotante WhatsApp ---------- */

.whatsapp-float {
  position: fixed; bottom: 24px; right: 24px; width: 58px; height: 58px;
  background: #25D366; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; z-index: 2000;
  box-shadow: 0 6px 20px rgba(37, 211, 102, .4);
  animation: pulseWa 2.2s infinite;
}
.whatsapp-float i { color: #fff; font-size: 30px; }
@keyframes pulseWa {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, .5); }
  50% { box-shadow: 0 0 0 14px rgba(37, 211, 102, 0); }
}

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .value-grid { grid-template-columns: repeat(2, 1fr); }
  .counter-grid { grid-template-columns: repeat(2, 1fr); }
  .history-grid, .contact-grid { grid-template-columns: 1fr; }
  .serv-grid, .testi-grid, .tours-grid { grid-template-columns: repeat(2, 1fr); }
  .gal-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .nav-links {
    position: fixed; top: 0; right: -100%; height: 100vh; width: 78%; max-width: 320px;
    background: #fff; flex-direction: column; justify-content: center; gap: 28px;
    transition: right .4s ease; box-shadow: -8px 0 30px rgba(0, 0, 0, .12);
    overscroll-behavior: contain;
  }
  .nav-links.open { right: 0; }
  .nav-links a { color: var(--text); }
  .burger { display: block; }
  .section-head h2, .history-text h2 { font-size: 2rem; }
  .serv-grid, .testi-grid, .value-grid, .footer-grid, .tours-grid, .gal-grid { grid-template-columns: 1fr; }
  .gal-item:nth-child(1), .gal-item:nth-child(4) { grid-row: span 1; }
  .counter-grid { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .hero-river path { stroke-dashoffset: 0; }
}
