/* ============================================================
   PELTIER GROUP — base.css
   Editorial · dark · champagne gold · BOLD agency redesign
   ============================================================ */

:root {
  --bg:        #0E0E0E;
  --bg-2:      #151515;
  --bg-3:      #070707;
  --bg-soft:   #1b1b1b;
  --text:      #F4F1EA;
  --text-2:    #9d9a91;
  --text-3:    #8a877f;  /* AA contrast vs --bg (4.7:1) */
  --line:      #2a2a2a;
  --line-2:    #1c1c1c;

  --accent:    #A88C55;   /* champagne sobrio — tweakable */
  --accent-ink:#0E0E0E;   /* text on accent */
  --accent-2:  #0B4D78;   /* institutional blue, faint */

  --display-scale: 1;     /* tweakable headline multiplier */
  --motion: 1;            /* motion multiplier (set by tweaks) */

  --f-display: 'Archivo', system-ui, sans-serif;  /* default; swappable by tweaks */
  --f-sans:    'Inter', system-ui, sans-serif;
  --f-mono:    'IBM Plex Mono', ui-monospace, monospace;

  --container: 1340px;
  --gutter: clamp(20px, 4.5vw, 72px);
  --ease: cubic-bezier(.2,.7,.2,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
}

/* -------------------- reset -------------------- */
*,*::before,*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; margin: 0; }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* Accesibilidad — foco de teclado visible */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn:focus-visible, .filter:focus-visible, .nav a:focus-visible, .hshow-arrow:focus-visible,
.case-card:focus-visible, .hpanel:focus-visible, .eco-c:focus-visible, .product-card:focus-visible,
.mobile-menu a:focus-visible, #lbClose:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (prefers-reduced-motion: no-preference){ html { scroll-behavior: smooth; } }

.container {
  width: 100%; max-width: var(--container);
  margin: 0 auto; padding: 0 var(--gutter);
}
.skip { position: absolute; left: -9999px; top: 0; background: var(--text); color: var(--bg); padding: 12px 16px; z-index: 9999; }
.skip:focus { left: 16px; top: 16px; }

/* -------------------- typography -------------------- */
h1,h2,h3,h4 { font-family: var(--f-display); font-weight: 600; margin: 0; line-height: .98; letter-spacing: -0.03em; }

/* Display scale helper — multiply any clamp by --display-scale */
.display {
  font-family: var(--f-display);
  font-weight: 700;
  line-height: .9;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
body.upper .display,
body.upper .section-title,
body.upper .kicker { text-transform: uppercase; }
body.upper .display { letter-spacing: -0.02em; }

/* Anton needs different metrics — looser tracking + leading for legibility */
body[data-display="Anton"] .display,
body[data-display="Anton"] .section-title { letter-spacing: .015em; font-weight: 400; line-height: 1; }
body[data-display="Anton"] { --display-weight: 400; }

.kicker {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex; align-items: center; gap: 12px;
}
.kicker::before {
  content: ""; width: 28px; height: 1px; background: var(--accent); opacity: .8;
}
.kicker.no-rule::before { display: none; }

.section-head { margin-bottom: clamp(40px, 6vw, 88px); max-width: 1100px; }
.section-head .kicker { margin-bottom: 22px; }
.section-title {
  font-family: var(--f-display);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: .92;
  font-size: calc(clamp(38px, 6vw, 92px) * var(--display-scale));
  text-wrap: balance;
}
.section-title em { font-style: normal; color: var(--accent); }
.section-lede { color: var(--text-2); font-size: clamp(16px,1.3vw,20px); max-width: 64ch; margin-top: 24px; line-height: 1.55; }

/* -------------------- buttons -------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  padding: 17px 30px;
  border: 1.5px solid var(--text);
  font-family: var(--f-mono);
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-weight: 500;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.btn .arr { transition: transform .25s var(--ease); }
.btn:hover .arr { transform: translateX(5px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--text); border-color: var(--text); color: var(--bg); }
.btn-ghost { background: transparent; color: var(--text); border-color: rgba(244,241,234,.28); }
.btn-ghost:hover { border-color: var(--text); background: rgba(244,241,234,.06); }
.btn-block { width: 100%; }
.btn-lg { padding: 22px 40px; font-size: 13px; }

/* -------------------- floating chrome -------------------- */
.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 200; pointer-events: none; }
.scroll-progress span { display: block; height: 100%; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .12s linear; }

.cursor-spot {
  position: fixed; top: 0; left: 0; width: 520px; height: 520px; margin: -260px 0 0 -260px;
  pointer-events: none; z-index: 1; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 9%, transparent) 0%, transparent 62%);
  opacity: 0; transition: opacity .5s ease; will-change: transform;
}
body:hover .cursor-spot { opacity: 1; }
@media (pointer: coarse){ .cursor-spot { display: none; } }

.wa-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 150;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 20px 14px 16px; background: rgba(18,18,18,.92); color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent);
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; font-weight: 600;
  box-shadow: 0 12px 30px rgba(0,0,0,.4); backdrop-filter: blur(8px);
  transition: transform .2s var(--ease), background .2s, color .2s, border-color .2s;
}
.wa-fab svg { width: 22px; height: 22px; }
.wa-fab:hover { transform: translateY(-3px); background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
@media (max-width:720px){ .wa-fab span { display:none; } .wa-fab { padding: 13px; } }

/* -------------------- header -------------------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 120;
  padding: 14px 0;
  transition: background .3s var(--ease), padding .3s var(--ease), border-color .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(8,8,8,.78);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  padding: 10px 0; border-bottom-color: var(--line-2);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: inline-flex; align-items: center; }
.brand-logo { height: 58px; width: auto; filter: brightness(0) invert(1); transition: height .3s var(--ease), opacity .2s; }
.site-header.scrolled .brand-logo { height: 46px; }
@media (max-width: 720px){ .brand-logo { height: 46px; } .site-header.scrolled .brand-logo { height: 40px; } }
.brand:hover .brand-logo { opacity: .82; }
.nav ul { display: flex; gap: 30px; }
.nav a {
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text); opacity: .72; position: relative; padding: 4px 0;
  transition: opacity .2s var(--ease);
}
.nav a::after { content:""; position:absolute; left:0; bottom:-2px; width:100%; height:1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.nav a:hover { opacity: 1; }
.nav a:hover::after { transform: scaleX(1); }
.header-cta { display: inline-flex; }
.menu-toggle { display: none; width: 44px; height: 44px; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.menu-toggle span { width: 24px; height: 1.5px; background: var(--text); transition: transform .25s var(--ease), opacity .25s; }
.menu-toggle[aria-expanded="true"] span:nth-child(1){ transform: translateY(3.75px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2){ transform: translateY(-3.75px) rotate(-45deg); }
.mobile-menu { display:none; flex-direction: column; gap: 2px; padding: 14px var(--gutter) 30px; background: var(--bg-2); border-top: 1px solid var(--line-2); }
.mobile-menu a { padding: 16px 0; border-bottom: 1px solid var(--line-2); font-family: var(--f-display); font-size: 26px; font-weight: 600; }
.mobile-menu .btn { margin-top: 18px; }
@media (max-width: 980px){
  .nav, .header-cta { display: none; }
  .menu-toggle { display: flex; }
}

/* ============================================================
   HERO — full-bleed cinematic montage of case work
   ============================================================ */
.hero {
  position: relative; min-height: 100svh;
  display: grid; align-items: end;
  overflow: hidden; background: var(--bg-3);
  isolation: isolate;
}
.hero-montage { position: absolute; inset: 0; z-index: -2; }
.montage-slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; transform: scale(1.08);
  transition: opacity 1.6s ease;
  will-change: opacity, transform;
}
.montage-slide.show { opacity: 1; animation: kenburns calc(9s / var(--motion, 1)) linear forwards; }
@keyframes kenburns {
  from { transform: scale(1.04); }
  to   { transform: scale(1.16); }
}
/* legibility scrims */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(7,7,7,.72) 0%, rgba(7,7,7,.30) 32%, rgba(7,7,7,.42) 64%, rgba(7,7,7,.96) 100%),
    linear-gradient(90deg, rgba(7,7,7,.55) 0%, transparent 55%);
}
.hero-grain {
  position: absolute; inset: 0; z-index: -1; opacity: .05; mix-blend-mode: overlay; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hero-inner { position: relative; z-index: 2; padding-bottom: clamp(48px, 8vh, 96px); padding-top: 160px; width:100%; }
.hero-eyebrow {
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--accent); margin-bottom: clamp(24px, 4vh, 44px);
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.hero-eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.hero-title {
  font-family: var(--f-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.035em;
  line-height: .88;
  font-size: calc(clamp(44px, 8.5vw, 152px) * var(--display-scale));
  margin: 0;
}
.hero-title .ln { display: block; overflow: hidden; }
.hero-title .ln > span { display: block; transform: translateY(110%); transition: transform 1s var(--ease-out); }
.hero.in .hero-title .ln > span { transform: translateY(0); }
.hero-title .ln:nth-child(2) > span { transition-delay: .08s; }
.hero-title em { font-style: normal; color: var(--accent); position: relative; }
.cycle-word { display: inline-block; transition: opacity .3s var(--ease), transform .3s var(--ease); }
body[data-display="Anton"] .hero-title { letter-spacing: .015em; font-weight: 400; line-height: .94; }

.hero-foot {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; flex-wrap: wrap;
  margin-top: clamp(32px, 5vh, 64px);
  padding-top: 28px; border-top: 1px solid rgba(244,241,234,.18);
}
.hero-descriptor { font-family: var(--f-display); font-weight: 500; font-size: clamp(18px, 1.9vw, 26px); letter-spacing: -0.02em; max-width: 22ch; line-height: 1.12; }
.hero-foot .hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-lead { display: flex; flex-direction: column; gap: 12px; }
.hero-firma { font-family: var(--f-mono); font-size: 11px; letter-spacing: .26em; text-transform: uppercase; color: var(--accent); }
.scroll-cue { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--text-2); display: inline-flex; align-items: center; gap: 10px; }
.scroll-cue .bar { width: 1px; height: 34px; background: linear-gradient(var(--accent), transparent); position: relative; overflow: hidden; }
.scroll-cue .bar::after { content:""; position:absolute; inset:0; background: var(--accent); animation: cue calc(1.8s / var(--motion,1)) var(--ease) infinite; }
@keyframes cue { 0%{ transform: translateY(-100%);} 60%,100%{ transform: translateY(100%);} }

@media (max-width: 980px){
  .hero-inner { padding-top: 128px; }
}
@media (max-width: 720px){
  .hero-foot { flex-direction: column; align-items: flex-start; gap: 24px; }
  .hero-foot .hero-ctas { width: 100%; }
  .hero-foot .hero-ctas .btn { flex: 1; }
  .scroll-cue { display: none; }
  .hero-title { font-size: calc(clamp(46px, 14vw, 92px) * var(--display-scale)); line-height: .86; }
  .hero-eyebrow { font-size: 10.5px; letter-spacing: .18em; }
  .hero-descriptor { font-size: 20px; }
}
@media (max-width: 380px){
  .hero-title { font-size: calc(46px * var(--display-scale)); }
}

/* ============================================================
   CLIENTS GRID (reemplaza al ticker — más institucional)
   ============================================================ */
.clients-section { background: var(--bg); padding: clamp(64px, 9vw, 128px) 0; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.clients-head { max-width: 880px; margin-bottom: clamp(40px, 5vw, 72px); }
.clients-head .kicker { font-family: var(--f-mono); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); display: block; margin-bottom: 18px; }
.clients-title { font-family: var(--f-display); font-weight: 700; font-size: clamp(34px, 4.6vw, 68px); line-height: .98; letter-spacing: -0.03em; color: var(--text); margin-bottom: 18px; text-transform: none; }
.clients-title em { font-style: normal; color: var(--accent); }
.clients-sub { color: var(--text-2); font-size: clamp(14px, 1.2vw, 17px); line-height: 1.55; max-width: 620px; }
.clients-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 0; border-top: 1px solid var(--line-2); border-left: 1px solid var(--line-2); }
.clients-cell { aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; padding: 24px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); background: var(--bg); transition: background .25s var(--ease); }
.clients-cell:hover { background: var(--bg-2); }
.clients-cell img { max-width: 78%; max-height: 56px; width: auto; height: auto; object-fit: contain; opacity: .55; filter: grayscale(1) brightness(1.85); transition: opacity .25s var(--ease), filter .25s var(--ease); }
.clients-cell:hover img { opacity: 1; filter: grayscale(0) brightness(1); }
@media (max-width: 1100px){ .clients-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 720px){ .clients-grid { grid-template-columns: repeat(3, 1fr); } .clients-cell { padding: 18px; aspect-ratio: 1 / 1; } .clients-cell img { max-height: 44px; } }
@media (max-width: 420px){ .clients-grid { grid-template-columns: repeat(2, 1fr); } }

/* ============================================================
   CLIENT TICKER (legacy, ya no se usa)
   ============================================================ */
.ticker {
  border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2);
  background: var(--bg); padding: 0; overflow: hidden;
  display: flex; align-items: stretch;
}
.ticker-label {
  flex-shrink: 0; display: flex; align-items: center; gap: 12px; padding: 0 28px;
  border-right: 1px solid var(--line-2); background: var(--bg-2);
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--text-2);
  white-space: nowrap;
}
.ticker-viewport { overflow: hidden; position: relative; flex: 1;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.ticker-track { display: flex; width: max-content; animation: ticker calc(55s / var(--motion,1)) linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item { flex-shrink: 0; width: 220px; height: 150px; display: flex; align-items: center; justify-content: center; padding: 18px 30px; border-right: 1px solid var(--line-2); }
.ticker-item img { max-height: 54px; max-width: 156px; width: auto; object-fit: contain; opacity: .68; filter: grayscale(1) brightness(1.9); transition: opacity .25s var(--ease), filter .25s var(--ease); }
.ticker-item:hover img { opacity: 1; filter: grayscale(0) brightness(1); }
@keyframes ticker { to { transform: translateX(-50%); } }
@media (max-width:720px){ .ticker-label { display: none; } .ticker-item { width: 168px; height: 120px; padding: 16px 22px; } .ticker-item img { max-height: 46px; max-width: 124px; } }

/* reduced motion — global */
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .montage-slide.show { animation: none; opacity: 1; }
  .ticker-track, .scroll-cue .bar::after { animation: none; }
  .hero-title .ln > span { transform: none; }
  .reveal, .reveal[data-d] { opacity: 1 !important; transform: none !important; }
  .kw > span { transform: none !important; }
  .hero-montage, .cursor-spot { display: none !important; }
}
