/* The Benison call to action (src/lib.mjs: ctaPrimary, ctaSecondary), chosen from the CTA concepts (concepts/cta):
   primary   = Kinetic: a serif label, a hairline linkage and a diamond housing that turns and passes the arrow through;
   secondary = Editorial: tracked capitals with a rule that extends, and a gold line drawn along the base.
   Shared rules: a target at least 3.5rem (56px) tall; hover is never needed to understand the button; a press state for touch;
   a keyboard focus ring distinct from hover; reduced motion keeps every state without the movement.
   Colours follow the surface: forest by default; limestone inside [data-tone="paper"] or with .cta--light. */

.cta {--cta-ink: #F3EEE4; --cta-accent: #D9BE86; --cta-line: rgba(217, 190, 134, 0.34); --cta-on-accent: #0A1713; --cta-focus: #F3EEE4;
  --cta-ease: cubic-bezier(0.65, 0, 0.25, 1);
  position: relative; display: inline-flex; align-items: center; color: var(--cta-ink); text-decoration: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;}
[data-tone="paper"] .cta, .cta--light {--cta-ink: #173B32; --cta-accent: #7A6440; --cta-line: rgba(23, 59, 50, 0.32); --cta-on-accent: #F3EEE4; --cta-focus: #173B32;}
.cta svg {display: block; width: 100%; height: auto; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: square;}
.cta:focus {outline: none;}
button.cta {padding-left: 0; border: 0; background: none; font: inherit; text-align: left;}
button.cta:disabled {opacity: 0.55; cursor: progress;}

/* =====================================================================================================================
   02 Kinetic: a serif label, a linkage, and a diamond housing that turns and passes the arrow through
   ===================================================================================================================== */
.cta--kinetic {min-height: 3.5rem; padding: 0.35rem 0.35rem 0.35rem 0; gap: 0;}
.cta--kinetic .cta_text {font-family: var(--serif); font-weight: 380; font-size: 1.32rem; letter-spacing: -0.012em; font-variation-settings: "SOFT" 100; line-height: 1; transition: transform 0.55s var(--cta-ease);}
.cta--kinetic .cta_text em {font-style: italic; font-variation-settings: "SOFT" 100, "WONK" 1; color: var(--cta-accent);}
.cta--kinetic .cta_link {width: 1.6rem; height: 1px; margin: 0 0.85rem 0 1rem; background-color: var(--cta-line); transform-origin: 0 50%; transition: width 0.55s var(--cta-ease), background-color 0.35s ease;}
.cta--kinetic .cta_gear {position: relative; flex: none; width: 2.6rem; height: 2.6rem; margin: 0.45rem; overflow: hidden; border: 1px solid var(--cta-accent); transform: rotate(45deg);
  transition: transform 0.7s var(--cta-ease), background-color 0.35s ease 0.1s, border-color 0.35s ease;}
.cta--kinetic .cta_turn {position: absolute; inset: 0; transform: rotate(-45deg); transition: transform 0.7s var(--cta-ease); color: var(--cta-accent);}
.cta--kinetic .cta_arrow {position: absolute; left: 50%; top: 50%; width: 1.15rem; margin: -0.27rem 0 0 -0.575rem; transition: transform 0.55s var(--cta-ease);}
.cta--kinetic .cta_arrow--in {transform: translateX(-2.6rem);}
/* hover: the linkage draws out, the housing turns a quarter and fills, the arrow passes through */
.cta--kinetic:is(:hover, .is-hover) .cta_link {width: 2.6rem; background-color: var(--cta-accent);}
.cta--kinetic:is(:hover, .is-hover) .cta_gear {transform: rotate(135deg); background-color: var(--cta-accent);}
.cta--kinetic:is(:hover, .is-hover) .cta_turn {transform: rotate(-135deg); color: var(--cta-on-accent);}
.cta--kinetic:is(:hover, .is-hover) .cta_arrow--out {transform: translateX(2.6rem);}
.cta--kinetic:is(:hover, .is-hover) .cta_arrow--in {transform: none;}
/* press: the housing compresses, the label leans in */
.cta--kinetic:is(:active, .is-press) .cta_gear {transform: rotate(135deg) scale(0.86); background-color: var(--cta-accent); transition-duration: 0.18s;}
.cta--kinetic:is(:active, .is-press) .cta_turn {transform: rotate(-135deg); color: var(--cta-on-accent);}
.cta--kinetic:is(:active, .is-press) .cta_arrow--out {transform: translateX(2.6rem);}
.cta--kinetic:is(:active, .is-press) .cta_arrow--in {transform: translateX(2px);}
.cta--kinetic:is(:active, .is-press) .cta_text {transform: translateX(3px);}
.cta--kinetic:is(:active, .is-press) .cta_link {width: 2.1rem; background-color: var(--cta-accent);}
/* keyboard focus: a ring around the whole, and the linkage drawn */
.cta--kinetic:is(:focus-visible, .is-focus) {outline: 2px solid var(--cta-focus); outline-offset: 0.5rem;}
.cta--kinetic:is(:focus-visible, .is-focus) .cta_link {width: 2.6rem; background-color: var(--cta-accent);}

/* =====================================================================================================================
   03 Editorial: tracked capitals, a dividing rule that opens the words apart, and a line drawn along the base
   ===================================================================================================================== */
.cta--editorial {flex-direction: column; align-items: flex-start; justify-content: center; min-height: 3.5rem; padding: 0.95rem 0;}
.cta--editorial .cta_kicker {margin-bottom: 0.7rem; font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.34em; text-transform: uppercase; color: var(--cta-accent); transition: opacity 0.4s ease, transform 0.55s var(--cta-ease);}
.cta--editorial .cta_line {display: flex; align-items: center; font-family: var(--sans); font-size: 0.84rem; font-weight: 500; letter-spacing: 0.32em; text-transform: uppercase; white-space: nowrap;}
.cta--editorial .cta_rule {width: 1.75rem; height: 1px; margin: 0 0.9rem 0 0.6rem; background-color: var(--cta-accent); transition: width 0.65s var(--cta-ease);}
.cta--editorial .cta_under {position: absolute; left: 0; right: 0.32em; bottom: 0; height: 1px; background-color: var(--cta-line); overflow: hidden;}
.cta--editorial .cta_under::after {content: ""; position: absolute; inset: 0; background-color: var(--cta-accent); transform: scaleX(0); transform-origin: 100% 50%; transition: transform 0.6s var(--cta-ease);}
/* hover: the rule opens the words apart, the base line draws from the left (and leaves to the right) */
.cta--editorial:is(:hover, .is-hover) .cta_rule {width: 4.25rem;}
.cta--editorial:is(:hover, .is-hover) .cta_under::after {transform: scaleX(1); transform-origin: 0 50%;}
.cta--editorial:is(:hover, .is-hover) .cta_kicker {transform: translateX(0.3rem);}
/* press: the rule draws back in */
.cta--editorial:is(:active, .is-press) .cta_rule {width: 1rem; transition-duration: 0.2s;}
.cta--editorial:is(:active, .is-press) .cta_under::after {transform: scaleX(1); transform-origin: 0 50%;}
.cta--editorial:is(:active, .is-press) .cta_line {opacity: 0.8;}
/* keyboard focus: the base line drawn, and a ring */
.cta--editorial:is(:focus-visible, .is-focus) {outline: 2px solid var(--cta-focus); outline-offset: 0.6rem;}
.cta--editorial:is(:focus-visible, .is-focus) .cta_under::after {transform: scaleX(1);}

/* a single label: the rule follows it, and extends on hover */
.cta--editorial .cta_rule--end {margin: 0 0 0 1rem;}

/* Phones: every concept stays on one line and inside the screen, with the same 56px-plus target */
@media (max-width: 479px) {
  .cta--kinetic .cta_text {font-size: 1.12rem; white-space: nowrap;}
  .cta--kinetic .cta_link {width: 1rem; margin: 0 0.6rem 0 0.75rem;}
  .cta--kinetic:is(:hover, .is-hover, :focus-visible, .is-focus) .cta_link {width: 1.75rem;}
  .cta--kinetic:is(:active, .is-press) .cta_link {width: 1.4rem;}
  .cta--editorial .cta_line {font-size: 0.76rem; letter-spacing: 0.24em;}
  .cta--editorial .cta_rule {width: 1.25rem; margin: 0 0.7rem 0 0.45rem;}
  .cta--editorial:is(:hover, .is-hover) .cta_rule {width: 2.5rem;}
  .cta--editorial:is(:active, .is-press) .cta_rule {width: 0.75rem;}
}

/* Reduced motion: every state still shows, it simply arrives without travelling */
@media (prefers-reduced-motion: reduce) {
  .cta, .cta *, .cta::before, .cta *::after {transition-duration: 0.01s !important; transition-delay: 0s !important;}
}

