:root {
  --navy: #051b3f;
  --petrol: #043e5f;
  --teal: #02706f;
  --teal-2: #0a9a97;
  --sky: #2e8fd6;
  --aqua: #3fd0d4;
  --cream: #ece2ce;
  --cream-2: #f6f1e6;
  --ink: #0d1b2a;
  --muted: #56667a;
  --white: #fff;
  --grad: linear-gradient(120deg, var(--aqua) 0%, var(--sky) 50%, var(--cream) 100%);
  --grad-deep: linear-gradient(135deg, var(--navy) 0%, var(--petrol) 55%, var(--teal) 100%);
  --page-w: 210mm;
  --page-h: 297mm;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "Inter", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(46,143,214,.25), transparent 60%),
    radial-gradient(ellipse at 50% 100%, rgba(2,112,111,.3), transparent 60%),
    linear-gradient(180deg, #040404 0%, #051b3f 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: "Montserrat", sans-serif; line-height: 1.08; }

/* =========================================================
   VISOR
   ========================================================= */
.viewer-bar {
  position: fixed; inset: 0 0 auto 0; z-index: 20; height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; color: rgba(255,255,255,.8);
}
.viewer-bar__brand { display: flex; align-items: center; gap: 16px; font: 600 .78rem "Montserrat"; letter-spacing: .28em; text-transform: uppercase; }
.viewer-bar__brand img { height: 36px; background: rgba(255,255,255,.95); padding: 4px 10px; border-radius: 10px; }
.viewer-bar__actions { display: flex; gap: 10px; }
.vbtn {
  padding: 10px 20px; border-radius: 999px; font: 700 .76rem "Montserrat"; letter-spacing: .1em; text-transform: uppercase;
  background: linear-gradient(120deg, var(--teal-2), var(--sky)); color: var(--white);
  box-shadow: 0 10px 24px -10px rgba(46,143,214,.8); transition: transform .3s;
}
.vbtn:hover { transform: translateY(-2px); }
.vbtn--ghost { background: transparent; border: 1px solid rgba(255,255,255,.3); box-shadow: none; }

.stage {
  position: fixed; inset: 64px 0 96px 0;
  display: grid; place-items: center;
}
.book-wrap { position: relative; }
.book-scale { position: absolute; top: 0; left: 0; transform-origin: top left; }
.book {
  position: relative; width: calc(var(--page-w) * 2); height: var(--page-h);
  perspective: 3200px;
  transition: transform .9s cubic-bezier(.645,.045,.355,1);
}
.book.at-start { transform: translateX(-25%); }
.book.at-end { transform: translateX(25%); }

.leaf {
  position: absolute; top: 0; left: 50%; width: 50%; height: 100%;
  transform-origin: left center; transform-style: preserve-3d;
  transition: transform 1.1s cubic-bezier(.645,.045,.355,1);
  cursor: pointer;
}
.leaf.turned { transform: rotateY(-180deg); }
.leaf > .face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.6);
}
.face--back { transform: rotateY(180deg); }
.face--front::after, .face--back::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 60px; z-index: 30; pointer-events: none;
}
.face--front::after { left: 0; background: linear-gradient(90deg, rgba(0,0,0,.28), transparent); }
.face--back::after { right: 0; background: linear-gradient(270deg, rgba(0,0,0,.28), transparent); }

.controls {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%); z-index: 20;
  display: flex; align-items: center; gap: 18px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(12px); border-radius: 999px; padding: 6px;
}
.ctrl {
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--white); color: var(--navy); font-size: 1.6rem; line-height: 1;
  transition: background .3s, color .3s, opacity .3s;
}
.ctrl:hover { background: var(--aqua); }
.ctrl:disabled { opacity: .3; cursor: default; background: var(--white); }
.ctrl__label { min-width: 150px; text-align: center; color: var(--white); font: 600 .8rem "Montserrat"; letter-spacing: .14em; text-transform: uppercase; }
.hint { position: fixed; left: 0; right: 0; bottom: 8px; text-align: center; color: rgba(255,255,255,.4); font-size: .72rem; letter-spacing: .06em; }

/* Modo lista (móvil) */
body.mode-list { overflow-y: auto; }
body.mode-list .stage { position: static; display: block; padding: 80px 0 40px; }
body.mode-list .book-wrap { margin: 0 auto; }
body.mode-list .book { width: var(--page-w); height: auto; transform: none !important; perspective: none; }
body.mode-list .leaf { position: static; width: auto; height: auto; transform: none !important; cursor: default; }
body.mode-list .leaf > .face { position: relative; transform: none; backface-visibility: visible; margin-bottom: 24px; }
body.mode-list .face::after { display: none; }
body.mode-list .controls, body.mode-list .hint { display: none; }
body.mode-list .viewer-bar { background: rgba(5,27,63,.92); backdrop-filter: blur(10px); }
body.mode-list .viewer-bar__brand span, body.mode-list .vbtn--ghost { display: none; }

/* =========================================================
   PÁGINA BASE
   ========================================================= */
.page { width: var(--page-w); height: var(--page-h); overflow: hidden; position: relative; background: var(--cream-2); }
.bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.page__body { position: relative; z-index: 2; padding: 56px 60px 0; }
.page__body--tight { padding-top: 26px; }
.page__foot {
  position: absolute; left: 60px; right: 60px; bottom: 30px; z-index: 3;
  display: flex; justify-content: space-between;
  font: 600 10px "Montserrat"; letter-spacing: .24em; text-transform: uppercase; color: var(--muted);
  border-top: 1px solid rgba(5,27,63,.15); padding-top: 12px;
}
.page__foot span:last-child { color: var(--teal); font-weight: 800; }
.page__foot--light { color: rgba(255,255,255,.55); border-color: rgba(255,255,255,.18); }
.page__foot--light span:last-child { color: var(--aqua); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 700 11px "Montserrat"; letter-spacing: .3em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.eyebrow--light { color: var(--aqua); }

h2 { font-size: 40px; font-weight: 800; color: var(--navy); letter-spacing: -.02em; margin-bottom: 16px; }
h2.light { color: var(--white); }
em { font-family: "Cormorant Garamond", serif; font-style: italic; font-weight: 600; font-size: 1.14em; color: var(--teal); }
h2.light em, .p-cover em { color: var(--aqua); }
.text { font-size: 14.5px; line-height: 1.65; color: var(--muted); margin-bottom: 12px; }
.text--light { color: rgba(255,255,255,.75); }
.center { text-align: center; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.logo-card { display: inline-block; background: rgba(255,255,255,.96); padding: 10px 18px; border-radius: 16px; box-shadow: 0 14px 30px -12px rgba(0,0,0,.5); }
.logo-card img { height: 54px; }
.logo-card--center { display: block; width: max-content; margin: 0 auto 34px; }

/* =========================================================
   P1 · PORTADA
   ========================================================= */
.p-cover { background: var(--navy); color: var(--white); }
.p-cover .bg { background-position: 40% center; }
.p-cover__overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 90% 10%, rgba(46,143,214,.35), transparent 55%),
    linear-gradient(180deg, rgba(4,8,20,.55) 0%, rgba(5,27,63,.55) 35%, rgba(5,27,63,.92) 68%, rgba(4,8,20,.98) 100%);
}
.routes { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .6; }
.routes path { fill: none; stroke: var(--aqua); stroke-width: 1.3; stroke-dasharray: 5 9; }
.routes path:nth-child(2) { stroke: var(--cream); opacity: .6; }
.routes path:nth-child(3) { stroke: var(--sky); }
.p-cover__top { position: absolute; top: 48px; left: 56px; right: 56px; display: flex; justify-content: space-between; align-items: flex-start; }
.p-cover__tag { font: 700 11px "Montserrat"; letter-spacing: .3em; text-transform: uppercase; text-align: right; line-height: 1.7; color: rgba(255,255,255,.85); border-right: 2px solid var(--aqua); padding-right: 14px; }
.p-cover__main { position: absolute; left: 56px; right: 56px; bottom: 190px; }
.p-cover h1 { font-size: 58px; font-weight: 900; letter-spacing: -.03em; line-height: 1.02; margin-bottom: 24px; }
.p-cover__lead { font-size: 16px; line-height: 1.6; color: rgba(255,255,255,.8); max-width: 520px; }
.p-cover__foot { position: absolute; left: 56px; right: 56px; bottom: 50px; border-top: 1px solid rgba(255,255,255,.2); padding-top: 22px; }
.modes { display: flex; gap: 22px; flex-wrap: wrap; font: 600 10.5px "Montserrat"; letter-spacing: .24em; text-transform: uppercase; color: rgba(255,255,255,.75); margin-bottom: 18px; }
.modes span { display: inline-flex; align-items: center; gap: 8px; }
.modes i { width: 6px; height: 6px; border-radius: 50%; background: var(--aqua); box-shadow: 0 0 10px var(--aqua); }
.p-cover__foot strong { font: 800 20px "Montserrat"; letter-spacing: .06em; }

/* =========================================================
   P2 · EMPRESA, CONTACTOS, SERVICIOS Y CIRCULAR 170
   ========================================================= */
.p-main { background: var(--cream-2); }
.p-main .page__body { padding: 44px 50px 0; }
.p-main .eyebrow { margin-bottom: 10px; }

.intro { display: grid; grid-template-columns: 1.3fr 1fr; gap: 26px; align-items: center; }
.intro h2 { font-size: 34px; margin-bottom: 10px; }
.intro .text { font-size: 13px; line-height: 1.6; margin: 0; }
.intro__img { position: relative; height: 200px; border-radius: 18px; overflow: hidden; box-shadow: 0 18px 32px -20px rgba(5,27,63,.6); }
.intro__img img { width: 100%; height: 100%; object-fit: cover; object-position: center 60%; }
.intro__badge {
  position: absolute; left: 12px; bottom: 12px;
  display: flex; align-items: center; gap: 8px;
  background: var(--grad-deep); color: var(--white); padding: 9px 14px; border-radius: 12px;
}
.intro__badge strong { font: 900 24px "Montserrat"; line-height: 1; }
.intro__badge span { font-size: 8.5px; letter-spacing: .14em; text-transform: uppercase; line-height: 1.35; opacity: .9; }

.people { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 20px; }
.person {
  display: block; padding: 15px 11px; border-radius: 14px;
  background: var(--white); border-top: 3px solid var(--teal);
  box-shadow: 0 14px 26px -20px rgba(5,27,63,.55);
}
.person__role { display: block; font: 700 8px "Montserrat"; letter-spacing: .16em; text-transform: uppercase; color: var(--teal); margin-bottom: 5px; }
.person strong { display: block; font: 800 14.5px "Montserrat"; color: var(--navy); margin-bottom: 5px; }
.person__line { display: block; font-size: 10.2px; line-height: 1.6; color: var(--muted); white-space: nowrap; letter-spacing: -.01em; }
.person--accent { background: var(--grad-deep); border-top-color: var(--aqua); }
.person--accent .person__role { color: var(--aqua); }
.person--accent strong { color: var(--white); }
.person--accent .person__line { color: rgba(255,255,255,.8); }

.svc-panel {
  position: relative; overflow: hidden; margin-top: 20px;
  padding: 24px 26px 22px; border-radius: 22px; color: var(--white);
  background:
    radial-gradient(circle at 0% 0%, rgba(2,112,111,.55), transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(46,143,214,.4), transparent 50%),
    var(--navy);
}
.svc-panel__title { font-size: 24px; font-weight: 800; margin-bottom: 6px; }
.svc-panel__title em { color: var(--aqua); }
.svc-panel__lead { font-size: 12px; line-height: 1.55; color: rgba(255,255,255,.7); margin-bottom: 16px; }
.svc-list { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.svc-item {
  display: flex; align-items: center; gap: 12px; min-height: 72px;
  padding: 10px 13px; border-radius: 14px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12);
}
.svc-item .svc__icon {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--teal), var(--sky));
}
.svc-item .svc__icon svg { width: 20px; height: 20px; fill: none; stroke: var(--white); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.svc-item h4 { font: 700 12.8px "Montserrat"; margin-bottom: 2px; }
.svc-item p { font-size: 10.8px; line-height: 1.4; color: rgba(255,255,255,.7); }
.svc-item--cta { background: linear-gradient(140deg, var(--teal), var(--sky)); border: 0; }
.svc-item--cta h4 { font-size: 15px; }
.svc-item--cta p { color: rgba(255,255,255,.9); }

.c170 {
  display: flex; align-items: center; gap: 14px; margin-top: 16px;
  padding: 13px 18px; border-radius: 14px;
  background: var(--white); border: 1.5px dashed rgba(2,112,111,.5);
}
.c170__tag { flex-shrink: 0; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--navy); color: var(--white); font: 800 10.5px "Montserrat"; letter-spacing: .04em; }
.c170__txt { flex: 1; font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.c170__txt strong { display: block; font: 800 12.5px "Montserrat"; color: var(--navy); }
.c170__url { flex-shrink: 0; padding: 9px 14px; border-radius: 999px; background: var(--teal); color: var(--white); font: 700 11px "Montserrat"; letter-spacing: .02em; }

/* =========================================================
   P3 · P4 · FOTOS CON LEYENDAS
   ========================================================= */
.p-photos { background: var(--cream-2); }
.p-photos h2 { margin-bottom: 22px; }
.photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 18px; }
.photo-grid figure { margin: 0; }
.photo-grid .ph { height: 345px; border-radius: 16px; overflow: hidden; box-shadow: 0 18px 32px -20px rgba(5,27,63,.6); }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; }
.photo-grid figcaption { padding: 12px 4px 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.photo-grid figcaption strong { display: block; font: 800 14px "Montserrat"; color: var(--navy); margin-bottom: 2px; }
.photo-grid figcaption strong::before { content: ""; display: inline-block; width: 16px; height: 2px; background: var(--teal); vertical-align: middle; margin-right: 8px; }
.photo-grid--compact .ph { height: 305px; }
.photo-grid--five { gap: 16px 18px; }
.photo-grid--five .wide { grid-column: span 2; }
.photo-grid--five .ph { height: 205px; }
.photo-grid--five .wide .ph { height: 240px; }
.photo-grid img.no-stamp { transform: scale(1.16); transform-origin: top left; }

.p-photos--end { background: var(--cream); }
.closing {
  position: absolute; left: 0; right: 0; bottom: 0; height: 150px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 0 60px; background: var(--grad-deep); color: var(--white);
}
.closing .logo-card img { height: 46px; }
.closing__txt { text-align: right; }
.closing__txt strong { display: block; font: 900 26px "Montserrat"; letter-spacing: .03em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.closing__txt span { font-size: 12px; color: rgba(255,255,255,.75); }

/* =========================================================
   IMPRESIÓN / PDF
   ========================================================= */
@media print {
  @page { size: 210mm 297mm; margin: 0; }
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  html, body { height: auto; background: none; overflow: visible; }
  .viewer-bar, .controls, .hint { display: none !important; }
  .stage { position: static !important; display: block !important; padding: 0 !important; }
  .book-wrap, .book-scale { position: static !important; width: auto !important; height: auto !important; transform: none !important; margin: 0 !important; }
  .book { width: var(--page-w) !important; height: auto !important; transform: none !important; perspective: none !important; }
  .leaf { position: static !important; width: auto !important; height: auto !important; transform: none !important; }
  .leaf > .face { position: relative !important; transform: none !important; backface-visibility: visible; box-shadow: none; margin: 0 !important; break-after: page; height: 296.8mm !important; }
  .leaf:last-child .face--back { break-after: auto; }
  .face::after { display: none; }
  .svc, .legal { backdrop-filter: none; }
}
