/*
 * Parked off the top of its positioned ancestor and slid in by keyboard focus.
 *
 * The slide is the WHOLE affordance, so it is CSS rather than two inline-style
 * writes from `onFocus`/`onBlur`: a transform declared here retimes with
 * `--lotics-duration-fast` and collapses under `prefers-reduced-motion`, which
 * a hand-written `transition: transform 0.15s` never did.
 *
 * `:focus-visible`, not `:focus` — theming.md §2.1's `--ring`. The link is unreachable by
 * pointer while it is parked, so the two agree in practice and the ring is the
 * one every other migrated control paints.
 */
@layer theme, base, lotics, components, utilities;
@layer lotics.tokens, lotics.reset, lotics.components;

@layer lotics.components {
  .lotics-skip-link {
    position: absolute;
    top: 0;
    left: 0;
    z-index: var(--lotics-z-skip-link);
    padding: var(--lotics-space-8) var(--lotics-space-16);
    margin: 0;
    border: 0 solid var(--border);
    border-radius: var(--lotics-radius-control);
    background-color: var(--primary);
    color: var(--lotics-ink-on-inverse);
    text-decoration: none;
    appearance: none;
    cursor: pointer;
    /* §5 rule 1 — the label is the element's own text, so its type is this
       rule's. `normal` on the two it never set: a one-line chip's box is its
       padding plus the label's natural line, which is what shipped, and the md
       rung's 26px leading would grow the chip by 6px for nothing. */
    font-family: var(--font-sans);
    font-size: var(--lotics-text-md);
    line-height: normal;
    letter-spacing: normal;
    font-weight: var(--lotics-weight-regular);
    font-feature-settings: var(--lotics-font-features);
    transform: translateY(-200%);
    transition: transform var(--lotics-duration-fast) var(--lotics-ease-standard);
  }

  .lotics-skip-link:focus-visible {
    transform: translateY(var(--lotics-space-8));
    outline: var(--lotics-ring-width) solid var(--ring);
    outline-offset: 0;
  }
}
