@font-face{font-family:"Roboto";font-style:normal;font-weight:300;font-display:swap;src:url("fonts/roboto-latin-300-normal.woff2") format("woff2");}
@font-face{font-family:"Roboto";font-style:normal;font-weight:400;font-display:swap;src:url("fonts/roboto-latin-400-normal.woff2") format("woff2");}
@font-face{font-family:"Roboto";font-style:normal;font-weight:500;font-display:swap;src:url("fonts/roboto-latin-500-normal.woff2") format("woff2");}
@font-face{font-family:"Roboto";font-style:normal;font-weight:700;font-display:swap;src:url("fonts/roboto-latin-700-normal.woff2") format("woff2");}
/* Caironat — identidad de la web actual
   Barra y pie azul petróleo, fondo arena, crema para el idioma activo, Roboto.
   Valores tomados de la grabación de pantalla: ajustar al hex exacto del CSS actual si difiere. */
:root {
  --petrol: #172d3a;
  --sand: #edeae3;
  --cream: #dae3d2;
  --white: #ffffff;
  --grey: #636871;
  --rule: rgba(11, 43, 56, .2);
  --font: "Roboto", Calibri, "Segoe UI", sans-serif;
  --maxw: 1280px;
  --pad: clamp(20px, 5vw, 80px);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--sand); color: var(--grey); font: 300 18px/1.65 var(--font); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--petrol); outline-offset: 3px; }
.bar :focus-visible, .foot :focus-visible { outline-color: var(--cream); }

[data-l] { display: none; }
html[data-lang="es"] [data-l="es"], html[data-lang="en"] [data-l="en"],
html[data-lang="it"] [data-l="it"], html[data-lang="va"] [data-l="va"] { display: revert; }
.pending { color: #a0574b; font-style: italic; }

.inner {
  max-width: var(--maxw); margin-inline: auto;
  padding-left: max(var(--pad), env(safe-area-inset-left, 0px));
  padding-right: max(var(--pad), env(safe-area-inset-right, 0px));
}

/* Barra superior */
.bar { background: var(--petrol); }
.bar .inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding-block: 26px 22px; }
.logo img, .logo svg { height: 74px; width: auto; }
.langs { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.langs button { font: 500 14px/1 var(--font); letter-spacing: .14em; color: rgba(255,255,255,.38); background: none; border: 0; padding: 8px 10px; cursor: pointer; transition: color .2s; }
.langs button:hover { color: rgba(255,255,255,.75); }
.langs button[aria-pressed="true"] { color: var(--cream); }

/* Título */
h1 { margin: 0; color: var(--petrol); font-weight: 500; letter-spacing: .16em; line-height: 1; }
.tagline { margin: 0; color: var(--petrol); font-weight: 400; line-height: 1.3; }
.map-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 75%; }

/* Áreas */
.areas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.areas h2 { margin: 0 0 14px; color: var(--petrol); font-weight: 500; font-size: 22px; line-height: 1.25; }
.areas p { margin: 0; font-size: 17px; }

/* Placas */
.solar { height: clamp(220px, 26vw, 380px); overflow: hidden; }
.solar img { width: 100%; height: 100%; object-fit: cover; object-position: left center; }

/* Pie */
.foot { background: var(--petrol); color: rgba(255,255,255,.72); font-size: 16px; line-height: 1.75; }
.foot .inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px 40px; padding-block: 48px 52px; }
.foot address { font-style: normal; }
.foot .name { display: block; margin-bottom: 8px; color: var(--white); font-weight: 400; letter-spacing: .22em; font-size: 17px; }
.foot a { color: inherit; text-decoration: none; }
.foot a:hover { color: var(--cream); }
.legal-btn { font: 300 14px/1 var(--font); color: rgba(255,255,255,.55); background: none; border: 0; padding: 8px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.legal-btn:hover { color: var(--cream); }

/* Aviso legal */
dialog.legal { width: min(760px, calc(100% - 32px)); max-height: min(86vh, 900px); border: 0; padding: 0; background: var(--white); color: var(--grey); }
dialog.legal::backdrop { background: rgba(11, 43, 56, .72); }
.legal-inner { padding: 36px clamp(20px, 5vw, 48px) 44px; overflow-y: auto; max-height: inherit; }
.legal-close { position: sticky; top: 0; float: right; margin: -16px -12px 0 0; width: 40px; height: 40px; font-size: 26px; border: 0; background: none; color: var(--petrol); cursor: pointer; }
.legal h2 { font-weight: 500; font-size: 26px; margin: 0 0 18px; color: var(--petrol); }
.legal h3 { font-weight: 500; font-size: 16px; margin: 24px 0 4px; color: var(--petrol); }
.legal p { margin: 0; font-size: 15px; }

@media (max-width: 800px) {
  body { font-size: 16px; }
  .logo img, .logo svg { height: 52px; }
  .bar .inner { padding-block: 18px 14px; }
  .langs { gap: 0; }
  .langs button { padding: 8px 6px; font-size: 12px; letter-spacing: .1em; }
  .areas { grid-template-columns: 1fr; }
}

.fx { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Borrador G — austeridad con escala: pocos elementos, tipografía grande, contraste arena / petróleo.
   Orden: barra fija · portada con el mapa · titular + dos columnas · áreas en petróleo · placas a sangre · pie */

/* Barra fija que se estrecha al bajar */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--petrol); }
.bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; }
.bar .inner { padding-block: 30px 26px; align-items: flex-end; }
.bar .langs { margin-bottom: -6px; } /* el texto de los idiomas cae sobre la base de CAIRONAT */
.bar .logo svg { height: 92px; transition: height .35s ease; }
.bar .inner { transition: padding .35s ease; }
/* Al bajar, el script añade .is-scrolled y la barra se estrecha (funciona en todos los navegadores) */
.is-scrolled .bar .inner { padding-block: 12px 10px; }
.is-scrolled .bar .logo svg { height: 46px; }

/* Portada */
.g-hero { position: relative; overflow: hidden; }
.g-hero .map-bg { transform-origin: 50% 70%; }
.g-hero .inner {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 22px;
  min-height: clamp(460px, 62vw, 760px); padding-block: 96px clamp(56px, 6vw, 96px);
}
.g-hero h1 { font-size: clamp(54px, 11.2vw, 168px); letter-spacing: .14em; line-height: .9; margin-left: -.04em; }
.g-hero .tagline { display: flex; align-items: center; gap: 22px; font-size: clamp(18px, 2vw, 28px); }
.g-hero .tagline::before { content: ""; flex: none; width: clamp(40px, 6vw, 88px); height: 3px; background: var(--petrol); }
.g-hero h1, .g-hero .tagline { animation: rise 1s cubic-bezier(.2,.7,.2,1) both; }
.g-hero .tagline { animation-delay: .12s; }
@keyframes rise { from { opacity: .001; transform: translateY(18px); } to { opacity: 1; transform: none; } }
/* Desplazamiento suave del mapa al bajar (el script calcula --hp de 0 a 1) */
.g-hero .map-bg { transform: scale(calc(1 + var(--hp, 0) * .08)) translateY(calc(var(--hp, 0) * 4%)); }

/* Titular y dos columnas */
.g-intro .inner { padding-block: clamp(80px, 10vw, 160px) clamp(80px, 9vw, 140px); display: grid; gap: clamp(48px, 6vw, 88px); }
.g-intro .lead p { margin: 0; max-width: 26ch; color: var(--petrol); font-weight: 500; font-size: clamp(28px, 4.1vw, 58px); line-height: 1.14; letter-spacing: -.012em; text-wrap: balance; }
.g-intro .cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 6vw, 96px); margin-left: auto; width: min(100%, 860px); }
.g-intro .cols > div { padding-top: 22px; border-top: 1px solid var(--rule); }
.g-intro .cols p { margin: 0; font-size: clamp(17px, 1.3vw, 19px); line-height: 1.7; }

/* Áreas sobre petróleo */
.g-areas { background: var(--petrol); color: rgba(255,255,255,.72); overflow-x: clip; }
.g-areas .inner { padding-block: clamp(72px, 9vw, 136px); }
.g-areas .areas { display: block; border-bottom: 1px solid rgba(210,219,204,.2); }
.g-areas .areas li {
  position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px clamp(32px, 6vw, 96px);
  align-items: baseline; padding-block: clamp(36px, 4.4vw, 64px); border-top: 1px solid rgba(210,219,204,.2);
}
.g-areas .areas li::before { content: ""; position: absolute; top: -1px; left: 0; width: 56px; height: 3px; background: var(--cream); }
.g-areas h2 { margin: 0; color: var(--cream); font-weight: 400; font-size: clamp(22px, 2.3vw, 32px); line-height: 1.2; letter-spacing: -.005em; text-wrap: balance; }
.g-areas p { margin: 0; font-size: clamp(17px, 1.35vw, 20px); line-height: 1.7; max-width: 50ch; }
.g-areas .pending { color: #e7a99c; }
/* Destaca el área más cercana al centro de la pantalla (el script marca .is-focus); la última queda encendida al final */
.g-areas .areas li::before { transition: width .6s cubic-bezier(.2,.7,.2,1); }
.g-areas .areas li > * { transition: opacity .6s ease; }
.spot-on .g-areas .areas li > * { opacity: .3; }
.spot-on .g-areas .areas li::before { width: 40px; }
.spot-on .g-areas .areas li.is-focus > * { opacity: 1; }
.spot-on .g-areas .areas li.is-focus::before { width: 140px; }

/* Placas a sangre, con un leve desplazamiento */
.g-solar { height: clamp(160px, 18vw, 280px); overflow: hidden; }
.g-solar img { width: 100%; height: 100%; object-fit: cover; object-position: left center; }
/* El script calcula --sp de 0 (entrando) a 1 (saliendo) */
.g-solar img { transform: scale(calc(1.14 - var(--sp, .5) * .12)) translateY(calc(-4% + var(--sp, .5) * 6%)); }

/* Pie más discreto */
.foot { font-size: 13.5px; line-height: 1.7; }
.foot .name { font-size: 14px; margin-bottom: 6px; }
.foot .inner { padding-block: 36px 40px; }
.legal-btn { font-size: 12.5px; }

@media (max-width: 800px) {
  .bar .inner { padding-block: 18px 16px; }
  .bar .langs { margin-bottom: -8px; }
  .bar .logo svg { height: 62px; }
  .is-scrolled .bar .inner { padding-block: 10px 8px; }
  .is-scrolled .bar .logo svg { height: 38px; }
  .g-hero .inner { min-height: 440px; }
  .g-hero h1 { letter-spacing: .1em; }
  .g-intro .cols { grid-template-columns: 1fr; gap: 28px; }
  .g-areas .areas li { grid-template-columns: 1fr; }
}

/* Entrada lateral, una sola vez: título desde la izquierda, texto desde la derecha */
.reveal-on .g-areas [data-reveal] h2,
.reveal-on .g-areas [data-reveal] p { opacity: 0; transition: opacity .9s ease, transform 1.1s cubic-bezier(.16,.8,.24,1); }
.reveal-on .g-areas [data-reveal] h2 { transform: translateX(-90px); }
.reveal-on .g-areas [data-reveal] p { transform: translateX(90px); transition-delay: .18s; }
.reveal-on .g-areas [data-reveal].is-in h2,
.reveal-on .g-areas [data-reveal].is-in p { opacity: 1; transform: none; }
.reveal-on .g-areas [data-reveal]:not(.is-in)::before { width: 0; }

/* Pantallas estrechas: el mapa entero a lo ancho, como en la web actual */
@media (max-width: 1000px) {
  .g-hero { background: #e3e2dd; }
  .g-hero .map-bg { top: auto; bottom: 0; height: auto; object-fit: initial;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22%); mask-image: linear-gradient(to bottom, transparent 0, #000 22%); }
  .g-hero .inner { justify-content: flex-start; min-height: 0; padding-block: clamp(48px, 9vw, 80px) calc(44vw + 8px); }
}
@media (max-width: 1000px) { .g-hero .map-bg { transform: none; } }

/* Logo animado: los cubos se montan al cargar y se abren al pasar el ratón */
.logo { display: block; line-height: 0; }
.logo-svg { display: block; aspect-ratio: 776 / 314; overflow: visible; }
.cube polygon { stroke-width: 1.2; stroke-linejoin: round; }
.cube .pc { transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.g1 { --x: 0px;    --y: -100px; --d: .26s; }
.g2 { --x: -80px;  --y: -60px;  --d: .16s; }
.g3 { --x: 100px;  --y: -50px;  --d: .34s; }
.g4 { --x: -100px; --y: 50px;   --d: 0s; }
.g5 { --x: 70px;   --y: 70px;   --d: .08s; }
@media (prefers-reduced-motion: reduce) {
  .bar .inner, .bar .logo svg, .g-areas .areas li > *, .g-areas .areas li::before { transition: none; }
  .g-hero .map-bg, .g-solar img { transform: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .cube .pc { animation: cube-in .9s cubic-bezier(.2,.8,.2,1) var(--d) backwards, cube-breathe 1.4s ease-in-out calc(var(--d) + 1.6s) 1; }
  .logo-svg .wm { animation: wm-in .8s ease .55s backwards; }
  .logo:hover .pc, .logo:focus-visible .pc { transform: translate(calc(var(--x) * .2), calc(var(--y) * .2)); }
}
@keyframes cube-in { from { transform: translate(var(--x), var(--y)); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes cube-breathe { 0%, 100% { transform: none; } 45% { transform: translate(calc(var(--x) * .16), calc(var(--y) * .16)); } }
@keyframes wm-in { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }


/* Variante invertida de G: presentación en petróleo, áreas en arena */
.g-intro { background: var(--petrol); }
.g-intro .lead p { color: var(--cream); }
.g-intro .cols p { color: rgba(255,255,255,.72); }
.g-intro .cols > div { border-top-color: rgba(210,219,204,.2); }

.g-areas { background: var(--sand); color: var(--grey); }
.g-areas .areas { border-bottom-color: var(--rule); }
.g-areas .areas li { border-top-color: var(--rule); }
.g-areas .areas li::before { background: var(--petrol); }
.g-areas h2 { color: var(--petrol); font-weight: 500; }
.g-areas .pending { color: #a0574b; }

/* Lema sin línea, en negrita */
.g-hero .tagline { font-weight: 500; }
.g-hero .tagline::before { content: none; }

/* Pie: tamaño intermedio */
.foot { font-size: 15px; }
.foot .name { font-size: 15.5px; }
.legal-btn { font-size: 13.5px; }

/* Variante 1: foto de placas pasada a los colores de la marca (oscuros en petróleo, claros en arena) */
.g-solar img { filter: url(#duo-placas); object-position: left 45%; }
