/* ═══════════════════════════════════════════════════════════════════════════════
   THE BUTTON. One definition, for every call to action on every public page.

   WHY THIS FILE EXISTS. On 10-09-2026 the owner asked why "BBQ BOEKEN" and "BEKIJK DE
   BIEREN" looked like two different controls on the same page. They were. The same pill was
   written SIX times, in three stylesheets, with six sets of numbers:

     .cbtn                                        master.css        16px 30px, gold fill
     .hero-cta a / .shop-cta a / .wa-closed-cta a index.css         15px 26px, cream + dark
     .xp-card .xp-card-cta                        index.css         10px 18px, cream + faint
     .cinfo-actions a                             master.css        12px 22px, cream + dark
     .vk-actions a                                verkooppunten.css 14px 22px, cream + dark
     .tile .tile-go                               master.css        no pill at all — gold
                                                                    text with an arrow

   THE ROOT CAUSE, and it is worth knowing before "simplifying" this away: the homepage
   loads ONLY css/index.css, never master.css — deliberately, it is the first paint of the
   site. So master.css's button was unreachable there and a second one grew. Every page that
   needed a button in a file master.css did not cover grew its own. This file is small and
   linked by BOTH shells, which is the only arrangement that stops a seventh copy appearing.

   ── THE FOUR RULES, all four set by the owner on 10-09-2026 ──────────────────────
   The first pass unified the colours but left three tells, and he caught all three from one
   screenshot: "the hover over on the buttons is also different… also seems like the shape is
   different and we lose the arrow. We really really need to have 1 style element for buttons
   to make the UX look like it was build with consistency in mind."

   1. ONE SHAPE. One padding, one radius, one type scale. There is no small variant. The
      earlier build had a 10px 18px size "for inside a card", and that is exactly what made
      the wegwijzer buttons a different shape from the booking buttons on the same page.
   2. ONE ARROW, on every button, drawn HERE as `::after`. It used to be markup — a
      `<span class="arr">` on some, an inline span on others, a CSS `::after` on `.tile-go`,
      and nothing at all on `.cbtn`. Three mechanisms means some buttons lose it. Do not put
      an arrow in the markup; this file draws it.
   3. THE LEFTMOST BUTTON IS BRAND YELLOW, the rest follow. *"Lets agree that the most left
      is always brand yellow to catch attention and the others follow."* Driven by POSITION,
      not by a class in the markup: `:first-of-type` inside a CTA container, and the button
      in the first card of a card row. There is no `.is-primary` any more — one mechanism, so
      a page cannot forget to tag it.
   4. ONE HOVER. Ghost buttons gain the gold outline and gold text; the filled one keeps its
      gold fill. Both lift 2px. A card-wide hover produces exactly the same result as
      hovering the button itself — the previous build filled the in-card ghost SOLID gold on
      card hover, which is why two buttons on one page behaved differently.

   ALIASED, NOT REWRITTEN. The old class names are kept in the selector lists below as
   aliases, so no page's markup had to be re-tagged and no layout hook was lost.
   `.hero-cta`, `.shop-cta`, `.wa-closed-cta`, `.cinfo-actions`, `.vk-actions` stay as they
   are — they are flex CONTAINERS that position the buttons, and they still own that job.
   NEW COMPONENTS DO NOT GET AN ALIAS. Write `class="cbtn"` in the markup.

   Enforced by apps/local/tests/button_single_source/run.sh. §10 of site/sitestandards.md
   carries the table.
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ── the pill: ghost is the default ───────────────────────────────────────────────
   Ghost by default and filled by position, never the other way round. A page that adds a
   button therefore gets the QUIET one unless it is the first, which is the safe direction:
   a missed tag costs a highlight, not a screen full of gold. */
.cbtn,
.hero-cta a,
.shop-cta a,
.wa-closed-cta a,
.cinfo-actions a,
.vk-actions a,
.xp-card .xp-card-cta,
.tile .tile-go,
/* The attachment picker on /contact/ is a <label> for a visually hidden file input, so it is a
   button in every way that matters. It stood at 12px 22px next to the form's own 15px 26px
   submit — two shapes on one form, which is the complaint this file was written for. */
.cfile-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 15px 26px;
  border-radius: 999px;
  /* Stated in the same rule as the background, every time — §0b of sitestandards.md. The
     ghost's background is `transparent`, and its colour is still declared right here. */
  background: transparent;
  color: var(--cream);
  border: 1px solid rgba(244, 239, 227, 0.30);
  font: inherit;
  font-size: var(--fs-label);
  /* LINE-HEIGHT IS NOT OPTIONAL. `font: inherit` also inherits the line-height of whatever
     section the button sits in, and those differ — 1.6 in a paragraph, 1.2 in a card. Same
     padding, same font size, and the buttons still came out 56px and 58px tall on different
     pages. Measured; two heights is two shapes, which is the thing this file exists to stop. */
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.2s var(--ease), border-color 0.25s var(--ease),
              color 0.25s var(--ease), background 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

/* ── the arrow ────────────────────────────────────────────────────────────────────
   `var(--sans)` because the brand display face has no arrow glyph and would fall back to
   something that does not match the label's weight. */
.cbtn::after,
.hero-cta a::after,
.shop-cta a::after,
.wa-closed-cta a::after,
.cinfo-actions a::after,
.vk-actions a::after,
.xp-card .xp-card-cta::after,
.tile .tile-go::after,
.cfile-btn::after {
  content: '\2192';
  font-family: var(--sans);
  line-height: 1;
}

/* ── filled: the leftmost button ──────────────────────────────────────────────────
   `:first-of-type` inside each CTA container, and the button inside the FIRST card of a card
   row. Source order is left-to-right in every one of these containers — they are all flex
   rows or grids without `order` — so "first" and "leftmost" are the same thing.
   When a row wraps to one column on a phone, "leftmost" becomes "topmost", which is the same
   intent: the first thing you read is the one you are meant to press. */
.cbtn.is-first,
.experience-grid > :first-child .cbtn,
.hero-cta a:first-of-type,
.shop-cta a:first-of-type,
.wa-closed-cta a:first-of-type,
.cinfo-actions a:first-of-type,
.vk-actions a:first-of-type,
.xp-cards > :first-child .xp-card-cta,
.tiles > :first-child .tile-go {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
}

/* ── hover / focus, identical everywhere ──────────────────────────────────────────
   The card selectors are here so that hovering a whole clickable card gives its button the
   SAME state as pointing at the button would. They used to fill it solid gold instead, and
   that was one of the three tells. */
.experience-btn:is(:hover,:focus-visible,[aria-pressed="true"]) .cbtn,
.cbtn:hover,
.cbtn:focus-visible,
.hero-cta a:hover,
.hero-cta a:focus-visible,
.shop-cta a:hover,
.shop-cta a:focus-visible,
.wa-closed-cta a:hover,
.wa-closed-cta a:focus-visible,
.cinfo-actions a:hover,
.cinfo-actions a:focus-visible,
.vk-actions a:hover,
.vk-actions a:focus-visible,
.tile:hover .tile-go,
.tile:focus-visible .tile-go,
.xp-card a:hover .xp-card-cta,
.xp-card a:focus-visible .xp-card-cta,
.cfile-btn:hover,
.cfile-btn:focus-visible {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.42);
}

/* The filled one is already gold, so it keeps its ink foreground and only lifts. This block
   MUST stay after the hover block above — it wins by order, not by specificity. */
.experience-grid > :first-child .cbtn,
.cbtn.is-first:hover,
.cbtn.is-first:focus-visible,
.hero-cta a:first-of-type:hover,
.hero-cta a:first-of-type:focus-visible,
.shop-cta a:first-of-type:hover,
.shop-cta a:first-of-type:focus-visible,
.wa-closed-cta a:first-of-type:hover,
.wa-closed-cta a:first-of-type:focus-visible,
.cinfo-actions a:first-of-type:hover,
.cinfo-actions a:first-of-type:focus-visible,
.vk-actions a:first-of-type:hover,
.vk-actions a:first-of-type:focus-visible,
.tiles > :first-child .tile-go,
.tiles > :first-child:hover .tile-go,
.xp-cards > :first-child .xp-card-cta,
.xp-cards > :first-child a:hover .xp-card-cta {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
}

/* ── states ───────────────────────────────────────────────────────────────────────
   A submit button is the leftmost thing in its own action row, so it is gold — which is
   correct: on a contact form, sending IS the one action you want taken. */
.cbtn:active { transform: scale(0.98); }

/* ── press, identical everywhere (Tier D `press`, 11-09-2026) ─────────────────────
   The same family as the hover block above, so every button on the site answers a
   pointer-down the same way: 140ms to 0.97. On desktop the magnet script owns these
   buttons' transform and folds the press in itself (an inline transform outranks any
   rule here); this block is what serves touch, where that script is off. Keyed on the
   body switchboard from site_shared/motion_flags.php. */
body[data-motion~="press"] .cbtn:active,
body[data-motion~="press"] .hero-cta a:active,
body[data-motion~="press"] .shop-cta a:active,
body[data-motion~="press"] .wa-closed-cta a:active,
body[data-motion~="press"] .cinfo-actions a:active,
body[data-motion~="press"] .vk-actions a:active,
body[data-motion~="press"] .bp-actions a:active,
body[data-motion~="press"] .cform-actions button:active,
body[data-motion~="press"] .tile:active .tile-go,
body[data-motion~="press"] .xp-card a:active .xp-card-cta,
body[data-motion~="press"] .cfile-btn:active {
  transform: scale(0.97);
  transition-duration: 140ms;
}

/* Touch fires :hover on tap and it STICKS until the next tap elsewhere, so the
   -2px lift above stayed on after the finger left. No pointer, no lift. */
@media (hover: none) {
  body[data-motion~="press"] .experience-btn:hover .cbtn,
  body[data-motion~="press"] .cbtn:hover,
  body[data-motion~="press"] .hero-cta a:hover,
  body[data-motion~="press"] .shop-cta a:hover,
  body[data-motion~="press"] .wa-closed-cta a:hover,
  body[data-motion~="press"] .cinfo-actions a:hover,
  body[data-motion~="press"] .vk-actions a:hover,
  body[data-motion~="press"] .tile:hover .tile-go,
  body[data-motion~="press"] .xp-card a:hover .xp-card-cta,
  body[data-motion~="press"] .cfile-btn:hover {
    transform: none;
  }
}
/* ONE YELLOW, AT FULL STRENGTH, ON EVERY BUTTON (owner, 16-09-2026: "some buttons are bright
   brand yellow and some are a bit dim — bright is the one we need").
   There was never a second yellow: every filled button is rgb(255,217,0). The dim ones were these
   two states, which faded the SAME colour to 55-60% — a waiting submit and a locked one. The
   owner chose one look for all of them, and was told the trade-off: a locked button now looks
   exactly like a live one.
   WHAT CARRIES THE STATE INSTEAD. The cursor still says it (`wait` / `not-allowed`), the button
   still does not move or glow on hover, and a locked button stays CLICKABLE on purpose so the
   click can answer what is missing — that is why it is not `disabled`. Do not re-add opacity
   here; if this state needs to read louder, change the LABEL or the answer on click. */
.cbtn:disabled {
  cursor: wait;
  transform: none;
  box-shadow: none;
}
.cbtn.is-locked { cursor: not-allowed; }
.cbtn.is-locked:hover { transform: none; box-shadow: none; }

/* A rejected attachment turns the picker's border red. This is a LOOK on a button, so it lives
   here and not in master.css beside the rest of the .cfile row — that is the rule this file
   enforces, and it applies to its own states too. */
.cfield.has-error .cfile-btn { border-color: #e0726a; }
