/* ============================================================
   components.css — the component library.
   Every component is base class + modifier classes.
   States (hover/focus/disabled) are defined ONCE on the base.
   Catalogue each component in COMPONENTS.md.
   ============================================================ */

/* ---- Button ------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font: inherit;
  font-weight: var(--weight-medium);
  line-height: 1;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast), border-color var(--transition-fast);
}
.btn:hover    { transform: translateY(-1px); }
.btn:active   { transform: translateY(0); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn--primary   { background: var(--color-brand); color: #fff; }
.btn--primary:hover { background: var(--color-brand-hover); color: #fff; }
.btn--secondary { background: transparent; border-color: var(--color-border); color: var(--color-text); }
.btn--secondary:hover { border-color: var(--color-brand); }
.btn--ghost     { background: transparent; color: var(--color-brand); padding-inline: var(--space-2); }
.btn--danger    { background: var(--color-danger); color: #fff; }
.btn--danger:hover { background: color-mix(in srgb, var(--color-danger) 85%, #000); }

/* Sizes — share the control-height scale so buttons line up with inputs */
.btn--sm { height: var(--control-height-sm); padding-inline: var(--space-3); font-size: var(--text-sm); }
.btn--lg { height: var(--control-height-lg); padding-inline: var(--space-8); font-size: var(--text-lg); }
.btn { height: var(--control-height); }
.btn--block { width: 100%; }

/* ---- Card -------------------------------------------------- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
}
.card--featured { border-color: var(--color-brand); box-shadow: var(--shadow-md); }
.card__title { font-size: var(--text-lg); margin-bottom: var(--space-2); }
.card__body  { color: var(--color-text-muted); }

/* ---- Pill / badge ------------------------------------------ */
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  border-radius: var(--radius-full);
  background: var(--color-surface-2);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

/* ---- Nav --------------------------------------------------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding-block: var(--space-4);
}
.nav__links { display: flex; gap: var(--space-6); align-items: center; }
.nav__brand { font-weight: var(--weight-bold); color: var(--color-text); display: inline-flex; align-items: center; gap: var(--space-2); }
.nav__brand img { display: block; width: auto; height: 28px; border-radius: var(--radius-sm); }
.nav__links a[aria-current="page"] { color: var(--color-text); font-weight: var(--weight-medium); }
/* Hamburger toggle — hidden on desktop, revealed on mobile only once JS
   enhances the nav. Without JS the links simply wrap (see below). */
.nav__toggle {
  display: none; align-items: center; justify-content: center;
  width: var(--control-height); height: var(--control-height); padding: 0;
  color: var(--color-text); background: transparent;
  border: 1px solid var(--color-border); border-radius: var(--radius-md); cursor: pointer;
}
.nav__toggle:hover { border-color: var(--color-brand); }
.nav__toggle:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; }
@media (max-width: 640px) {
  .nav { flex-wrap: wrap; }
  /* No-JS fallback: the links wrap onto their own row and stay reachable. */
  .nav__links { flex-wrap: wrap; flex-basis: 100%; gap: var(--space-4); }
  /* Enhanced: the toggle controls a stacked disclosure menu. */
  .nav.is-enhanced .nav__toggle { display: inline-flex; }
  .nav.is-enhanced .nav__links { display: none; flex-direction: column; align-items: stretch; flex-basis: 100%; }
  .nav.is-enhanced .nav__links.is-open { display: flex; }
  .nav.is-enhanced .nav__links a { padding-block: var(--space-2); }
}

/* ---- Nav dropdown ----------------------------------------- */
.nav__dropdown { position: relative; }
.nav__dropdown-toggle {
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--color-link); font-size: inherit; font-family: inherit;
  display: inline-flex; align-items: center; gap: var(--space-1);
}
.nav__dropdown-toggle:hover { color: var(--color-brand-hover); }
.nav__dropdown-toggle:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; border-radius: 2px; }
.nav__dropdown-toggle svg { transition: transform 0.2s; }
.nav__dropdown-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav__dropdown-menu {
  position: absolute; top: calc(100% + var(--space-2)); left: 0;
  min-width: 14rem; background: var(--color-surface, #1a1a1a);
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); padding: var(--space-2);
  display: none; flex-direction: column; gap: 0; z-index: 100;
}
.nav__dropdown-menu.is-open { display: flex; }
.nav__dropdown-menu a {
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm);
  color: var(--color-text-muted); font-size: var(--text-sm);
  display: block;
}
.nav__dropdown-menu a:hover { background: var(--color-surface-2); color: var(--color-text); }
@media (max-width: 640px) {
  .nav__dropdown-menu { position: static; box-shadow: none; border: none; padding: var(--space-1) 0 var(--space-1) var(--space-4); background: transparent; }
  .nav__dropdown-menu a { padding-block: var(--space-1); }
}

/* ---- Grid -------------------------------------------------- */
.grid {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

/* ---- Grid system (12 columns) -----------------------------
   .grid-12 is the container; .col-span-N (1–12) sets width.
   Gap uses tokens. Below 640px every column goes full-width so
   layouts stay mobile-first without per-column breakpoints. */
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--space-6);
}
.grid-12.gap-sm { gap: var(--space-3); }
.grid-12.gap-lg { gap: var(--space-12); }

.col-span-1  { grid-column: span 1; }
.col-span-2  { grid-column: span 2; }
.col-span-3  { grid-column: span 3; }
.col-span-4  { grid-column: span 4; }
.col-span-5  { grid-column: span 5; }
.col-span-6  { grid-column: span 6; }
.col-span-7  { grid-column: span 7; }
.col-span-8  { grid-column: span 8; }
.col-span-9  { grid-column: span 9; }
.col-span-10 { grid-column: span 10; }
.col-span-11 { grid-column: span 11; }
.col-span-12 { grid-column: span 12; }
.col-start-2 { grid-column-start: 2; }  /* offset helper example */
.col-start-3 { grid-column-start: 3; }
.col-start-4 { grid-column-start: 4; }

@media (max-width: 640px) {
  .grid-12 > [class*="col-span"] { grid-column: 1 / -1; }
}

/* Responsive tiers (Bootstrap-style): col-md-N applies ≥768px,
   col-lg-N ≥1024px. Combine with a base .col-span-N for the
   small-screen width, e.g. class="col-span-12 col-md-6 col-lg-4". */
@media (min-width: 768px) {
  .col-md-1{grid-column:span 1}.col-md-2{grid-column:span 2}.col-md-3{grid-column:span 3}
  .col-md-4{grid-column:span 4}.col-md-5{grid-column:span 5}.col-md-6{grid-column:span 6}
  .col-md-7{grid-column:span 7}.col-md-8{grid-column:span 8}.col-md-9{grid-column:span 9}
  .col-md-10{grid-column:span 10}.col-md-11{grid-column:span 11}.col-md-12{grid-column:span 12}
}
@media (min-width: 1024px) {
  .col-lg-1{grid-column:span 1}.col-lg-2{grid-column:span 2}.col-lg-3{grid-column:span 3}
  .col-lg-4{grid-column:span 4}.col-lg-5{grid-column:span 5}.col-lg-6{grid-column:span 6}
  .col-lg-7{grid-column:span 7}.col-lg-8{grid-column:span 8}.col-lg-9{grid-column:span 9}
  .col-lg-10{grid-column:span 10}.col-lg-11{grid-column:span 11}.col-lg-12{grid-column:span 12}
}

/* ---- Icon -------------------------------------------------
   <svg class="icon"><use href="assets/icons.svg#icon-NAME"></use></svg>
   Sizes in em so an icon scales with its surrounding text. */
.icon {
  width: 1.25em; height: 1.25em;
  flex: 0 0 auto;
  vertical-align: -0.18em;   /* optical alignment with text baseline */
  color: inherit;            /* strokes use currentColor */
}
.icon--sm { width: 1em;   height: 1em;   vertical-align: -0.12em; }
.icon--lg { width: 1.5em; height: 1.5em; vertical-align: -0.25em; }
.icon--xl { width: 2rem;  height: 2rem; }

/* ---- External icon utility (Lucide / Iconoir) -------------
   Renders any monochrome SVG via CSS mask so it inherits
   currentColor — works with Lucide & Iconoir CDN files alike:
   <i class="ico" style="--ico:url('…/coffee.svg')" aria-hidden="true"></i>
   Stroke icons stay crisp; multicolour icons aren't supported (by design). */
.ico {
  display: inline-block;
  width: 1.25em; height: 1.25em;
  flex: 0 0 auto;
  vertical-align: -0.18em;
  background-color: currentColor;
  -webkit-mask: var(--ico) center / contain no-repeat;
          mask: var(--ico) center / contain no-repeat;
}
.ico--sm { width: 1em;   height: 1em;   vertical-align: -0.12em; }
.ico--lg { width: 1.5em; height: 1.5em; vertical-align: -0.25em; }
.ico--xl { width: 2rem;  height: 2rem; }

/* ---- Hero -------------------------------------------------- */
.hero { text-align: center; padding-block: var(--space-24); }
.hero__title    { max-width: 18ch; margin-inline: auto; }
.hero__subtitle { max-width: var(--max-width-prose); margin-inline: auto; font-size: var(--text-lg); color: var(--color-text-muted); }
.hero__actions  { display: flex; gap: var(--space-3); justify-content: center; flex-wrap: wrap; }

/* Fluid headline: scales without breakpoints */
.hero__title { font-size: clamp(var(--text-3xl), 6vw, var(--text-4xl)); }

/* ============================================================
   The 10 most important components continue below.
   Patterns adapted from Tailwind UI + Chakra UI, expressed in
   token-driven vanilla CSS. Interactivity lives in scripts/ui.js.
   ============================================================ */

/* ---- 2. Form field ---------------------------------------- */
.field { display: flex; flex-direction: column; gap: var(--space-2); max-width: var(--max-width-prose); }
.field__label { font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--color-text); }
.field__label .req { color: var(--color-danger); }
.field__hint  { font-size: var(--text-xs); color: var(--color-text-muted); }
.field__error { font-size: var(--text-xs); color: var(--color-danger); }

.input {
  height: var(--control-height);
  padding: 0 var(--space-3);
  font: inherit;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
textarea.input { height: auto; padding-block: var(--space-3); resize: vertical; min-height: 6rem; }
.input::placeholder { color: var(--color-text-muted); }
.input:hover { border-color: color-mix(in srgb, var(--color-border) 60%, var(--color-text-muted)); }
.input:focus-visible {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-brand) 30%, transparent);
}
.input:disabled { opacity: 0.5; cursor: not-allowed; }
/* Invalid state — paired with .field__error text, never colour alone */
.field--invalid .input,
.input[aria-invalid="true"] {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-danger) 25%, transparent);
}

/* ---- 5. Modal / dialog (native <dialog>) ------------------ */
.modal {
  width: min(32rem, calc(100vw - var(--space-8)));
  padding: 0;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.modal::backdrop { background: var(--color-overlay); backdrop-filter: blur(2px); }
.modal__header { display: flex; align-items: start; justify-content: space-between; gap: var(--space-4); padding: var(--space-6) var(--space-6) 0; }
.modal__title  { font-size: var(--text-lg); }
.modal__body   { padding: var(--space-4) var(--space-6); color: var(--color-text-muted); }
.modal__footer { display: flex; gap: var(--space-3); justify-content: flex-end; padding: 0 var(--space-6) var(--space-6); }
.modal__close  {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; border: 0; border-radius: var(--radius-md);
  background: transparent; color: var(--color-text-muted); cursor: pointer; font-size: var(--text-lg);
}
.modal__close:hover { background: var(--color-surface-2); color: var(--color-text); }

/* ---- 6. Dropdown menu ------------------------------------- */
.menu { position: relative; display: inline-block; }
.menu__list {
  position: absolute; top: calc(100% + var(--space-2)); left: 0; z-index: var(--z-dropdown);
  min-width: 12rem; padding: var(--space-2); margin: 0; list-style: none;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-md);
}
.menu__list[hidden] { display: none; }
.menu__item {
  display: flex; align-items: center; gap: var(--space-2); width: 100%;
  padding: var(--space-2) var(--space-3); font: inherit; text-align: left;
  color: var(--color-text); background: transparent; border: 0; border-radius: var(--radius-sm); cursor: pointer;
}
.menu__item:hover, .menu__item:focus-visible { background: var(--color-surface-2); outline: none; }
.menu__item--danger { color: var(--color-danger); }
.menu__sep { height: 1px; margin: var(--space-2) 0; background: var(--color-border); border: 0; }

/* ---- 7. Alert (static) + Toast (transient) ---------------- */
.alert {
  display: flex; gap: var(--space-3); align-items: start;
  padding: var(--space-4); border: 1px solid var(--color-border);
  border-left-width: 4px; border-radius: var(--radius-md);
  background: var(--color-surface);
}
.alert__title { font-weight: var(--weight-medium); }
.alert__body  { color: var(--color-text-muted); font-size: var(--text-sm); }
.alert--info    { border-left-color: var(--color-brand);   background: color-mix(in srgb, var(--color-brand) 8%, var(--color-surface)); }
.alert--success { border-left-color: var(--color-success); background: color-mix(in srgb, var(--color-success) 8%, var(--color-surface)); }
.alert--warn    { border-left-color: var(--color-warn);    background: color-mix(in srgb, var(--color-warn) 8%, var(--color-surface)); }
.alert--danger  { border-left-color: var(--color-danger);  background: color-mix(in srgb, var(--color-danger) 8%, var(--color-surface)); }

.toast-region {
  position: fixed; bottom: var(--space-6); right: var(--space-6); z-index: var(--z-toast);
  display: flex; flex-direction: column; gap: var(--space-3); width: min(22rem, calc(100vw - var(--space-8)));
}
.toast {
  display: flex; gap: var(--space-3); align-items: start;
  padding: var(--space-4); background: var(--color-surface-2);
  border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-md);
  animation: toast-in var(--transition-base);
}
@keyframes toast-in { from { opacity: 0; transform: translateY(var(--space-2)); } }

/* ---- 8. Table --------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius-lg); }
.table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.table caption { padding: var(--space-3) var(--space-4); text-align: left; color: var(--color-text-muted); }
.table th, .table td { padding: var(--space-3) var(--space-4); text-align: left; border-bottom: 1px solid var(--color-border); }
.table thead th { font-weight: var(--weight-medium); color: var(--color-text-muted); background: var(--color-surface-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--color-surface); }
.table--zebra tbody tr:nth-child(even) { background: color-mix(in srgb, var(--color-surface) 50%, transparent); }

/* ---- 9. Tabs ---------------------------------------------- */
.tabs__list { display: flex; gap: var(--space-2); border-bottom: 1px solid var(--color-border); }
.tabs__tab {
  padding: var(--space-3) var(--space-4); font: inherit; font-weight: var(--weight-medium);
  color: var(--color-text-muted); background: transparent; border: 0; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs__tab:hover { color: var(--color-text); }
.tabs__tab[aria-selected="true"] { color: var(--color-brand); border-bottom-color: var(--color-brand); }
.tabs__panel { padding-block: var(--space-6); }
.tabs__panel[hidden] { display: none; }

/* ---- Site footer — .site-footer --------------------------- */
.site-footer { border-top: 1px solid var(--color-border); background: var(--color-surface); }
.site-footer__top {
  display: grid; gap: var(--space-8) var(--space-12);
  grid-template-columns: 1.5fr repeat(3, 1fr);
  grid-auto-rows: auto;
  padding-block: var(--space-16);
}
.site-footer__brand {
  display: flex; flex-direction: column; gap: var(--space-3); max-width: 22rem;
  grid-column: 1; grid-row: 1 / 3;
}
.site-footer__brandname { font-weight: var(--weight-bold); color: var(--color-text); display: inline-flex; align-items: center; gap: var(--space-2); }
.site-footer__brandname img { display: block; width: auto; height: 28px; border-radius: var(--radius-sm); }
.site-footer__tagline { color: var(--color-text-muted); font-size: var(--text-sm); }
.site-footer__col { display: flex; flex-direction: column; gap: var(--space-3); }
.site-footer__heading {
  margin: 0;
  font-size: var(--text-xs); font-weight: var(--weight-medium);
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-muted);
}
.site-footer__links { display: flex; flex-direction: column; gap: var(--space-2); }
.site-footer__col a { color: var(--color-text-muted); font-size: var(--text-sm); }
.site-footer__col a:hover { color: var(--color-text); }
.site-footer__bottom {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  flex-wrap: wrap; padding-block: var(--space-6);
  border-top: 1px solid var(--color-border); color: var(--color-text-muted); font-size: var(--text-sm);
}
.site-footer__social { display: flex; gap: var(--space-3); }
.site-footer__social a { color: var(--color-text-muted); }
.site-footer__social a:hover { color: var(--color-brand); }
@media (max-width: 768px) {
  .site-footer__top { grid-template-columns: 1fr 1fr; gap: var(--space-8); }
  .site-footer__brand { grid-column: 1 / -1; grid-row: auto; }
}

/* ---- Sidebar nav / table of contents — .sidenav ----------
   A sticky vertical nav for in-page or cross-page wayfinding.
   Active item marked with aria-current (set in markup or by the
   scrollspy in ui.js). */
.sidenav { position: sticky; top: var(--space-6); align-self: start; }
.sidenav__title {
  font-size: var(--text-xs); font-weight: var(--weight-medium);
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--color-text-muted); padding: 0 var(--space-3) var(--space-2);
}
.sidenav__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.sidenav__link {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-md);
  font-size: var(--text-sm); color: var(--color-text-muted);
  border-left: 2px solid transparent;
  transition: color var(--transition-fast), background var(--transition-fast);
}
.sidenav__link:hover { color: var(--color-text); background: var(--color-surface); }
.sidenav__link[aria-current="true"] {
  color: var(--color-brand); font-weight: var(--weight-medium);
  background: color-mix(in srgb, var(--color-brand) 10%, transparent);
  border-left-color: var(--color-brand);
}
.sidenav__num { font-variant-numeric: tabular-nums; color: var(--color-text-muted); }
.sidenav__link[aria-current="true"] .sidenav__num { color: var(--color-brand); }

/* ---- 10. Badge (semantic; supersedes plain .pill) --------- */
.badge {
  display: inline-flex; align-items: center; gap: var(--space-1);
  padding: var(--space-1) var(--space-3); font-size: var(--text-xs); font-weight: var(--weight-medium);
  border-radius: var(--radius-full); background: var(--color-surface-2);
  color: var(--color-text-muted); border: 1px solid var(--color-border);
}
.badge--brand   { background: color-mix(in srgb, var(--color-brand) 15%, transparent);   color: var(--color-link);   border-color: transparent; }
.badge--success { background: color-mix(in srgb, var(--color-success) 15%, transparent); color: var(--color-success); border-color: transparent; }
.badge--warn    { background: color-mix(in srgb, var(--color-warn) 15%, transparent);    color: var(--color-warn);    border-color: transparent; }
.badge--danger  { background: color-mix(in srgb, var(--color-danger) 15%, transparent);  color: var(--color-danger);  border-color: transparent; }
.badge--dot::before { content: ""; width: 0.5em; height: 0.5em; border-radius: var(--radius-full); background: currentColor; }

/* ============================================================
   PHASE 1 — Integrations (Irish SMB). See specs/integrations.md
   and specs/personas.md. Three components ship together:
   .enquiry (lead form) · .pay (Stripe deposit) · .consent (banner)
   ============================================================ */

/* ---- Choice control (checkbox / radio row) ----------------
   Used for the consent + marketing opt-ins. The control is a row,
   not a column, so the label sits beside the box. Consent boxes
   are NEVER pre-checked — that's enforced in markup, not CSS. */
.choice { display: flex; gap: var(--space-3); align-items: flex-start; cursor: pointer; }
.choice input[type="checkbox"], .choice input[type="radio"] {
  flex: 0 0 auto; width: 1.15em; height: 1.15em; margin-top: 0.15em;
  accent-color: var(--color-brand); cursor: pointer;
}
.choice__text { font-size: var(--text-sm); color: var(--color-text); }
.choice__text a { color: var(--color-brand); text-decoration: underline; }
.choice__hint { display: block; color: var(--color-text-muted); font-size: var(--text-xs); margin-top: var(--space-1); }
.choice:has(input:focus-visible) .choice__text {
  outline: 2px solid var(--color-brand); outline-offset: 3px; border-radius: var(--radius-sm);
}

/* ---- Enquiry form — .enquiry ------------------------------
   A token-styled lead form. Works with zero JS (native validation +
   a normal POST); ui.js only adds inline errors + a success state.
   The honeypot field is visually hidden but reachable by bots. */
.enquiry { display: grid; gap: var(--space-4); max-width: 34rem; }
.enquiry__row { display: grid; gap: var(--space-4); }
@media (min-width: 560px) { .enquiry__row--2 { grid-template-columns: 1fr 1fr; } }
.enquiry .field { max-width: none; }
/* Honeypot: off-screen, not display:none (some bots skip hidden fields). */
.enquiry__pot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.enquiry__consent { display: grid; gap: var(--space-3); padding: var(--space-4);
  background: var(--color-surface-2); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.enquiry__status { font-size: var(--text-sm); }
.enquiry[data-state="sent"] .enquiry__form { display: none; }
.enquiry__sent { display: none; }
.enquiry[data-state="sent"] .enquiry__sent { display: flex; }

/* ---- Pay block — .pay ------------------------------------
   A deposit / fixed-price call to action. Card data never touches
   the page: the button is a link to a Stripe-hosted Payment Link.
   Price is shown inclusive of Irish VAT (specs/integrations.md). */
.pay {
  display: grid; gap: var(--space-4); max-width: 24rem;
  padding: var(--space-6); background: var(--color-surface);
  border: 1px solid var(--color-border); border-radius: var(--radius-lg);
}
.pay__amount { display: flex; align-items: baseline; gap: var(--space-2); }
.pay__price { font-size: var(--text-3xl); font-weight: var(--weight-bold); font-variant-numeric: tabular-nums; }
.pay__vat { font-size: var(--text-sm); color: var(--color-text-muted); }
.pay__desc { color: var(--color-text-muted); font-size: var(--text-sm); }
.pay__methods { display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap;
  font-size: var(--text-xs); color: var(--color-text-muted); }

/* ---- Consent banner — .consent ---------------------------
   GDPR/ePrivacy gate. No third-party script with cookies loads
   until the visitor accepts. Hidden by default; ui.js reveals it
   when no prior choice is stored, and re-hides on a decision. */
.consent {
  position: fixed; inset: auto var(--space-4) var(--space-4) var(--space-4);
  z-index: var(--z-overlay); margin-inline: auto; max-width: 40rem;
  display: none; gap: var(--space-4); align-items: center; flex-wrap: wrap;
  padding: var(--space-6); background: var(--color-surface-2);
  border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
}
.consent[data-open] { display: flex; }
.consent__text { flex: 1 1 16rem; font-size: var(--text-sm); color: var(--color-text-muted); }
.consent__text strong { color: var(--color-text); }
.consent__text a { color: var(--color-brand); text-decoration: underline; }
.consent__actions { display: flex; gap: var(--space-3); flex-wrap: wrap; }
/* A consent-gated embed shows its façade until consent is granted. */
.embed-gate__facade { display: grid; place-items: center; gap: var(--space-3); min-height: 16rem;
  padding: var(--space-6); text-align: center; background: var(--color-surface);
  border: 1px dashed var(--color-border); border-radius: var(--radius-lg); color: var(--color-text-muted); }
[data-consent-granted] .embed-gate__facade { display: none; }
.embed-gate__live { display: none; }
[data-consent-granted] .embed-gate__live { display: block; }
/* Demo stand-in shown in place of a real iframe on the reference pages. */
.embed-gate__placeholder { display: grid; place-items: center; min-height: 8rem; margin: 0;
  padding: var(--space-6); text-align: center; font-size: var(--text-sm); color: var(--color-text-muted);
  background: var(--color-surface); border: 1px dashed var(--color-border); border-radius: var(--radius-lg); }

/* ============================================================
   PHASE 2 — Scheduling + Maps & reviews (Irish SMB).
   ============================================================ */

/* ---- Scheduler — .scheduler -------------------------------
   A consent-gated booking embed. Reuses .embed-gate, adding a
   provider-branded façade so the page stays fast/cookie-free
   until the visitor chooses to load Acuity / Calendly / Cal.com. */
.scheduler { max-width: 44rem; }
.scheduler__facade { display: grid; gap: var(--space-4); justify-items: center; text-align: center;
  min-height: 18rem; padding: var(--space-8); background: var(--color-surface);
  border: 1px dashed var(--color-border); border-radius: var(--radius-lg); }
.scheduler__provider { display: inline-flex; align-items: center; gap: var(--space-2);
  font-size: var(--text-sm); color: var(--color-text-muted); }
.scheduler__provider .badge { text-transform: none; }

/* ---- Star rating — .rating --------------------------------
   Accessible: the visual stars are decorative; the accessible name
   comes from aria-label on the container. --rating (0–5) sets fill. */
.rating { display: inline-flex; align-items: center; gap: var(--space-1); }
.rating__stars { --rating: 0; position: relative; display: inline-block;
  font-size: var(--text-lg); line-height: 1; color: var(--color-border); }
.rating__stars::before { content: "★★★★★"; }
.rating__stars::after { content: "★★★★★"; position: absolute; inset: 0; overflow: hidden;
  width: calc(var(--rating) / 5 * 100%); color: var(--color-warn); }
.rating__count { font-size: var(--text-sm); color: var(--color-text-muted); }

/* ---- Review card — .review --------------------------------
   Rendered from CACHED Google review data, not a live cookie-heavy
   widget. Plain content; no third-party script needed. */
.reviews { display: grid; gap: var(--space-4); }
@media (min-width: 720px) { .reviews--grid { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); } }
.review { display: grid; gap: var(--space-3); padding: var(--space-6);
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); }
.review__head { display: flex; align-items: center; gap: var(--space-3); }
.review__avatar { width: 2.25rem; height: 2.25rem; flex: 0 0 auto; border-radius: var(--radius-full);
  display: grid; place-items: center; font-weight: var(--weight-bold);
  background: color-mix(in srgb, var(--color-brand) 18%, var(--color-surface-2)); color: var(--color-text); }
.review__who { display: grid; }
.review__name { font-weight: var(--weight-medium); }
.review__date { font-size: var(--text-xs); color: var(--color-text-muted); }
.review__body { color: var(--color-text); font-size: var(--text-sm); }
.review__source { font-size: var(--text-xs); color: var(--color-text-muted); }

/* ---- Map block — .mapblock --------------------------------
   Consent-gated map with a static address + Eircode fallback that
   ALWAYS shows (works with no JS, no consent, no network to Google). */
.mapblock { display: grid; gap: var(--space-4); }
.mapblock__address { display: grid; gap: var(--space-1); font-size: var(--text-sm);
  padding: var(--space-4); background: var(--color-surface-2);
  border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.mapblock__address dt { color: var(--color-text-muted); font-size: var(--text-xs); }
.mapblock__eircode { font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }

/* ============================================================
   PHASE 3 — Point of sale (Square / SumUp deep links).
   The site CONNECTS to the trader's existing PoS; it never
   duplicates the checkout. Buttons are links, not forms.
   ============================================================ */
.pos { display: grid; gap: var(--space-4); max-width: 32rem; }
.pos__options { display: grid; gap: var(--space-3); }
@media (min-width: 520px) { .pos__options { grid-template-columns: 1fr 1fr; } }
.pos__option { display: flex; align-items: center; gap: var(--space-3); text-align: left;
  padding: var(--space-4); background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); color: var(--color-text); text-decoration: none;
  transition: border-color var(--transition-fast), transform var(--transition-fast); }
.pos__option:hover { border-color: var(--color-brand); transform: translateY(-1px); }
.pos__option:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; }
.pos__icon { font-size: var(--text-2xl); color: var(--color-brand); flex: 0 0 auto; }
.pos__label { display: grid; gap: var(--space-1); }
.pos__name { font-weight: var(--weight-medium); }
.pos__sub { font-size: var(--text-xs); color: var(--color-text-muted); }
.pos__provider { font-size: var(--text-xs); color: var(--color-text-muted); }

/* ============================================================
   EXTENDED COMPONENTS — carousel, accordion, pricing, stats,
   timeline, team, features, cta, steps, testimonial, progress,
   avatar-group, divider, skip-link.
   ============================================================ */

/* ---- A. Carousel — .carousel ------------------------------
   Horizontal scroll-snap container. Zero JS for basic function.
   JS can add prev/next button behaviour as progressive enhancement. */
.carousel { display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  gap: var(--space-4); scroll-behavior: smooth; -webkit-overflow-scrolling: touch;
  padding-block: var(--space-2); }
.carousel::-webkit-scrollbar { display: none; }
.carousel { scrollbar-width: none; }
.carousel__slide { scroll-snap-align: start; flex: 0 0 min(20rem, 80vw); }
.carousel__controls { display: flex; justify-content: space-between; gap: var(--space-2); margin-top: var(--space-3); }
.carousel--peek { padding-inline: var(--space-4); }

/* ---- B. Accordion / FAQ — .accordion ---------------------
   Native <details>/<summary>. Zero JS required. */
.accordion { display: grid; gap: 1px; border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; }
.accordion__item { background: var(--color-surface); }
.accordion__trigger { display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-4); padding: var(--space-5) var(--space-6);
  font-weight: var(--weight-medium); cursor: pointer; list-style: none;
  color: var(--color-text); }
.accordion__trigger::-webkit-details-marker { display: none; }
.accordion__trigger::marker { display: none; }
.accordion__trigger::after { content: "+"; font-size: var(--text-lg); line-height: 1;
  color: var(--color-text-muted); flex: 0 0 auto;
  transition: transform var(--transition-fast); }
details[open] > .accordion__trigger::after { content: "×"; }
.accordion__body { padding: 0 var(--space-6) var(--space-5);
  color: var(--color-text-muted); font-size: var(--text-sm); }

/* ---- C. Pricing table — .pricing -------------------------*/
.pricing { display: grid; gap: var(--space-6); grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.pricing__plan { background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-8); display: grid; gap: var(--space-4); }
.pricing__plan--featured { border-color: var(--color-brand); box-shadow: var(--shadow-md); }
.pricing__name { font-weight: var(--weight-bold); font-size: var(--text-lg); }
.pricing__price { font-size: var(--text-3xl); font-weight: var(--weight-bold); font-variant-numeric: tabular-nums; }
.pricing__period { font-size: var(--text-sm); color: var(--color-text-muted); }
.pricing__desc { color: var(--color-text-muted); font-size: var(--text-sm); }
.pricing__features { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.pricing__feature { display: flex; gap: var(--space-2); font-size: var(--text-sm); align-items: flex-start; }
.pricing__feature::before { content: "✓"; color: var(--color-brand); font-weight: var(--weight-bold); flex: 0 0 auto; }
.pricing__feature--unavailable { color: var(--color-text-muted); }
.pricing__feature--unavailable::before { content: "–"; color: var(--color-text-muted); }

/* ---- D. Stats / numbers — .stats -------------------------*/
.stats { display: grid; gap: var(--space-6); grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); text-align: center; }
.stat__value { font-size: var(--text-3xl); font-weight: var(--weight-bold); color: var(--color-brand);
  font-variant-numeric: tabular-nums; line-height: var(--leading-tight); }
.stat__label { font-size: var(--text-sm); color: var(--color-text-muted); margin-top: var(--space-1); }
.stat__sub { font-size: var(--text-xs); color: var(--color-text-muted); }

/* ---- E. Timeline — .timeline -----------------------------*/
.timeline { display: grid; gap: 0; position: relative; }
.timeline__item { display: grid; grid-template-columns: auto 1fr; gap: var(--space-4) var(--space-6); padding-bottom: var(--space-8); }
.timeline__marker { display: flex; flex-direction: column; align-items: center; gap: 0; }
.timeline__dot { width: 0.75rem; height: 0.75rem; border-radius: var(--radius-full);
  background: var(--color-brand); flex: 0 0 auto; margin-top: 0.25rem; }
.timeline__dot--muted { background: var(--color-border); }
.timeline__line { flex: 1; width: 2px; background: var(--color-border); margin-top: var(--space-2); }
.timeline__item:last-child .timeline__line { display: none; }
.timeline__content { padding-bottom: var(--space-2); }
.timeline__date { font-size: var(--text-xs); color: var(--color-text-muted); margin-bottom: var(--space-1); }
.timeline__title { font-weight: var(--weight-medium); }
.timeline__body { font-size: var(--text-sm); color: var(--color-text-muted); margin-top: var(--space-1); }

/* ---- F. Team grid — .team --------------------------------*/
.team { display: grid; gap: var(--space-6); grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
.team__member { display: grid; gap: var(--space-3); text-align: center; }
.team__avatar { width: 5rem; height: 5rem; border-radius: var(--radius-full); margin-inline: auto;
  background: color-mix(in srgb, var(--color-brand) 18%, var(--color-surface-2));
  display: grid; place-items: center; font-size: var(--text-2xl); font-weight: var(--weight-bold);
  color: var(--color-text); overflow: hidden; }
.team__avatar img { width: 100%; height: 100%; object-fit: cover; }
.team__name { font-weight: var(--weight-medium); }
.team__role { font-size: var(--text-sm); color: var(--color-text-muted); }
.team__bio { font-size: var(--text-sm); color: var(--color-text-muted); }

/* ---- G. Feature grid — .features -------------------------*/
.features { display: grid; gap: var(--space-8); grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); }
.feature { display: grid; gap: var(--space-3); }
.feature__icon { width: 2.5rem; height: 2.5rem; border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-brand) 15%, transparent);
  display: grid; place-items: center; color: var(--color-brand); font-size: var(--text-xl); }
.feature__title { font-weight: var(--weight-medium); }
.feature__body { color: var(--color-text-muted); font-size: var(--text-sm); }

/* ---- H. CTA section — .cta -------------------------------*/
.cta { text-align: center; padding-block: var(--space-20); display: grid; gap: var(--space-6); place-items: center; }
.cta--filled { background: color-mix(in srgb, var(--color-brand) 8%, var(--color-surface));
  border: 1px solid color-mix(in srgb, var(--color-brand) 25%, transparent);
  border-radius: var(--radius-lg); padding: var(--space-16); }
.cta__title { font-size: clamp(var(--text-2xl), 4vw, var(--text-3xl)); font-weight: var(--weight-bold); max-width: 22ch; }
.cta__body { color: var(--color-text-muted); max-width: var(--max-width-prose); }
.cta__actions { display: flex; gap: var(--space-3); flex-wrap: wrap; justify-content: center; }

/* ---- I. Steps / process — .steps -------------------------*/
.steps { display: grid; gap: var(--space-8); counter-reset: steps; }
.step { display: grid; grid-template-columns: auto 1fr; gap: var(--space-4); counter-increment: steps; }
.step__num { width: 2.5rem; height: 2.5rem; border-radius: var(--radius-full);
  background: color-mix(in srgb, var(--color-brand) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-brand) 40%, transparent);
  color: var(--color-brand); font-weight: var(--weight-bold); display: grid;
  place-items: center; flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.step__num::before { content: counter(steps); }
.step__title { font-weight: var(--weight-medium); margin-bottom: var(--space-1); }
.step__body { color: var(--color-text-muted); font-size: var(--text-sm); }

/* ---- J. Testimonial — .testimonial -----------------------
   Large pull-quote style. Distinct from .review (card-sized). */
.testimonial { display: grid; gap: var(--space-6); max-width: var(--max-width-prose); }
.testimonial__quote { font-size: var(--text-xl); color: var(--color-text); line-height: var(--leading-normal); }
.testimonial__quote::before { content: "\201C"; color: var(--color-brand); font-size: var(--text-4xl);
  line-height: 0.8; vertical-align: -0.3em; margin-right: var(--space-1); }
.testimonial__cite { display: flex; align-items: center; gap: var(--space-4); }
.testimonial__avatar { width: 3rem; height: 3rem; border-radius: var(--radius-full);
  background: color-mix(in srgb, var(--color-brand) 18%, var(--color-surface-2));
  display: grid; place-items: center; font-size: var(--text-lg); font-weight: var(--weight-bold);
  color: var(--color-text); overflow: hidden; flex: 0 0 auto; }
.testimonial__avatar img { width: 100%; height: 100%; object-fit: cover; }
.testimonial__who { display: grid; }
.testimonial__name { font-weight: var(--weight-medium); }
.testimonial__company { font-size: var(--text-sm); color: var(--color-text-muted); }

/* ---- K. Progress bar — .progress -------------------------*/
.progress { display: grid; gap: var(--space-2); }
.progress__label { display: flex; justify-content: space-between; font-size: var(--text-sm); }
.progress__track { height: 0.5rem; background: var(--color-surface-2); border-radius: var(--radius-full); overflow: hidden; }
.progress__fill { height: 100%; background: var(--color-brand); border-radius: var(--radius-full);
  transition: width var(--transition-base); width: var(--progress, 0%); }
.progress__fill--success { background: var(--color-success); }
.progress__fill--warn { background: var(--color-warn); }

/* ---- L. Avatar group — .avatar-group ---------------------
   Stacked overlapping avatars — "3 people doing X". */
.avatar-group { display: flex; align-items: center; }
.avatar-group__item { width: 2.25rem; height: 2.25rem; border-radius: var(--radius-full);
  border: 2px solid var(--color-bg);
  background: color-mix(in srgb, var(--color-brand) 18%, var(--color-surface-2));
  display: grid; place-items: center; font-size: var(--text-xs);
  font-weight: var(--weight-bold); overflow: hidden; margin-left: -0.5rem; }
.avatar-group__item:first-child { margin-left: 0; }
.avatar-group__item img { width: 100%; height: 100%; object-fit: cover; }
.avatar-group__count { background: var(--color-surface-2); color: var(--color-text-muted); }

/* ---- M. Divider — .divider --------------------------------*/
.divider { display: flex; align-items: center; gap: var(--space-4);
  color: var(--color-text-muted); font-size: var(--text-sm); }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--color-border); }
.divider--vertical { width: 1px; height: 100%; background: var(--color-border);
  margin-inline: var(--space-4); align-self: stretch; }
.divider--vertical::before, .divider--vertical::after { display: none; }

/* ---- N. Skip link — .skip-link ---------------------------
   Accessibility: visible only on keyboard focus. */
.skip-link { position: absolute; top: var(--space-2); left: var(--space-2); z-index: 9999;
  padding: var(--space-2) var(--space-4); background: var(--color-brand); color: #fff;
  border-radius: var(--radius-md); font-weight: var(--weight-medium);
  transform: translateY(-200%); transition: transform var(--transition-fast); }
.skip-link:focus { transform: translateY(0); }
