/**
 * Link atom — colour and interactive states (hover / focus / visited) for
 * Tone=Blue and Tone=Ink. Layout and typography are Tailwind utilities in
 * link.twig. Tokens only; no raw values.
 *
 * .is-hover / .is-focus / .is-visited mirror the pseudo-classes so the states
 * can be shown statically in Storybook (passed via modifier_class); they are
 * not schema props.
 */

.link {
  @apply relative transition-colors duration-150;
}

/* Figma node 304:30 — focus ring is an absolutely-placed ::after overlay:
   inset: -4px (4px outside the element), 2px solid ink-primary border,
   border-radius: 8px on the ring, 4px on the element itself. */
.link:focus-visible,
.link.is-focus {
  @apply outline-none rounded-[4px];
}

.link:focus-visible::after,
.link.is-focus::after {
  @apply content-[''] absolute -inset-1 border-2 border-neutral-900 rounded-[8px] pointer-events-none;
}

/* CTA-high — element radius bumps to 8px so the ::after ring (inset: -4px)
   gets 12px, keeping clearance visually consistent. */
.link--cta-high:focus-visible,
.link--cta-high.is-focus {
  @apply rounded-[8px];
}

.link--cta-high:focus-visible::after,
.link--cta-high.is-focus::after {
  @apply rounded-[12px];
}

/* Stretched overlay — makes the nearest `position:relative` ancestor fully
   clickable. Sets `static` to override `.link`'s `relative` so `::before`
   stretches to the card's containing block, not the link's own box. */
.link--stretched {
  @apply static;
}

.link--stretched::before {
  @apply content-[''] absolute inset-0 z-[1];
}

/* ---- Tone: Blue — standalone link in body copy, cards, rate strip ---- */
.link--tone-blue {
  @apply text-link;
}

.link--tone-blue:hover,
.link--tone-blue.is-hover {
  @apply text-brand-navy;
}

.link--tone-blue:visited,
.link--tone-blue.is-visited {
  @apply text-neutral-800; /* --ink/eyebrow #2e5b70 — Figma node 304:13 */
}

/* ---- Tone: Ink — heading-row link; reads as ink at rest ---- */
.link--tone-ink {
  @apply text-brand-navy;
}

.link--tone-ink:hover,
.link--tone-ink.is-hover {
  @apply text-link; /* PROPOSED: lifts to action blue on hover */
}

.link--tone-ink:visited,
.link--tone-ink.is-visited {
  @apply text-brand-navy; /* stays ink on visited */
}
