/* Homepage student feature teaser — above studio interior
   Kits (random per load via JS data-hsf-kit / classes on #hka-home-student-feature):
   is-enter | is-kenburns | is-border-glow | is-sweep | is-name-reveal | is-rotate
*/
.hka-home-student-feature {
  --hsf-gold: #d4b87a;
  --hsf-gold-soft: rgba(212, 184, 122, 0.55);
  --hsf-ink: #111;
  display: block;
  max-width: 1100px;
  margin: 0 auto 28px;
  padding: 0 16px;
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
}
.hka-hsf__eyebrow {
  margin: 0 0 12px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8a7a55;
}

/* Gallery matte frame — bridges light page bg ↔ dark panel */
.hka-hsf__frame {
  --hsf-matte: #f4f0e6;
  --hsf-matte-edge: #e4dcc8;
  position: relative;
  padding: clamp(8px, 1.4vw, 14px);
  background: linear-gradient(
    145deg,
    #faf7f0 0%,
    var(--hsf-matte) 45%,
    var(--hsf-matte-edge) 100%
  );
  border: 1px solid rgba(138, 122, 85, 0.32);
  border-radius: 3px;
  box-sizing: border-box;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.65) inset,
    0 10px 28px rgba(40, 32, 18, 0.08),
    0 0 0 1px rgba(212, 184, 122, 0.1);
  animation: hka-hsf-frame-breathe 4.8s ease-in-out infinite;
}
/* Gold fillet + dark inner reveal (picture-frame stack) */
.hka-hsf__frame::before,
.hka-hsf__frame::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 4;
  border-radius: 1px;
}
.hka-hsf__frame::before {
  inset: 4px;
  border: 1px solid rgba(212, 184, 122, 0.62);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35) inset;
  animation: hka-hsf-frame-fillet 3.6s ease-in-out infinite;
}
.hka-hsf__frame::after {
  inset: 7px;
  border: 1px solid rgba(17, 17, 17, 0.55);
}
/* Soft highlight gliding along the matte rim only */
.hka-hsf__frame-shine {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 5;
  border-radius: inherit;
  padding: clamp(8px, 1.4vw, 14px);
  box-sizing: border-box;
  background: linear-gradient(
    115deg,
    transparent 0%,
    transparent 40%,
    rgba(255, 236, 180, 0.55) 50%,
    transparent 60%,
    transparent 100%
  );
  background-size: 220% 220%;
  animation: hka-hsf-frame-shine 6.5s ease-in-out infinite;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
}
@keyframes hka-hsf-frame-breathe {
  0%,
  100% {
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.65) inset,
      0 10px 28px rgba(40, 32, 18, 0.08),
      0 0 0 1px rgba(212, 184, 122, 0.1);
  }
  50% {
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.72) inset,
      0 12px 32px rgba(40, 32, 18, 0.1),
      0 0 16px rgba(212, 184, 122, 0.2);
  }
}
@keyframes hka-hsf-frame-fillet {
  0%,
  100% {
    border-color: rgba(212, 184, 122, 0.45);
  }
  50% {
    border-color: rgba(232, 205, 140, 0.9);
  }
}
@keyframes hka-hsf-frame-shine {
  0%,
  15% {
    background-position: 100% 0%;
  }
  50%,
  100% {
    background-position: -20% 100%;
  }
}

.hka-hsf__stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(120px, 220px) 1fr;
  gap: clamp(16px, 3vw, 32px);
  align-items: center;
  padding: clamp(16px, 2.5vw, 28px);
  background: var(--hsf-ink);
  color: #f5f5f7;
  border-radius: 1px;
  overflow: hidden;
  isolation: isolate;
}
.hka-hsf__portrait {
  margin: 0;
  overflow: hidden;
  border-radius: 2px;
  background: #222;
  position: relative;
  z-index: 1;
}
.hka-hsf__portrait img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  transform: scale(1);
}
.hka-hsf__copy {
  min-width: 0;
  position: relative;
  z-index: 1;
}
.hka-hsf__name {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.hka-hsf__sub {
  margin: 0 0 18px;
  font-size: clamp(0.92rem, 1.4vw, 1.05rem);
  line-height: 1.45;
  color: rgba(245, 245, 247, 0.78);
}

/* ——— Always-on glowing CTA button ——— */
.hka-hsf__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  max-width: 100%;
  padding: 0.7em 1.15em 0.72em;
  border: 1px solid var(--hsf-gold-soft);
  border-radius: 2px;
  background: linear-gradient(
    135deg,
    rgba(212, 184, 122, 0.22),
    rgba(212, 184, 122, 0.06) 55%,
    rgba(255, 255, 255, 0.04)
  );
  color: #f3e6c4;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  box-shadow:
    0 0 0 1px rgba(212, 184, 122, 0.12),
    0 0 18px rgba(212, 184, 122, 0.35),
    0 0 36px rgba(212, 184, 122, 0.12);
  animation: hka-hsf-cta-pulse 2.6s ease-in-out infinite;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
}
.hka-hsf__cta-arrow {
  display: inline-block;
  animation: hka-hsf-cta-arrow 1.6s ease-in-out infinite;
}
.hka-home-student-feature:hover .hka-hsf__cta,
.hka-home-student-feature:focus-visible .hka-hsf__cta {
  text-decoration: none;
  transform: translateY(-1px) scale(1.03);
  box-shadow:
    0 0 0 1px rgba(212, 184, 122, 0.35),
    0 0 28px rgba(212, 184, 122, 0.55),
    0 0 48px rgba(212, 184, 122, 0.22);
  background: linear-gradient(
    135deg,
    rgba(212, 184, 122, 0.34),
    rgba(212, 184, 122, 0.1) 55%,
    rgba(255, 255, 255, 0.06)
  );
}
@keyframes hka-hsf-cta-pulse {
  0%,
  100% {
    box-shadow:
      0 0 0 1px rgba(212, 184, 122, 0.12),
      0 0 14px rgba(212, 184, 122, 0.28),
      0 0 28px rgba(212, 184, 122, 0.08);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(212, 184, 122, 0.28),
      0 0 26px rgba(212, 184, 122, 0.55),
      0 0 44px rgba(212, 184, 122, 0.2);
  }
}
@keyframes hka-hsf-cta-arrow {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(4px);
  }
}

/* ——— Kit: entrance ——— */
.hka-home-student-feature.is-enter .hka-hsf__portrait,
.hka-home-student-feature.is-enter .hka-hsf__copy {
  opacity: 0;
  transform: translateY(14px);
  animation: hka-hsf-enter 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hka-home-student-feature.is-enter .hka-hsf__copy {
  animation-delay: 0.12s;
}
@keyframes hka-hsf-enter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ——— Kit: Ken Burns on portrait ——— */
.hka-home-student-feature.is-kenburns .hka-hsf__portrait img {
  animation: hka-hsf-kenburns 14s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes hka-hsf-kenburns {
  from {
    transform: scale(1) translate(0, 0);
  }
  to {
    transform: scale(1.08) translate(-2%, -1.5%);
  }
}

/* ——— Kit: breathing gold on frame (not the dark stage) ——— */
.hka-home-student-feature.is-border-glow .hka-hsf__frame {
  animation: hka-hsf-frame-breathe-strong 3.4s ease-in-out infinite;
}
.hka-home-student-feature.is-border-glow .hka-hsf__frame::before {
  animation: hka-hsf-frame-fillet 2.4s ease-in-out infinite;
}
@keyframes hka-hsf-frame-breathe-strong {
  0%,
  100% {
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.65) inset,
      0 10px 28px rgba(40, 32, 18, 0.08),
      0 0 10px rgba(212, 184, 122, 0.16);
  }
  50% {
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.75) inset,
      0 14px 36px rgba(40, 32, 18, 0.12),
      0 0 28px rgba(212, 184, 122, 0.38);
  }
}

/* ——— Kit: gold sweep line ——— */
.hka-hsf__sweep {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0;
}
.hka-home-student-feature.is-sweep .hka-hsf__sweep {
  opacity: 1;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(212, 184, 122, 0.14) 48%,
    rgba(255, 240, 200, 0.28) 50%,
    rgba(212, 184, 122, 0.12) 52%,
    transparent 65%
  );
  background-size: 220% 100%;
  animation: hka-hsf-sweep 5.5s ease-in-out infinite;
  mix-blend-mode: screen;
}
@keyframes hka-hsf-sweep {
  0%,
  18% {
    background-position: 100% 0;
  }
  55%,
  100% {
    background-position: -100% 0;
  }
}

/* ——— Kit: name reveal ——— */
.hka-home-student-feature.is-name-reveal .hka-hsf__name {
  opacity: 0;
  filter: blur(4px);
  animation: hka-hsf-name-reveal 0.9s ease 0.35s forwards;
}
@keyframes hka-hsf-name-reveal {
  to {
    opacity: 1;
    filter: blur(0);
  }
}

/* ——— Kit: soft rotate (JS toggles .is-fading) ——— */
.hka-home-student-feature.is-rotate .hka-hsf__portrait img,
.hka-home-student-feature.is-rotate .hka-hsf__name,
.hka-home-student-feature.is-rotate .hka-hsf__sub {
  transition:
    opacity 0.55s ease,
    filter 0.55s ease;
}
.hka-home-student-feature.is-rotate.is-fading .hka-hsf__portrait img,
.hka-home-student-feature.is-rotate.is-fading .hka-hsf__name,
.hka-home-student-feature.is-rotate.is-fading .hka-hsf__sub {
  opacity: 0.15;
  filter: blur(2px);
}

@media (max-width: 640px) {
  .hka-hsf__stage {
    grid-template-columns: 1fr;
  }
  .hka-hsf__portrait {
    max-width: 220px;
  }
  .hka-hsf__cta {
    font-size: 0.8rem;
    padding: 0.65em 1em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hka-hsf__cta,
  .hka-hsf__cta-arrow,
  .hka-hsf__frame,
  .hka-hsf__frame::before,
  .hka-hsf__frame-shine,
  .hka-home-student-feature.is-enter .hka-hsf__portrait,
  .hka-home-student-feature.is-enter .hka-hsf__copy,
  .hka-home-student-feature.is-kenburns .hka-hsf__portrait img,
  .hka-home-student-feature.is-border-glow .hka-hsf__frame,
  .hka-home-student-feature.is-sweep .hka-hsf__sweep,
  .hka-home-student-feature.is-name-reveal .hka-hsf__name {
    animation: none !important;
  }
  .hka-home-student-feature.is-enter .hka-hsf__portrait,
  .hka-home-student-feature.is-enter .hka-hsf__copy,
  .hka-home-student-feature.is-name-reveal .hka-hsf__name {
    opacity: 1;
    transform: none;
    filter: none;
  }
  .hka-home-student-feature.is-kenburns .hka-hsf__portrait img {
    transform: none;
  }
  .hka-hsf__cta {
    box-shadow:
      0 0 0 1px rgba(212, 184, 122, 0.2),
      0 0 16px rgba(212, 184, 122, 0.25);
  }
}
