/* ==========================================================================
   Links — nav-indicator, small-link, large-link
   ========================================================================== */

/* ── Nav indicator — shared by small-link and header nav ───────────────────── */
.nav-indicator {
  position: relative;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.nav-dot {
  position: absolute;
  left: 3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: currentColor;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.nav-arrow-icon {
  position: absolute;
  left: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* ── Small link ────────────────────────────────────────────────────────────── */
.small-link {
  display: inline-flex;
  align-items: center;
  gap: var(--gap-sm);
  font-size: var(--body-xs);
  font-weight: 400;
  color: var(--text-title);
  text-decoration: none;
  padding: 4px 0;
  cursor: pointer; /* keep pointer on hover-only <span> labels (Services/Work/Always On) */
}
.small-link:hover .nav-dot        { opacity: 0; transform: translateX(6px); }
.small-link:hover .nav-arrow-icon { opacity: 1; transform: translateX(0); }

/* Light variant — dark backgrounds */
.small-link--light                   { color: #fff; }
.small-link--light .nav-dot          { background-color: #fff; }
.small-link--light:hover             { color: rgba(255,255,255,0.7); }

/* ── Large link ────────────────────────────────────────────────────────────── */
/* One component, two modes — .large-link--dark (default) / .large-link--light.
   The modes differ ONLY in resting text colors, set via the --ll-* variables;
   every interaction (arrow slide-in on hover/press) is identical in both. */
.large-link {
  display: inline-block;
  width: fit-content;
  max-width: 100%;   /* nowrap titles must still be capped by the card */
  text-decoration: none;
  --ll-label: var(--text-title);
  --ll-title: var(--text-title);
  color: var(--ll-title);
}
.large-link--dark {
  --ll-label: var(--text-title);
  --ll-title: var(--text-title);
}
.large-link--light {
  --ll-label: var(--text-light);   /* Figma: the label is solid white, not 60% */
  --ll-title: #fff;
}
.large-link__label {
  font-size: var(--body-md);          /* 20px */
  font-weight: 400;
  line-height: var(--body-md-lh);     /* 30px */
  letter-spacing: var(--body-md-ls);
  color: var(--ll-label);
  margin-bottom: 4px;
}
.large-link__title {
  display: flex;
  align-items: center;
  font-size: var(--title-card);        /* Figma H2 Small: 36px */
  font-weight: 400;
  line-height: var(--title-card-lh);   /* 48px */
  letter-spacing: var(--title-card-ls);
  color: var(--ll-title);
}

/* Card titles are ONE line. The text needs a box of its own because the
   heading is a flex row (the arrow slides in beside it) and text-overflow
   only applies to a block container; min-width:0 is what lets a flex item
   shrink below its content width, which is the whole trick. A title that
   fits shows no ellipsis at all. */
.large-link__text {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.large-link__arrow {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-width 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}
.large-link__arrow svg {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  padding-right: 16px;    /* space between arrow and text */
  box-sizing: content-box;
}
/* The arrow slide-in — identical in both modes. Triggers on hovering the whole
   CARD: the entire tile is one <a>, so the arrow has to answer wherever the
   pointer is on it — reacting only to the title read as if the image were not
   part of the link (Kajsa 2026-10-05). Both case cards and Always On cards use
   .case-card as the wrapper, so one selector covers both. .large-link:hover
   stays for a link rendered outside a card, and .is-pressed is the touch path
   (added by main.js on tap so the transition plays before navigation;
   :active alone dies at touchend). */
.case-card:hover .large-link__arrow,
.large-link:hover .large-link__arrow,
.case-card.is-pressed .large-link__arrow {
  max-width: 42px;        /* 26px icon + 16px padding */
  opacity: 1;
}
/* Keyboard focus — kept as its OWN rule: a browser that doesn't know
   :focus-visible drops the whole selector list, and must never take the
   hover/press rule down with it. */
.large-link:focus-visible .large-link__arrow,
.case-card:focus-visible .large-link__arrow {
  max-width: 42px;
  opacity: 1;
}
