/* Kit "Qin Saba" — código propio que reproduce los patrones de qinsaba.com/en (agencia de viajes a medida por Italia).
   Tokens: cambia la paleta, las fuentes y --cut por cliente. */
:root {
  --ivory: #ffffff;   /* fondo base (marfil) */
  --sand: #f2f2f2;    /* fondo alterno / footer */
  --night: #111111;   /* verde noche: texto y tramos oscuros */
  --olive: #4a4a4a;   /* texto atenuado */
  --brass: #6b6b6b;   /* líneas, antetítulos, puntos */
  --wine: #c4342b;    /* único botón (CTA) */
  --wine-2: #8e1f17;
  --font-head: "Cormorant Garamond", "Italiana", "Times New Roman", serif; /* serif fina y alta */
  --font-body: "Jost", system-ui, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --gut: clamp(20px, 4vw, 64px);
  --cut: 28px;        /* esquina cortada de las fotos */
  --header-h: 64px;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--ivory); color: var(--night); font: 300 15px/1.7 var(--font-body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 400; letter-spacing: -.02em; line-height: 1.02; margin: 0; }
.q-eyebrow { display: flex; align-items: center; gap: 14px; font: 500 10px/1 var(--font-body); letter-spacing: .28em; text-transform: uppercase; color: var(--brass); }
.q-eyebrow::after { content: ""; width: 48px; height: 1px; background: currentColor; }
.q-btn { display: inline-flex; align-items: center; gap: 14px; height: 48px; padding: 0 28px; border-radius: 2px; background: var(--wine); color: var(--ivory); font: 500 10px var(--font-body); letter-spacing: .24em; text-transform: uppercase; transition: background .25s; }
.q-btn::after { content: "→"; transition: transform .6s var(--ease); }
.q-btn:hover { background: var(--wine-2); } .q-btn:hover::after { transform: translateX(4px); }
.q-link { font: 500 10px var(--font-body); letter-spacing: .24em; text-transform: uppercase; border-bottom: 1px solid var(--brass); padding-bottom: 4px; }

/* ---------- Header: reloj local + nav + logo al centro + idiomas ---------- */
.q-header { position: fixed; inset: 0 0 auto; z-index: 90; height: var(--header-h); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 var(--gut); font: 500 10px var(--font-body); letter-spacing: .2em; text-transform: uppercase; transition: background .4s, transform .6s var(--ease); }
.q-header.is-solid { background: color-mix(in srgb, var(--ivory) 92%, transparent); backdrop-filter: blur(8px); }
.q-header.is-hidden { transform: translateY(-100%); }
.q-header__clock { display: flex; gap: 10px; align-items: center; color: var(--olive); }
.q-header__clock i { width: 6px; height: 6px; border-radius: 50%; background: var(--brass); animation: q-pulse 2.4s ease-in-out infinite; }
.q-header__nav { display: flex; gap: 32px; align-items: center; }
.q-header__logo { font: 400 26px/1 var(--font-head); letter-spacing: 0; text-transform: none; }
.q-header__langs { justify-self: end; display: flex; gap: 12px; color: var(--olive); }
@keyframes q-pulse { 50% { opacity: .3; } }
@media (max-width: 899px) { .q-header { grid-template-columns: 1fr auto; } .q-header__clock, .q-header__nav a:not(.q-header__logo) { display: none; } }

/* ---------- Sombras de hojas (video en multiply sobre el marfil) ---------- */
.q-shadows { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: multiply; opacity: .55; overflow: hidden; }
.q-shadows video, .q-shadows img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Hero: texto a la izquierda + carrusel de fotos con barra de progreso ---------- */
.q-hero { position: relative; min-height: 100svh; display: grid; grid-template-columns: 1fr 1.15fr; gap: var(--gut); align-items: center; padding: calc(var(--header-h) + 24px) var(--gut) 48px; overflow: hidden; }
.q-hero__title { font-size: clamp(48px, 6.4vw, 104px); margin: 24px 0; }
.q-hero__lead { max-width: 30ch; color: var(--olive); margin-bottom: 32px; }
.q-hero__text > * { opacity: 0; transform: translateY(24px); animation: q-up 1.2s var(--ease) forwards; animation-delay: calc(.2s + var(--i, 0) * .12s); }
@keyframes q-up { to { opacity: 1; transform: none; } }
.q-carousel { position: relative; aspect-ratio: 4/3.4; overflow: hidden; }
.q-carousel__slide { position: absolute; inset: 0; clip-path: inset(0 0 0 100%); transition: clip-path 1.4s var(--ease-io); }
.q-carousel__slide.is-on { clip-path: inset(0 0 0 0); z-index: 1; }
.q-carousel__slide.is-out { clip-path: inset(0 0 0 0); z-index: 0; }
.q-carousel__slide img, .q-carousel__slide video { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); transition: transform 6s linear; }
.q-carousel__slide.is-on img, .q-carousel__slide.is-on video { transform: scale(1); }
.q-carousel__bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; height: 2px; background: rgba(255,255,255,.3); }
.q-carousel__bar span { display: block; height: 100%; background: var(--ivory); transform: scaleX(0); transform-origin: left; }
.q-carousel__bar.is-run span { animation: q-progress var(--interval, 6s) linear forwards; }
@keyframes q-progress { to { transform: scaleX(1); } }
.q-carousel__cap { position: absolute; right: 0; bottom: -28px; font: 500 9px var(--font-body); letter-spacing: .24em; text-transform: uppercase; color: var(--olive); }
@media (max-width: 899px) { .q-hero { grid-template-columns: 1fr; } .q-carousel { order: -1; aspect-ratio: 4/3; } }

/* ---------- Experiencias: escena fijada; palabra izq + foto cortada + palabra der ---------- */
.q-exp { position: relative; height: calc(var(--n, 4) * 100svh + 100svh); }
.q-exp__stage { position: sticky; top: 0; height: 100svh; overflow: hidden; display: grid; place-items: center; }
.q-exp__head { position: absolute; top: calc(var(--header-h) - 8px); left: 0; right: 0; text-align: center; display: grid; gap: 10px; justify-items: center; z-index: 3; }
.q-exp__head h2 { font: 500 11px var(--font-body); letter-spacing: .32em; text-transform: uppercase; }
.q-exp__item { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 4vw; padding: 0 var(--gut); will-change: transform, opacity; }
.q-exp__word { font: 400 clamp(40px, 5.6vw, 92px)/1 var(--font-head); position: relative; padding-bottom: 18px; }
.q-exp__word::after { content: ""; position: absolute; bottom: 0; width: 64px; height: 1px; background: var(--brass); }
.q-exp__word--l { justify-self: end; } .q-exp__word--l::after { right: 25%; }
.q-exp__word--r { justify-self: start; } .q-exp__word--r::after { left: 25%; }
.q-exp__fig { margin: 0; width: min(24vw, 340px); text-align: center; }
.q-photo { position: relative; clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut)); overflow: hidden; }
.q-photo img { width: 100%; height: 100%; object-fit: cover; }
.q-exp__fig .q-photo { aspect-ratio: 3/4.4; }
.q-tag { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); white-space: nowrap; padding: 5px 10px; background: color-mix(in srgb, var(--ivory) 80%, transparent); font: 500 8px var(--font-body); letter-spacing: .22em; text-transform: uppercase; }
.q-exp__fig figcaption { margin-top: 18px; font-size: 13px; color: var(--olive); }
@media (max-width: 899px) { .q-exp__item { grid-template-columns: 1fr; justify-items: center; align-content: center; gap: 16px; } .q-exp__fig { width: 62vw; order: 2; } .q-exp__word--r { order: 3; } .q-exp__word { font-size: 44px; } }

/* ---------- Atlas emocional: el fondo pasa de marfil a verde noche con el scroll ---------- */
.q-atlas { position: relative; min-height: 100svh; padding: calc(var(--header-h) + 40px) var(--gut) 80px; background: var(--scene-bg, var(--night)); color: var(--ivory); overflow: hidden; }
.q-atlas__head { position: relative; z-index: 2; max-width: 40rem; }
.q-atlas__head h2 { font-size: clamp(32px, 3.6vw, 56px); margin: 16px 0 10px; }
.q-atlas__head p { opacity: .8; margin: 0; }
.q-atlas__map { position: relative; aspect-ratio: 16/8; margin-top: -40px; }
.q-atlas__mood { position: absolute; transform: translate(-50%, -50%); font: 400 clamp(26px, 3.4vw, 54px)/1 var(--font-head); text-transform: uppercase; letter-spacing: .02em; color: var(--brass); opacity: .45; transition: opacity .6s var(--ease), letter-spacing .6s var(--ease); }
.q-atlas__mood.is-near { opacity: 1; letter-spacing: .08em; }
.q-atlas__pt { position: absolute; display: flex; align-items: center; gap: 10px; font-size: 13px; opacity: .85; transform: translate(-5px, -50%); }
.q-atlas__pt::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--brass); transition: transform .25s; }
.q-atlas__pt:hover::before { transform: scale(1.4); }
.q-atlas.js-scrub .q-atlas__inner { opacity: var(--p, 1); }
@media (max-width: 899px) { .q-atlas__map { aspect-ratio: 3/4; margin-top: 24px; } .q-atlas__pt { font-size: 11px; } }

/* ---------- Recorrido (cómo funciona): borde ondulado + pasos que se suceden fijados ---------- */
.q-journey { position: relative; height: calc(var(--n, 4) * 100svh); background: var(--night); }
.q-journey__stage { position: sticky; top: 0; height: 100svh; overflow: hidden; background: var(--ivory); }
.q-journey__wave { position: absolute; inset: 0 0 auto; height: 24svh; background: var(--night); color: var(--ivory); z-index: 3; clip-path: ellipse(150% 100% at 50% 0); display: flex; flex-direction: column; align-items: flex-end; justify-content: center; padding: 0 var(--gut) 4svh; gap: 12px; }
.q-journey__wave h2 { font-size: clamp(28px, 3vw, 46px); }
.q-journey__step { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; will-change: transform; }
.q-journey__step:nth-child(odd of .q-journey__step) .q-journey__photo { order: 2; }
.q-journey__photo { overflow: hidden; } .q-journey__photo img { width: 100%; height: 100%; object-fit: cover; }
.q-journey__text { display: flex; flex-direction: column; justify-content: center; padding: 24svh var(--gut) 0; background: var(--ivory); }
.q-journey__step.is-dark .q-journey__text { background: var(--night); color: var(--ivory); }
.q-journey__num { font: 300 clamp(48px, 5vw, 80px)/1 var(--font-head); color: var(--brass); opacity: .5; }
.q-journey__text h3 { font-size: clamp(26px, 2.6vw, 40px); margin: 12px 0; }
.q-journey__text p { max-width: 34ch; color: inherit; opacity: .8; }
.q-journey__final { position: absolute; inset: 0; display: grid; place-items: center; background: var(--ivory); padding-top: 24svh; }
@media (max-width: 899px) { .q-journey__step { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; } .q-journey__step .q-journey__photo { order: 0 !important; } .q-journey__text { padding: 24px var(--gut); } }

/* ---------- Producto / app: fondo oscuro, lista numerada + objeto ---------- */
.q-app { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: var(--gut); padding: 120px var(--gut); background: var(--night); color: var(--ivory); overflow: hidden; }
.q-app h2 { font-size: clamp(34px, 3.6vw, 56px); margin: 18px 0; }
.q-app p { opacity: .8; max-width: 40ch; }
.q-app ol { list-style: none; padding: 0; margin: 32px 0 0; counter-reset: q; }
.q-app li { counter-increment: q; display: flex; align-items: center; gap: 18px; padding: 8px 0; opacity: .7; transition: opacity .3s; }
.q-app li::before { content: "0" counter(q); font: 300 22px var(--font-head); color: var(--brass); }
.q-app li:hover { opacity: 1; }
.q-app__media { align-self: center; justify-self: center; width: min(100%, 380px); }
.q-app__media img { border-radius: 36px; box-shadow: 0 40px 80px rgba(0,0,0,.35); }
@media (max-width: 899px) { .q-app { grid-template-columns: 1fr; padding: 80px var(--gut); } }

/* ---------- Diario: lista de artículos con foto que se abre ---------- */
.q-journal { padding: 120px var(--gut) 0; }
.q-journal__head { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gut); align-items: end; padding-bottom: 32px; border-bottom: 1px solid var(--sand); }
.q-journal__head h2 { font-size: clamp(36px, 4vw, 64px); margin-top: 16px; }
.q-journal__head p { color: var(--olive); max-width: 36ch; }
.q-row { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--sand); }
.q-row__text { display: flex; justify-content: space-between; align-items: center; padding: 28px 0; gap: 24px; transition: padding .6s var(--ease), background .6s var(--ease), color .6s; }
.q-row__text h3 { font-size: clamp(24px, 2.2vw, 34px); }
.q-row__text p { margin: 6px 0 0; font-size: 13px; color: var(--olive); }
.q-row__text::after { content: "→"; color: var(--brass); font-size: 20px; transition: transform .6s var(--ease); }
.q-row__img { position: relative; min-height: 120px; overflow: hidden; clip-path: inset(0 0 0 100%); transition: clip-path 1s var(--ease-io); }
.q-row__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.q-row:hover .q-row__text, .q-row.is-on .q-row__text { background: var(--night); color: var(--ivory); padding-left: 28px; padding-right: 28px; }
.q-row:hover .q-row__text p, .q-row.is-on .q-row__text p { color: var(--sand); }
.q-row:hover .q-row__text::after { transform: translateX(6px); }
.q-row:hover .q-row__img, .q-row.is-on .q-row__img { clip-path: inset(0 0 0 0); }
@media (max-width: 899px) { .q-journal__head, .q-row { grid-template-columns: 1fr; } .q-row__img { height: 180px; clip-path: none; } }

/* ---------- Footer arena: CTA + columnas + dibujo de línea + marquesina gigante ---------- */
.q-footer { position: relative; margin-top: 120px; background: var(--sand); padding: 72px var(--gut) 0; overflow: hidden; }
.q-footer__top { display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--gut); }
.q-footer h2 { font-size: clamp(32px, 3.4vw, 52px); margin-bottom: 18px; }
.q-footer__cols { display: flex; gap: 56px; margin-top: 48px; font-size: 12px; }
.q-footer__cols b { display: block; margin-bottom: 14px; font: 500 9px var(--font-body); letter-spacing: .24em; text-transform: uppercase; }
.q-footer__cols a { display: block; padding: 3px 0; color: var(--olive); }
.q-footer__draw { justify-self: end; width: min(260px, 60%); color: var(--wine); }
.q-footer__draw path { fill: none; stroke: currentColor; stroke-width: 1.2; stroke-dasharray: var(--len, 1200); stroke-dashoffset: var(--len, 1200); }
.q-footer__draw.is-inview path { animation: q-draw 1.5s var(--ease-io) calc(.3s + var(--i, 0) * 60ms) forwards; }
@keyframes q-draw { to { stroke-dashoffset: 0; } }
.q-footer__legal { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 56px; padding: 16px 0; border-top: 1px solid color-mix(in srgb, var(--night) 15%, transparent); font-size: 10px; color: var(--olive); }
.q-marquee { display: flex; width: max-content; animation: q-marquee 60s linear infinite; font: 400 clamp(120px, 18vw, 300px)/.8 var(--font-head); color: color-mix(in srgb, var(--night) 9%, var(--sand)); white-space: nowrap; margin-bottom: -.12em; }
.q-marquee span { padding-right: .3em; }
@keyframes q-marquee { to { transform: translateX(-50%); } }
@media (max-width: 899px) { .q-footer__top { grid-template-columns: 1fr; } .q-footer__cols { gap: 28px; flex-wrap: wrap; } }

/* ---------- Aparición genérica ---------- */
.js-reveal { opacity: 0; transform: translateY(32px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js-reveal.is-inview { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .q-exp, .q-journey { height: auto; } .q-exp__stage, .q-journey__stage { position: relative; height: auto; }
  .q-exp__item, .q-journey__step, .q-journey__final { position: relative; min-height: 100svh; }
}
