/* ==========================================================================
   Tot Ràpid Gràfiques — MOBILE FIRST
   Base = móvil. Ampliaciones con min-width:
     600px  tableta vertical
     960px  tableta horizontal / portátil pequeño
     1280px escritorio (medidas exactas del Figma: frame 1440, contenedor 1240)
   ========================================================================== */

:root {
	--blue: #002596;
	--blue-dark: #001b70;
	--blue-soft: #d5dfff;
	--ink: #000;
	--heading: #3c3b3b;
	--muted: #898e91;
	--rule: #c5c5c5;
	--line: #d9d9d9;
	--bg: #fff;
	--f-head: "Pathway Extreme", "Inter", system-ui, sans-serif;
	--f-body: "Inter", system-ui, sans-serif;
	--pad: 20px;
	--gap: 8px;
	--h1: 30px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 16px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 300 14px/1.5 var(--f-body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
main { overflow-x: clip; }

.wrap { width: 100%; max-width: calc(1240px + 2 * var(--pad)); margin: 0 auto; padding: 0 var(--pad); }
.h1 { font: 700 var(--h1)/1.1 var(--f-head); color: var(--heading); }
.h1.white { color: #fff; }

/* ---------- Cabecera ---------- */
.site-header { border-bottom: 1px solid var(--line); }
.header-in { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; }
.logo { display: block; }
.logo svg, .logo img { width: 150px; height: auto; display: block; }

.nav-toggle { display: grid; gap: 5px; background: none; border: 0; padding: 10px; margin-right: -10px; cursor: pointer; position: relative; z-index: 31; }
.nav-toggle span { width: 24px; height: 2px; background: #000; transition: transform .25s, opacity .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.main-nav { position: fixed; inset: 0; z-index: 30; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; font: 500 20px/1 var(--f-body); opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
.main-nav.open { opacity: 1; visibility: visible; }
.main-nav > a { position: relative; padding: 6px 0; }
.svc-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 28px; }
.svc-menu a { display: block; padding: 6px 0; }
.svc-menu a[aria-current], .main-nav a:hover { color: var(--blue); }
.dd-btn { display: none; }
.lang-menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; }
.lang-menu a { display: block; padding: 6px 4px; color: var(--muted); }
.lang-menu a[aria-current] { color: var(--blue); }

/* ---------- Tiles (fotos con etiqueta) ---------- */
.grid3 { display: grid; grid-template-columns: 1fr; gap: 10px var(--gap); }
.tile { position: relative; display: block; overflow: hidden; background: #f2f2f2; aspect-ratio: 407 / 406; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.tile.is-fit img { object-fit: contain; }
/* En táctil la etiqueta se ve siempre, como franja inferior */
.tile-label, .row-label { position: absolute; left: 0; right: 0; bottom: 0; display: grid; place-items: center; padding: 12px; text-align: center; background: rgb(255 255 255 / .9); font: 600 14px/1.2 var(--f-body); color: #000; text-transform: uppercase; pointer-events: none; }

/* ---------- Inicio: portada ---------- */
.hero { padding-top: 36px; }
.hero-title { text-align: center; }
.services-line { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 0; list-style: none; margin: 24px 0; padding: 0; font: 600 11px/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; }
.services-line li { display: flex; align-items: center; }
.services-line li + li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); margin: 0 12px; }
.cards { display: grid; grid-template-columns: 1fr; gap: 10px var(--gap); }
.cards .tile { aspect-ratio: 4 / 3; }
.cards .tile-label { text-transform: none; font-weight: 700; font-size: 16px; }

/* ---------- Novedades ---------- */
.news { position: relative; margin-top: 48px; padding: 48px 0; overflow: hidden; color: #fff; background: linear-gradient(170deg, #002596 0%, #0a2fa3 55%, #6d84d6 100%); }
.news-bird { position: absolute; top: 0; right: -20px; width: 150px; opacity: .5; pointer-events: none; }
.news-bird svg { width: 100%; height: auto; display: block; }
.news .wrap { position: relative; }
.news-grid { display: grid; gap: 28px; margin-top: 28px; }
.product { font: 600 20px/1.15 var(--f-head); letter-spacing: .08em; margin-bottom: 18px; }
.news-text ul { margin: 0; padding-left: 18px; font: 300 14px/21px var(--f-body); }
.news-text li { margin-bottom: 6px; }
.news-img img { width: 100%; aspect-ratio: 616 / 405; object-fit: cover; }

/* ---------- Antetítulo con línea ---------- */
.kicker-line { display: flex; align-items: center; gap: 16px; }
.kicker-line::after { content: ""; flex: 1; height: 1px; background: var(--blue); }
.kicker { font: 600 13px/1 var(--f-body); letter-spacing: .1em; color: var(--blue); text-transform: uppercase; white-space: nowrap; }

/* ---------- Sobre nosotros ---------- */
.about { padding-top: 48px; }
.about-grid { display: grid; gap: 10px var(--gap); margin-top: 18px; }
.about-copy { margin-bottom: 18px; }
.about-copy .body { margin-top: 20px; font: 300 14px/21px var(--f-body); }
.about-img img { width: 100%; aspect-ratio: 616 / 405; object-fit: cover; }

/* ---------- Contacto ---------- */
.contact { padding-top: 48px; position: relative; }
.contact-top { display: grid; }
.map { aspect-ratio: 590 / 500; background: #eee; overflow: hidden; }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-load { all: unset; position: relative; display: block; width: 100%; height: 100%; cursor: pointer; }
.map-load img { width: 100%; height: 100%; object-fit: cover; }
.map-cta { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--blue); color: #fff; font: 500 12px/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; padding: 14px 24px; border-radius: 30px; white-space: nowrap; transition: background .2s; }
.map-load:hover .map-cta, .map-load:focus-visible .map-cta { background: var(--blue-dark); }

.contact-info { position: relative; padding-top: 40px; }
.contact-info .h1 { margin-top: 24px; }
.info-list { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 16px; font: 500 16px/20px var(--f-head); }
.info-list li { display: flex; align-items: center; gap: 18px; }
.info-list a:hover { color: var(--blue); }

/* Formas orgánicas de Figma aplicadas como máscara (assets/img/blob-*.svg) */
.ico, .deco, .bubble { position: relative; isolation: isolate; }
.deco, .bubble { position: absolute; }
.ico::before, .deco::before, .bubble::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--fill); -webkit-mask: var(--shape) center / 100% 100% no-repeat; mask: var(--shape) center / 100% 100% no-repeat; }
.ico { flex: none; width: 56px; height: 56px; display: grid; place-items: center; --shape: url(../img/blob-ico1.svg); --fill: var(--blue-soft); }
.info-list li:nth-child(2) .ico { --shape: url(../img/blob-ico2.svg); }
.info-list li:nth-child(3) .ico { --shape: url(../img/blob-ico3.svg); }
.ico svg { width: 28px; height: 30px; }
.deco { pointer-events: none; display: none; }
.deco-blob { width: 226px; height: 223px; --fill: var(--blue-soft); --shape: url(../img/blob-info.svg); top: 16px; left: 375px; }
.deco-ring { width: 314px; height: 322px; --fill: var(--blue-soft); --shape: url(../img/blob-ring.svg); top: 38px; left: 452px; }
.bubble { display: grid; place-items: center; text-align: center; font: 500 13px/18px var(--f-body); }

.contact-bottom { display: grid; position: relative; }
.form-col { position: relative; z-index: 2; padding: 48px 0 40px; }
.contact-form { margin-top: 28px; display: grid; gap: 16px; position: relative; z-index: 1; }
.field { position: relative; display: block; }
.field span { position: absolute; left: 24px; top: 20px; font: 500 12px/1 var(--f-body); letter-spacing: .1em; color: var(--blue); text-transform: uppercase; pointer-events: none; }
.field input, .field textarea { width: 100%; border: 1px solid var(--blue); border-radius: 30px; background: transparent; font: 400 16px/1.4 var(--f-body); color: #000; outline: none; transition: box-shadow .2s; -webkit-appearance: none; appearance: none; }
.field input { height: 51px; padding: 0 24px 0 110px; }
.field textarea { min-height: 220px; padding: 44px 24px 20px; resize: vertical; }
.field input:focus, .field textarea:focus { box-shadow: 0 0 0 3px var(--blue-soft); }
.btn { justify-self: start; width: 199px; max-width: 100%; height: 51px; border: 0; border-radius: 30px; background: var(--blue); color: #fff; font: 500 12px/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; cursor: pointer; transition: background .2s, transform .2s; }
.btn:hover { background: var(--blue-dark); }
.hp { position: absolute; left: -9999px; }
.notice { margin: 20px 0 0; padding: 14px 20px; border-radius: 16px; font-weight: 500; }
.notice.ok { background: var(--blue-soft); color: var(--blue); }
.notice.err { background: #ffe1e1; color: #8a0000; }

.bubble-help { display: none; }
.contact-img { position: relative; }
.contact-img img { width: 100%; aspect-ratio: 650 / 684; object-fit: cover; }
.bubble-hands { width: 150px; height: 152px; --fill: var(--blue); --shape: url(../img/blob-hands.svg); color: #fff; letter-spacing: .08em; text-transform: uppercase; top: -36px; right: 0; font-size: 11px; line-height: 15px; }

/* ---------- Páginas de servicio ---------- */
.subnav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding-top: 24px; font: 500 12px/1 var(--f-body); color: var(--muted); }
.subnav a { padding: 4px 0; border-bottom: 1px solid transparent; }
.subnav a[aria-current] { color: #000; border-color: #000; }
.page-title { text-align: center; margin: 24px 0 28px; }

/* Rotulación */
.projects { display: grid; gap: 10px; }
.project-row { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.project-row .tile:last-of-type:nth-of-type(odd) { grid-column: span 2; aspect-ratio: 2 / 1; }
.project-row .row-label { z-index: 2; }

.rot-types { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 14px; margin-top: 56px; }
.rot-type .num { font: 600 18px/24px var(--f-body); color: var(--blue); }
.rot-type h3 { font: 600 18px/22px var(--f-head); border-top: 1px solid var(--rule); margin-top: 12px; padding-top: 12px; min-height: 58px; }
.rot-type img { width: 100%; aspect-ratio: 1; object-fit: cover; }

.materials { margin-top: 56px; }
.mat-title { font: 600 20px/24px var(--f-head); margin: 28px 0 14px; }
.mat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 7px; }
.mat-grid figure { margin: 0; }
.mat-grid a { display: block; overflow: hidden; }
.mat-grid img { width: 100%; aspect-ratio: 305 / 304; object-fit: cover; transition: transform .5s; }
.mat-grid figcaption { margin-top: 10px; text-align: center; font: 300 12px/18px var(--f-body); text-transform: uppercase; }
.mat-grid.is-textil { grid-template-columns: 1fr; gap: 10px; }
.mat-grid.is-textil img { aspect-ratio: 405 / 304; }

.page-generic { padding: 40px var(--pad); }

/* ---------- Pie ---------- */
.site-footer { margin-top: 48px; border-top: 1px solid var(--line); }
.footer-in { max-width: 1440px; margin: 0 auto; }
.footer-in img { width: 100%; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgb(0 10 40 / .94); display: grid; place-items: center; padding: 56px 12px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 112px); object-fit: contain; }
.lightbox button { all: unset; cursor: pointer; position: absolute; color: #fff; font: 300 40px/1 var(--f-body); padding: 8px 14px; opacity: .85; }
.lightbox button:hover, .lightbox button:focus-visible { opacity: 1; }
.lb-close { top: 6px; right: 8px; }
.lb-prev { left: 0; bottom: 6px; }
.lb-next { right: 0; bottom: 6px; }

/* ==========================================================================
   Ratón: etiquetas y zoom solo al pasar por encima
   ========================================================================== */
@media (hover: hover) and (pointer: fine) {
	.main-nav > a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px; background: var(--blue); transition: right .25s; }
	.main-nav > a:hover::after { right: 0; }
	.services-line a:hover, .subnav a:hover { color: var(--blue); }
	.tile-label, .row-label { inset: 0; padding: 20px; opacity: 0; transition: opacity .3s; }
	.tile:hover .tile-label, .tile:focus-visible .tile-label, .project-row:hover .row-label { opacity: 1; }
	.tile:hover img { transform: scale(1.03); }
	.mat-grid a:hover img { transform: scale(1.04); }
	.btn:hover { transform: translateY(-1px); }
}

/* ==========================================================================
   ≥ 600px — tableta vertical
   ========================================================================== */
@media (min-width: 600px) {
	:root { --pad: 32px; --h1: 36px; --gap: 9px; }
	.logo svg, .logo img { width: 180px; }
	.hero { padding-top: 48px; }
	.services-line { font-size: 12px; margin: 32px 0 36px; }
	.services-line li + li::before { margin: 0 18px; }
	.grid3 { grid-template-columns: repeat(2, 1fr); }
	.cards { grid-template-columns: repeat(3, 1fr); }
	.cards .tile { aspect-ratio: 407 / 537; }
	.tile-label, .row-label { font-size: 16px; }
	.news-bird { width: 220px; opacity: .7; }
	.project-row, .project-row.cols-3 { grid-template-columns: repeat(3, 1fr); }
	.project-row.cols-2 { grid-template-columns: 1fr 1fr; }
	.project-row .tile:last-of-type:nth-of-type(odd) { grid-column: auto; aspect-ratio: 407 / 406; }
	.project-row.cols-2 .tile { aspect-ratio: 613 / 406; }
	.project-row.cols-1 .tile { grid-column: 1 / -1; aspect-ratio: 3 / 1; }
	.about-grid { grid-template-columns: 1fr 1fr; }
	.about-copy { grid-column: 1 / -1; }
	.about-copy + .about-img { grid-column: 1 / -1; }
	.mat-grid { grid-template-columns: repeat(3, 1fr); }
	.mat-grid.is-textil { grid-template-columns: repeat(3, 1fr); }
	.ico { width: 64px; height: 64px; }
	.info-list { font-size: 18px; }
	.info-list li { gap: 26px; }
	.bubble-hands { width: 200px; height: 202px; top: -60px; right: -10px; font-size: 13px; line-height: 18px; }
	.contact-form { max-width: 505px; }
	.lightbox { padding: 40px 70px; }
	.lightbox img { max-height: calc(100vh - 80px); }
	.lb-prev, .lb-next { bottom: auto; top: 50%; transform: translateY(-50%); font-size: 48px; }
	.lb-prev { left: 10px; }
	.lb-next { right: 10px; }
}

/* ==========================================================================
   ≥ 960px — escritorio: navegación horizontal y composición del Figma
   ========================================================================== */
@media (min-width: 960px) {
	:root { --pad: 48px; --h1: 42px; }

	/* Cabecera */
	.header-in { padding-top: 23px; padding-bottom: 27px; }
	.logo svg, .logo img { width: 231px; }
	.nav-toggle { display: none; }
	.main-nav { position: static; flex-direction: row; gap: 60px; font-size: 12px; opacity: 1; visibility: visible; background: none; }
	.dd { position: relative; }
	.lang { margin-left: 41px; }
	.dd-btn { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; font: 500 12px/1 var(--f-body); padding: 6px 0; }
	.dd-menu { position: absolute; top: 100%; display: block; margin-top: 6px; padding: 6px 0; background: #fff; border: 1px solid #e3e3e3; border-radius: 8px; box-shadow: 0 8px 24px rgb(0 0 0 / .08); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: .2s; z-index: 20; }
	.dd:hover .dd-menu, .dd.open .dd-menu, .dd:focus-within .dd-menu { opacity: 1; visibility: visible; transform: none; }
	.svc-menu { left: -14px; gap: 0; align-items: stretch; min-width: 200px; white-space: nowrap; }
	.svc-menu a { padding: 8px 14px; color: #000; }
	.svc-menu a:hover, .svc-menu a[aria-current] { color: var(--blue); }
	.lang-menu { right: -10px; min-width: 70px; }
	.lang-menu a { padding: 8px 14px; color: #000; }
	.lang-menu a:hover, .lang-menu a[aria-current] { color: var(--blue); }

	/* Rejillas */
	.grid3 { grid-template-columns: repeat(3, 1fr); gap: 12px var(--gap); }
	.tile-label, .row-label { font-size: 20px; }

	/* Portada */
	.hero { padding-top: 70px; }
	.services-line { font-size: 14px; margin: 55px 0; }
	.services-line li + li::before { width: 7px; height: 7px; margin: 0 29px; }

	/* Novedades */
	.news { margin-top: 55px; padding: 77px 0 89px; background: linear-gradient(90deg, #002596 0%, #fff 100%); }
	.news-bird { left: calc(50% + 200px); right: auto; width: 300px; opacity: 1; }
	.news-grid { grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 52px; align-items: start; }
	.product { font-size: 24px; letter-spacing: .08em; margin-bottom: 26px; }

	/* Sobre nosotros */
	.about { padding-top: 55px; }
	.about-copy { grid-column: auto; margin: 0; }
	.about-copy + .about-img { grid-column: auto; }
	.about-copy .h1 { max-width: 532px; }
	.about-copy .body { max-width: 452px; margin-top: 34px; }

	/* Contacto */
	.contact { padding-top: 67px; }
	.contact-top, .contact-bottom { grid-template-columns: minmax(0, 590fr) minmax(0, 650fr); }
	.contact-top { column-gap: 0; }
	.contact-info { padding: 0 0 0 62px; }
	.contact-info .h1 { margin-top: 31px; }
	.info-list { margin-top: 41px; gap: 20px; }
	.info-list li { gap: 33px; }
	.ico { width: 72px; height: 72px; }
	.info-list li:nth-child(3) .ico { width: 76px; height: 78px; }
	.ico svg { width: 36px; height: 38px; }
	.deco { display: block; }
	.deco-blob { left: auto; right: 40px; }
	.deco-ring { left: auto; right: -100px; }
	.form-col { padding: 56px 85px 0 0; }
	.form-col .h1 { max-width: 505px; }
	.contact-form { margin-top: 40px; gap: 19px; }
	.field input { font-size: 14px; padding-left: 120px; }
	.field textarea { font-size: 14px; height: 277px; padding: 46px 28px 20px; }
	.field span { left: 28px; }
	.notice { max-width: 505px; margin-top: 24px; }
	.bubble { font-size: 16px; line-height: 22px; }
	.bubble-help { display: grid; width: 220px; height: 222px; --fill: var(--blue-soft); --shape: url(../img/blob-help.svg); color: var(--blue); right: -10px; bottom: -80px; z-index: 0; }
	.bubble-hands { width: 240px; height: 243px; top: -70px; right: -20px; font-size: 14px; line-height: 20px; letter-spacing: .1em; }

	/* Servicios */
	.subnav { gap: 16px; padding-top: 36px; }
	.page-title { margin: 36px 0 47px; }
	.projects { gap: 12px; }
	.rot-types { grid-template-columns: repeat(4, 1fr); gap: 34px; margin-top: 95px; }
	.rot-type .num { font-size: 20px; }
	.rot-type h3 { font-size: 24px; line-height: 26px; margin-top: 14px; padding-top: 14px; min-height: 66px; }
	.materials { margin-top: 84px; }
	.mat-title { font-size: 24px; line-height: 26px; margin: 32px 0 18px; }
	.mat-grid { grid-template-columns: repeat(4, 1fr); gap: 20px 7px; }
	.mat-grid figcaption { margin-top: 25px; font-size: 14px; line-height: 21px; }
	.mat-grid.is-textil { gap: 12px; }

	.site-footer { margin-top: 53px; }
	.home .site-footer { margin-top: 102px; }
	.page-generic { padding: 60px var(--pad); }
}

/* ==========================================================================
   ≥ 1280px — medidas exactas del Figma (1440)
   ========================================================================== */
@media (min-width: 1280px) {
	:root { --pad: 100px; --h1: 48px; }
	.news-bird { left: calc(50% + 260px); width: 359px; }
	.news-grid { grid-template-columns: 560px 1fr; gap: 63px; }
	.contact-top, .contact-bottom { grid-template-columns: 590px 1fr; }
	.deco-blob { left: 375px; right: auto; }
	.deco-ring { left: 452px; right: auto; }
	.bubble-hands { width: 281px; height: 284px; top: -83px; right: -56px; font-size: 16px; line-height: 22px; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
