/* ==========================================================================
   IBAC — Arquitectura y Construcción
   Sistema visual: editorial cálido + material "glass" estilo Apple
   ========================================================================== */

/* Tipografías alojadas localmente (sin transferencia de datos a terceros) */
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/inter-tight-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/inter-tight-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/inter-tight-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/instrument-serif-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/instrument-serif-latin-400-italic.woff2") format("woff2"); }

:root {
  /* Color */
  --ink: #141416;
  --ink-2: #2a2b2f;
  --muted: #6b6a66;
  --line: rgba(20, 20, 22, .10);
  --paper: #f6f4f0;
  --paper-2: #ece7df;
  --sand: #d9cfbf;
  --white: #ffffff;
  --brand: #f9b216;          /* ámbar del logotipo IBAC */
  --brand-ink: #3a2a00;
  --wa: #25d366;

  /* Glass */
  --glass-light: rgba(255, 255, 255, .58);
  --glass-light-strong: rgba(255, 255, 255, .74);
  --glass-dark: rgba(24, 24, 27, .42);
  --glass-dark-strong: rgba(18, 18, 20, .62);
  --glass-border: rgba(255, 255, 255, .42);
  --glass-border-dark: rgba(255, 255, 255, .16);
  --glass-blur: saturate(180%) blur(22px);
  --glass-shadow: 0 1px 0 rgba(255,255,255,.45) inset, 0 18px 50px -18px rgba(20, 20, 22, .35);

  /* Type */
  --font: "Inter Tight", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;

  /* Layout */
  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1320px;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
section[id] { scroll-margin-top: 84px; }

[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; transition: top .2s; }
.skip-link:focus { top: 12px; }

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

/* ---------- Type ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--brand); transform: rotate(45deg); }
.on-dark .eyebrow { color: rgba(255,255,255,.72); }

.h-display {
  font-size: clamp(42px, 6.4vw, 92px);
  line-height: .98; letter-spacing: -.035em; font-weight: 600; margin: 0;
}
.h-section {
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.02; letter-spacing: -.03em; font-weight: 600; margin: 0;
}
.h-card { font-size: clamp(22px, 2.2vw, 28px); line-height: 1.1; letter-spacing: -.02em; font-weight: 600; margin: 0; }
.serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
.lead { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; color: var(--ink-2); max-width: 58ch; }
.on-dark .lead { color: rgba(255,255,255,.82); }
p { margin: 0 0 1em; }

/* ---------- Glass primitives ---------- */
.glass {
  background: var(--glass-light);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}
.glass-dark {
  background: var(--glass-dark);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border-dark);
  box-shadow: 0 1px 0 rgba(255,255,255,.14) inset, 0 20px 60px -20px rgba(0,0,0,.55);
  color: #fff;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: rgba(255,255,255,.92); }
  .glass-dark { background: rgba(20,20,22,.86); }
}

/* ---------- Buttons ---------- */
.btn {
  --h: 52px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--h); padding: 0 24px; border-radius: 999px; border: 1px solid transparent;
  font-size: 16px; font-weight: 500; letter-spacing: -.005em; white-space: nowrap;
  cursor: pointer; transition: transform .35s var(--ease), background-color .25s, color .25s, box-shadow .35s var(--ease), border-color .25s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-primary { background: var(--brand); color: var(--ink); box-shadow: 0 10px 30px -10px rgba(249,178,22,.65), 0 1px 0 rgba(255,255,255,.5) inset; }
.btn-primary:hover { background: #ffc23d; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-glass {
  color: #fff; background: rgba(255,255,255,.16);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border-color: rgba(255,255,255,.38); box-shadow: 0 1px 0 rgba(255,255,255,.35) inset;
}
.btn-glass:hover { background: rgba(255,255,255,.26); }
.btn-glass-light { color: var(--ink); background: var(--glass-light); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border-color: var(--glass-border); box-shadow: var(--glass-shadow); }
.btn-wa { background: var(--wa); color: #06331a; box-shadow: 0 10px 30px -12px rgba(37,211,102,.7), 0 1px 0 rgba(255,255,255,.45) inset; }
.btn-wa:hover { background: #33e077; }
.btn-sm { --h: 42px; padding: 0 18px; font-size: 15px; }

.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.link-arrow svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: fixed; inset: 12px 0 auto; z-index: 100;
  padding-inline: var(--gutter);
  pointer-events: none;
}
.nav-shell {
  pointer-events: auto;
  max-width: var(--maxw); margin: 0 auto;
  height: 64px; padding: 0 10px 0 22px; border-radius: 999px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  color: #fff;
  background: rgba(20,20,22,.18);
  -webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px);
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: 0 1px 0 rgba(255,255,255,.22) inset;
  transition: background-color .4s var(--ease), color .4s var(--ease), border-color .4s, box-shadow .4s, height .4s var(--ease);
}
.site-header.is-scrolled .nav-shell {
  color: var(--ink);
  background: rgba(250,248,245,.68);
  border-color: rgba(255,255,255,.65);
  box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 12px 40px -18px rgba(20,20,22,.35);
}
.brand { display: flex; align-items: center; height: 100%; }
.brand svg { height: 40px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 9px 14px; border-radius: 999px; font-size: 15px; font-weight: 500; opacity: .86;
  transition: background-color .25s, opacity .25s;
}
.nav-links a:hover, .nav-links a.is-active { opacity: 1; background: rgba(255,255,255,.16); }
.site-header.is-scrolled .nav-links a:hover, .site-header.is-scrolled .nav-links a.is-active { background: rgba(20,20,22,.06); }
.nav-cta { display: flex; align-items: center; gap: 8px; }
.menu-toggle {
  display: none; width: 46px; height: 46px; border-radius: 50%; border: 0; background: transparent; cursor: pointer;
  align-items: center; justify-content: center;
}
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
  display: block; width: 20px; height: 1.6px; background: currentColor; border-radius: 2px; position: relative; transition: transform .35s var(--ease), background-color .2s;
}
.menu-toggle span::before, .menu-toggle span::after { content: ""; position: absolute; left: 0; }
.menu-toggle span::before { top: -6px; }
.menu-toggle span::after { top: 6px; }
.menu-open .menu-toggle span { background: transparent; }
.menu-open .menu-toggle span::before { transform: translateY(6px) rotate(45deg); }
.menu-open .menu-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 90;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 96px var(--gutter) calc(28px + env(safe-area-inset-bottom));
  background: rgba(14,14,16,.55);
  -webkit-backdrop-filter: saturate(160%) blur(28px); backdrop-filter: saturate(160%) blur(28px);
  color: #fff;
  opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility .35s;
}
.menu-open .mobile-menu { opacity: 1; visibility: visible; }
.mobile-menu ul { list-style: none; margin: 0 0 28px; padding: 0; }
.mobile-menu li { overflow: hidden; border-bottom: 1px solid rgba(255,255,255,.12); }
.mobile-menu li a { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; font-size: 34px; font-weight: 600; letter-spacing: -.03em;
  transform: translateY(100%); transition: transform .6s var(--ease); }
.menu-open .mobile-menu li a { transform: none; }
.menu-open .mobile-menu li:nth-child(2) a { transition-delay: .04s; }
.menu-open .mobile-menu li:nth-child(3) a { transition-delay: .08s; }
.menu-open .mobile-menu li:nth-child(4) a { transition-delay: .12s; }
.menu-open .mobile-menu li:nth-child(5) a { transition-delay: .16s; }
.mobile-menu .btn { width: 100%; margin-top: 10px; }
.mobile-menu .mm-contact { margin-top: 18px; font-size: 15px; color: rgba(255,255,255,.7); display: grid; gap: 4px; }
.menu-open { overflow: hidden; }
.menu-open .site-header .nav-shell { color: #fff; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); box-shadow: none; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: flex-end;
  color: #fff; overflow: hidden; background: #0e1117;
}
.hero-media { position: absolute; inset: 0; }
.hero-media video, .hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(8,10,14,.45) 0%, rgba(8,10,14,0) 26%),
    linear-gradient(0deg, rgba(8,10,14,.82) 0%, rgba(8,10,14,.35) 38%, rgba(8,10,14,0) 62%);
}
.hero-inner { position: relative; width: 100%; padding-top: 140px; padding-bottom: clamp(28px, 5vw, 56px); }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 28px; align-items: end; }
.hero h1 { max-width: 17ch; text-wrap: balance; }
.hero h1 .serif { color: #fff; }
.hero .lead { margin: 22px 0 30px; max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-aside { display: none; }
.hero-tags {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 34px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.18);
  font-size: 14px; color: rgba(255,255,255,.8);
}
.hero-tags span { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.hero-card {
  border-radius: var(--radius-lg); padding: 20px 22px; max-width: 340px;
}
.hero-card .k { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.66); }
.hero-card .v { font-size: 19px; font-weight: 500; line-height: 1.3; margin-top: 6px; letter-spacing: -.01em; }
.hero-card .row { display: flex; align-items: center; gap: 12px; }
.hero-card .row + .row { margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.14); }
.hero-card .ico { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.14); }
.hero-card .ico svg { width: 20px; height: 20px; }
.scroll-cue { position: absolute; right: var(--gutter); bottom: 28px; display: none; align-items: center; gap: 10px; font-size: 13px; color: rgba(255,255,255,.7); letter-spacing: .08em; text-transform: uppercase; }
.scroll-cue i { width: 1px; height: 46px; background: linear-gradient(rgba(255,255,255,.8), transparent); animation: cue 2.2s var(--ease) infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
.video-toggle {
  position: absolute; right: var(--gutter); top: 96px; z-index: 2; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; color: #fff;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.video-toggle svg { width: 16px; height: 16px; }

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding: clamp(84px, 11vw, 160px) 0; position: relative; }
.section-head { display: grid; gap: 22px; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head .h-section { max-width: 16ch; text-wrap: balance; }
.section-head .lead { margin: 0; }

/* ---------- Intro / Nosotros ---------- */
.intro-grid { display: grid; gap: clamp(40px, 6vw, 88px); align-items: center; }
.intro-copy .h-section { margin: 18px 0 26px; text-wrap: balance; }
.intro-copy .lead { margin-bottom: 30px; }
.intro-points { list-style: none; padding: 0; margin: 0 0 34px; display: grid; gap: 12px; }
.intro-points li { display: flex; gap: 12px; align-items: baseline; font-size: 16px; color: var(--ink-2); }
.intro-points li::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); transform: translateY(-2px); }
.intro-visual { position: relative; padding-bottom: 24%; }
.intro-visual .img-main { position: relative; border-radius: var(--radius-xl); overflow: hidden; aspect-ratio: 16 / 10.5; }
.intro-visual .img-main { background: #2b2620; }
.intro-visual .img-main img, .intro-visual .img-main video { width: 100%; height: 100%; object-fit: cover; }
.intro-visual .img-float {
  position: absolute; right: -3%; bottom: 0; width: 46%; aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg); overflow: hidden; border: 6px solid var(--paper);
  box-shadow: 0 30px 60px -30px rgba(20,20,22,.5);
}
.intro-visual .img-float img { width: 100%; height: 100%; object-fit: cover; }
.intro-visual .badge {
  position: absolute; left: 16px; bottom: 16px; border-radius: 18px; padding: 14px 18px; display: flex; align-items: center; gap: 12px; max-width: 50%;
}
.intro-visual .badge svg { width: 34px; height: auto; flex: none; }
.intro-visual .badge strong { display: block; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.intro-visual .badge span { display: block; font-size: 13px; color: var(--muted); }

/* ---------- Services (bento) ---------- */
.services { background: var(--white); }
.bento { display: grid; gap: 14px; grid-template-columns: 1fr; }
.svc {
  position: relative; display: flex; align-items: flex-end;
  min-height: 420px; border-radius: var(--radius-xl); overflow: hidden; isolation: isolate;
  background: var(--paper-2); color: #fff;
}
.svc img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1.2s var(--ease); }
.svc::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(10,10,12,.55), rgba(10,10,12,0) 55%); }
.svc:hover img { transform: scale(1.045); }
.svc-panel {
  margin: 14px; padding: 20px 22px; border-radius: var(--radius-lg); width: calc(100% - 28px);
  display: grid; gap: 8px;
}
.svc-num { font-size: 12px; letter-spacing: .14em; color: rgba(255,255,255,.7); }
.svc-panel p { margin: 0; font-size: 15px; line-height: 1.5; color: rgba(255,255,255,.86); max-width: 46ch; }
.svc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.svc-actions .btn { --h: 38px; padding: 0 16px; font-size: 14px; }

/* ---------- Projects / Gallery ---------- */
.projects-head { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-end; justify-content: space-between; margin-bottom: 36px; }
.projects-head .h-section { margin-top: 18px; }
.segmented {
  display: flex; gap: 4px; padding: 5px; border-radius: 999px; overflow-x: auto; scrollbar-width: none; max-width: 100%;
}
.segmented::-webkit-scrollbar { display: none; }
.segmented button {
  flex: none; height: 40px; padding: 0 16px; border-radius: 999px; border: 0; background: transparent; cursor: pointer;
  font-size: 14px; font-weight: 500; color: var(--ink-2); transition: background-color .3s var(--ease), color .3s, box-shadow .3s;
}
.segmented button[aria-pressed="true"] { background: var(--ink); color: #fff; box-shadow: 0 6px 18px -8px rgba(0,0,0,.5); }
.segmented button:not([aria-pressed="true"]):hover { background: rgba(20,20,22,.06); }
.gallery { columns: 2; column-gap: 12px; }
.g-item {
  break-inside: avoid; margin: 0 0 12px; position: relative; border-radius: var(--radius-md); overflow: hidden; cursor: zoom-in; background: var(--paper-2);
  transition: opacity .45s var(--ease), transform .45s var(--ease);
}
.g-item button { all: unset; display: block; width: 100%; cursor: zoom-in; }
.g-item button:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.g-item img { width: 100%; transition: transform 1s var(--ease); }
.g-item:hover img { transform: scale(1.04); }
.g-item figcaption {
  position: absolute; left: 10px; right: 10px; bottom: 10px; padding: 9px 12px; border-radius: 12px; font-size: 13px; font-weight: 500;
  display: flex; justify-content: space-between; gap: 10px; align-items: center;
  opacity: 0; transform: translateY(8px); transition: opacity .35s var(--ease), transform .35s var(--ease); pointer-events: none;
}
.g-item figcaption small { font-weight: 400; color: rgba(255,255,255,.72); font-size: 12px; }
.g-item:hover figcaption, .g-item:focus-within figcaption { opacity: 1; transform: none; }
.g-item.is-hidden { display: none; }
.gallery-note { margin-top: 22px; font-size: 14px; color: var(--muted); }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 150; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; padding: 16px; height: 100dvh;
  background: rgba(10,10,12,.78); -webkit-backdrop-filter: blur(24px) saturate(140%); backdrop-filter: blur(24px) saturate(140%);
  color: #fff; opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), visibility .3s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lb-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.lb-count { font-size: 14px; color: rgba(255,255,255,.72); padding-left: 6px; }
.lb-stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 12px 0; }
.lb-stage img, .lb-stage video { max-width: 100%; max-height: calc(100dvh - 230px); width: auto; height: auto; object-fit: contain; border-radius: 14px; box-shadow: 0 40px 80px -30px rgba(0,0,0,.7); transition: opacity .25s; }
.lb-stage img.is-loading { opacity: .25; }
.lb-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.lb-caption { font-size: 15px; color: rgba(255,255,255,.86); }
.lb-btn { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: #fff;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); transition: background-color .2s; }
.lb-btn:hover { background: rgba(255,255,255,.24); }
.lb-btn svg { width: 20px; height: 20px; }
.lb-nav { display: flex; gap: 8px; }

/* ---------- Process (video bg) ---------- */
.process { color: #fff; background: #111214; overflow: hidden; }
.process-media { position: absolute; inset: 0; }
.process-media video, .process-media img { width: 100%; height: 100%; object-fit: cover; }
.process-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12,12,14,.78), rgba(12,12,14,.55) 40%, rgba(12,12,14,.82)); }
.process .container { position: relative; }
.steps { display: grid; gap: 14px; counter-reset: step; list-style: none; margin: 0; padding: 0; }
.step { border-radius: var(--radius-lg); padding: 26px 24px 28px; display: grid; gap: 12px; align-content: start; }
.step-top { display: flex; justify-content: space-between; align-items: center; }
.step-n { font-size: 13px; letter-spacing: .14em; color: var(--brand); font-weight: 600; }
.step-ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14); }
.step-ico svg { width: 22px; height: 22px; }
.step h3 { font-size: 22px; letter-spacing: -.02em; font-weight: 600; margin: 8px 0 0; line-height: 1.15; }
.step p { margin: 0; color: rgba(255,255,255,.78); font-size: 15.5px; }
.process-foot { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
.process-foot p { margin: 0; color: rgba(255,255,255,.75); max-width: 52ch; }

/* ---------- Value ---------- */
.value-grid { display: grid; gap: clamp(40px, 6vw, 80px); align-items: center; }
.value-visual { position: relative; border-radius: var(--radius-xl); overflow: hidden; aspect-ratio: 5 / 4; background: #1a1410; }
.value-visual img, .value-visual video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.value-visual .quote {
  position: absolute; left: 14px; right: 14px; bottom: 14px; border-radius: var(--radius-lg); padding: 20px 22px;
  font-size: 19px; line-height: 1.35; letter-spacing: -.01em;
}
.value-visual .quote .serif { font-size: 1.15em; }
.value-list { list-style: none; padding: 0; margin: 36px 0 0; display: grid; }
.value-list li { display: grid; grid-template-columns: 48px 1fr; gap: 18px; padding: 22px 0; border-top: 1px solid var(--line); align-items: start; }
.value-list li:last-child { border-bottom: 1px solid var(--line); }
.value-list .vi { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--white); border: 1px solid var(--line); }
.value-list .vi svg { width: 22px; height: 22px; color: var(--ink); }
.value-list h3 { margin: 2px 0 4px; font-size: 19px; font-weight: 600; letter-spacing: -.015em; }
.value-list p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* ---------- CTA (video bg) ---------- */
.cta { position: relative; color: #fff; overflow: hidden; background: #16110c; padding: clamp(110px, 14vw, 200px) 0; }
.cta-media { position: absolute; inset: 0; }
.cta-media video, .cta-media img { width: 100%; height: 100%; object-fit: cover; }
.cta-media::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(10,8,6,.35), rgba(10,8,6,.72)); }
.cta-panel { position: relative; max-width: 760px; margin: 0 auto; text-align: center; border-radius: 32px; padding: clamp(32px, 5vw, 56px) clamp(22px, 5vw, 56px); }
.cta-panel .h-section { max-width: none; margin: 16px auto 18px; }
.cta-panel .lead { margin: 0 auto 30px; }
.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* ---------- Contact ---------- */
.contact { background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%); overflow: hidden; }
.contact::before {
  content: ""; position: absolute; width: 60vw; max-width: 760px; aspect-ratio: 1; right: -18vw; top: 8%; border-radius: 50%;
  background: radial-gradient(circle, rgba(249,178,22,.22), rgba(249,178,22,0) 65%); pointer-events: none;
}
.contact-grid { display: grid; gap: 22px; position: relative; }
.contact-info .h-section { margin: 18px 0 20px; }
.contact-cards { display: grid; gap: 10px; margin-top: 32px; }
.c-card { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: var(--radius-md); transition: transform .3s var(--ease), background-color .3s; }
a.c-card:hover { transform: translateY(-2px); background: var(--glass-light-strong); }
.c-card .ci { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--ink); color: #fff; flex: none; }
.c-card .ci.wa { background: var(--wa); color: #06331a; }
.c-card .ci svg { width: 22px; height: 22px; }
.c-card small { display: block; color: var(--muted); font-size: 13px; }
.c-card strong { display: block; font-weight: 600; font-size: 17px; letter-spacing: -.01em; word-break: break-word; }

.form-card { border-radius: var(--radius-xl); padding: clamp(22px, 4vw, 40px); background: var(--glass-light-strong); }
.form-card h3 { margin: 0 0 4px; font-size: 24px; letter-spacing: -.02em; }
.form-card > p { color: var(--muted); font-size: 15px; margin-bottom: 24px; }
.form-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
.field { display: grid; gap: 7px; }
.field label { font-size: 14px; font-weight: 500; color: var(--ink-2); }
.field label .req { color: #b4540a; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 13px 16px; border-radius: 14px; font-size: 16px;
  background: rgba(255,255,255,.75); border: 1px solid rgba(20,20,22,.12); transition: border-color .2s, box-shadow .2s, background-color .2s; appearance: none; -webkit-appearance: none;
}
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23141416' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; padding-right: 44px; }
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); background: #fff; box-shadow: 0 0 0 4px rgba(249,178,22,.28); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: #c0392b; box-shadow: 0 0 0 4px rgba(192,57,43,.12); }
.field .err { font-size: 13px; color: #a5281b; min-height: 0; }
.field .err:empty { display: none; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form-consent { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.form-consent a { text-decoration: underline; text-underline-offset: 2px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 8px; }
.form-actions .btn { min-width: 210px; }
.btn .spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(20,20,22,.25); border-top-color: var(--ink); animation: spin .8s linear infinite; display: none; }
.is-sending .btn .spinner { display: inline-block; }
.is-sending .btn .btn-ico { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.form-status { display: none; margin-top: 16px; padding: 14px 16px; border-radius: 14px; font-size: 15px; line-height: 1.45; }
.form-status.is-success { display: block; background: rgba(37,211,102,.14); border: 1px solid rgba(37,160,80,.35); color: #0d4d25; }
.form-status.is-error { display: block; background: rgba(192,57,43,.08); border: 1px solid rgba(192,57,43,.3); color: #7d1e13; }
.form-status a { text-decoration: underline; font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { background: #0f0f11; color: rgba(255,255,255,.72); padding: 80px 0 calc(96px + env(safe-area-inset-bottom)); font-size: 15px; }
.footer-grid { display: grid; gap: 40px; }
.footer-brand svg { height: 56px; width: auto; margin-bottom: 18px; }
.footer-brand p { max-width: 38ch; }
.site-footer h4 { color: #fff; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; font-weight: 500; margin: 0 0 16px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-footer a:hover { color: #fff; }
.footer-bottom { margin-top: 56px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.1); display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: 13px; color: rgba(255,255,255,.5); }

/* ---------- WhatsApp float ---------- */
.wa-float {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 80;
  display: flex; align-items: center; gap: 10px; height: 60px; padding: 0 8px 0 8px; border-radius: 999px;
  background: rgba(255,255,255,.6); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255,255,255,.6); box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 18px 40px -14px rgba(0,0,0,.4);
  color: var(--ink); transition: transform .4s var(--ease), padding .4s var(--ease);
  transform: translateY(120px);
}
.wa-float.is-visible { transform: none; }
.wa-float .wa-ico { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--wa); color: #fff; flex: none; box-shadow: 0 6px 16px -6px rgba(37,211,102,.9); }
.wa-float .wa-ico svg { width: 24px; height: 24px; }
.wa-float .wa-label { font-size: 15px; font-weight: 600; letter-spacing: -.01em; padding-right: 12px; white-space: nowrap; display: none; }
.wa-float:hover { transform: translateY(-3px); }
.wa-float .pulse { position: absolute; left: 8px; top: 8px; width: 44px; height: 44px; border-radius: 50%; box-shadow: 0 0 0 0 rgba(37,211,102,.55); animation: pulse 2.6s infinite; pointer-events: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(37,211,102,.5); } 70% { box-shadow: 0 0 0 16px rgba(37,211,102,0); } 100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); } }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .reveal[data-delay="1"] { transition-delay: .08s; }
.js .reveal[data-delay="2"] { transition-delay: .16s; }
.js .reveal[data-delay="3"] { transition-delay: .24s; }

/* ==========================================================================
   Responsive (mobile-first → up)
   ========================================================================== */
@media (max-width: 959px) {
  .nav-links, .nav-cta .btn-quote { display: none; }
  .menu-toggle { display: inline-flex; }
  .nav-shell { height: 58px; padding: 0 6px 0 18px; }
  .brand svg { height: 34px; }
}
@media (min-width: 600px) {
  .gallery { columns: 2; column-gap: 14px; }
  .g-item { margin-bottom: 14px; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid .full { grid-column: 1 / -1; }
  .steps { grid-template-columns: 1fr 1fr; }
  .wa-float .wa-label { display: block; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 760px) {
  .bento { grid-template-columns: repeat(6, 1fr); gap: 16px; }
  .svc { min-height: 480px; }
  .svc:nth-child(1) { grid-column: span 4; }
  .svc:nth-child(2) { grid-column: span 2; }
  .svc:nth-child(3) { grid-column: span 2; }
  .svc:nth-child(4) { grid-column: span 4; }
  .svc:nth-child(5) { grid-column: span 3; }
  .svc:nth-child(6) { grid-column: span 3; }
  .svc-panel { width: auto; max-width: 520px; }
}
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1fr auto; gap: 48px; }
  .hero-aside { display: block; }
  .scroll-cue { display: flex; }
  .intro-grid { grid-template-columns: 1fr 1.05fr; }
  .gallery { columns: 3; }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .step { min-height: 250px; }
  .value-grid { grid-template-columns: 1fr 1.05fr; }
  .contact-grid { grid-template-columns: .85fr 1.15fr; gap: 56px; align-items: start; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .section-head.split { grid-template-columns: 1.1fr 1fr; align-items: end; }
}
@media (min-width: 1280px) {
  .gallery { columns: 4; }
  .gallery.cols-3 { columns: 3; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .wa-float .pulse { display: none; }
}

/* ---------- Páginas simples (legal / 404) ---------- */
.page-simple { background: var(--paper); }
.page-simple .site-header .nav-shell { color: var(--ink); }
.prose h2 { font-size: 22px; letter-spacing: -.02em; margin: 34px 0 10px; }
.prose p { color: var(--ink-2); }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 599px) {
  .intro-visual .badge { top: 12px; bottom: auto; left: 12px; padding: 10px 14px; max-width: 70%; }
  .intro-visual .img-float { right: -1%; width: 52%; border-width: 4px; }
  .intro-visual { padding-bottom: 28%; }
  .intro-visual .badge svg { width: 26px; }
}

/* ---------- Footer legal ---------- */
.footer-legal { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.link-btn:hover, .footer-legal a:hover { color: #fff; }
.page-simple .footer-legal a:hover, .page-simple .link-btn:hover { color: #fff; }
.gallery-empty { color: var(--muted); }

/* ---------- Tabla de cookies ---------- */
.table-wrap { overflow-x: auto; margin: 10px 0 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--white); }
.cookie-table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
.cookie-table th, .cookie-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.cookie-table th { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.cookie-table tr:last-child td { border-bottom: 0; }
.prose ul { padding-left: 20px; color: var(--ink-2); }
.prose li { margin-bottom: 6px; }

/* ---------- Consentimiento de cookies (glass) ---------- */
.cookie-banner {
  position: fixed; z-index: 120; left: max(16px, env(safe-area-inset-left)); bottom: max(16px, env(safe-area-inset-bottom));
  width: min(440px, calc(100vw - 32px)); padding: 22px 22px 18px; border-radius: 24px; color: var(--ink);
  background: rgba(250,248,245,.78); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  border: 1px solid rgba(255,255,255,.7); box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 30px 70px -24px rgba(0,0,0,.45);
  animation: ck-in .6s var(--ease) both;
}
.cookie-banner h2, .ckm-head h2 { font-size: 18px; letter-spacing: -.015em; margin: 0 0 8px; font-weight: 600; }
.cookie-banner p { font-size: 14.5px; line-height: 1.5; color: var(--ink-2); margin: 0 0 16px; }
.cookie-banner a, .ckm-intro a { text-decoration: underline; text-underline-offset: 2px; }
.ck-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ck-btn { --h: 42px; padding: 0 10px; background: rgba(20,20,22,.06); color: var(--ink); border-color: rgba(20,20,22,.08); }
.ck-btn:hover { background: rgba(20,20,22,.1); }
.ck-btn.ck-accept, .ck-btn[data-ck="reject"] { background: var(--ink); color: #fff; }
.ck-btn.ck-accept:hover, .ck-btn[data-ck="reject"]:hover { background: #000; }
@keyframes ck-in { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

.cookie-modal { position: fixed; inset: 0; z-index: 130; display: grid; place-items: center; padding: 16px;
  background: rgba(10,10,12,.45); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); opacity: 0; transition: opacity .3s var(--ease); }
.cookie-modal.is-open { opacity: 1; }
.ckm-panel { width: min(560px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; border-radius: 28px; padding: 24px;
  background: rgba(250,248,245,.9); -webkit-backdrop-filter: saturate(180%) blur(28px); backdrop-filter: saturate(180%) blur(28px);
  border: 1px solid rgba(255,255,255,.75); box-shadow: 0 40px 90px -30px rgba(0,0,0,.6); color: var(--ink); }
.ckm-head { display: flex; justify-content: space-between; align-items: center; }
.ckm-close { width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(20,20,22,.07); font-size: 22px; line-height: 1; cursor: pointer; color: var(--ink); }
.ckm-intro { font-size: 14.5px; color: var(--ink-2); margin: 4px 0 14px; }
.ckm-row { display: flex; gap: 16px; justify-content: space-between; align-items: center; padding: 14px 16px; margin-bottom: 8px; border-radius: 16px;
  background: rgba(255,255,255,.7); border: 1px solid var(--line); cursor: pointer; }
.ckm-row strong { display: block; font-size: 15.5px; font-weight: 600; }
.ckm-row span:not(.ck-switch) { display: block; font-size: 13.5px; color: var(--muted); line-height: 1.45; margin-top: 2px; }
.ckm-panel .ck-actions { margin-top: 16px; }
.ck-switch { position: relative; flex: none; width: 50px; height: 30px; }
.ck-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.ck-switch i { position: absolute; inset: 0; border-radius: 999px; background: rgba(20,20,22,.18); transition: background-color .25s; pointer-events: none; }
.ck-switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); transition: transform .25s var(--ease); }
.ck-switch input:checked + i { background: #34c759; }
.ck-switch input:checked + i::after { transform: translateX(20px); }
.ck-switch input:focus-visible + i { outline: 2px solid var(--brand); outline-offset: 2px; }
.ck-switch.is-locked i { opacity: .55; }
body.cookie-open .wa-float { opacity: 0; pointer-events: none; }
body.cookie-modal-open { overflow: hidden; }
@media (max-width: 480px) {
  .cookie-banner { left: 10px; right: 10px; bottom: 10px; width: auto; border-radius: 22px; padding: 18px; }
  .ck-actions { grid-template-columns: 1fr 1fr; }
  .ck-actions .ck-accept { grid-column: 1 / -1; order: -1; }
}

/* ---------- Galería: trabajos con varios archivos ---------- */
.g-badges { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; pointer-events: none; }
.g-badge { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: #fff;
  background: rgba(20,20,22,.42); -webkit-backdrop-filter: blur(12px) saturate(160%); backdrop-filter: blur(12px) saturate(160%); border: 1px solid rgba(255,255,255,.25); }
.g-badge svg { width: 14px; height: 14px; }
.g-badge.g-play { padding: 0; width: 28px; justify-content: center; }
.g-badge.g-play svg { width: 12px; height: 12px; margin-left: 2px; }
.lb-stage video { border-radius: 14px; background: #000; box-shadow: 0 40px 80px -30px rgba(0,0,0,.7); }
.lb-thumbs { display: flex; gap: 8px; justify-content: center; overflow-x: auto; padding: 4px 2px 12px; scrollbar-width: none; }
.lb-thumbs::-webkit-scrollbar { display: none; }
.lb-thumb { position: relative; flex: none; width: 76px; height: 54px; padding: 0; border-radius: 10px; overflow: hidden; cursor: pointer; opacity: .55;
  border: 2px solid transparent; background: #222; transition: opacity .2s, border-color .2s, transform .2s; }
.lb-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lb-thumb span { position: absolute; left: 0; right: 0; bottom: 0; font-size: 10px; font-weight: 600; color: #fff; padding: 2px 4px; background: linear-gradient(transparent, rgba(0,0,0,.75)); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-thumb.is-video::after { content: "▶"; position: absolute; top: 4px; right: 5px; font-size: 10px; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.lb-thumb:hover { opacity: .85; }
.lb-thumb.is-active { opacity: 1; border-color: var(--brand); }
