/* ------------------------------------------------------------------
   Portfolio UI kit — components
   Built only from tokens.css. Pair each with its text-style class.
   ------------------------------------------------------------------ */

/* Button — pink fill, white label, square corners.
   Hover: fill turns black and the label rolls up, a copy rolling in from below
   (same motion as the headline rise-in).
   <a class="btn text-label-md" href="…">
     <span class="btn__label"><span data-text="Contact">Contact</span></span>
   </a> */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  background: var(--color-pink);
  color: var(--color-white);
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: background-color 0.25s ease;
}
.btn__label {
  display: block;
  overflow: clip; /* the mask the label rolls through */
  white-space: nowrap; /* one line always — even while the button animates its width */
}
.btn__label > span {
  display: block;
  position: relative;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn__label > span::after {
  content: attr(data-text);
  content: attr(data-text) / ""; /* empty alt: screen readers don't hear it twice */
  position: absolute;
  left: 0;
  top: 100%;
}
.btn:hover,
.btn:focus-visible {
  background: var(--color-black);
}
.btn:hover .btn__label > span,
.btn:focus-visible .btn__label > span {
  transform: translateY(-100%);
}
.btn:focus-visible {
  outline: 2px solid var(--color-black);
  outline-offset: 2px;
}
/* Icon button — square 40px, one 24px icon (case-page top bar)
   <a class="btn btn--icon btn--on-image" href="…" aria-label="Back"><img src="assets/icons/back.svg" alt="" /></a> */
.btn--icon {
  padding: 8px;
}
.btn--icon img {
  display: block;
  width: 24px;
  height: 24px;
}

/* Outline (Figma 80:225803): 1px black inside stroke, black label, no fill —
   e.g. the header's "Full CV" download on the CV. Fills black on hover. */
.btn--outline {
  background: transparent;
  color: var(--color-black);
  box-shadow: inset 0 0 0 1px var(--color-black); /* inside stroke: keeps the 40px height */
}
.btn--outline:hover,
.btn--outline:focus-visible {
  background: var(--color-black);
  color: var(--color-white);
}

/* Over a photo: translucent black fill (case-study sections) */
.btn--on-image {
  background: var(--color-black-10);
}
.btn--on-image:hover,
.btn--on-image:focus-visible {
  background: var(--color-black);
}
/* Unavailable (e.g. a store the app isn't on yet): no hover change; the
   cursor shows an X via data-cursor="blocked" */
.btn[aria-disabled="true"]:hover {
  background: var(--color-pink);
}
.btn--on-image[aria-disabled="true"]:hover {
  background: var(--color-black-10);
}
@media (prefers-reduced-motion: reduce) {
  .btn,
  .btn__label > span {
    transition: none;
  }
}

/* Tag — accent frame with a 16px accent flag, black label.
   Accent is lime by default; set --tag-accent on any parent to recolor
   (e.g. --tag-accent: var(--color-magenta)).
   <span class="tag"><span class="tag__label text-label-sm">WEB3</span></span> */
.tag {
  display: inline-flex;
  padding-left: 16px;
  background: var(--tag-accent, var(--color-lime));
  border: 2px solid var(--tag-accent, var(--color-lime));
}
.tag__label {
  padding: 2px 6px;
  background: var(--color-black);
  color: var(--color-white);
  white-space: nowrap;
}

/* Chip — small black label on its own (e.g. "NDA" on a case image).
   Same look as the tag's label.
   <span class="chip text-label-sm">NDA</span> */
.chip {
  display: inline-block;
  padding: 2px 6px;
  background: var(--color-black);
  color: var(--color-white);
  white-space: nowrap;
}

/* Cursor — follows the pointer (scripts/cursor.js). Three states:
     default   8px dot
     .is-link     dot inside a 26px ring — over anything clickable
     .is-blocked  X inside the ring — over something you can't open (NDA case)
     .is-scroll   up/down chevrons, no dot — over an area that scrolls (app preview)
   Everything is drawn white with `difference` blending, which inverts what's
   underneath: black on the white page, white over dark text, inverse hue over
   color (teal over pink buttons, violet over lime).
   <div class="cursor"><span class="cursor__ring"></span><span class="cursor__dot"></span>
     <img class="cursor__x" src="assets/cursor/x.svg" width="8" height="8" alt="" /></div> */
.cursor {
  position: fixed;
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  mix-blend-mode: difference;
  pointer-events: none;
  z-index: 100;
}
.cursor__ring,
.cursor__dot,
.cursor__x {
  position: absolute;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}
.cursor__ring {
  inset: 0;
  border: 1px solid var(--color-white);
  border-radius: 999px;
  opacity: 0;
  transform: scale(0.3);
}
.cursor__dot,
.cursor__x {
  left: 9px; /* (26 - 8) / 2 */
  top: 9px;
  width: 8px;
  height: 8px;
}
.cursor__dot {
  border-radius: 50%;
  background: var(--color-white);
}
.cursor__x {
  filter: invert(1); /* the icon is black; white is what difference-blends to black */
  opacity: 0;
  transform: scale(0.4) rotate(-45deg);
}
.cursor.is-link .cursor__ring,
.cursor.is-blocked .cursor__ring {
  opacity: 1;
  transform: none;
}
.cursor.is-blocked .cursor__dot {
  opacity: 0;
  transform: scale(0.4);
}
.cursor.is-blocked .cursor__x {
  opacity: 1;
  transform: none;
}
.cursor__scroll {
  position: absolute;
  left: 7px; /* (26 - 12) / 2 */
  top: 1px; /* (26 - 24) / 2 */
  width: 12px;
  height: 24px;
  filter: invert(1); /* black icon; white is what difference-blends to black */
  opacity: 0;
  transform: scale(0.6);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}
.cursor.is-scroll .cursor__dot {
  opacity: 0;
  transform: scale(0.4);
}
.cursor.is-scroll .cursor__scroll {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .cursor__ring,
  .cursor__dot,
  .cursor__x {
    transition: none;
  }
}
