/* css/sections/09-ownership.css · G6 · D09: the one smoked band, hairline rows (row recipe from base) */
@layer sections {
  .s-ownership {
    background: var(--color-paper-2);
    margin-block-start: var(--gap-a);
    padding-block: var(--space-3xl);
  }

  .s-ownership .own__head {
    display: grid;
    gap: var(--space-md);
    margin-block-end: var(--space-2xl);
  }
  .s-ownership .own__title { max-width: 14ch; }

  /* the list closes with a hairline under the last visible row (the warranty) */
  .s-ownership .own__warranty:not([hidden])::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: var(--rule-hair);
    background: var(--color-rule);
    transform: scaleX(var(--rule, 1));
    transform-origin: left;
  }
  .s-ownership .rows__title { min-width: 0; }
  .s-ownership .rows__text { max-width: 52ch; }

  @media (min-width: 64em) {
    .s-ownership .own__head {
      grid-template-columns: repeat(12, minmax(0, 1fr));
      column-gap: var(--gap-columns);
      margin-block-end: var(--space-3xl);
    }
    .s-ownership .own__title { grid-column: 1 / 7; }
    .s-ownership .own__lead { grid-column: 1 / 6; }
    .s-ownership .rows__row { padding-block: var(--space-xl); }
  }

  /* rows that lead to how-it-works: the whole row is the target (44px+), no underline on the title,
   * a surface step on hover and a small line arrow at the row's far end (not glued to the text) */
  .s-ownership .rows__row:has(.rows__title .link) {
    padding-inline: var(--space-md) calc(var(--space-md) + 28px);   /* room for the arrow while the row stacks */
    margin-inline: calc(-1 * var(--space-md));
    transition: background-color var(--dur-short) var(--ease-out);
  }
  .s-ownership .rows__row:has(.rows__title .link)::before { inset-inline: var(--space-md); }
  .s-ownership .rows__row:has(.rows__title .link)::after {
    content: "";
    position: absolute;
    inset-inline-end: var(--space-md);
    top: 50%;
    width: 16px;
    height: 16px;
    translate: 0 -50%;
    background: var(--color-muted);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 8h11M9 3.5 13.5 8 9 12.5'/%3E%3C/svg%3E") center / 16px no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 8h11M9 3.5 13.5 8 9 12.5'/%3E%3C/svg%3E") center / 16px no-repeat;
    transition: translate var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out);
    pointer-events: none;
  }
  @media (min-width: 64em) {   /* the text column ends at column 10: the arrow sits in the empty end columns */
    .s-ownership .rows__row:has(.rows__title .link) { padding-inline-end: var(--space-md); }
  }
  .s-ownership .rows__title .link {
    text-decoration-line: none;
    color: inherit;
  }
  .s-ownership .rows__title .link::after {   /* stretched hit area over the whole row */
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
  }
  .s-ownership .rows__title .link:focus-visible { outline: none; }
  .s-ownership .rows__title .link:focus-visible::after { outline: var(--focus-w) solid var(--color-focus); outline-offset: -2px; }
  @media (hover: hover) {
    .s-ownership .rows__row:has(.rows__title .link):hover { background-color: color-mix(in oklch, var(--color-ink) 4%, transparent); }
    .s-ownership .rows__row:has(.rows__title .link):hover::after { background-color: var(--color-ink); translate: 3px -50%; }
  }
  @media (prefers-reduced-motion: reduce) {
    .s-ownership .rows__row:has(.rows__title .link):hover::after { translate: 0 -50%; }
  }
}
