/* =========================================================
   KAB Creative Studio · Sitio editorial
   Paleta: Negro #0F0F0F · Dorado #B59356 · Dorado claro #F1D583
           Dorado profundo #9F773C · Blanco #FFFFFF · grises
   Tipografía: Montserrat
   ========================================================= */

:root {
  --black: #0F0F0F;
  --gold: #B59356;
  --gold-light: #F1D583;
  --gold-deep: #9F773C;
  --white: #FFFFFF;
  --g-50: #F6F6F5;
  --g-100: #EDEDEB;
  --g-300: #C9C9C6;
  --g-500: #8A8A87;
  --g-700: #3A3A38;

  /* Variables de la escena (las actualiza main.js) */
  --wall: #ECEAE6;
  --desk: #D9D5CD;
  --desk-edge: #E9E6E0;
  --sky-top: #FFFFFF;
  --sky-bot: #F3F1EC;
  --obj: #BDB8AF;
  --obj-dark: #8E8A84;
  --sun: 1;
  --night: 0;
  --ink: #0F0F0F;

  --header-h: 84px;
  --pad: clamp(20px, 5vw, 80px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 400;
  color: var(--black);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }

.wrap { width: min(1280px, 100%); margin: 0 auto; padding: 0 var(--pad); }

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.eyebrow::before {
  content: "";
  width: 32px; height: 1px;
  background: var(--gold);
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 18px 30px;
  font: 700 14px/1 "Montserrat", sans-serif;
  letter-spacing: .06em;
  text-decoration: none;
  border: 0; cursor: pointer;
  transition: transform .4s var(--ease), background .3s, color .3s;
}
.btn span { transition: transform .4s var(--ease); }
.btn:hover span { transform: translateX(6px); }
.btn-gold { background: var(--gold); color: var(--black); }
.btn-gold:hover { background: var(--gold-light); }
.btn-dark { background: var(--black); color: var(--white); }
.btn-dark:hover { background: var(--g-700); }
.btn:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 3px;
}

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--pad);
  background: var(--white);
  border-bottom: 1px solid var(--g-100);
}
/* Logo completo ≥120 px de ancho visible (la imagen incluye su área de seguridad) */
.brand img { width: 150px; height: auto; }
.nav { display: flex; align-items: center; gap: clamp(18px, 3vw, 40px); }
.nav a {
  font-size: 13px; font-weight: 600; letter-spacing: .08em;
  text-decoration: none; position: relative;
}
.nav a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; bottom: -6px;
  width: 100%; height: 1px; background: var(--gold);
  transform: scaleX(0); transform-origin: left;
  transition: transform .4s var(--ease);
}
.nav a:not(.nav-cta):hover::after { transform: scaleX(1); }
.nav-cta {
  background: var(--black); color: var(--white);
  padding: 12px 20px;
  transition: background .3s;
}
.nav-cta:hover { background: var(--gold); color: var(--black); }

/* =========================================================
   HERO
   ========================================================= */
.hero { position: relative; height: 520vh; background: var(--black); }
.stage {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
}

/* ---------- Escena del estudio ---------- */
.scene { position: absolute; inset: 0; }
.room {
  position: absolute; inset: -6%;
  filter: blur(14px) saturate(.95);
  transform: scale(1.02);
}
.room > * { position: absolute; }

.wall { inset: 0; background: var(--wall); }

/* luz de día que entra por la ventana */
.sunlight {
  left: 4%; top: 6%; width: 70%; height: 90%;
  background: linear-gradient(115deg, rgba(255,255,255,.9) 0%, rgba(255,255,255,.35) 40%, rgba(255,255,255,0) 70%);
  opacity: var(--sun);
  clip-path: polygon(0 0, 42% 0, 100% 100%, 30% 100%);
}

.window {
  left: 8%; top: 10%; width: 32%; height: 52%;
  background: var(--obj-dark);
  padding: 1.2%;
  box-shadow: 0 0 0 10px var(--obj);
}
.sky {
  position: absolute; inset: 1.4%;
  background: linear-gradient(180deg, var(--sky-top), var(--sky-bot));
}
.stars {
  position: absolute; inset: 1.4%;
  opacity: calc(var(--night) * 1.1 - .2);
  background-image:
    radial-gradient(2px 2px at 18% 22%, #fff 60%, transparent),
    radial-gradient(3px 3px at 64% 14%, #fff 60%, transparent),
    radial-gradient(2px 2px at 82% 40%, #fff 60%, transparent),
    radial-gradient(2px 2px at 36% 58%, #fff 60%, transparent),
    radial-gradient(3px 3px at 52% 34%, var(--gold-light) 60%, transparent),
    radial-gradient(28px 28px at 76% 24%, var(--gold-light) 40%, transparent 70%);
}
.mullion { background: var(--obj-dark); }
.mullion-v { position: absolute; left: 50%; top: 0; bottom: 0; width: 2.2%; transform: translateX(-50%); }
.mullion-h { position: absolute; top: 50%; left: 0; right: 0; height: 2.2%; transform: translateY(-50%); }

.frame { background: var(--obj); box-shadow: inset 0 0 0 8px var(--obj-dark); }
.frame-1 { left: 47%; top: 14%; width: 9%; height: 22%; }
.frame-2 { left: 58%; top: 20%; width: 6%; height: 10%; background: var(--gold); opacity: .55; }

.shelf {
  right: 6%; top: 30%; width: 24%; height: 1.4%;
  background: var(--obj-dark);
}
.book { position: absolute; bottom: 100%; width: 5%; background: var(--obj-dark); }
.b1 { left: 6%;  height: 900%;  }
.b2 { left: 12%; height: 1100%; background: var(--black); }
.b3 { left: 18%; height: 800%;  background: var(--obj); }
.b4 { left: 24%; height: 1000%; background: var(--gold-deep); opacity: .7; }
.b5 { left: 32%; height: 700%;  transform: rotate(-18deg); transform-origin: bottom left; }
.vase { position: absolute; bottom: 100%; right: 16%; width: 12%; height: 900%; border-radius: 40% 40% 20% 20%; background: var(--obj); }

.plant { left: 1%; bottom: 26%; width: 12%; height: 42%; }
.pot { position: absolute; left: 22%; bottom: 0; width: 56%; height: 26%; background: var(--obj-dark); border-radius: 4px 4px 14px 14px; }
.leaf { position: absolute; background: var(--g-700); border-radius: 50% 0; opacity: .85; }
.l1 { left: 10%; bottom: 22%; width: 40%; height: 46%; transform: rotate(-20deg); }
.l2 { left: 44%; bottom: 26%; width: 44%; height: 56%; transform: rotate(14deg); }
.l3 { left: 26%; bottom: 38%; width: 36%; height: 58%; transform: rotate(-4deg); }
.l4 { left: 52%; bottom: 46%; width: 30%; height: 40%; transform: rotate(36deg); }

.desk {
  left: 0; right: 0; bottom: 0; height: 30%;
  background: linear-gradient(180deg, var(--desk-edge) 0, var(--desk) 4%, var(--desk) 100%);
}
.mug { right: 40%; bottom: 24%; width: 3.4%; height: 7%; background: var(--obj); border-radius: 2px 2px 8px 8px; }

.lamp { right: 6%; bottom: 26%; width: 12%; height: 52%; }
.lamp-base { position: absolute; left: 30%; bottom: 0; width: 46%; height: 4%; background: var(--black); border-radius: 50%; }
.lamp-arm  { position: absolute; left: 50%; bottom: 3%; width: 3%; height: 56%; background: var(--black); transform: rotate(14deg); transform-origin: bottom; }
.lamp-arm2 { position: absolute; left: 34%; top: 32%; width: 3%; height: 34%; background: var(--black); transform: rotate(-52deg); transform-origin: bottom; }
.lamp-shade {
  position: absolute; left: -20%; top: 24%; width: 46%; height: 16%;
  background: var(--black);
  clip-path: polygon(25% 0, 75% 0, 100% 100%, 0 100%);
  transform: rotate(-24deg);
}
/* Halo de la lámpara: aparece al anochecer */
.lamp-glow {
  right: 6%; bottom: 8%; width: 70%; height: 80%;
  background: radial-gradient(ellipse at 74% 40%, rgba(241,213,131,.55) 0%, rgba(181,147,86,.22) 34%, rgba(15,15,15,0) 66%);
  opacity: var(--night);
}

.vignette {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at 66% 60%, transparent 40%, rgba(15,15,15, calc(.15 + var(--night) * .55)) 100%);
}

/* ---------- Hoja de papel ---------- */
.paper {
  position: absolute;
  right: 9vw; bottom: 15vh;
  width: clamp(300px, 40vw, 660px);
  aspect-ratio: 1.414 / 1;
  background: var(--white);
  box-shadow:
    0 1px 0 rgba(15,15,15,.04),
    0 30px 60px -20px rgba(15,15,15, calc(.25 + var(--night) * .45)),
    0 0 calc(var(--night) * 120px) rgba(241,213,131, calc(var(--night) * .35));
  display: grid; place-items: center;
}

.logo-draw {
  position: relative;
  width: 82%;
  aspect-ratio: 1290 / 600;
}
.logo-draw img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  mix-blend-mode: multiply; /* el fondo blanco del archivo se funde con la hoja blanca */
  user-select: none; pointer-events: none;
}
.logo-base { opacity: 0; }
.layer { clip-path: inset(0 100% 0 0); }

.pencil {
  position: absolute; left: 0; top: 0;
  width: 3.2%; min-width: 10px;
  transform-origin: 50% 100%;
  transform: translate(-50%, -100%) rotate(28deg);
  filter: drop-shadow(6px 8px 6px rgba(15,15,15,.25));
  transition: opacity .4s;
  will-change: left, top;
}

/* ---------- Copy del banner ---------- */
.copy {
  position: absolute;
  left: var(--pad);
  top: calc(var(--header-h) + 6vh);
  bottom: 12vh;
  width: min(40vw, 580px);
  pointer-events: none;
}
.panel {
  position: absolute; left: 0; right: 0; top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  color: var(--ink);
  will-change: opacity, transform;
}
.panel.is-light { color: var(--white); }
.panel .eyebrow { margin-bottom: 26px; }
.panel .btn { pointer-events: auto; margin-top: 36px; }
.display {
  font-weight: 800;
  font-size: clamp(40px, 5vw, 76px);
  line-height: 1.02;
  letter-spacing: -.025em;
}
.display-sm { font-size: clamp(26px, 3vw, 44px); font-weight: 700; letter-spacing: -.01em; line-height: 1.15; max-width: 14ch; }
.accent-line { display: inline-block; position: relative; }
.accent-line::after {
  content: ""; position: absolute; left: 0; bottom: .04em;
  height: .09em; width: 100%;
  background: var(--gold);
  transform-origin: left;
  transform: scaleX(var(--underline, 0));
}
.lede { margin-top: 28px; font-size: clamp(15px, 1.2vw, 18px); font-weight: 500; max-width: 34ch; }
.counter {
  display: flex; align-items: flex-start;
  font-weight: 800;
  font-size: clamp(96px, 13vw, 210px);
  line-height: .9;
  letter-spacing: -.04em;
  margin-bottom: 14px;
}
.counter span:first-child { color: var(--gold-light); font-size: .5em; margin-top: .14em; margin-right: .06em; }

.hero-meta {
  position: absolute; right: var(--pad); top: calc(var(--header-h) + 32px);
  display: flex; align-items: center; gap: 12px;
  font-size: 12px; font-weight: 600; letter-spacing: .2em;
  color: var(--ink);
}
.step-track { width: 90px; height: 1px; background: currentColor; opacity: .3; position: relative; }
.step-fill { position: absolute; inset: 0; background: var(--gold); transform-origin: left; transform: scaleX(0); }
.hero-meta .step-track { opacity: 1; background: color-mix(in srgb, currentColor 25%, transparent); }

.scroll-hint {
  position: absolute; left: var(--pad); bottom: 5vh;
  font-size: 11px; font-weight: 600; letter-spacing: .3em; text-transform: uppercase;
  color: var(--ink);
  display: flex; align-items: center; gap: 14px;
}
.scroll-hint span { width: 1px; height: 40px; background: currentColor; position: relative; overflow: hidden; opacity: .5; }
.scroll-hint span::after {
  content: ""; position: absolute; left: 0; top: -40%; width: 100%; height: 40%;
  background: var(--gold); animation: drip 1.8s var(--ease) infinite;
}
@keyframes drip { to { top: 110%; } }

/* =========================================================
   SECCIONES
   ========================================================= */
section:not(.hero) { padding: clamp(96px, 14vw, 180px) 0; scroll-margin-top: calc(var(--header-h) - 1px); }

.statement {
  font-weight: 800;
  font-size: clamp(36px, 5.4vw, 84px);
  line-height: 1.04;
  letter-spacing: -.025em;
  max-width: 18ch;
  margin-top: 36px;
}
.statement em { font-style: normal; color: var(--g-500); }

/* Manifiesto (noche que continúa) */
.manifesto { background: var(--black); color: var(--white); }
.manifesto .statement em { color: var(--gold-light); }
.manifesto-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 64px);
  margin-top: clamp(60px, 8vw, 110px);
  padding-top: 40px; border-top: 1px solid var(--g-700);
}
.manifesto-grid p { color: #D6D6D3; font-size: 16px; }
.manifesto-grid p.strong { color: var(--white); font-weight: 600; }
.pillars {
  list-style: none; padding: 0; margin: clamp(60px, 8vw, 100px) 0 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.pillars li {
  padding: 22px 0; border-top: 1px solid var(--g-700);
  font-weight: 700; font-size: clamp(16px, 1.6vw, 22px);
  display: flex; align-items: center; gap: 12px;
}
.pillars li::before { content: ""; width: 8px; height: 8px; background: var(--gold); clip-path: polygon(50% 0, 100% 100%, 0 100%); }

/* Encabezados de sección */
.section-head { display: grid; gap: 28px; margin-bottom: clamp(56px, 7vw, 96px); }
.section-title {
  font-weight: 800;
  font-size: clamp(30px, 3.8vw, 56px);
  line-height: 1.08;
  letter-spacing: -.02em;
  max-width: 20ch;
}

/* Servicios */
.services { background: var(--white); }
.service-list { border-top: 1px solid var(--black); }
.service { border-bottom: 1px solid var(--g-300); }
.service summary {
  list-style: none; cursor: pointer;
  display: grid;
  grid-template-columns: 70px minmax(0, 1.1fr) minmax(0, 1fr) 40px;
  align-items: baseline; gap: 24px;
  padding: 34px 0;
  transition: padding .4s var(--ease);
}
.service summary::-webkit-details-marker { display: none; }
.s-num { font-weight: 600; font-size: 14px; color: var(--gold-deep); letter-spacing: .1em; }
.s-title { font-weight: 700; font-size: clamp(20px, 2.2vw, 32px); letter-spacing: -.01em; line-height: 1.15; transition: transform .4s var(--ease); }
.s-hook { font-size: 15px; color: var(--g-700); }
.s-toggle { position: relative; width: 22px; height: 22px; justify-self: end; align-self: center; }
.s-toggle::before, .s-toggle::after {
  content: ""; position: absolute; left: 0; top: 50%; width: 100%; height: 2px; background: var(--black);
  transition: transform .4s var(--ease);
}
.s-toggle::after { transform: rotate(90deg); }
.service[open] .s-toggle::after { transform: rotate(0); }
.service summary:hover .s-title { transform: translateX(8px); }
.s-body {
  display: grid; grid-template-columns: 70px minmax(0, 1.1fr) minmax(0, 1fr) 40px; gap: 24px;
  padding: 0 0 44px;
}
.s-body p { grid-column: 2; font-size: 16px; max-width: 46ch; }
.s-body ul {
  grid-column: 3; list-style: none; margin: 0; padding: 0;
  columns: 1; font-size: 15px;
}
.s-body li { padding: 9px 0; border-top: 1px solid var(--g-100); display: flex; gap: 12px; }
.s-body li::before { content: "—"; color: var(--gold); }

/* Proceso */
.process { background: var(--g-50); }
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px;
  counter-reset: none;
}
.step {
  background: var(--white);
  padding: 36px 28px 44px;
  min-height: 300px;
  display: flex; flex-direction: column;
  position: relative;
  transition: background .4s, color .4s;
}
.step::before {
  content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 100%;
  background: var(--gold); transform: scaleX(0); transform-origin: left;
  transition: transform .6s var(--ease);
}
.step:hover { background: var(--black); color: var(--white); }
.step:hover::before { transform: scaleX(1); }
.step-n { font-weight: 800; font-size: 44px; letter-spacing: -.03em; line-height: 1; color: var(--g-300); margin-bottom: auto; transition: color .4s; }
.step:hover .step-n { color: var(--gold); }
.step h3 { font-weight: 700; font-size: 20px; margin: 48px 0 12px; }
.step p { font-size: 15px; }

/* Cierre */
.closing { background: var(--black); color: var(--white); }
.closing .statement { margin-top: 0; max-width: 20ch; }
.closing .statement em { color: var(--g-500); }
.closing-row {
  display: flex; justify-content: space-between; align-items: center; gap: 40px; flex-wrap: wrap;
  margin-top: clamp(48px, 6vw, 80px); padding-top: 40px; border-top: 1px solid var(--g-700);
}
.closing-row p { max-width: 52ch; font-size: 17px; color: #D6D6D3; }
.tagline {
  margin-top: clamp(80px, 10vw, 140px);
  font-weight: 700; font-size: clamp(18px, 1.8vw, 24px);
  color: var(--gold-light);
  letter-spacing: .01em;
}

/* Contacto */
.contact { background: var(--white); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(48px, 7vw, 120px); align-items: start; }
.contact-intro .section-title { margin: 28px 0 24px; }
.contact-intro > p { font-size: 17px; max-width: 40ch; }
.contact-data { margin: 48px 0 0; display: grid; gap: 0; }
.contact-data div { display: grid; grid-template-columns: 170px 1fr; padding: 16px 0; border-top: 1px solid var(--g-100); }
.contact-data dt { font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--g-500); }
.contact-data dd { margin: 0; font-weight: 600; }

.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 28px; }
.field { display: grid; gap: 8px; }
.field-full { grid-column: 1 / -1; }
.field label { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.field input, .field select, .field textarea {
  font: 500 16px/1.4 "Montserrat", sans-serif;
  color: var(--black);
  background: transparent;
  border: 0; border-bottom: 1px solid var(--g-300);
  border-radius: 0;
  padding: 12px 0;
  transition: border-color .3s;
  -webkit-appearance: none; appearance: none;
}
.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--black) 50%), linear-gradient(135deg, var(--black) 50%, transparent 50%);
  background-position: calc(100% - 12px) 55%, calc(100% - 7px) 55%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--black); }
.field.has-error input, .field.has-error textarea { border-color: var(--gold-deep); }
.form-foot { grid-column: 1 / -1; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 8px; }
.form-status { font-size: 14px; font-weight: 500; }

/* Footer */
.site-footer { border-top: 1px solid var(--g-100); padding: 56px 0; background: var(--white); }
.footer-grid { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer-logo { width: 200px; height: auto; }
.footer-nav { display: flex; gap: 28px; flex-wrap: wrap; }
.footer-nav a { text-decoration: none; font-size: 13px; font-weight: 600; letter-spacing: .08em; }
.footer-nav a:hover { color: var(--gold-deep); }
.footer-legal { font-size: 13px; color: var(--g-500); }

/* Revelado al hacer scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1080px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step:last-child { grid-column: 1 / -1; min-height: 220px; }
}

@media (max-width: 860px) {
  :root { --header-h: 72px; }
  .brand img { width: 136px; }
  .nav a:not(.nav-cta) { display: none; }

  .hero { height: 480vh; }
  .paper { right: auto; left: 50%; transform: translateX(-50%); bottom: auto; top: calc(var(--header-h) + 5vh); width: 84vw; }
  .window { left: 4%; width: 46%; }
  .lamp { right: 2%; bottom: 52%; }
  .copy { top: auto; bottom: 14vh; width: auto; right: var(--pad); height: 44vh; }
  .panel { top: auto; bottom: 0; transform: none; }
  .display { font-size: clamp(34px, 9.5vw, 56px); }
  .counter { font-size: clamp(80px, 24vw, 140px); }
  .hero-meta { display: none; }
  .scroll-hint { bottom: 4vh; }

  .manifesto-grid { grid-template-columns: 1fr; }
  .pillars { grid-template-columns: 1fr 1fr; }
  .service summary { grid-template-columns: 44px 1fr 28px; gap: 14px; }
  .s-hook { grid-column: 2; grid-row: 2; font-size: 14px; }
  .s-toggle { grid-column: 3; grid-row: 1; }
  .s-body { grid-template-columns: 44px 1fr; gap: 20px 14px; }
  .s-body p, .s-body ul { grid-column: 2; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-form { grid-template-columns: 1fr; }
  .contact-data div { grid-template-columns: 1fr; gap: 4px; }
}

@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .step { min-height: 0; }
  .step h3 { margin-top: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-hint span::after { animation: none; }
}
