/* Jenko Digital — flowing motion, mobile first, with a no-motion baseline. */

/* A calm, wave-led first impression, built only with CSS/SVG geometry. */
.hero-visual { position: relative; width: 100%; min-width: 0; }
.hero-visual .hero-art { width: 100%; }
.hero-photo-static {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 24px;
}
@media (max-width: 479px) {
  .hero-photo-static { border-radius: 18px; }
}
.hero h1 em {
  position: relative;
  display: inline-block;
  isolation: isolate;
}
.hero h1 em::after {
  content: '';
  position: absolute;
  z-index: -1;
  left: -.015em;
  right: -.015em;
  bottom: .025em;
  height: .17em;
  border-radius: 100px;
  background: #D8F5BC;
  transform-origin: left center;
}

.hero-art .hero-glow {
  position: absolute;
  z-index: 0;
  width: 76%;
  height: 86%;
  top: 4%;
  right: -8%;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 42%, #C6F0F2D9, #D8F5BC80 37%, transparent 72%);
  opacity: .55;
  pointer-events: none;
}
.hero-art .hero-waves {
  position: absolute;
  z-index: 1;
  top: -8%;
  left: -10%;
  width: 120%;
  height: 116%;
  fill: none;
  stroke: #FFFFFF;
  stroke-width: 2.6;
  stroke-linecap: round;
  opacity: .76;
  pointer-events: none;
}
.hero-waves path:nth-child(2) { stroke: #D8F5BC; opacity: .7; }
.hero-waves path:nth-child(3) { stroke: #C6F0F2; opacity: .55; }
.hero-art .mock { z-index: 2; }
.hero-art .float { z-index: 3; }
.hero-art .hero-spark { z-index: 3; }
.hero-art .mock { transform: rotate(-4deg); }
.hero-art .float { transform: rotate(3deg); }
.hero-art .hero-photo {
  position: absolute;
  z-index: 2;
  left: 8%;
  top: 11%;
  width: 84%;
  height: 72%;
  display: block;
  object-fit: cover;
  object-position: center;
  border: 5px solid rgba(255, 255, 255, .86);
  border-radius: 20px;
  box-shadow: 0 18px 45px rgba(33, 20, 57, .24);
  transform: rotate(-3deg);
}
@media (max-width: 479px) {
  .hero-art .hero-photo {
    left: 6%;
    top: 11%;
    width: 88%;
    height: 70%;
    object-position: 54% center;
    border-width: 4px;
    border-radius: 15px;
  }
}

/* More breathing room and slightly smaller headings on narrow screens. */
@media (max-width: 679px) {
  .container { padding-left: clamp(24px, 6.5vw, 30px); padding-right: clamp(24px, 6.5vw, 30px); }
  h1 { font-size: clamp(2.3rem, 10.85vw, 3.2rem); line-height: 1.08; letter-spacing: -.047em; }
  .hero p { font-size: 16px; }
  .section-title { font-size: clamp(2.15rem, 8.4vw, 3.2rem); }
  .statement h2 { font-size: clamp(2.17rem, 8.5vw, 3.2rem); }
  .contact h2 { font-size: clamp(2.35rem, 9.4vw, 3.8rem); }
  .service h3 { font-size: 24px; }
  .step h3 { font-size: 26px; }
}

/* Services and process need their own inner gutters because .section also sets padding. */
@media (max-width: 767px) {
  #servicios.section.container,
  #proceso.section.container {
    padding-left: clamp(30px, 8vw, 38px);
    padding-right: clamp(26px, 7vw, 32px);
  }
  #servicios .section-title,
  #proceso .section-title {
    font-size: clamp(2.02rem, 8vw, 3rem);
    line-height: 1.1;
  }
  #proceso .step h3 { font-size: 25px; }
}
@media (max-width: 359px) {
  .theme-toggle .theme-label { display: none; }
  .theme-toggle { width: 44px; padding: 8px; }
}

@media (min-width: 680px) {
  .hero-visual { max-width: 650px; margin-inline: auto; }
}

@media (min-width: 950px) {
  .hero-visual { max-width: none; }
}

@media (min-width: 1100px) {
  .navlinks a { position: relative; }
  .navlinks a::after {
    content: '';
    position: absolute;
    bottom: 7px;
    left: 0;
    width: 100%;
    height: 2px;
    border-radius: 5px;
    background: #9265DA;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .25s ease;
  }
  .navlinks a:hover::after,
  .navlinks a:focus-visible::after { transform: scaleX(1); }
}

/* Process timeline: center each marker over its text, with clear gaps around circles. */
.steps {
  position: relative;
  padding-left: 0;
}

.steps::before,
.steps::after {
  content: none;
}

.step { position: relative; border-top: 0; padding-top: 37px; text-align: center; }
.step::before {
  content: '';
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 4px;
  transform: translateX(-50%);
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid #9265DA;
}
.step::after {
  content: '';
  position: absolute;
  z-index: 0;
  left: 0;
  top: 9px;
  width: 100%;
  height: 2px;
  border-radius: 10px;
  background: linear-gradient(to right, #9265DA 0 calc(50% - 10px), transparent calc(50% - 10px) calc(50% + 10px), #9265DA calc(50% + 10px) 100%);
}

:root[data-theme='dark'] .step::before { border-color: #C4A7FF; }
:root[data-theme='dark'] .step::after { background: linear-gradient(to right, #C4A7FF 0 calc(50% - 10px), transparent calc(50% - 10px) calc(50% + 10px), #C4A7FF calc(50% + 10px) 100%); }

@media (min-width: 950px) {
  .step { padding-top: 25px; }
  .step::before { top: -6px; }
  .step::after {
    left: calc(50% + 9px);
    top: 0;
    width: calc(100% + 10px);
    height: 2px;
    background: #9265DA;
  }
  .step:last-child::after { content: none; }
  :root[data-theme='dark'] .step::after { background: #C4A7FF; }
}

@media (hover: hover) and (pointer: fine) {
  :is(.services > .service, .projects-grid > .project-card):hover {
    z-index: 1;
    border-color: #A98AD5;
    box-shadow: 0 12px 26px #45316726;
  }
  :root[data-theme="dark"] :is(.services > .service, .projects-grid > .project-card):hover {
    background-color: #3B2955;
    box-shadow: 0 14px 32px #10081D66;
  }
}

@media (prefers-reduced-motion: no-preference) {
  /* Content never starts hidden until IntersectionObserver is ready. */
  .motion-ready .reveal {
    opacity: 0;
    transform: translate3d(0, 30px, 0);
    transition: opacity .82s ease, transform .82s cubic-bezier(.16, .82, .24, 1);
    transition-delay: var(--reveal-delay, 0ms);
  }
  .motion-ready .reveal.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }

  /* Gentle stagger, never a long wait for information. */
  .services .service:nth-child(2),
  .services .service:nth-child(5) { --reveal-delay: 90ms; }
  .services .service:nth-child(3),
  .services .service:nth-child(6) { --reveal-delay: 170ms; }
  .steps .step:nth-child(2) { --reveal-delay: 110ms; }
  .steps .step:nth-child(3) { --reveal-delay: 220ms; }
  .projects-grid .project-card:nth-child(2) { --reveal-delay: 130ms; }

  .motion-ready .hero > div:first-child > .eyebrow,
  .motion-ready .hero h1,
  .motion-ready .hero p,
  .motion-ready .hero > div:first-child > .btn,
  .motion-ready .hero-art {
    animation: jenko-enter .9s cubic-bezier(.16, .82, .24, 1) both;
  }
  .motion-ready .hero h1 { animation-delay: 80ms; }
  .motion-ready .hero p { animation-delay: 170ms; }
  .motion-ready .hero > div:first-child > .btn { animation-delay: 240ms; }
  .motion-ready .hero-art { animation: jenko-art-enter 1.1s cubic-bezier(.16, .82, .24, 1) .18s both; }

  /* The hero keeps flowing after the initial entrance. Only transforms/opacity move. */
  .motion-ready .hero-art .mock { animation: jenko-mock-wave 7s ease-in-out 1.1s infinite; }
  .motion-ready .hero-art .hero-photo { animation: jenko-mock-wave 7s ease-in-out 1.1s infinite; }
  .motion-ready .hero-art .float { animation: jenko-float-wave 5.8s ease-in-out .6s infinite; }
  .motion-ready .hero-art .hero-glow { animation: jenko-glow-wave 10s ease-in-out .5s infinite; }
  .motion-ready .hero-art .hero-waves { animation: jenko-wave-drift 9s ease-in-out .2s infinite; }
  .motion-ready .hero-art .hero-spark { animation: jenko-spark-soft 8s ease-in-out 1.1s infinite; }
  .motion-ready .hero-art .hero-waves path:nth-child(1) { animation: jenko-wave-line-one 8s ease-in-out infinite; }
  .motion-ready .hero-art .hero-waves path:nth-child(2) { animation: jenko-wave-line-two 10s ease-in-out infinite; }
  .motion-ready .hero > div:first-child > .eyebrow::before { animation: jenko-dot-breathe 3.6s ease-in-out infinite; }
  .motion-ready .hero h1 em::after {
    transform: scaleX(0);
    animation: jenko-highlight-sweep .9s cubic-bezier(.2, .75, .2, 1) .63s forwards;
  }
  .motion-ready .mockbar i { animation: jenko-window-dot 4.7s ease-in-out infinite; }
  .motion-ready .mockbar i:nth-child(2) { animation-delay: .3s; }
  .motion-ready .mockbar i:nth-child(3) { animation-delay: .6s; }

  :is(.services > .service, .projects-grid > .project-card) {
    --card-hover-transition: scale .28s cubic-bezier(.2, .75, .2, 1),
      box-shadow .28s ease, border-color .28s ease, background-color .28s ease;
    transition: var(--card-hover-transition);
  }
  .motion-ready :is(.services > .service, .projects-grid > .project-card).reveal {
    transition: opacity .82s ease var(--reveal-delay, 0ms),
      transform .82s cubic-bezier(.16, .82, .24, 1) var(--reveal-delay, 0ms),
      var(--card-hover-transition);
  }
  .service-icon { transition: transform .35s cubic-bezier(.2, .75, .2, 1); }
  .btn .ui-icon { transition: transform .25s ease; }

  @media (hover: hover) and (pointer: fine) {
    :is(.services > .service, .projects-grid > .project-card):hover { scale: 1.04; }
    .service:hover .service-icon { transform: translate3d(3px, -3px, 0) rotate(5deg); }
    .btn:hover .ui-icon { transform: translate3d(3px, -3px, 0); }
  }

  @keyframes jenko-enter {
    from { opacity: 0; transform: translate3d(0, 26px, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
  }
  @keyframes jenko-art-enter {
    from { opacity: 0; transform: translate3d(0, 26px, 0) scale(.975); }
    to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
  }
  @keyframes jenko-mock-wave {
    0%, 100% { transform: rotate(-4deg) translate3d(0, 0, 0); }
    50% { transform: rotate(-1.5deg) translate3d(7px, -15px, 0); }
  }
  @keyframes jenko-float-wave {
    0%, 100% { transform: rotate(3deg) translate3d(0, 0, 0); }
    50% { transform: rotate(1deg) translate3d(-4px, -17px, 0); }
  }
  @keyframes jenko-glow-wave {
    0%, 100% { transform: translate3d(0, 0, 0); opacity: .5; }
    50% { transform: translate3d(-25px, 10px, 0); opacity: .85; }
  }
  @keyframes jenko-wave-drift {
    0%, 100% { transform: translate3d(-15px, 8px, 0); opacity: .72; }
    50% { transform: translate3d(18px, -12px, 0); opacity: .96; }
  }
  @keyframes jenko-wave-line-one {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(0, -8px, 0); }
  }
  @keyframes jenko-wave-line-two {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(0, 10px, 0); }
  }
  @keyframes jenko-spark-soft {
    0%, 100% { transform: rotate(-15deg) scale(.97); }
    50% { transform: rotate(5deg) scale(1.12); }
  }
  @keyframes jenko-dot-breathe {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.35); opacity: .64; }
  }
  @keyframes jenko-highlight-sweep {
    to { transform: scaleX(1); }
  }
  @keyframes jenko-window-dot {
    0%, 100% { opacity: .8; transform: scale(1); }
    45% { opacity: 1; transform: scale(1.12); }
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  .reveal, .motion-ready .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Contact: a genuine project photo, framed consistently with Jenko's rounded imagery. */
#contacto .contact-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 30px;
}
#contacto .contact-copy { min-width: 0; }
#contacto .contact-copy h2 { margin-bottom: 0; }
#contacto .contact-copy p {
  max-width: 440px;
  margin: 24px 0 0;
}
#contacto .contact-copy .btn { margin-top: 24px; }
#contacto .contact-image {
  width: 100%;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  border-radius: 22px;
  background: #7e629c;
}
#contacto .contact-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 55% center;
}
@media (min-width: 950px) {
  #contacto .contact-inner {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: clamp(40px, 5.5vw, 78px);
  }
  #contacto .contact-copy h2 { font-size: clamp(3.7rem, 5.5vw, 5.8rem); }
  #contacto .contact-image { aspect-ratio: 5 / 4; border-radius: 26px; }
}
