/* ==========================================================================
   Lōno Studio — sistema de diseño (versión Netlify + Sanity)
   Paleta y tipografías del manual de marca. Escala tipográfica por ancho
   de pantalla (clamp), no por alto como en Squarespace.
   ========================================================================== */

/* block: el texto espera a la tipografía (las principales se precargan en <head>) en vez de verse un instante en otra letra */
@font-face { font-family: 'Black Mango'; src: url('/fonts/BlackMango-Light.woff2') format('woff2'), url('/fonts/BlackMango-Light.ttf') format('truetype'); font-weight: 300; font-display: block; }
@font-face { font-family: 'Black Mango'; src: url('/fonts/BlackMango-Regular.woff2') format('woff2'), url('/fonts/BlackMango-Regular.ttf') format('truetype'); font-weight: 400; font-display: block; }
@font-face { font-family: 'Black Mango'; src: url('/fonts/BlackMango-Medium.woff2') format('woff2'), url('/fonts/BlackMango-Medium.ttf') format('truetype'); font-weight: 500; font-display: block; }
@font-face { font-family: 'Black Mango'; src: url('/fonts/BlackMango-SemiBold.woff2') format('woff2'), url('/fonts/BlackMango-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: block; }
@font-face { font-family: 'Lato'; src: url('/fonts/Lato-Light.woff2') format('woff2'), url('/fonts/Lato-Light.ttf') format('truetype'); font-weight: 300; font-display: block; }
@font-face { font-family: 'Lato'; src: url('/fonts/Lato-Regular.woff2') format('woff2'), url('/fonts/Lato-Regular.ttf') format('truetype'); font-weight: 400; font-display: block; }
@font-face { font-family: 'Lato'; src: url('/fonts/Lato-Bold.woff2') format('woff2'), url('/fonts/Lato-Bold.ttf') format('truetype'); font-weight: 700; font-display: block; }
@font-face { font-family: 'Lato'; src: url('/fonts/Lato-Italic.woff2') format('woff2'), url('/fonts/Lato-Italic.ttf') format('truetype'); font-weight: 400; font-style: italic; font-display: block; }

:root {
  --lino: #EDECE6;
  --arena: #E3E1DA;
  --navy: #0C1C33;
  --navy-soft: rgba(12, 28, 51, .62);
  --navy-line: rgba(12, 28, 51, .22);
  --white: #FFFFFF;

  --display: 'Black Mango', 'Times New Roman', serif;
  --text: 'Lato', 'Helvetica Neue', Arial, sans-serif;

  /* Tamaños FIJOS por dispositivo (computadora/iPad y celular), como Webflow.
     Antes dependían del alto de la ventana (método de Squarespace). */
  --u: 10.8px;
  --fs-title: calc(16px + 1.6 * var(--u));     /* h3: 33.3px en 1440×900 */
  --fs-statement: calc(16px + .64 * var(--u)); /* h4: 22.9px */
  --fs-name: calc(16px + .64 * var(--u));      /* h4 */
  --fs-body: calc(16px + .32 * var(--u));      /* p2: 19.5px */
  --fs-small: .875rem;
  --fs-micro: .8125rem;

  --gutter: clamp(20px, 5vw, 96px);
  --gap: clamp(12px, 1.5vw, 28px);
  --max: 1760px;

  --header-h: 88px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
/* Páginas cortas (Blog, Descargables): el footer queda pegado al fondo de la ventana */
body { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--lino);
  color: var(--navy);
  font-family: var(--text);
  font-weight: 300;
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Tipografía ---------- */
.statement {
  font-family: var(--display);
  font-weight: 400;
  font-size: var(--fs-statement);
  line-height: 1.28;
  letter-spacing: .04em;
  margin: 0;
  text-wrap: balance;
}
.page-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: var(--fs-title);
  line-height: 1.25;
  letter-spacing: .04em;
  margin: 0;
  text-wrap: balance;
}
.lede { font-size: var(--fs-body); line-height: 1.5; letter-spacing: .03em; max-width: 46em; margin: 0; text-wrap: pretty; }
.name { font-family: var(--display); font-weight: 400; font-size: var(--fs-name); line-height: 1.28; letter-spacing: .04em; margin: 0; }
.meta { font-size: var(--fs-small); font-weight: 400; color: var(--navy-soft); letter-spacing: .01em; }

/* ---------- Header ---------- */
.site-header {
  position: absolute; inset: 0 0 auto 0; z-index: 30;
  height: var(--header-h);
  color: var(--navy);
}
.site-header.on-image { color: var(--white); }
.site-header .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; } /* misma orilla que el contenido (.wrap) */
.logo { display: block; width: clamp(118px, 9.7vw, 150px); line-height: 0; }
.logo svg { width: 100%; height: auto; fill: currentColor; }
.main-nav { display: flex; gap: clamp(18px, 2vw, 34px); align-items: center; }
.main-nav a, .main-nav button {
  font-family: var(--display); font-weight: 400; font-size: 1rem; letter-spacing: .04em;
  text-decoration: none; line-height: 1.3; padding: 4px 0;
  background-image: linear-gradient(currentColor, currentColor); background-repeat: no-repeat;
  background-size: 0 1px; background-position: 0 100%; transition: background-size .35s var(--ease);
}
.main-nav a:hover, .main-nav button:hover, .main-nav [aria-current="page"] { background-size: 100% 1px; }
.burger { display: none; width: 34px; height: 24px; position: relative; }
.burger span { position: absolute; left: 0; right: 0; height: 1px; background: currentColor; transition: transform .3s var(--ease); }
.burger span:nth-child(1) { top: 7px; } .burger span:nth-child(2) { top: 16px; }

/* ---------- Menú fullscreen (Proyectos en desktop, todo el menú en mobile) ---------- */
.menu-panel {
  position: fixed; inset: 0; z-index: 50;
  background: var(--lino); color: var(--navy);
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  opacity: 0; visibility: hidden; transition: opacity .45s var(--ease), visibility 0s linear .45s;
}
.menu-panel[hidden] { display: none; }
.menu-panel.is-open { opacity: 1; visibility: visible; transition: opacity .45s var(--ease); }
.menu-panel nav { display: flex; flex-direction: column; align-items: center; gap: clamp(18px, 2.6vh, 34px); }
.menu-panel nav a { font-family: var(--display); font-weight: 300; font-size: clamp(1.75rem, 1.2rem + 2vw, 2.75rem); text-decoration: none; line-height: 1.15; }
@media (hover: hover) { .menu-panel nav a:hover { font-style: normal; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; } }
.menu-panel .menu-close { position: absolute; top: 28px; right: clamp(20px, 3.4vw, 64px); width: 34px; height: 34px; }
.menu-panel .menu-close::before, .menu-panel .menu-close::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: currentColor; }
.menu-panel .menu-close::before { transform: rotate(45deg); } .menu-panel .menu-close::after { transform: rotate(-45deg); }
.menu-panel .menu-top, .menu-panel .menu-main, .menu-panel .menu-back { display: none; }
/* "PROYECTOS" como encabezado del menú y debajo solo Corporativos / Comerciales / Residenciales */
.menu-panel .menu-heading { margin: 0 0 clamp(2px, .8vh, 10px); font-family: var(--display); font-weight: 400; font-size: clamp(.85rem, .72rem + .4vw, 1.05rem); letter-spacing: .16em; color: var(--navy-soft); }
body.menu-open { overflow: hidden; }
/* Barra fija de WhatsApp (solo celular): te sigue por todo el sitio */
.wa-bar { display: none; }
@media (max-width: 767px) {
  .wa-bar {
    display: flex; align-items: center; justify-content: center; gap: 14px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
    background: var(--arena); border-top: 1px solid rgba(12, 28, 51, .12);
    color: var(--navy); text-decoration: none;
    font-family: var(--display); font-weight: 400; font-size: 1.08rem; letter-spacing: .03em;
  }
  .wa-bar svg:last-child { width: 22px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.2; transition: transform .3s; }
  .wa-bar:active svg:last-child { transform: translateX(4px); }
  .wa-bar .wa-ico { width: 20px; height: 20px; fill: currentColor; flex: none; margin-right: -4px; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  body.menu-open .wa-bar { display: none; }
  /* Versión 2: WhatsApp a la izquierda + correo para el newsletter a la derecha */
  .wa-bar--nl { justify-content: space-between; gap: 14px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); font-family: var(--text, inherit); }
  .wa-bar--nl .wa-bar-wa { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid rgba(12, 28, 51, .25); border-radius: 50%; color: var(--navy); }
  .wa-bar--nl .wa-bar-wa svg { width: 20px; height: 20px; fill: currentColor; stroke: none; transform: none; }
  .wa-bar--nl form { flex: 1; min-width: 0; display: flex; align-items: center; border-bottom: 1px solid var(--navy-line); }
  .wa-bar--nl input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 16px; color: var(--navy); padding: 9px 0; outline: none; }
  .wa-bar--nl input::placeholder { color: var(--navy-soft); }
  .wa-bar--nl button { width: 40px; height: 40px; display: grid; place-items: center; color: var(--navy); }
  .wa-bar--nl button svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.2; }
  .wa-bar--nl .ok { display: none; flex: 1; margin: 0; font-size: var(--fs-small); color: var(--navy); }
  .wa-bar--nl.is-ok form { display: none; }
}

/* ---------- Hero (Home y proyectos) ---------- */
.hero { position: relative; width: 100%; height: min(calc(100vw * .6667), 90svh); overflow: hidden; background: var(--arena); }
.hero img, .hero .slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero .slide { opacity: 0; transition: opacity 1.4s ease; }
.hero .slide.is-active { opacity: 1; }
/* Portada de proyecto: el contenedor toma la proporción de la foto, nunca la recorta ni la estira.
   Fotos verticales: tope de altura y la foto completa centrada sobre arena. */
@media (min-width: 768px) { #hero { height: auto; aspect-ratio: var(--r, 1.5); } }
#project-hero { height: auto; aspect-ratio: var(--r, 1.5); max-height: calc(100vw / 1.25); }
#project-hero img { object-fit: contain; }
/* Foto más chica que la pantalla: se muestra a su tamaño real, centrada, debajo del menú */
.hero.is-boxed { width: min(100%, var(--w)); max-width: var(--w); margin: var(--header-h) auto 0; background: none; }
#project-hero.is-boxed { max-height: none; }
.hero.is-boxed::after { display: none; }
.hero::after { content: ''; position: absolute; inset: 0 0 auto 0; height: 160px; background: linear-gradient(rgba(0,0,0,.22), rgba(0,0,0,0)); pointer-events: none; }

/* ---------- Bloque de declaración ---------- */


/* ---------- Foto con fondo de reserva ---------- */
.frame { position: relative; overflow: hidden; background: var(--arena); }
.frame img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s ease, transform 1.2s var(--ease); }
.frame img.is-loaded { opacity: 1; }
a:hover .frame img.is-loaded { transform: scale(1.015); }
@media (prefers-reduced-motion: reduce) { .frame img { transition: none; } a:hover .frame img.is-loaded { transform: none; } }
.caption { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-top: 14px; }
a.card { text-decoration: none; display: block; }

/* ---------- Destacados (Home) ---------- */
.featured { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.featured .frame { aspect-ratio: 1 / 1; max-height: calc(100svh - 120px); }
.featured .frame, .project-grid .frame { width: 100%; }

/* ---------- Carrusel de proyectos (Home) ---------- */
.reel-section { padding: clamp(90px, 7vw, 120px) 0 0; position: relative; }
.reel-arrow { position: absolute; z-index: 2; top: calc(clamp(90px, 7vw, 120px) + var(--reel-h) / 2 - 20px); width: 40px; height: 40px; border: 1px solid var(--navy); border-radius: 50%; background: rgba(255, 255, 255, .85); display: grid; place-items: center; transition: opacity .3s; }
.reel-arrow.prev { left: calc(var(--edge) - 20px); } .reel-arrow.next { right: 12px; }
.reel-arrow[hidden] { display: none; }
.reel-arrow svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.2; }
.reel { display: flex; gap: 30px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding: 0 var(--edge); scroll-padding-inline: var(--edge); overscroll-behavior-x: contain; }
.reel::-webkit-scrollbar { display: none; }
.reel .card { flex: 0 0 auto; scroll-snap-align: start; }
/* Altura = 65% de la altura de los destacados */
.reel-section { --reel-h: calc(min((min(100vw, var(--max)) - 2 * var(--gutter) - var(--gap)) / 2, 100svh - 120px) * .65); }
.reel .card { width: calc(var(--reel-h) * var(--r, 1.5)); }
.reel .frame { width: 100%; height: var(--reel-h); }

/* ---------- Encabezado de página interior ---------- */



/* ---------- Categorías ---------- */
.project-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--gap); row-gap: clamp(40px, 4.4vw, 76px); }
.project-grid .frame { aspect-ratio: 3 / 2; }
.slideshow img { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease; }
.slideshow img.is-active.is-loaded { opacity: 1; }

/* ---------- Página de proyecto ---------- */

.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.gallery .frame { aspect-ratio: 3 / 2; }
.gallery button { display: block; width: 100%; cursor: zoom-in; }
.project-nav { display: flex; justify-content: space-between; gap: 24px; padding: clamp(64px, 7vw, 120px) var(--gutter) 0; }
.project-nav a { text-decoration: none; }
.project-nav .meta { display: block; margin-bottom: 6px; }

/* ---------- Visor (lightbox) ---------- */
#lono-viewer { position: fixed; inset: 0; z-index: 60; isolation: isolate; color: var(--navy); display: grid; grid-template-rows: auto 1fr auto auto; opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility 0s linear .35s; }
#lono-viewer.is-open { opacity: 1; visibility: visible; transition: opacity .35s ease; }
/* Fondo beige translúcido en una capa aparte: el difuminado no toca la foto (Safari a veces la suaviza) */
#lono-viewer::before { content: ''; position: absolute; inset: 0; z-index: -1; background: rgba(237, 236, 230, .94); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
#lono-viewer .viewer-bar { display: flex; justify-content: space-between; align-items: center; padding: 20px clamp(20px, 3vw, 48px); font-size: var(--fs-small); letter-spacing: .02em; }
#lono-viewer .viewer-close { width: 30px; height: 30px; position: relative; }
#lono-viewer .viewer-close::before, #lono-viewer .viewer-close::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: currentColor; }
#lono-viewer .viewer-close::before { transform: rotate(45deg); } #lono-viewer .viewer-close::after { transform: rotate(-45deg); }
#lono-viewer .viewer-stage { display: grid; place-items: center; min-height: 0; padding: 0 clamp(12px, 3vw, 48px); }
#lono-viewer .viewer-stage { position: relative; }
#lono-viewer .viewer-stage img { transition: filter .25s ease; }
#lono-viewer .viewer-stage img.is-cargando { filter: blur(10px); }
#lono-viewer .viewer-stage img { position: absolute; inset: 0 clamp(12px, 3vw, 48px); margin: auto; width: calc(100% - 2 * clamp(12px, 3vw, 48px)); height: 100%; object-fit: contain; }
#lono-viewer .viewer-caption { display: flex; justify-content: center; align-items: center; gap: 22px; padding: 16px; font-size: var(--fs-small); }
#lono-viewer .viewer-nav { width: 40px; height: 40px; border: 1px solid rgba(12, 28, 51, .35); border-radius: 50%; display: grid; place-items: center; }
#lono-viewer .viewer-nav svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.2; }
#lono-viewer .viewer-thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 4px clamp(20px, 3vw, 48px) 22px; scrollbar-width: none; justify-content: safe center; }
#lono-viewer .viewer-thumbs button { flex: 0 0 auto; width: 68px; height: 48px; opacity: .45; transition: opacity .25s; }
#lono-viewer .viewer-thumbs button[aria-pressed="true"], #lono-viewer .viewer-thumbs button:hover { opacity: 1; }
#lono-viewer .viewer-thumbs img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Nosotros ---------- */
/* Nosotros: un mismo respiro entre todas las secciones, y la foto de Daniela
   dimensionada para que su altura acompañe al texto. */

/* La columna de texto mide lo mismo que su renglón (46em) y el bloque foto+texto va centrado:
   así el aire a la izquierda y a la derecha es igual en cualquier pantalla. */
.founder { display: grid; grid-template-columns: clamp(300px, 31vw, 500px) minmax(0, calc(46 * var(--fs-text))); gap: clamp(32px, 6vw, 110px); align-items: center; justify-content: center; }
.founder .frame { aspect-ratio: 4 / 5; }
.founder .name { font-size: var(--fs-name); font-weight: 400; }
.founder .role { margin: 8px 0 clamp(24px, 2.6vw, 40px); }
/* Equipo: nombre y, debajo, su título (Lato, como el de Daniela) */
.team .team-caption { flex-direction: column; align-items: flex-start; gap: 4px; }
.team .team-role { margin: 0; }








.team { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.team .frame { aspect-ratio: 3 / 4; }

/* ---------- Contacto ---------- */
.contact { max-width: 880px; margin: 0 auto; padding: 0 var(--gutter); box-sizing: content-box; }
.form-note { font-size: var(--fs-micro); color: var(--navy-soft); margin: 0 0 14px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { grid-column: span 2; border: 1px solid var(--navy-line); padding: 12px 16px 10px; transition: border-color .25s; }
.field.half { grid-column: span 1; }
.field:focus-within { border-color: var(--navy); }
.field label { display: block; font-size: var(--fs-small); font-weight: 400; letter-spacing: .01em; }
.field label .req { color: var(--navy-soft); margin-left: 2px; }
.field input, .field select, .field textarea { width: 100%; border: 0; background: transparent; color: var(--navy); font: inherit; font-size: 1rem; font-weight: 300; padding: 6px 0 2px; outline: none; border-radius: 0; -webkit-appearance: none; appearance: none; }
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%230C1C33' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 2px center; }
.field textarea { min-height: 96px; resize: vertical; }
.field.is-hidden { display: none; }

/* Selector y calendario con colores de marca (solo con mouse/trackpad) */
.field.has-picker { position: relative; }
.native-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; opacity: 0; pointer-events: none; }
.picker-btn { display: block; width: 100%; text-align: left; border: 0; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%230C1C33' fill='none'/%3E%3C/svg%3E") no-repeat right 2px center; color: var(--navy); font: inherit; font-size: 1rem; font-weight: 300; padding: 6px 24px 2px 0; cursor: pointer; outline: none; }
.picker-btn.is-placeholder, .field input::placeholder { color: rgba(11, 29, 50, .55); }
.picker-pop { position: absolute; z-index: 20; left: 15px; top: calc(100% - 4px); background: var(--lino); box-shadow: 0 8px 28px rgba(12, 28, 51, .14), 0 0 0 1px rgba(12, 28, 51, .06); border-radius: 4px; }
.picker-pop[hidden] { display: none; }
.picker-list { right: 15px; margin: 0; padding: 8px 0; list-style: none; }
.picker-list li { padding: 8px 14px; font-size: var(--fs-small); font-weight: 400; cursor: pointer; }
.picker-list li.is-active { background: var(--arena); }
.picker-list li[aria-selected="true"] { font-weight: 700; }
.picker-cal { width: 304px; padding: 14px 14px 12px; font-size: var(--fs-small); }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-title { font-weight: 700; letter-spacing: .02em; }
.cal-nav { width: 28px; height: 28px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; color: var(--navy); }
.cal-nav svg { width: 7px; height: 9px; fill: currentColor; }
.cal-nav:disabled { opacity: .25; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.cal-dow span { font-size: .6875rem; color: var(--navy-soft); padding-bottom: 8px; }
.cal-days button { height: 30px; margin: 1px; border: 0; border-radius: 50%; background: none; font: inherit; font-weight: 400; color: var(--navy); cursor: pointer; }
.cal-days button:hover:not(:disabled) { background: var(--arena); }
.cal-days button.is-today { font-weight: 700; }
.cal-days button.is-picked { background: var(--navy); color: var(--lino); }
.cal-days button:disabled { color: rgba(12, 28, 51, .25); cursor: default; }
.field input[inputmode="none"] { cursor: pointer; caret-color: transparent; }
.submit-row { display: flex; justify-content: flex-end; margin-top: 28px; }
.submit-btn { font-family: var(--display); font-size: clamp(1.25rem, 1.1rem + .5vw, 1.5rem); font-weight: 400; padding: 8px 0; border-bottom: 1px solid var(--navy); }
.form-success { display: none; max-width: 792px; margin: 0 auto; padding: 24px 0 40px; text-align: left; outline: none; }
.form-success.is-visible { display: block; }
.form-success p { margin: 0; }
.form-success a { text-decoration: underline; text-decoration-color: var(--navy-line); text-decoration-thickness: 1px; text-underline-offset: .22em; transition: text-decoration-color .2s; }
.form-success a:hover { text-decoration-color: var(--navy); }

.ok-info { display: grid; grid-template-columns: 1fr auto; gap: 24px 48px; align-items: end; margin-top: clamp(40px, 4vw, 56px); padding: clamp(28px, 3vw, 40px) 0; border-top: 1px solid var(--navy-line); border-bottom: 1px solid var(--navy-line); font-size: var(--fs-small); line-height: 1.7; }
.ok-contact p + p, .ok-social p + p { margin-top: 6px; }
.ok-social { text-align: right; }
.ok-tagline { margin-top: 18px !important; font-style: italic; font-weight: 400; font-size: calc(16px + .6 * var(--u)); color: var(--navy-soft); }
.ok-whatsapp { margin-top: 28px !important; font-size: var(--fs-small); }
.contact-head.is-done { display: none; }
@media (max-width: 767px) {
  .ok-info { grid-template-columns: 1fr; }
  .ok-social { text-align: left; }
}

/* ---------- Blog / Descargables ---------- */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(48px, 5vw, 72px) var(--gap); }
.posts .frame { aspect-ratio: 3 / 2; margin-bottom: 18px; }
.post-card { text-decoration: none; display: block; }
.post-card .meta { margin: 0 0 6px; }
.post-card .name { margin: 0; }
.post-card .t-note { margin: 10px 0 0; text-align: left; max-width: none; text-wrap: pretty; }
.post-card:hover .name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }

/* ---------- Footer ---------- */
.site-footer { padding: clamp(110px, 11vw, 180px) 0 36px; }
.site-footer .wrap { display: grid; grid-template-columns: 1fr auto; gap: 14px 64px; align-items: start; }
.footer-brand { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; padding-top: 2px; }
.footer-mark { width: 44px; height: 44px; color: var(--navy); }
.footer-mark svg { width: 100%; height: 100%; fill: currentColor; }
.footer-social { display: flex; gap: 0; }
.footer-social a { width: 36px; height: 36px; display: grid; place-items: center; color: var(--navy); }
.footer-social svg { width: 20px; height: 20px; fill: currentColor; }
.lang-switch { font-size: .8125rem; font-weight: 700; letter-spacing: .05em; padding: 6px 2px; margin-left: 12px; }
.footer-address { grid-column: 1; grid-row: 2; font-size: .75rem; font-weight: 400; line-height: 1.7; letter-spacing: .015em; margin-top: -40px; }
.footer-address a { text-decoration: none; }
.footer-address a:hover { text-decoration: underline; }
.footer-address a { text-decoration: none; }
.newsletter p { margin: 0 0 6px; font-size: var(--fs-small); font-weight: 400; }
.newsletter form { display: flex; width: min(360px, 100%); border-bottom: 1px solid var(--navy-line); transition: border-color .25s; }
.newsletter form:focus-within { border-color: var(--navy); }
.newsletter input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 1rem; color: var(--navy); padding: 10px 0; outline: none; }
.newsletter input::placeholder { color: var(--navy-soft); }
.newsletter button { width: 44px; display: grid; place-items: center; }
.newsletter button svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.2; }
.newsletter .ok { font-size: var(--fs-small); color: var(--navy-soft); margin-top: 8px; display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 767px) {
  :root { --header-h: 76px; }
  .main-nav { display: none; }
  .burger { display: block; }
  /* Menú mobile como en Squarespace: lista a la izquierda, Proyectos abre un submenú */
  .menu-panel { align-items: stretch; }
  .menu-panel .menu-top { display: flex; align-items: center; position: absolute; top: 0; left: 0; right: 0; height: var(--header-h); padding: 0 clamp(20px, 3.4vw, 64px); }
  .menu-panel .menu-close { top: calc((var(--header-h) - 34px) / 2); }
  .menu-panel nav { align-items: flex-start; gap: 6px; padding: 0 16vw; }
  .menu-panel nav a, .menu-panel .menu-to-sub, .menu-panel .menu-back { font-family: var(--display); font-weight: 400; font-size: 1.3rem; line-height: 1.3; letter-spacing: .02em; padding: 4px 0; }
  .menu-panel .menu-main { display: flex; }
  .menu-panel .menu-cats { display: none; }
  .menu-panel.is-sub .menu-main { display: none; }
  .menu-panel.is-sub .menu-cats { display: flex; }
  .menu-panel .menu-to-sub { display: inline-flex; align-items: center; gap: 12px; color: var(--navy); }
  .menu-panel .menu-to-sub svg, .menu-panel .menu-back svg { width: 8px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.2; }
  .menu-panel .menu-back { display: inline-flex; align-items: center; gap: 12px; color: var(--navy-soft); margin: 0 0 14px 12px; }
  .menu-panel .menu-heading { font-size: .8rem; margin: 0 0 4px; }
  .hero { height: calc(100vw * 1.25); }
  .featured { grid-template-columns: 1fr; gap: 40px; }
  .featured .frame { aspect-ratio: 3 / 2; max-height: none; }
  .reel .card { width: calc(100vw - 2 * var(--gutter) - 20px); }
  .reel .frame { height: auto; }
  .reel .frame { height: auto; aspect-ratio: 3 / 2; }
  .reel-arrow { display: none; }
  .reel { gap: 20px; }
  .project-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; gap: 32px; }
  .gallery .frame { aspect-ratio: var(--r, 1.5); }
  .founder { grid-template-columns: 1fr; }
  .team { grid-template-columns: 1fr 1fr; }
  .posts { grid-template-columns: 1fr; }
  .field.half { grid-column: span 2; }
  .site-footer .wrap { grid-template-columns: 1fr; align-items: start; }
  .newsletter form { width: 100%; }
}
@media (min-width: 768px) and (max-width: 1024px) {
  .posts { grid-template-columns: 1fr 1fr; }
}

/* Textos largos con estilo de declaración: un paso más chicos */

@media (max-width: 767px) {
  .team { grid-template-columns: 1fr; gap: 40px; }
}

/* Mobile: escala de Squarespace para celular */
@media (max-width: 767px) {
  :root { --u: 10px; --fs-title: calc(16px + 1 * var(--u)); --fs-statement: calc(16px + .4 * var(--u)); --fs-name: calc(16px + .4 * var(--u)); --fs-body: calc(16px + .2 * var(--u)); }
  /* Dirección debajo del newsletter, en una sola línea */
  .newsletter { grid-row: 2; }
  .footer-address { grid-row: 3; margin-top: 22px; white-space: nowrap; font-size: min(12px, 2.45vw); letter-spacing: 0; }
  /* Footer centrado en celular: todo nace del eje central */
  .site-footer .wrap { justify-items: center; text-align: center; }
  .newsletter { grid-row: 1 !important; }
  .footer-brand { grid-row: 2; justify-content: center; gap: 20px; margin-top: 40px; }
  .lang-switch { margin-left: 0; }
  .newsletter { width: 100%; max-width: 360px; }
  .newsletter form { margin: 0 auto; }
  .newsletter input { text-align: center; padding-left: 44px; }
  .footer-address { text-align: center; }
  /* Footer en celular: más separado del contenido y un poco más chico, para que no compita */
  .site-footer { padding-top: clamp(130px, 36vw, 170px); padding-bottom: 40px; }
  /* Más discreto: tono Graphite, tamaños menores y columna más angosta */
  .site-footer { color: var(--graphite); }
  .newsletter { max-width: 290px; }
  .newsletter p { font-size: .75rem; font-weight: 400; letter-spacing: .02em; color: var(--graphite); }
  .newsletter form { border-bottom-color: rgba(12, 28, 51, .16); }
  .newsletter input { font-size: .875rem; padding: 6px 0 6px 36px; }
  .newsletter button { width: 36px; color: var(--graphite); }
  .newsletter button svg { width: 14px; height: 14px; }
  .footer-brand { margin-top: 22px; gap: 14px; }
  .footer-mark { width: 30px; height: 30px; color: var(--graphite); }
  .footer-social a { width: 28px; height: 28px; color: var(--graphite); }
  .footer-social svg { width: 16px; height: 16px; }
  .lang-switch { font-size: .6875rem; color: var(--graphite); }
  .footer-address { margin-top: 10px; color: var(--graphite); font-size: min(11px, 2.3vw); }
  /* Compacto y siempre por encima de la barra de Safari en iPhone */
  .newsletter p { margin-bottom: 0; }
  .site-footer { padding-bottom: 52px; }
}

/* ---------- Descargables (acordeón) ---------- */
.downloads { max-width: 1000px; margin: 0 auto; padding: 0 var(--gutter); box-sizing: content-box; }
/* Descargables: el encabezado solo aparece si Daniela escribe algo en Sanity */
.desc-head:not(:has(> :not(:empty))) { display: none; }
#downloads { padding-top: calc(var(--header-h) + 92px); }
.desc-head:has(> :not(:empty)) ~ #downloads { padding-top: 0; }
.download { border-top: 1px solid rgba(12, 28, 51, .15); border-bottom: 1px solid rgba(12, 28, 51, .15); }
.download + .download { border-top: 0; }
.download-toggle { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 15px 0; text-align: left; }
.download-title { font-family: var(--display); font-weight: 400; font-size: calc(var(--fs-name) * 1.13); letter-spacing: -.02em; line-height: 1.08; margin: 0; }
.download-action { font-size: .9rem; letter-spacing: .02em; opacity: .75; white-space: nowrap; }
.download-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); }
.download.is-open .download-panel { grid-template-rows: 1fr; }
.download-panel > div { overflow: hidden; }
.download-form { max-width: 501px; margin: 0; padding: 32px 0 48px; }
.download-form .row2 { display: grid; grid-template-columns: 250px 1fr; gap: 12px; }
.line-field { display: block; margin-bottom: 20px; }
.line-field span { font-size: 1rem; }
.line-field small { font-size: .75rem; opacity: .7; margin-left: 6px; }
.line-field input { display: block; width: 100%; border: 0; border-bottom: 1px solid rgba(11, 29, 50, .55); background: transparent; font: inherit; font-size: var(--fs-body); color: var(--navy); padding: 6px 0; outline: none; border-radius: 0; }
.line-field input:focus { border-color: var(--navy); }
.check { display: flex; gap: 10px; align-items: center; font-size: .875rem; margin: 4px 0 26px; cursor: pointer; }
.check input { width: 15px; height: 15px; accent-color: var(--navy); }
.outline-btn { font-family: var(--display); font-size: 1rem; border: 1px solid var(--navy); padding: 20px 32px; transition: background .3s, color .3s; }
.outline-btn:hover { background: var(--navy); color: var(--lino); }
.download-done { display: none; padding: 32px 0 48px; }
.download-done a { font-family: var(--display); font-size: var(--fs-name); }
@media (max-width: 767px) { .download-form .row2 { grid-template-columns: 1fr; } }
.contact-head.is-done + .contact { padding-top: calc(var(--header-h) + clamp(72px, 8vw, 130px)); }

/* ==========================================================================
   SISTEMA EDITORIAL — la única fuente de verdad para textos y espacios.
   6 estilos de texto + 4 espacios. Cada página solo dice qué es cada texto
   (t-label, t-title, t-statement, t-note, t-body, name) y lo envuelve en .stack.
   Para ajustar el sitio entero se cambian solo estas variables.
   ========================================================================== */
:root {
  --edge: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); /* orilla del contenido aunque la pantalla sea más ancha que --max */
  --graphite: #444442;                 /* Graphite del manual de identidad: cuerpo de texto */
  --fs-note: calc(15px + .08 * var(--u));
  --fs-text: 16.5px;
  --measure-statement: 40em;           /* ~70–75 caracteres por línea */
  --measure-note: 50em;
  --measure-body: 38em;                /* ~70 caracteres, lectura cómoda */
  --s-1: clamp(12px, 1.1vw, 18px);     /* entre notas */
  --s-2: clamp(24px, 2.2vw, 34px);     /* dentro de un bloque: título → declaración → nota */
  --s-3: clamp(80px, 8vw, 128px);      /* entre secciones */
  --s-top: calc(var(--header-h) + clamp(80px, 8.5vw, 140px)); /* menú → primer texto */
}
.t-label { font-family: var(--display); font-weight: 600; font-size: var(--fs-title); line-height: 1.3; letter-spacing: .05em; margin: 0 auto; max-width: 22em; text-wrap: balance; }
.t-title { font-family: var(--display); font-weight: 400; font-size: var(--fs-title); line-height: 1.25; letter-spacing: .04em; margin: 0 auto; text-wrap: balance; }
.t-statement { font-family: var(--display); font-weight: 400; font-size: var(--fs-statement); line-height: 1.32; letter-spacing: .035em; margin: 0 auto; max-width: var(--measure-statement); text-wrap: balance; }
.t-note { font-weight: 300; font-size: var(--fs-note); line-height: 1.7; letter-spacing: .02em; color: var(--graphite); margin: 0 auto; max-width: var(--measure-note); text-wrap: balance; }
.t-lede { font-weight: 300; font-size: 22px; line-height: 1.5; letter-spacing: .015em; color: var(--graphite); margin: 0 auto; max-width: 1320px; text-wrap: pretty; }
@media (max-width: 767px) { .t-lede { font-size: calc(16px + .2 * var(--u)); text-wrap: balance; } }
/* ENCABEZADO DE PÁGINA (basado en el texto del home): frase en Black Mango (--fs-head)
   y debajo la entrada (t-lede), más ancha y pegada a la frase. Igual en todas las páginas. */
:root { --fs-head: 28px; }
@media (max-width: 767px) { :root { --fs-head: var(--fs-title); } }
.intro .t-title, .project-head > .t-title, .page-head > .t-statement, .page-head > .t-title { font-size: var(--fs-head); line-height: 1.3; letter-spacing: .04em; max-width: 46em; }
.stack > .t-lede { margin-top: clamp(2px, .25vw, 4px); }
/* En celular las frases largas de las páginas bajan un poco (la del home es corta y se queda). */
@media (max-width: 767px) { .page-head > .t-statement { font-size: 22px; } }
@media (min-width: 1024px) { .page-head > .t-lede { max-width: 50em; } }
.t-body { font-weight: 300; font-size: var(--fs-text); line-height: 1.8; letter-spacing: .02em; color: var(--graphite); margin: 0; max-width: var(--measure-body); text-wrap: pretty; }
.t-body strong, .t-note strong { font-weight: 400; color: var(--navy); }
.t-body + .t-body { margin-top: 1.5em; }
.bio-text > .t-body + .t-body { margin-top: 1.5em; }
.t-note a { color: var(--navy); }

/* Ritmo vertical dentro de un bloque */
.stack > * + * { margin-top: var(--s-2); }
.stack > .t-note + .t-note { margin-top: var(--s-1); }

/* Secciones */
.page-head { padding: var(--s-top) var(--gutter) var(--s-3); text-align: center; }
.intro { padding: var(--s-3) var(--gutter); text-align: center; }
.project-head { padding: clamp(64px, 7vw, 110px) var(--gutter) clamp(56px, 6vw, 96px); text-align: center; }
.philosophy { padding: var(--s-3) var(--gutter); text-align: center; }
.philosophy .t-body { max-width: 44em; margin-left: auto; margin-right: auto; }
.ok-message { max-width: none; }
.founder .t-body { max-width: 46em; }
/* Bio de Daniela justificada (como en Squarespace) con guiones automáticos en español:
   el guion parte palabras largas para que no se abran huecos entre palabras.
   Solo desde 1200px: en columnas más angostas se abren huecos y se queda alineada a la izquierda. */
@media (min-width: 1200px) {
  .founder .t-body { text-align: justify; -webkit-hyphens: auto; hyphens: auto; hyphenate-limit-chars: 7 3 3; text-wrap: wrap; }
}

/* Los cortes forzados del documento chocan con la medida editorial: las líneas
   se balancean solas (text-wrap: balance), así que se ocultan siempre. */
.br-d { display: none; }
/* Cortes del documento de Daniela: solo en pantallas anchas, donde caben las líneas completas. */
.br-l { display: none; }
.nw { white-space: nowrap; }
@media (min-width: 1280px) { .br-l { display: inline; } .t-lede:has(.br-l), .t-statement:has(.br-l) { max-width: none; text-wrap: wrap; } }

/* ---------- Blog (estructura de Squarespace) ---------- */
.blog-head { padding-bottom: clamp(48px, 5vw, 72px); }
.post-row { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 14px 0; border-top: 1px solid rgba(12, 28, 51, .15); text-decoration: none; transition: background-color .25s; }
.post-row:last-child { border-bottom: 1px solid rgba(12, 28, 51, .15); }
.post-row:hover { background: rgba(227, 225, 218, .6); }
.post-row .download-title { font-size: calc(var(--fs-name) * 1.3); }
.post-row-date { flex: none; font-size: var(--fs-micro); color: var(--graphite); }
.blog-empty { text-align: center; }

/* ---------- Post del blog ---------- */
.post { max-width: 1000px; margin: 0 auto; padding: var(--s-top) var(--gutter) 0; box-sizing: content-box; }
.post-date { margin: 0 0 clamp(14px, 1.4vw, 20px); font-size: var(--fs-small); font-weight: 300; letter-spacing: .02em; color: var(--graphite); }
.post-title { font-family: var(--display); font-weight: 400; font-size: var(--fs-title); line-height: 1.3; letter-spacing: .04em; margin: 0 0 clamp(28px, 3vw, 44px); text-wrap: balance; }
.post-body { font-weight: 300; font-size: var(--fs-body); line-height: 1.6; letter-spacing: .02em; color: var(--graphite); }
.post-body p { margin: 0; }
/* Espacio de fábrica entre párrafos (se cambia en Blog → Párrafos · estilo → Espacio entre párrafos) */
.post-body p + p { margin-top: .8em; }
.post-body > * + * { margin-top: 1em; }
.post-body strong { font-weight: 400; color: var(--navy); }
.post-body h2 { font-family: var(--display); font-weight: 400; font-size: calc(var(--fs-statement) * .9); line-height: 1.32; letter-spacing: .035em; color: var(--navy); margin-top: 1.8em; }
.post-body h3 { font-family: var(--display); font-weight: 400; font-size: var(--fs-name); line-height: 1.3; letter-spacing: .04em; color: var(--navy); margin-top: 1.6em; }
.post-body blockquote { font-family: var(--display); font-size: var(--fs-statement); line-height: 1.4; letter-spacing: .03em; color: var(--navy); margin: 1.6em 0; padding-left: 24px; border-left: 1px solid var(--navy-line); }
.post-body ul, .post-body ol { padding-left: 1.2em; }
.post-body a { color: var(--navy); }
.post-figure { margin: 1.6em 0; }
.post-figure img { display: block; width: 100%; height: auto; }
.post-figure figcaption { font-size: var(--fs-small); margin-top: 10px; }
.post-back { margin: var(--s-3) 0 0; font-size: var(--fs-small); }
.post-back a { text-decoration: none; }
.download .t-note { margin: 0 0 18px; max-width: 46em; text-align: left; text-wrap: pretty; }
.download-done .t-note { margin-bottom: 10px; }
/* Calendario y selector cómodos para el dedo en celular */
@media (max-width: 767px) {
  .picker-cal { width: auto; right: 15px; }
  .cal-days button { height: 38px; }
  .picker-list li { padding: 12px 16px; font-size: .9375rem; }
}

/* Footer en escritorio: la fila del logo e íconos alineada con el título del newsletter,
   y la dirección alineada con la línea del campo de correo. */
@media (min-width: 768px) {
  .site-footer .wrap { grid-template-columns: 1fr minmax(0, 360px); grid-template-rows: auto auto auto; row-gap: 0; align-items: center; }
  .newsletter { display: contents; }
  .newsletter > p:first-child { grid-column: 2; grid-row: 1; margin: 0; }
  .newsletter form { grid-column: 2; grid-row: 2; align-self: end; width: 100%; margin-top: 4px; }
  .newsletter .ok { grid-column: 2; grid-row: 3; }
  .footer-brand { grid-column: 1; grid-row: 1; padding-top: 0; }
  .footer-address { grid-column: 1; grid-row: 2; align-self: end; margin: 0; line-height: 1.2; }
}


/* Filosofía: centrada, título pegado a la cita y cita a lo ancho (2 líneas en desktop, como el documento). */
.philosophy.stack > .philosophy-text { margin-top: clamp(10px, 1vw, 16px); }
/* Título de página ("PROYECTOS RESIDENCIALES") → frase: misma cercanía que Filosofía → texto */
.page-head.stack > .t-label + * { margin-top: clamp(10px, 1vw, 16px); }
@media (min-width: 1024px) { .philosophy .t-body { max-width: 1296px; text-wrap: balance; } }

/* Celular, criterio editorial:
   - Los textos no tocan la orilla: margen de texto de 32px (la foto sigue a 20px).
   - Párrafos justificados SIN partir palabras, en un tamaño que da ~40–45 letras por renglón
     para que los espacios entre palabras se vean parejos. El último renglón no queda huérfano.
   - Un párrafo de 3 renglones o menos no se justifica (se abrirían huecos): .is-short, lo pone js/i18n.js.
   - Las frases en Black Mango van centradas y balanceadas (renglones de largo similar). */
@media (max-width: 767px) {
  :root { --text-inset: 32px; }
  .page-head, .intro, .philosophy { padding-left: var(--text-inset); padding-right: var(--text-inset); }
  .founder .bio { padding: 0 calc(var(--text-inset) - var(--gutter)); }
  .post { padding-left: var(--text-inset); padding-right: var(--text-inset); }
  /* El blog no se justifica en celular: sigue la alineación que elijan en Sanity (columna angosta = huecos) */
  .t-lede, .t-note, .t-body {
    text-align: justify; -webkit-hyphens: manual; hyphens: manual; text-wrap: pretty;
    letter-spacing: calc(.01em + var(--track, 0em));
  }
  .t-lede { font-size: 15px; line-height: 1.6; }
  .t-body { font-size: 15px; }
  .page-head > .t-lede, .intro > .t-lede, .philosophy .t-body, .blog-empty { text-align-last: center; }
  .t-statement, .intro .t-title, .page-head > .t-title { text-wrap: balance; -webkit-hyphens: manual; hyphens: manual; }
  .nw { white-space: normal; }
  .intro .t-title, .project-head > .t-title { font-size: 23px; }
  .is-short { text-align: inherit; text-wrap: balance; }
}

/* Nosotros en iPad: la foto arriba con el texto y más grande; en iPad vertical va encima del texto. */
@media (min-width: 900px) and (max-width: 1199px) {
  .founder { grid-template-columns: 38vw minmax(0, calc(46 * var(--fs-text))); align-items: start; }
}
@media (min-width: 768px) and (max-width: 899px) {
  .founder { grid-template-columns: minmax(0, calc(46 * var(--fs-text))); }
  .founder .frame { width: min(100%, 440px); }
}

/* Visor con el celular acostado (pantallas bajitas): la foto ocupa casi todo el alto.
   Contador y cerrar arriba en las esquinas, flechas a los lados, sin tira de miniaturas. */
@media (max-height: 520px) {
  #lono-viewer { grid-template-rows: 1fr; }
  #lono-viewer .viewer-bar { position: absolute; inset: 0 0 auto 0; z-index: 2; padding: 10px max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); }
  #lono-viewer .viewer-stage { grid-row: 1; padding: 0; }
  #lono-viewer .viewer-stage img { inset: 44px 64px 12px; width: calc(100% - 128px); height: calc(100% - 56px); }
  #lono-viewer .viewer-caption { position: absolute; inset: 0; z-index: 1; justify-content: space-between; padding: 0 max(12px, env(safe-area-inset-left)); pointer-events: none; }
  #lono-viewer .viewer-caption .viewer-nav { pointer-events: auto; background: rgba(237, 236, 230, .8); }
  #lono-viewer .viewer-caption .label, #lono-viewer .viewer-thumbs { display: none; }
}
/* Footer escritorio más compacto (como Squarespace): campo de correo más bajito
   y la dirección pegada a la fila de íconos. */
@media (min-width: 768px) {
  .newsletter input { padding: 4px 0; }
  .newsletter form { margin-top: 2px; }
  .footer-address { align-self: center; margin: 0; }
}

/* ==========================================================================
   ESTILO DE TEXTOS DESDE SANITY (Textos del sitio → "Estilo" de cada texto)
   Opciones cerradas: tamaño, peso y ancho. Todo es relativo al estilo base de
   cada texto, así cualquier combinación se ve bien en computadora, iPad y celular.
   ========================================================================== */
.tx { display: block; font-size: var(--fs-d, 1em); font-weight: var(--peso, inherit); }
@media (min-width: 768px) and (max-width: 1023px) { .tx { font-size: var(--fs-t, 1em); } }
@media (max-width: 767px) { .tx { font-size: var(--fs-m, 1em); } }
[data-ancho="angosto"] { max-width: 32em !important; margin-left: auto; margin-right: auto; }
[data-ancho="ancho"] { max-width: none !important; }
/* Espacio arriba elegido en Sanity */
[data-esp] { margin-top: var(--esp-d) !important; }
@media (max-width: 767px) { [data-esp] { margin-top: var(--esp-m) !important; } }
/* Tipografía elegida en Sanity */
[data-fuente="mango"], [data-fuente="mango"] .tx, [data-fuente="mango"] p { font-family: 'Black Mango', serif !important; }
[data-fuente="lato"], [data-fuente="lato"] .tx, [data-fuente="lato"] p { font-family: 'Lato', sans-serif !important; }
/* Interlineado y espacio entre párrafos elegidos en Sanity */
[data-lh], [data-lh] .tx, [data-lh] p { line-height: var(--lh) !important; }
[data-par] p + p { margin-top: var(--par) !important; }
/* Mayúsculas elegidas en Sanity */
[data-mayus="normal"], [data-mayus="normal"] .tx { text-transform: none !important; }
[data-mayus="mayus"], [data-mayus="mayus"] .tx { text-transform: uppercase !important; }
/* Alineación elegida en Sanity (también en celular) */
[data-alinea="izquierda"], [data-alinea="izquierda"] p, [data-alinea="izquierda"] .tx { text-align: left !important; text-align-last: auto !important; }
[data-alinea="centro"], [data-alinea="centro"] p, [data-alinea="centro"] .tx { text-align: center !important; text-align-last: center !important; }
[data-alinea="derecha"], [data-alinea="derecha"] p, [data-alinea="derecha"] .tx { text-align: right !important; text-align-last: right !important; }
[data-alinea="justificado"], [data-alinea="justificado"] p, [data-alinea="justificado"] .tx { text-align: justify !important; text-align-last: left !important; }
/* Ficha (Alcance, Programa…) y texto de cada proyecto: debajo del nombre, antes de las fotos */
.project-head > .project-ficha, .project-head > .project-desc { max-width: calc(56 * var(--fs-text)); margin-left: auto; margin-right: auto; margin-top: clamp(36px, 4vw, 56px); }
.project-head > .project-ficha + .project-desc { margin-top: clamp(28px, 3vw, 44px); }
.project-ficha p.spec { margin: 0; max-width: none; text-align: justify; text-align-last: left; -webkit-hyphens: auto; hyphens: auto; hyphenate-limit-chars: 7 3 3; text-wrap: wrap; }
/* renglones cortos (3 o menos, lo marca js/i18n.js en celular): sin justificar para que no se abran huecos */
.project-ficha p.spec.is-short { text-align: left; }
.project-ficha p.spec + p.spec { margin-top: 1.1em; }
.project-ficha .spec-label { display: block; margin-bottom: .15em; font-size: .78em; letter-spacing: .16em; color: var(--navy); font-weight: 400; }
.project-ficha .spec-texto { display: block; }
/* Relato del proyecto: justificado (como la bio), con guiones para que no se abran huecos */
.project-head > .project-desc p { margin: 0; max-width: none; text-align: justify; text-align-last: left; -webkit-hyphens: auto; hyphens: auto; hyphenate-limit-chars: 7 3 3; text-wrap: wrap; }
.project-head > .project-desc p + p { margin-top: .9em; }
.project-head > #project-sup { margin-top: clamp(0px, .2vw, 2px); }
/* Celular: ficha y texto alineados a la orilla del texto, justificados (sin centrar) */
@media (max-width: 767px) {
  .project-head > .project-ficha, .project-head > .project-desc { padding: 0 calc(var(--text-inset, 32px) - var(--gutter)); text-align: left; }
}
/* Computadora: ficha y texto ocupan exactamente el ancho de la foto de la izquierda y arrancan
   en su misma orilla. Solo título, ubicación y superficie quedan centrados. */
@media (min-width: 1024px) {
  .project-head { --col: min(100%, var(--max) - 2 * var(--gutter)); }
  .project-head > .project-ficha, .project-head > .project-desc { max-width: none; width: calc((var(--col) - 48px) / 2); margin-left: calc((100% - var(--col)) / 2); margin-right: 0; text-align: left; }
}
/* Alineación elegida para un renglón de la ficha */
.project-ficha p.spec[data-alinea="izquierda"] { text-align: left !important; text-align-last: auto !important; }
/* Siguiente / anterior proyecto (como una revista: abajo, la flecha sola a la izquierda y el texto a la derecha) */
.proj-nav { display: flex; justify-content: space-between; align-items: center; padding-top: clamp(48px, 6vw, 96px); padding-bottom: clamp(24px, 3vw, 48px); }
.proj-nav[hidden] { display: none; }
.proj-nav a { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; color: var(--navy); font-family: var(--display); font-weight: 400; font-size: clamp(1.1rem, 1rem + .4vw, 1.4rem); letter-spacing: .03em; padding: 12px 0; }
.proj-nav svg { width: 26px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.1; transition: transform .3s var(--ease); flex: none; }
.proj-nav .proj-prev:hover svg { transform: translateX(-5px); }
.proj-nav .proj-next:hover svg { transform: translateX(5px); }
.proj-nav .proj-prev { padding-right: 24px; }
/* Textos con varios párrafos (biografía): el tamaño y grosor elegidos llegan a cada párrafo */
[data-fs] .tx p { font-size: inherit; }
[data-peso] .tx p { font-weight: inherit; }

/* ---------- Agregados (Sanity) ---------- */
/* En inglés el texto espera a estar traducido (lo pone un script en <head>, máx. 2 s) */
.lono-en [data-i18n], .lono-en [data-i18n-html] { visibility: hidden; }
/* Equipo: personas por renglón elegidas en Sanity (computadora) */
@media (min-width: 1024px) { .team { grid-template-columns: repeat(var(--cols, 3), 1fr); } }
/* Aviso de privacidad debajo de los formularios */
.form-aviso { font-size: var(--fs-micro, .7rem); color: var(--navy-soft); margin: 12px 0 0; line-height: 1.5; }
.form-aviso a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.contact .form-aviso { text-align: right; margin-top: 14px; }
.newsletter .form-aviso { margin-top: 8px; max-width: 360px; font-size: .75rem; }
.footer-legal { margin: 0; font-size: .75rem; letter-spacing: .015em; color: var(--navy-soft); }
.footer-legal a { color: inherit; }
@media (min-width: 768px) {
  .footer-legal { grid-column: 1; grid-row: 3; align-self: start; margin-top: 10px; }
  .newsletter .form-aviso { grid-column: 2; grid-row: 3; align-self: start; margin-top: 10px; }
  .newsletter .ok { grid-row: 4; }
}
@media (max-width: 767px) {
  .footer-legal { grid-row: 4; margin-top: 8px; font-size: min(10.5px, 2.2vw); color: var(--graphite); }
  .newsletter .form-aviso { font-size: min(10.5px, 2.2vw); text-align: center; margin: 8px auto 0; color: var(--graphite); }
}
.footer-legal a { text-decoration: none; }
.footer-legal a:hover { text-decoration: underline; }
/* Barra de celular apagada en Sanity */
.wa-bar[hidden] { display: none !important; }
@media (max-width: 767px) { body.sin-barra, body:has(> .wa-bar[hidden]) { padding-bottom: 0 !important; } }
/* Blog: renglón vacío = espacio; alineación por párrafo */
.post-body p.vacio { margin: 0; line-height: 1 !important; }
.post-body p[data-alinea-p="center"] { text-align: center !important; text-align-last: auto !important; }
.post-body p[data-alinea-p="right"] { text-align: right !important; text-align-last: auto !important; }
.post-body p[data-alinea-p="justify"] { text-align: justify !important; text-align-last: left !important; -webkit-hyphens: auto; hyphens: auto; }
.post-body p[data-alinea-p="left"] { text-align: left !important; text-align-last: auto !important; }
/* Páginas legales */
.legal .post-body h2 { margin-top: 2em; }
.legal .post-date:empty { display: none; }

/* Mayúsculas del diseño original. Con todo precargado en Sanity (html.cms-literal) los textos salen
   exactamente como se escriben, así que ya vienen en mayúsculas desde Sanity. */
html:not(.cms-literal) .t-label, html:not(.cms-literal) .project-ficha .spec-label, html:not(.cms-literal) .menu-panel .menu-heading { text-transform: uppercase; }
/* Menú de proyectos: las categorías (que llegan de Sanity) van una debajo de otra */
.menu-cat-links { display: contents; }
/* Justificado elegido en Sanity: los párrafos cortos en celular (3 renglones o menos) no se justifican, para que no se abran huecos */
[data-alinea="justificado"] .is-short, .is-short[data-alinea="justificado"] { text-align: left !important; }
/* Espacio entre letras y color elegidos en Sanity */
[data-ls], [data-ls] .tx { letter-spacing: var(--ls) !important; }
[data-color], [data-color] .tx { color: var(--color) !important; }
/* Preguntas extra del formulario (se agregan desde Sanity) */
.extras { display: contents; }
[data-fuente="propia"], [data-fuente="propia"] .tx, [data-fuente="propia"] p { font-family: var(--fuente) !important; }

/* ---------- Aviso de cookies (barra abajo, discreta) ---------- */
.cookie-bar {
  position: fixed; left: 24px; right: 24px; bottom: 24px; z-index: 60; margin: 0 auto; max-width: 980px;
  display: flex; align-items: center; gap: 24px 32px; padding: 18px 24px;
  background: var(--lino); color: var(--navy); border: 1px solid var(--navy-line);
  box-shadow: 0 8px 30px rgba(12, 28, 51, .10);
  font-family: var(--text); font-size: var(--fs-small); line-height: 1.5;
}
.cookie-bar[hidden] { display: none; }
.cookie-bar p { margin: 0; flex: 1; }
.cookie-bar a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.cookie-bar-botones { display: flex; gap: 10px; flex: none; }
.cookie-bar button {
  min-width: 150px; padding: 11px 18px; font: inherit; font-size: var(--fs-micro); letter-spacing: .08em; text-transform: uppercase;
  border: 1px solid var(--navy); background: transparent; color: var(--navy); cursor: pointer; transition: background .2s, color .2s;
}
.cookie-bar button:hover, .cookie-bar button:focus-visible { background: var(--navy); color: var(--lino); }
.footer-legal button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: inherit; letter-spacing: inherit; text-transform: inherit; }
.footer-legal button:hover { text-decoration: underline; }
@media (max-width: 767px) {
  .cookie-bar { left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); flex-direction: column; align-items: stretch; gap: 14px; padding: 16px; }
  body:has(> .wa-bar[hidden]) .cookie-bar, body.sin-barra .cookie-bar, body.menu-open .cookie-bar { bottom: calc(12px + env(safe-area-inset-bottom)); }
  .cookie-bar-botones button { flex: 1; min-width: 0; padding: 12px 8px; }
}
