/* Composición de proyectos y acceso para artistas en la portada. */
.featured-projects {
  padding-block: clamp(40px, 3.3vw, 50px);
  background: #f2f3f4;
}
.featured-projects::before { display: none; }
.artist-case {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, .92fr) minmax(0, 1.34fr);
  align-items: center;
  gap: clamp(22px, 3vw, 42px);
}
.artist-case-heading { min-width: 0; }
.artist-case-rule { display: block; width: 44px; height: 4px; margin-bottom: 23px; border-radius: 4px; background: var(--yellow); box-shadow: 0 0 18px rgba(255,202,0,.35); }
.artist-case-heading h2 { max-width: 460px; margin: 0; color: #10171b; font: 650 clamp(35px, 3vw, 47px)/1.04 var(--display); letter-spacing: -.055em; }
.artist-case-heading h2 em { color: #826500; font-style: normal; }
.artist-case-copy { min-width: 0; }
.artist-case-copy h3 { margin: 0; color: #171c20; font: 650 clamp(19px, 1.7vw, 25px)/1.2 var(--display); letter-spacing: -.035em; }
.artist-case-copy h3 span { color: #5c6870; font-size: .82em; font-weight: 550; }
.artist-case-copy p { max-width: 340px; margin: 14px 0 20px; color: #56636b; font-size: 16px; line-height: 1.6; }
.artist-case-link { min-height: 44px; padding: 10px 18px; border-color: #111719; background: transparent; color: #111719; }
.artist-case-link:hover { transform: translateY(-2px); background: #111719; color: #fff; }
.artist-project-figure { min-width: 0; margin: 0; }
.artist-site-preview {
  position: relative;
  isolation: isolate;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 1;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 16px;
  background: #111416;
  box-shadow: 0 22px 46px rgba(13,25,29,.2), 0 3px 12px rgba(13,25,29,.1);
  transform: perspective(1400px) rotateY(-1.5deg);
  transition: transform .3s ease, box-shadow .3s ease;
}
.artist-site-preview img { position: relative; z-index: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.artist-site-preview::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle 250px at var(--field-x, 50%) var(--field-y, 50%), rgba(101,214,209,.2), transparent 76%);
  transition: opacity .22s ease;
  mix-blend-mode: screen;
}
.artist-site-preview:hover { transform: perspective(1400px) rotateY(0) translateY(-4px); box-shadow: 0 30px 60px rgba(13,25,29,.24); }
.artist-site-preview:hover::after { opacity: 1; }
.artist-site-preview:focus-visible { outline: 3px solid #806300; outline-offset: 4px; }

.artist-invite {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 300px;
  background: linear-gradient(110deg, #2b070d, #7d101a 50%, #24070c);
  border-block: 1px solid rgba(255,255,255,.12);
}
.artist-invite-art { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.artist-invite::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(12,7,9,.88) 0%, rgba(17,7,10,.78) 36%, rgba(19,7,10,.3) 68%, rgba(15,7,9,.24) 100%), linear-gradient(0deg, rgba(11,7,9,.2), transparent 50%);
}
.artist-invite::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle 340px at var(--field-x, 50%) var(--field-y, 50%), rgba(255,52,68,.28), transparent 76%);
  transition: opacity .22s ease;
  mix-blend-mode: screen;
}
.artist-invite:hover::after,.artist-invite:focus-within::after { opacity: 1; }
.artist-invite-inner {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 30px;
  min-height: 300px;
  padding-block: 38px;
}
.artist-invite-copy h2 { display: grid; gap: 5px; max-width: 760px; margin: 0; font-family: var(--display); letter-spacing: -.05em; }
.artist-invite-question { color: #fff; font-size: clamp(40px, 4.7vw, 62px); font-weight: 750; line-height: 1.02; }
.artist-invite-offer { color: #f4f1f2; font-size: clamp(23px, 2.6vw, 34px); font-weight: 600; line-height: 1.18; letter-spacing: -.035em; }
.artist-invite-button { flex: none; background: var(--yellow); color: var(--ink); box-shadow: 0 10px 28px rgba(0,0,0,.28); }
.artist-invite-button:hover { background: #ffe16a; color: var(--ink); }

@media (max-width: 1099px) {
  .artist-case { grid-template-columns: minmax(0, .84fr) minmax(0, 1.16fr); gap: 28px; }
  .artist-case-heading { grid-column: 1; }
  .artist-case-copy { grid-column: 1; }
  .artist-project-figure { grid-column: 2; grid-row: 1 / span 2; }
  .artist-invite-inner { grid-template-columns: 1fr; justify-items: start; gap: 22px; padding-block: 40px; }
  .artist-invite { min-height: 320px; }
  .artist-invite-inner { min-height: 320px; }
}

@media (max-width: 649px) {
  .featured-projects { padding-block: 46px; }
  .artist-case { grid-template-columns: 1fr; gap: 24px; }
  .artist-case-heading,.artist-case-copy,.artist-project-figure { grid-column: 1; grid-row: auto; }
  .artist-case-heading h2 { max-width: 440px; font-size: clamp(38px, 10vw, 49px); }
  .artist-case-copy h3 { font-size: 22px; }
  .artist-case-copy p { margin-block: 11px 17px; font-size: 15px; }
  .artist-site-preview { border-radius: 13px; transform: none; }
  .artist-site-preview:hover { transform: translateY(-3px); }
  .artist-invite { min-height: 390px; }
  .artist-invite-art { object-position: 53% center; }
  .artist-invite::before { background: linear-gradient(180deg, rgba(12,8,10,.83), rgba(12,8,10,.76) 54%, rgba(12,8,10,.43)); }
  .artist-invite-inner { min-height: 390px; align-content: center; gap: 25px; padding-block: 44px; }
  .artist-invite-question { font-size: clamp(39px, 10vw, 48px); }
  .artist-invite-offer { font-size: clamp(24px, 6.3vw, 29px); }
  .artist-invite-button { width: 100%; max-width: 360px; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .artist-site-preview,.artist-site-preview::after,.artist-invite::after { transition: none; }
  .artist-site-preview::after,.artist-invite::after { display: none; }
  .artist-site-preview { transform: none; }
  .artist-site-preview:hover { transform: none; }
}

/* Más aire para el caso destacado y la invitación a artistas. */
.featured-projects {
  padding-block: clamp(76px, 6.8vw, 102px);
  background: radial-gradient(ellipse 52% 110% at 90% 50%, rgba(101,214,209,.13), transparent 75%), #f2f3f4;
}
.artist-case { gap: clamp(28px, 3.5vw, 52px); }
.artist-case-copy {
  padding-left: clamp(18px, 2vw, 28px);
  border-left: 1px solid rgba(16,23,27,.18);
}
.artist-site-preview {
  aspect-ratio: 1.72 / 1;
  border-color: rgba(16,23,27,.12);
  box-shadow: 0 26px 54px rgba(13,25,29,.18), 0 0 0 1px rgba(255,255,255,.8);
}
.artist-invite,.artist-invite-inner { min-height: 382px; }
.artist-invite-inner { padding-block: 54px; }

/* El flujo gana espacio para respirar y mantiene el control humano visible. */
.flow-section { padding-block: clamp(112px, 9vw, 148px); }
.flow-visual {
  min-height: 500px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.flow-label,.flow-node,.flow-connector,.human-review { z-index: 2; }
.flow-node { width: 168px; min-height: 172px; }
.flow-orbit { width: min(78%, 560px); height: 320px; }
.human-review { bottom: 13px; }

/* Luz local sobre las superficies que muestran producto, proceso y marca. */
.flow-visual::before,
.service-feature .feature-image::before,
.service-feature .software-art::before,
.service-mini::before,
.artist-site-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .72;
  background: linear-gradient(112deg, transparent 38%, rgba(255,255,255,.08) 47%, rgba(101,214,209,.16) 50%, transparent 62%);
  background-size: 230% 100%;
  background-position: 180% 0;
}
.flow-visual::before { z-index: 0; }
.flow-visual::before { display: none; }
.flow-visual::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(ellipse 230px 190px at var(--field-x,50%) var(--field-y,50%), rgba(101,214,209,.2), transparent 76%);
  mix-blend-mode: screen;
  transition: opacity .25s ease;
}
.flow-orbit { z-index: 0; }
.flow-visual:hover::after,.flow-visual:focus-within::after { opacity: 1; }
.flow-visual > :not(.flow-orbit) { position: relative; z-index: 2; }
.flow-visual > .flow-label,.flow-visual > .human-review { position: absolute; }
.service-feature .feature-image,.service-feature .software-art { isolation: isolate; }
.service-feature .feature-image::before,.service-feature .software-art::before { z-index: 2; }
.service-feature .feature-image::after,.service-feature .software-art::after { z-index: 3; }
.service-feature .image-overlay { z-index: 1; }
.service-feature .browser-float,.service-feature .image-tag,
.service-feature .desktop-screen,.service-feature .software-sticker { z-index: 4; }
.service-mini::before,.service-mini::after { z-index: 0; }
.service-mini > * { position: relative; z-index: 1; }
.artist-site-preview::before { z-index: 1; }
.artist-site-preview::after { z-index: 2; }

.about-mark { isolation: isolate; }
.about-mark i.about-mark-light {
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(ellipse 210px 185px at var(--field-x,50%) var(--field-y,50%), rgba(101,214,209,.2), transparent 76%);
  transition: opacity .25s ease;
}
.about-mark:hover i.about-mark-light,.about-mark:focus-within i.about-mark-light { opacity: .9; }
.about-mark::after {
  border: 0;
  background: conic-gradient(from 0deg, rgba(255,202,0,.16) 0 62%, rgba(255,202,0,.9) 72%, rgba(101,214,209,.32) 77%, rgba(255,202,0,.16) 86% 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px));
  filter: drop-shadow(0 0 8px rgba(255,202,0,.22));
}
.about-mark img { z-index: 2; }
.about-mark > span { z-index: 2; }

.impact-window { isolation: isolate; }
.impact-window::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 42px 0 0;
  pointer-events: none;
  opacity: .62;
  background:
    radial-gradient(circle 240px at var(--field-x,50%) var(--field-y,50%), rgba(101,214,209,.16), transparent 76%),
    linear-gradient(112deg, transparent 40%, rgba(255,202,0,.16) 49%, rgba(101,214,209,.08) 52%, transparent 62%);
  background-size: auto, 230% 100%;
  background-position: center, 180% 0;
  mix-blend-mode: screen;
}
.impact-window .window-bar,.impact-window .impact-head,.impact-window .impact-map,.impact-window .impact-footer { position: relative; z-index: 2; }
.impact-window .impact-head,.impact-window .impact-footer { z-index: 3; }

.artist-invite::before {
  background:
    linear-gradient(90deg, rgba(12,7,9,.88) 0%, rgba(17,7,10,.78) 36%, rgba(19,7,10,.3) 68%, rgba(15,7,9,.24) 100%),
    linear-gradient(0deg, rgba(11,7,9,.2), transparent 50%),
    linear-gradient(112deg, transparent 40%, rgba(255,68,88,.24) 49%, rgba(255,196,84,.12) 52%, transparent 62%);
  background-size: auto, auto, 230% 100%;
  background-position: 0 0, 0 0, 180% 0;
}

@media (prefers-reduced-motion: no-preference) {
  .service-feature .feature-image::before,
  .service-feature .software-art::before,
  .service-mini::before,
  .artist-site-preview::before {
    animation: home-light-pass 15s ease-in-out infinite;
  }
  .impact-window::after { animation: impact-light-pass 15s ease-in-out infinite; }
  .artist-invite::before { animation: artist-light-pass 18s ease-in-out infinite; }
  .about-mark::after { animation: about-ring-turn 24s linear infinite; }
  @keyframes home-light-pass {
    0%,62% { background-position: 180% 0; }
    88%,100% { background-position: -80% 0; }
  }
  @keyframes artist-light-pass {
    0%,64% { background-position: 0 0, 0 0, 180% 0; }
    90%,100% { background-position: 0 0, 0 0, -80% 0; }
  }
  @keyframes impact-light-pass {
    0%,62% { background-position: center, 180% 0; }
    88%,100% { background-position: center, -80% 0; }
  }
  @keyframes about-ring-turn { to { transform: rotate(360deg); } }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .impact-window:hover::after { opacity: .92; }
  .about-mark:hover { box-shadow: 0 30px 68px rgba(20,39,44,.22), 0 0 38px rgba(255,202,0,.12); }
}

@media (max-width: 1099px) {
  .artist-invite,.artist-invite-inner { min-height: 366px; }
  .flow-section { padding-block: 102px; }
  .flow-visual { min-height: 450px; }
  .flow-node { width: 152px; min-height: 164px; }
}

@media (max-width: 899px) {
  .flow-section { padding-block: 94px; }
  .flow-visual { min-height: 440px; }
  .flow-node { width: 148px; min-height: 160px; }
}

@media (max-width: 649px) {
  .featured-projects { padding-block: 60px; }
  .artist-case-copy { padding: 18px 0 0; border-left: 0; border-top: 1px solid rgba(16,23,27,.18); }
  .artist-site-preview { aspect-ratio: 1.72 / 1; }
  .artist-site-preview img { object-fit: contain; background: #111416; }
  .artist-invite,.artist-invite-inner { min-height: 426px; }
  .artist-invite-inner { padding-block: 48px; }
  .flow-section { padding-block: 82px; }
  .flow-visual { min-height: 462px; padding-bottom: 54px; }
  .flow-node { min-height: 74px; }
  .flow-orbit { width: min(82vw, 320px); height: 350px; }
  .human-review { bottom: 12px; }
  .artist-invite::before {
    background:
      linear-gradient(180deg, rgba(12,8,10,.83), rgba(12,8,10,.76) 54%, rgba(12,8,10,.43)),
      linear-gradient(112deg, transparent 40%, rgba(255,68,88,.2) 49%, rgba(255,196,84,.1) 52%, transparent 62%);
    background-size: auto, 230% 100%;
    background-position: 0 0, 180% 0;
  }
}

@media (max-width: 649px) and (prefers-reduced-motion: no-preference) {
  .artist-invite::before { animation-name: artist-light-pass-mobile; }
  @keyframes artist-light-pass-mobile {
    0%,64% { background-position: 0 0, 180% 0; }
    90%,100% { background-position: 0 0, -80% 0; }
  }
}

@media (prefers-reduced-motion: reduce) {
  .artist-site-preview::before,.flow-visual::before,.service-feature .feature-image::before,
  .service-feature .software-art::before,.service-mini::before { display: none; }
  .impact-window::after { animation: none; }
  .about-mark::after { animation: none; }
  .about-mark i.about-mark-light,.flow-visual::after { transition: none; }
  .artist-invite::before {
    animation: none;
    background: linear-gradient(90deg, rgba(12,7,9,.88) 0%, rgba(17,7,10,.78) 36%, rgba(19,7,10,.3) 68%, rgba(15,7,9,.24) 100%), linear-gradient(0deg, rgba(11,7,9,.2), transparent 50%);
  }
}

/* El diagrama comunica el recorrido encendiendo cada etapa y su conexión. */
.flow-node--input { --stage-color: var(--yellow); --stage-glow: rgba(255,202,0,.4); }
.flow-node--ai { --stage-color: var(--teal); --stage-glow: rgba(101,214,209,.42); }
.flow-node--output { --stage-color: #d3c3ff; --stage-glow: rgba(211,195,255,.38); }

@media (prefers-reduced-motion: no-preference) {
  .flow-section.is-inview .flow-node--input { animation: flow-latch-input 10s linear infinite; }
  .flow-section.is-inview .connector-one { animation: flow-latch-line-one 10s linear infinite; }
  .flow-section.is-inview .flow-node--ai { animation: flow-latch-ai 10s linear infinite; }
  .flow-section.is-inview .connector-two { animation: flow-latch-line-two 10s linear infinite; }
  .flow-section.is-inview .flow-node--output { animation: flow-latch-output 10s linear infinite; }
  .flow-section.is-inview .connector-one i { animation: flow-latch-dot-one 10s linear infinite; }
  .flow-section.is-inview .connector-two i { animation: flow-latch-dot-two 10s linear infinite; }

  @keyframes flow-latch-input {
    0%,2% { border-color: rgba(203,231,231,.36); filter: none; transform: translateY(0); }
    4%,72% { border-color: var(--stage-color); filter: brightness(1.22) drop-shadow(0 0 16px var(--stage-glow)); transform: translateY(-2px); }
    80%,100% { border-color: rgba(203,231,231,.36); filter: none; transform: translateY(0); }
  }
  @keyframes flow-latch-line-one {
    0%,12% { opacity: .32; filter: none; }
    16%,72% { opacity: 1; filter: drop-shadow(0 0 7px rgba(255,202,0,.74)); }
    80%,100% { opacity: .32; filter: none; }
  }
  @keyframes flow-latch-ai {
    0%,27% { border-color: rgba(203,231,231,.36); filter: none; transform: translateY(0); }
    31%,72% { border-color: var(--stage-color); filter: brightness(1.22) drop-shadow(0 0 16px var(--stage-glow)); transform: translateY(-2px); }
    80%,100% { border-color: rgba(203,231,231,.36); filter: none; transform: translateY(0); }
  }
  @keyframes flow-latch-line-two {
    0%,38% { opacity: .32; filter: none; }
    42%,72% { opacity: 1; filter: drop-shadow(0 0 7px rgba(101,214,209,.76)); }
    80%,100% { opacity: .32; filter: none; }
  }
  @keyframes flow-latch-output {
    0%,52% { border-color: rgba(203,231,231,.36); filter: none; transform: translateY(0); }
    56%,72% { border-color: var(--stage-color); filter: brightness(1.22) drop-shadow(0 0 16px var(--stage-glow)); transform: translateY(-2px); }
    80%,100% { border-color: rgba(203,231,231,.36); filter: none; transform: translateY(0); }
  }
  @keyframes flow-latch-dot-one {
    0%,14% { left: 15%; opacity: 0; }
    16% { opacity: 1; }
    24% { left: calc(100% - 6px); opacity: 1; }
    72% { left: calc(100% - 6px); opacity: .78; }
    80%,100% { left: 15%; opacity: 0; }
  }
  @keyframes flow-latch-dot-two {
    0%,40% { left: 15%; opacity: 0; }
    42% { opacity: 1; }
    50% { left: calc(100% - 6px); opacity: 1; }
    72% { left: calc(100% - 6px); opacity: .78; }
    80%,100% { left: 15%; opacity: 0; }
  }
}

@media (max-width: 599px) and (prefers-reduced-motion: no-preference) {
  .flow-section.is-inview .connector-one i { animation-name: flow-latch-dot-one-vertical; }
  .flow-section.is-inview .connector-two i { animation-name: flow-latch-dot-two-vertical; }
  @keyframes flow-latch-dot-one-vertical {
    0%,14% { top: -3px; opacity: 0; }
    16% { opacity: 1; }
    24% { top: calc(100% - 6px); opacity: 1; }
    72% { top: calc(100% - 6px); opacity: .78; }
    80%,100% { top: -3px; opacity: 0; }
  }
  @keyframes flow-latch-dot-two-vertical {
    0%,40% { top: -3px; opacity: 0; }
    42% { opacity: 1; }
    50% { top: calc(100% - 6px); opacity: 1; }
    72% { top: calc(100% - 6px); opacity: .78; }
    80%,100% { top: -3px; opacity: 0; }
  }
}

@media (prefers-reduced-motion: reduce) {
  .flow-section .flow-node--input,.flow-section .flow-node--ai,
  .flow-section .flow-node--output,.flow-section .connector-one,
  .flow-section .connector-two {
    animation: none !important;
  }
  .flow-section .connector-one i,.flow-section .connector-two i {
    animation: none !important;
    opacity: .55;
  }
}
