/* ── Motion system ─────────────────────────────────────────────────────────── */
/* Mirror of src/js/animation.js — keep in sync */

:root {
  --dur-fast:  150ms;
  --dur-base:  250ms;
  --dur-slow:  500ms;   /* matches hero profile image */
  --dur-xslow: 1000ms;  /* overlay entry / exit */

  --ease-default: ease;
  --ease-in-out:  ease-in-out;
  --ease-out:     cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-in:      cubic-bezier(0.55, 0.055, 0.675, 0.19);
}

/* ── Persona module styles ── */

.collection-item {
  position: relative;
}

.case--hidden {
  display: none;
}

/* Assumes .collection-list is a flex or grid container */
.case--featured {
  order: -1;
}

.case-star {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  background: none;
  border: none;
  padding: 4px 6px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  color: #aaa;
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-default),
              color    var(--dur-fast) var(--ease-default);
}

.collection-item:hover .case-star,
.case-star:focus-visible {
  opacity: 1;
}

.case-star:hover {
  color: #111;
}

/* ── Greeting overlay ─────────────────────────────────────────────────────── */

#jh-greeting {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: #0c0c0c;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 10vw;
  text-align: left;
  /* visibility: visible overrides html.jh-persona-loading body { visibility: hidden }
     so the overlay is shown while everything else stays hidden behind it */
  visibility: visible;
  opacity: 1;
  transition: opacity var(--dur-xslow) var(--ease-default);
}

#jh-greeting.jh-greeting--fade {
  opacity: 0;
}

.jh-greeting-line {
  font-family: 'Inter Tight', sans-serif;
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  font-weight: 400;
  color: #fff;
  line-height: 1.3;
  margin: 0;
  padding: 0;
  /* JS toggles inline opacity/transition for the per-line fade */
}

.jh-cursor {
  display: inline-block;
  width: 2px;
  height: 0.8em;
  background: #fff;
  margin-left: 4px;
  vertical-align: middle;
  animation: jh-blink 0.85s step-end infinite;
}

@keyframes jh-blink {
  50% { opacity: 0; }
}

.jh-greeting-proceed {
  margin-top: 3.5rem;
  padding: 14px 40px;
  font-family: 'Inter Tight', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #fff;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.5);
  cursor: pointer;
  opacity: 0;
  transition: opacity    var(--dur-slow)  var(--ease-default),
              background var(--dur-base)  var(--ease-default),
              color      var(--dur-base)  var(--ease-default),
              border-color var(--dur-base) var(--ease-default);
}

.jh-greeting-proceed:hover {
  background: #fff;
  color: #0c0c0c;
  border-color: #fff;
}

.jh-greeting-proceed.jh-proceed--visible {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  #jh-greeting,
  .jh-greeting-line,
  .jh-greeting-proceed {
    transition: none;
  }
  .jh-cursor {
    animation: none;
  }
}
