/* ==========================================================================
   Miravent Jané · Operador de transporte
   ========================================================================== */

:root {
  --red: #e3141b;
  --red-dark: #c00e14;
  --ink: #15171c;
  --ink-2: #1d2027;
  --text: #2a2d34;
  --muted: #5d626d;
  --line: #e4e6ea;
  --bg-soft: #f3f4f6;
  --white: #fff;
  --radius: 6px;
  --shadow: 0 10px 30px rgba(17, 19, 24, .08);
  --container: 1200px;
  --header-h: 100px;
  --font: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --script: "Allura", "Brush Script MT", cursive;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--white); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3 { font-weight: 700; line-height: 1.1; margin: 0; color: var(--ink); letter-spacing: -.01em; }
p { margin: 0; }
button, input, select { font: inherit; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--red); color: #fff; padding: 8px 14px; z-index: 100; border-radius: var(--radius); }
.skip:focus { left: 8px; }

/* Icons ------------------------------------------------------------------ */
.ic { width: 1.1em; height: 1.1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic--fill { fill: currentColor; stroke: none; }

/* Buttons ---------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 20px; border-radius: 4px; border: 2px solid transparent; font-weight: 600; font-size: 14px; letter-spacing: .03em; text-transform: uppercase; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s, box-shadow .2s; white-space: nowrap; }
.btn .ic { width: 16px; height: 16px; transition: transform .2s; }
.btn:hover .ic { transform: translateX(3px); }
.btn--red { background: var(--red); color: #fff; box-shadow: 0 6px 18px rgba(227, 20, 27, .28); }
.btn--red:hover { background: var(--red-dark); }
.btn--ghost { border-color: rgba(255, 255, 255, .85); color: #fff; background: rgba(255, 255, 255, .02); }
.btn--ghost:hover { background: #fff; color: var(--ink); }
.btn--lg { padding: 15px 24px; }
.btn--block { width: 100%; }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(227, 20, 27, .45); outline-offset: 2px; }

.eyebrow { color: var(--red); font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }

/* Header ----------------------------------------------------------------- */
.header { position: sticky; top: 0; z-index: 50; background: #fff; transition: box-shadow .25s; }
.header.is-scrolled { box-shadow: 0 4px 20px rgba(0, 0, 0, .08); }
.header__inner { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "brand top top" "brand nav cta"; align-items: center; column-gap: 32px; row-gap: 14px; min-height: var(--header-h); padding-block: 9px; }
.brand { grid-area: brand; }
.brand img { width: 190px; height: auto; }
.header__right { display: contents; }
.topbar { grid-area: top; justify-self: end; display: flex; align-items: center; gap: 24px; font-size: 13px; color: var(--ink); }
.nav { grid-area: nav; justify-self: center; }
.topbar a { display: inline-flex; align-items: center; gap: 7px; transition: color .2s; }
.topbar a:hover { color: var(--red); }
.nav ul { display: flex; gap: 26px; }
.nav a { position: relative; white-space: nowrap; font-size: 15px; font-weight: 500; color: var(--ink); padding: 6px 0; transition: color .2s; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--red); transform: scaleX(0); transition: transform .25s; }
.nav a:hover, .nav a.is-active { color: var(--red); }
.nav a.is-active::after { transform: scaleX(1); }
.nav__cta-mobile { display: none; }
.header__cta { grid-area: cta; padding-block: 10px; }
.burger { display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--ink); }
.burger .ic { width: 28px; height: 28px; }

/* Hero ------------------------------------------------------------------- */
.hero { position: relative; color: #fff; overflow: hidden; background: var(--ink); isolation: isolate; padding: 0; }
/* La foto se muestra tal cual, sin oscurecer ni animar; el texto lleva sombra para leerse bien */
.hero__bg { position: absolute; inset: 0; z-index: -1; background: url("../img/hero-camion-miravent.png") 70% 60% / cover no-repeat; }
.hero__content { text-shadow: 0 2px 14px rgba(0, 0, 0, .55), 0 1px 3px rgba(0, 0, 0, .5); }
.hero__content .btn { text-shadow: none; }
.screen.hero { padding: 0; }
.hero__content { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-top: 48px; padding-bottom: 48px; }
.hero h1 { color: #fff; font-size: clamp(44px, 6.4vw, 80px); font-weight: 700; line-height: .98; letter-spacing: -.02em; }
.hero__lead { margin-top: 22px; font-size: clamp(17px, 1.6vw, 21px); font-weight: 600; line-height: 1.35; }
.hero__text { margin-top: 26px; max-width: 520px; font-size: 17px; color: rgba(255, 255, 255, .9); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 30px; }
.hero__script { position: absolute; right: 6%; top: 24%; font-family: var(--script); font-size: clamp(34px, 3.8vw, 54px); line-height: .9; transform: rotate(-12deg); color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, .35); }
.hero__script span { padding-left: 1.1em; }
.hero__features { position: relative; background: rgba(12, 14, 18, .82); backdrop-filter: blur(4px); border-top: 1px solid rgba(255, 255, 255, .06); }
.features { display: grid; grid-template-columns: repeat(4, 1fr); padding-block: 18px; }
.features li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; font-weight: 500; font-size: 15px; line-height: 1.25; }
.features strong { font-weight: 600; }
.features .ic { width: 34px; height: 34px; stroke-width: 1.5; }

/* Sections --------------------------------------------------------------- */
.screen { min-height: calc(100vh - var(--header-h)); min-height: calc(100svh - var(--header-h)); display: flex; flex-direction: column; justify-content: center; padding-block: 64px; }
.screen h2 { font-size: clamp(30px, 3.2vw, 44px); margin-bottom: 18px; }
.section__head { text-align: center; margin-bottom: 40px; }
.section__head h2 { margin-bottom: 0; }
.section__head p:last-child { margin-top: 6px; color: var(--text); font-size: 17px; }

/* Service cards ---------------------------------------------------------- */
.services { background: #fff; }
.cards { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.card { background: var(--bg-soft); border-radius: 2px; overflow: hidden; text-align: center; transition: transform .25s, box-shadow .25s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card__img { aspect-ratio: 4 / 3; overflow: hidden; }
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card__img img { transform: scale(1.06); }
.card__body { padding: 22px 14px 26px; }
.card__ic { width: 34px; height: 34px; margin: 0 auto 10px; fill: none; stroke: var(--red); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card__ic--wide { width: 52px; }
.card__ic--map { stroke-width: 2; }
.card h3 { font-size: 17px; margin-bottom: 8px; }
.card p { font-size: 14px; color: var(--muted); line-height: 1.4; }

/* Nosotros --------------------------------------------------------------- */
.about { background: #fff; }
.about__grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 72px; align-items: center; }
.about__media { position: relative; }
.about__media img { width: 100%; height: min(600px, calc(100svh - var(--header-h) - 128px)); min-height: 380px; object-fit: cover; object-position: center 60%; border-radius: var(--radius); box-shadow: var(--shadow); }
.about__badge { position: absolute; right: -28px; bottom: 40px; display: flex; align-items: center; gap: 12px; padding: 18px 24px; background: var(--red); color: #fff; border-radius: var(--radius); box-shadow: 0 12px 30px rgba(227, 20, 27, .35); }
.about__badge strong { font-size: 44px; line-height: 1; font-weight: 800; }
.about__badge span { font-size: 14px; line-height: 1.2; font-weight: 500; }
.about__text p:not(.eyebrow) { font-size: 16.5px; color: var(--text); max-width: 600px; }
.about__text p:not(.eyebrow) + p { margin-top: 14px; }
.about__why-title { margin-top: 36px; }
.why { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 32px; margin-top: 8px; }
.why li { display: flex; gap: 16px; align-items: flex-start; }
.why .ic { width: 34px; height: 34px; color: var(--red); stroke-width: 1.7; }
.why strong { display: block; color: var(--ink); font-size: 16px; }
.why span { font-size: 14px; color: var(--muted); }

/* Flota ------------------------------------------------------------------ */
.fleet-sec { display: grid; grid-template-columns: 1fr 1fr; padding: 0; background: var(--bg-soft); }
.fleet-sec__content { display: flex; align-items: center; padding: 64px 56px 64px max(24px, calc((100vw - var(--container)) / 2 + 24px)); }
.fleet-sec__inner p:not(.eyebrow) { font-size: 16.5px; max-width: 480px; }
.fleet { margin: 32px 0 36px; display: grid; gap: 20px; }
.fleet li { display: flex; align-items: center; gap: 20px; font-size: 18px; }
.fleet .ic { width: 56px; height: 36px; stroke-width: 1.4; color: var(--ink); }
.fleet strong { font-weight: 700; color: var(--red); }
.fleet-sec__photo { background: url("../img/flota.jpg") 40% center / cover no-repeat; min-height: 320px; }

/* Almacenaje ------------------------------------------------------------- */
.storage { color: #fff; background:
    linear-gradient(90deg, rgba(14, 16, 20, .96) 0%, rgba(14, 16, 20, .85) 45%, rgba(14, 16, 20, .2) 100%),
    url("../img/almacen.jpg") center / cover no-repeat; }
.storage__inner { max-width: 640px; }
.storage h2 { color: #fff; }
.storage p:not(.eyebrow) { max-width: 520px; color: rgba(255, 255, 255, .9); font-size: 16.5px; }
.checks { display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: 18px 40px; margin: 32px 0 36px; font-size: 16px; }
.checks li { display: flex; align-items: center; gap: 12px; }
.checks .ic { width: 22px; height: 22px; color: var(--red); }

/* Dónde trabajamos -------------------------------------------------------- */
.where { background: #fff; overflow: hidden; }
.where__grid { display: grid; grid-template-columns: 1fr 1.35fr; gap: 48px; align-items: center; }
.where__info p:not(.eyebrow) { font-size: 16.5px; max-width: 460px; }
.map { position: relative; width: 100%; aspect-ratio: 16 / 13; max-height: calc(100svh - var(--header-h) - 128px); }
.map img, .map__routes { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center bottom; }
.map__routes { overflow: visible; }
.map__routes path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.map.is-visible .map__routes path { animation: draw 1.2s cubic-bezier(.4, 0, .2, 1) forwards; }
.map.is-visible .map__routes path:nth-child(2) { animation-delay: .12s; }
.map.is-visible .map__routes path:nth-child(3) { animation-delay: .24s; }
.map.is-visible .map__routes path:nth-child(4) { animation-delay: .36s; }
.map.is-visible .map__routes path:nth-child(5) { animation-delay: .48s; }
.map.is-visible .map__routes path:nth-child(6) { animation-delay: .6s; }
.map.is-visible .map__routes path:nth-child(7) { animation-delay: .72s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.map__pulse { transform-origin: 288px 572px; animation: pulse 2s ease-out infinite; }
@keyframes pulse { from { transform: scale(1); opacity: .9; } to { transform: scale(3); opacity: 0; } }
.zones { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 24px; margin-top: 40px; }
.zones li { display: flex; flex-direction: column; gap: 2px; font-size: 14px; color: var(--muted); line-height: 1.4; }
.zones strong { color: var(--ink); font-size: 16px; margin-top: 8px; }
.zones .ic { width: 34px; height: 34px; color: var(--red); stroke-width: 1.8; }
.ic--map { stroke-width: 2.2; }

/* Contacto --------------------------------------------------------------- */
.contact { position: relative; color: #fff; background:
    linear-gradient(90deg, rgba(12, 14, 18, .92) 0%, rgba(12, 14, 18, .7) 40%, rgba(12, 14, 18, .45) 100%),
    url("../img/contacto-bg.jpg") center 70% / cover no-repeat; }
.contact__grid { display: grid; grid-template-columns: 1fr 2fr; gap: 36px; align-items: center; }
.contact h2 { color: #fff; }
.contact__intro p:last-child { font-size: 17px; max-width: 330px; }
.contact__card { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; background: #fff; color: var(--text); padding: 24px; border-radius: 8px; box-shadow: 0 20px 50px rgba(0, 0, 0, .35); }
.quote { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(4, auto); grid-auto-flow: column; gap: 12px 14px; align-content: start; }
.field label:not(.check) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.field input:not([type=checkbox]), .field select { width: 100%; height: 46px; padding: 0 12px; border: 1px solid var(--line); border-radius: 3px; background: #fff; color: var(--ink); font-size: 14px; transition: border-color .2s, box-shadow .2s; }
.field select { color: var(--muted); appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235d626d' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 10px center / 16px no-repeat; padding-right: 32px; }
.field select:valid:not([data-empty]) { color: var(--ink); }
.field input::placeholder { color: #8a8f99; }
.field input:focus, .field select:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(227, 20, 27, .12); outline: none; }
.field.is-invalid input, .field.is-invalid select { border-color: var(--red); background: #fff6f6; }
.field--privacy { display: flex; align-items: center; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 11.5px; line-height: 1.3; color: var(--muted); cursor: pointer; }
.check input { accent-color: var(--red); margin: 1px 0 0; }
.field--privacy.is-invalid .check { color: var(--red); }
.quote__status { grid-column: 1 / -1; grid-row: 5; font-size: 13px; min-height: 0; }
.quote__status:empty { display: none; }
.quote__status.is-error { color: var(--red); }
.quote__status.is-ok { color: #1a7f37; }
.contact__side { display: flex; flex-direction: column; gap: 16px; padding: 0 4px 6px 0; }
.contact__list { display: grid; gap: 10px; font-size: 13.5px; color: var(--ink); }
.contact__list a { display: flex; align-items: center; gap: 12px; transition: color .2s; }
.contact__list a:hover { color: var(--red); }
.contact__list .ic { width: 18px; height: 18px; }
.contact__list .wa .ic { color: #25d366; }

/* Footer ----------------------------------------------------------------- */
.footer { background: var(--ink); color: #fff; }
.footer__inner { display: flex; align-items: center; gap: 40px; padding-block: 22px; }
.footer__brand img { width: 170px; height: auto; }
.footer nav { flex: 1; }
.footer nav ul { display: flex; flex-wrap: wrap; justify-content: center; }
.footer nav li + li::before { content: "|"; color: rgba(255, 255, 255, .5); margin: 0 10px; }
.footer nav a { font-size: 14px; white-space: nowrap; transition: color .2s; }
.footer nav a:hover { color: var(--red); }
.footer__legal { display: flex; align-items: center; gap: 16px; font-size: 12.5px; color: rgba(255, 255, 255, .85); }
.footer__legal .ic { width: 30px; height: 30px; }

/* WhatsApp flotante ------------------------------------------------------- */
.wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; background: #25d366; color: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); transition: transform .2s, opacity .3s; opacity: 0; pointer-events: none; transform: translateY(12px); }
.wa-float.is-visible { opacity: 1; pointer-events: auto; transform: none; }
.wa-float:hover { transform: scale(1.06); }
.wa-float .ic { width: 30px; height: 30px; }

/* Animaciones de entrada -------------------------------------------------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .cards .reveal:nth-child(2) { transition-delay: .06s; }
.js .cards .reveal:nth-child(3) { transition-delay: .12s; }
.js .cards .reveal:nth-child(4) { transition-delay: .18s; }
.js .cards .reveal:nth-child(5) { transition-delay: .24s; }
.js .cards .reveal:nth-child(6) { transition-delay: .3s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .map__routes path { stroke-dashoffset: 0; }
}

/* Responsive ------------------------------------------------------------- */
@media (max-width: 1240px) {
  .nav ul { gap: 16px; }
  .nav a { font-size: 14px; }
  .header__inner { column-gap: 18px; }
  .brand img { width: 165px; }
}

@media (max-width: 1100px) {
  .cards { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .about__grid { gap: 48px; }
  .where__grid { gap: 32px; }
  .contact__grid { grid-template-columns: 1fr; }
}

@media (max-width: 1080px) {
  :root { --header-h: 72px; }
  .brand img { width: 135px; }
  .header__inner { display: flex; justify-content: space-between; gap: 12px; padding-block: 0; }
  .topbar, .header__cta { display: none; }
  .burger { display: block; }
  .nav { position: fixed; inset: var(--header-h) 0 0; background: #fff; padding: 24px; display: flex; flex-direction: column; gap: 24px; transform: translateX(100%); transition: transform .3s ease; overflow-y: auto; visibility: hidden; }
  .nav.is-open { transform: none; visibility: visible; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav li { border-bottom: 1px solid var(--line); }
  .nav a { display: block; padding: 16px 0; font-size: 18px; }
  .nav a::after { display: none; }
  .nav__cta-mobile { display: inline-flex; }
  body.menu-open { overflow: hidden; }

}

@media (max-width: 960px) {
  .hero__content { padding-top: 40px; padding-bottom: 40px; }
  .hero__bg { background-position: 75% center; }
  .hero__script { display: none; }
  .features { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .features li { flex-direction: row; text-align: left; font-size: 14px; }
  .features .ic { width: 28px; height: 28px; }
  .features br { display: none; }

  .screen { padding-block: 56px; }
  .about__grid { grid-template-columns: 1fr; }
  .about__media img { height: 380px; min-height: 0; }
  .about__badge { right: 16px; bottom: 16px; }
  .fleet-sec { grid-template-columns: 1fr; }
  .fleet-sec__content { padding: 56px 24px; }
  .fleet-sec__photo { min-height: 300px; }
  .where__grid { grid-template-columns: 1fr; }
  .map { max-height: none; }
  .contact__card { grid-template-columns: 1fr; }
  .footer__inner { flex-direction: column; text-align: center; gap: 20px; }
  .footer nav li + li::before { margin: 0 8px; }
}

@media (max-width: 600px) {
  .container { padding-inline: 16px; }
  .hero h1 { font-size: 44px; }
  .hero__lead br { display: none; }
  .hero__actions .btn { width: 100%; }
  .features { grid-template-columns: 1fr 1fr; }
  .cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .card__body { padding: 12px 8px 16px; }
  .card h3 { font-size: 14.5px; }
  .card p { font-size: 12.5px; }
  .screen { padding-block: 48px; }
  .about__media img { height: 300px; }
  .fleet-sec__content { padding: 48px 16px; }
  .fleet li { font-size: 16px; }
  .checks { grid-template-columns: 1fr; gap: 14px; }
  .why { grid-template-columns: 1fr; }
  .map { margin-inline: -16px; width: calc(100% + 32px); }
  .contact__card { padding: 14px; }
  .quote { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-flow: row; }
  .quote__status { grid-row: auto; order: 3; }
  .field--privacy { order: 2; }
  .wa-float { width: 50px; height: 50px; right: 14px; bottom: 14px; }
}

/* Formulario: campo antispam oculto ------------------------------------- */
.quote__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.check a { color: inherit; text-decoration: underline; }
.footer__legal a { text-decoration: underline; }
.footer__legal a[aria-label] { text-decoration: none; }

/* Páginas interiores (privacidad, aviso legal...) ------------------------- */
.inner-page { background: var(--bg-soft); padding: 64px 0 80px; min-height: calc(100svh - var(--header-h)); }
.page__inner { max-width: 860px; }
.page__article { background: #fff; padding: clamp(24px, 5vw, 56px); border-radius: var(--radius); box-shadow: var(--shadow); }
.page__title { font-size: clamp(30px, 3.4vw, 44px); margin-bottom: 24px; }
.page__content { font-size: 16.5px; }
.page__content > * + * { margin-top: 1em; }
.page__content h2 { font-size: 24px; margin-top: 1.6em; }
.page__content h3 { font-size: 19px; margin-top: 1.4em; }
.page__content a:not(.btn) { color: var(--red); text-decoration: underline; }
.page__content ul, .page__content ol { padding-left: 1.4em; }
.page__content ul { list-style: disc; }
.page__content img { height: auto; border-radius: var(--radius); }
