/* Cada bloque oscuro tiene una pieza editorial propia; ninguna se repite. */
.hero-image {
  overflow: hidden;
  background-image: url('assets/img/landing/forja-hero-fondo-profundidad.webp');
  background-size: cover;
  background-position: center;
  animation: forja-atmosphere 16s ease-in-out infinite alternate;
}
.hero-portrait {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: url('assets/img/landing/forja-hero-sebastian-recorte.webp') no-repeat right center / auto 100%;
  filter: drop-shadow(-18px 14px 20px rgba(0, 0, 0, .48));
  pointer-events: none;
}

/* La luz llama la atención; la mirada responde al cursor solo sobre los ojos. */
.hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 78% 28%, rgba(255, 177, 91, .18), transparent 13%), linear-gradient(105deg, transparent 55%, rgba(232,130,58,.1) 72%, transparent 86%);
  mix-blend-mode: screen;
  opacity: .55;
  animation: forja-glow 7s ease-in-out infinite;
  pointer-events: none;
}
.hero-gaze { z-index: 2; }

.hero-gaze {
  position: absolute;
  inset: 0;
  background: var(--gaze-frame, url('assets/img/landing/forja-hero-joaquin-vintage.webp')) no-repeat right center / auto 100%;
  clip-path: ellipse(16% 10% at 76% 20%);
  opacity: 0;
  transition: opacity .14s ease;
  pointer-events: none;
}

.hero-gaze.is-tracking { opacity: 1; }

@keyframes forja-glow {
  0%, 100% { opacity: .36; }
  50% { opacity: .72; }
}
@keyframes forja-atmosphere {
  from { background-position: 50% 50%; }
  to { background-position: 48% 52%; }
}

.hero-grid { align-items: flex-start; height: auto; min-height: 570px; padding: 86px 0 48px; }
.hero-copy { padding-bottom: 0; }
.hero-words { position: static; left: auto; bottom: auto; transform: none; width: auto; margin: 26px 0 0; color: #a49f98; white-space: normal; line-height: 1.7; }

.section-cta { margin-top: 34px; }

.hero-image {
  background-color: #171615;
}

.dark-section {
  background-color: var(--ink);
  background-image: linear-gradient(90deg, rgba(20, 19, 18, .95) 0%, rgba(20, 19, 18, .82) 44%, rgba(20, 19, 18, .28) 100%), url('assets/img/landing/forja-hero-filosofia-digital.webp');
  background-position: center calc(50% + var(--scene-shift, 0px));
  background-size: cover;
}

.dark-section:before { background: rgba(20, 19, 18, .08); }

.action {
  background-image: linear-gradient(90deg, rgba(20, 19, 18, .96) 0%, rgba(20, 19, 18, .83) 47%, rgba(20, 19, 18, .25) 100%), url('assets/img/landing/forja-accion-movimiento.webp');
  background-position: right calc(50% + var(--scene-shift, 0px));
  background-size: auto 100%;
  background-repeat: no-repeat;
}

.diagnostic {
  background-color: var(--ink);
  background-image: linear-gradient(90deg, rgba(20, 19, 18, .98) 0%, rgba(20, 19, 18, .88) 50%, rgba(20, 19, 18, .22) 100%), url('assets/img/landing/forja-diagnostico-lupa.webp');
  background-position: center calc(50% + var(--scene-shift, 0px));
  background-size: cover;
}

.diagnostic:before { background: transparent; }

main > .section,
main > .dark-section,
main > .diagnostic { content-visibility: auto; contain-intrinsic-size: 800px; }

.modal-open { overflow: hidden; }
.application-modal { position: fixed; z-index: 30; inset: 0; display: grid; place-items: center; padding: 24px; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.application-modal[aria-hidden="false"] { opacity: 1; pointer-events: auto; }
.application-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.78); backdrop-filter: blur(8px); }
.application-dialog { position: relative; z-index: 1; width: min(100%, 820px); max-height: min(90vh, 940px); overflow: auto; padding: 45px; background: #f5f0e8; color: var(--ink); border-top: 4px solid var(--ember); box-shadow: 0 24px 80px rgba(0,0,0,.5); }
.application-dialog h2 { max-width: 620px; font-size: clamp(30px, 4.5vw, 48px); }
.application-intro { max-width: 620px; margin: 15px 0 32px; color: #625e58; }
.modal-close { position: absolute; top: 15px; right: 18px; width: 38px; height: 38px; border: 0; background: transparent; color: var(--ink); cursor: pointer; font: 400 34px/1 Arial,sans-serif; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; margin: 0 0 20px; font: 700 12px Poppins,sans-serif; letter-spacing: .2px; }
.field span, fieldset legend span { display: block; color: #716b64; font: 400 12px/1.4 Roboto,Arial,sans-serif; letter-spacing: 0; }
.field input { min-height: 46px; border: 1px solid #bdb5aa; border-radius: 2px; background: #fffdfa; color: var(--ink); padding: 10px 12px; font: 400 16px Roboto,Arial,sans-serif; }
.field input:focus, .choice input:focus { outline: 2px solid var(--fire); outline-offset: 2px; }
fieldset { margin: 0 0 24px; padding: 18px 20px 14px; border: 1px solid #d4ccc2; }
fieldset legend { padding: 0 4px; font: 700 13px/1.4 Poppins,sans-serif; }
.choice { display: block; margin: 9px 0; color: #3f3b37; cursor: pointer; font-size: 15px; line-height: 1.4; }
.choice input { accent-color: var(--fire); margin: 0 8px 0 0; }
.choice em { color: var(--fire); font-size: 12px; font-style: normal; }
.phone-field { max-width: 390px; }
.consent { display: flex; gap: 10px; align-items: flex-start; margin: 30px 0 0; color: #5d5750; font-size: 13px; line-height: 1.5; }
.consent input { margin-top: 4px; accent-color: var(--fire); }
.consent a { color: var(--fire); font-weight: 700; }
.form-status { min-height: 24px; margin: 16px 0 0; color: #9d390f; font-weight: 700; }
.form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; margin-top: 10px; }
.form-actions .button { border: 0; cursor: pointer; }
.back-button { border: 0; padding: 10px 0; background: transparent; color: #5f5952; cursor: pointer; font: 700 11px Poppins,sans-serif; letter-spacing: .7px; text-decoration: underline; }
.form-trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Secuencia editorial: cada bloque entra como una escena al avanzar. */
.js .reveal {
  opacity: 0;
  transform: translate3d(0, 42px, 0);
  transition: opacity .72s cubic-bezier(.22,1,.36,1) var(--reveal-delay, 0ms), transform .72s cubic-bezier(.22,1,.36,1) var(--reveal-delay, 0ms);
}

.js .reveal.is-visible { opacity: 1; transform: translate3d(0, 0, 0); }
.js .split > .reveal:nth-child(2),
.js .method-head.reveal + .phases .reveal:nth-child(even),
.js .diagnostic-grid > .reveal:nth-child(2),
.js .about > .reveal:nth-child(2) { transform: translate3d(44px, 0, 0); }
.js .split > .reveal:nth-child(2).is-visible,
.js .method-head.reveal + .phases .reveal:nth-child(even).is-visible,
.js .diagnostic-grid > .reveal:nth-child(2).is-visible,
.js .about > .reveal:nth-child(2).is-visible { transform: translate3d(0, 0, 0); }

.rodaje-image, .about img { position: relative; overflow: hidden; background: #171615; }
.rodaje-image::after, .about::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.rodaje-image::after { background: linear-gradient(125deg, rgba(232,130,58,.22), transparent 36%, rgba(0,0,0,.22)); mix-blend-mode: screen; }
.about { position: relative; }
.about::after { left: auto; width: min(42%, 480px); background: linear-gradient(115deg, transparent 15%, rgba(232,130,58,.12) 100%); }
.js .reveal-media { clip-path: inset(0 0 100% 0); filter: blur(7px); transition: clip-path 1.1s cubic-bezier(.22,1,.36,1) var(--reveal-delay, 0ms), filter .9s ease var(--reveal-delay, 0ms); }
.js .reveal-media.is-visible { clip-path: inset(0 0 0 0); filter: blur(0); }
.js .reveal-media img { transform: scale(1.13); transition: transform 1.35s cubic-bezier(.22,1,.36,1) var(--reveal-delay, 0ms); }
.js .reveal-media.is-visible img { transform: scale(1); }
.js .about img.reveal-media { transform: translate3d(0, 32px, 0); }
.js .about img.reveal-media.is-visible { transform: translate3d(0, 0, 0); }
.js .rodaje-image.reveal-media img { transform: translate3d(0, var(--media-shift, 0px), 0) scale(1.13); }
.js .rodaje-image.reveal-media.is-visible img { transform: translate3d(0, var(--media-shift, 0px), 0) scale(1); }
.js .about img.reveal-media { transform: translate3d(0, calc(32px + var(--media-shift, 0px)), 0) scale(1.06); }
.js .about img.reveal-media.is-visible { transform: translate3d(0, var(--media-shift, 0px), 0) scale(1); }

.dark-section, .diagnostic { overflow: hidden; }
.dark-section .shell, .diagnostic .shell { z-index: 1; }
.dark-section::after, .diagnostic::after {
  content: "";
  position: absolute;
  width: 44vw;
  height: 44vw;
  right: -22vw;
  top: -18vw;
  border: 1px solid rgba(232,130,58,.2);
  border-radius: 50%;
  box-shadow: 0 0 0 38px rgba(232,130,58,.025), 0 0 100px rgba(232,130,58,.11);
  pointer-events: none;
}

@media (max-width: 760px) {
  .hero { min-height: auto; }
  .hero-grid { height: auto; min-height: 0; padding: 54px 0 104px; }
  .hero-words { margin-top: 22px; max-width: 330px; font-size: 9px; letter-spacing: 1px; line-height: 1.9; }
  .hero-words i { margin: 0 5px; }
  .hero-image { background-image: url('assets/img/landing/forja-hero-sebastian-mirada-mobile.webp'); background-position: 73% center; background-size: auto 100%; animation: none; }
  .hero-portrait, .hero-gaze { display: none; }
  .hero-image::after { animation: none; opacity: .34; }
  .dark-section { background-image: linear-gradient(90deg, rgba(20, 19, 18, .98) 0%, rgba(20, 19, 18, .9) 61%, rgba(20, 19, 18, .48) 100%), url('assets/img/landing/forja-hero-filosofia-digital.webp'); }
  .action { background-image: linear-gradient(90deg, rgba(20, 19, 18, .98) 0%, rgba(20, 19, 18, .91) 61%, rgba(20, 19, 18, .43) 100%), url('assets/img/landing/forja-accion-movimiento.webp'); background-size: auto 100%; }
  .diagnostic { background-image: linear-gradient(90deg, rgba(20, 19, 18, .99) 0%, rgba(20, 19, 18, .93) 64%, rgba(20, 19, 18, .51) 100%), url('assets/img/landing/forja-diagnostico-lupa.webp'); }
  .application-modal { padding: 10px; }
  .application-dialog { max-height: 94vh; padding: 36px 21px 28px; }
  .field-grid { grid-template-columns: 1fr; gap: 0; }
  fieldset { padding: 16px 13px 12px; }
  .choice { font-size: 14px; }
  .form-actions { align-items: stretch; flex-direction: column; gap: 9px; }
  .form-actions .button { justify-content: space-between; }
  .js .reveal, .js .split > .reveal:nth-child(2), .js .diagnostic-grid > .reveal:nth-child(2), .js .about > .reveal:nth-child(2) { transform: translate3d(0, 26px, 0); }
  .js .reveal.is-visible, .js .split > .reveal:nth-child(2).is-visible, .js .diagnostic-grid > .reveal:nth-child(2).is-visible, .js .about > .reveal:nth-child(2).is-visible { transform: translate3d(0, 0, 0); }
  .dark-section::after, .diagnostic::after { width: 76vw; height: 76vw; right: -35vw; top: -22vw; }
  .js .rodaje-image.reveal-media img, .js .rodaje-image.reveal-media.is-visible img { transform: scale(1); }
  .js .about img.reveal-media, .js .about img.reveal-media.is-visible { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-gaze, .hero-image::after, .hero-image { animation: none; }
}

@media (max-width: 390px) {
  .hero-grid { padding-top: 42px; padding-bottom: 96px; }
  h1 { font-size: 38px; letter-spacing: -2.3px; }
  .lead { margin-top: 22px; }
  .hero-note { margin-bottom: 24px; }
  .hero-words { font-size: 8px; letter-spacing: .85px; }
}
