/* ==========================================================================
   MACSA design system – shared by every page
   Colours are taken from the MACSA logo (red chevron, yellow peaks).
   ========================================================================== */

/* ---------- Fonts (self-hosted, latin subset) ---------- */
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin-var.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  /* Brand */
  --red: #c82026;
  --red-deep: #a3191e;
  --red-ink: #7a1216;
  --red-wash: #fbeced;
  --yellow: #ffd400;
  --yellow-deep: #f2b705;
  --yellow-wash: #fff6c7;

  /* Neutrals */
  --ink: #171717;
  --ink-2: #2b2b2b;
  --text: #2a2a2a;
  --muted: #5c5c5c;
  --line: #e6e1d6;
  --line-strong: #cfc8b8;
  --paper: #faf9f6;
  --paper-2: #f3f0e8;
  --white: #ffffff;

  /* Type */
  --font-sans: "Manrope", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;

  --fs-xs: 0.8125rem;   /* 13 */
  --fs-sm: 0.9375rem;   /* 15 */
  --fs-base: 1rem;      /* 16 */
  --fs-md: 1.125rem;    /* 18 */
  --fs-lg: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem);
  --fs-h3: clamp(1.375rem, 1.15rem + 0.9vw, 1.75rem);
  --fs-h2: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem);
  --fs-display: clamp(2.25rem, 1.4rem + 3.4vw, 3.9rem);

  /* Space & layout */
  --gutter: clamp(1rem, 0.6rem + 1.8vw, 2rem);
  --section: clamp(3.5rem, 2.6rem + 3.5vw, 6rem);
  --container: 1240px;
  --radius-sm: 6px;
  --radius: 12px;
  --header-h: 76px;
  --topbar-h: 0px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.35s;

  --shadow-soft: 0 1px 2px rgba(23, 23, 23, 0.04), 0 12px 32px -12px rgba(23, 23, 23, 0.16);
}

@media (min-width: 1100px) {
  :root {
    --header-h: 80px;
  }
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

body.is-locked {
  overflow: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd {
  margin: 0;
}

h1, h2, h3, h4 {
  color: var(--ink);
  line-height: 1.1;
  font-weight: 700;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
  margin: 0;
  padding: 0;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

address {
  font-style: normal;
}

/* Custom yellow text-selection colour removed (owner request, 2026-12-02): selected text now uses the browser default. */

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
  border-radius: 2px;
}

.section--dark :focus-visible,
.enquiry :focus-visible,
.site-footer :focus-visible,
.stats :focus-visible {
  outline-color: var(--yellow);
}

main:focus {
  outline: none;
}

/* ---------- Utilities ---------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: var(--ink);
  color: var(--white);
  font-weight: 700;
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
}

.motif {
  color: currentColor;
}

.section {
  padding-block: var(--section);
  position: relative;
}

.section--paper {
  background: var(--paper);
}

.section--dark {
  background: var(--ink);
  color: #e9e6df;
}

.section--dark h2,
.section--dark h3 {
  color: var(--white);
}

/* ---------- Typography ---------- */
.display {
  font-weight: 800;
  font-size: var(--fs-display);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

/* Section headings: 800 → 700 so they match the lighter homepage heading (owner request, 2026-12-02) */
.heading-xl {
  font-weight: 700;
  font-size: var(--fs-h2);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.accent {
  font-style: normal;
  color: var(--red);
}

.section--dark .accent {
  color: var(--yellow);
}

.lead {
  font-size: var(--fs-lg);
  line-height: 1.6;
  color: var(--muted);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: currentColor;
}

.eyebrow--tick::before {
  width: 12px;
  height: 12px;
  background: var(--yellow);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.section--dark .eyebrow {
  color: var(--yellow);
}

.section-head {
  margin-bottom: clamp(2.5rem, 2rem + 2vw, 4rem);
  max-width: 52rem;
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.section-head--split {
  max-width: none;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
}

/* ---------- Buttons & links ---------- */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--white);
  --btn-bd: var(--btn-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 48px;
  padding: 0.8rem 1.4rem;
  border: 1.5px solid var(--btn-bd);
  border-radius: var(--radius-sm);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.btn .icon {
  transition: transform var(--dur) var(--ease);
}

.btn:hover .icon {
  transform: translateX(3px);
}

.btn:active {
  transform: translateY(1px);
}

.btn--lg {
  min-height: 56px;
  padding: 1rem 1.75rem;
  font-size: var(--fs-base);
}

.btn--block {
  width: 100%;
}

.btn--primary {
  --btn-bg: var(--red);
  --btn-bd: var(--red);
}

.btn--primary:hover {
  --btn-bg: var(--red-deep);
  --btn-bd: var(--red-deep);
}

.btn--dark:hover {
  --btn-bg: var(--red);
  --btn-bd: var(--red);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-bd: var(--line-strong);
}

.btn--ghost:hover {
  --btn-bg: var(--ink);
  --btn-fg: var(--white);
  --btn-bd: var(--ink);
}

.btn--outline {
  --btn-bg: var(--white);
  --btn-fg: var(--ink);
  --btn-bd: var(--line-strong);
}

.btn--outline:hover {
  --btn-bg: var(--white);
  --btn-fg: var(--red);
  --btn-bd: var(--red);
}

.btn--yellow {
  --btn-bg: var(--yellow);
  --btn-fg: var(--ink);
  --btn-bd: var(--yellow);
}

.btn--yellow:hover {
  --btn-bg: var(--yellow-deep);
  --btn-bd: var(--yellow-deep);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: var(--fs-sm);
  color: var(--red);
  text-decoration: none;
  border-bottom: 1.5px solid transparent;
  padding-bottom: 2px;
  transition: border-color var(--dur) var(--ease), gap var(--dur) var(--ease);
  position: relative;
}

/* Larger invisible tap area (about 44 px tall) without changing the look (QA fix, 2026-12-02) */
.link-arrow::after {
  content: "";
  position: absolute;
  inset: -10px -6px;
}

.link-arrow:hover {
  border-color: currentColor;
  gap: 0.75rem;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.icon-btn .icon {
  width: 24px;
  height: 24px;
}

.icon-btn:hover {
  background: var(--paper-2);
}

.icon-btn--outline {
  border: 1.5px solid var(--line-strong);
}

.icon-btn--outline:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}

.icon-btn:disabled {
  opacity: 0.35;
  pointer-events: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--ink);
  background: var(--white);
}

.chip .icon {
  color: var(--red);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: calc(var(--topbar-h) * -1);
  z-index: 100;
}

.topbar {
  display: none;
  height: var(--topbar-h);
  background: var(--ink);
  color: #d9d6cf;
  font-size: var(--fs-xs);
}

@media (min-width: 1100px) {
  .topbar {
    display: block;
  }
}

.topbar__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.topbar__contact {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  min-width: 0;
}

.topbar__contact li,
.topbar__contact a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  text-decoration: none;
}

.topbar__contact a:hover {
  color: var(--yellow);
}

.topbar__contact .icon {
  color: var(--yellow);
  width: 15px;
  height: 15px;
}

.topbar__location {
  overflow: hidden;
  text-overflow: ellipsis;
}

.social {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.social a {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.social .icon {
  width: 16px;
  height: 16px;
}

.social--topbar a:hover {
  background: var(--yellow);
  color: var(--ink);
}

/* Note: no backdrop-filter/transform here – either would trap the fixed mobile drawer inside the bar. */
.navbar {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  transition: box-shadow var(--dur) var(--ease);
}

.site-header.is-scrolled .navbar {
  box-shadow: 0 8px 24px -16px rgba(23, 23, 23, 0.35);
}

.navbar__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  flex: none;
  display: block;
  margin-right: auto;
}

.brand img {
  width: auto;
  height: 48px;
}

@media (min-width: 1100px) {
  .brand img {
    height: 60px;
  }
}

.navbar__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar__cta {
  display: none;
}

@media (min-width: 640px) {
  .navbar__cta {
    display: inline-flex;
  }
}

/* Primary navigation – mobile drawer first */
.primary-nav {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 120;
  width: min(420px, 100%);
  display: flex;
  flex-direction: column;
  background: var(--white);
  /* clip-path (not transform) so the closed drawer never widens the page */
  clip-path: inset(0 0 0 100%);
  visibility: hidden;
  transition: clip-path 0.45s var(--ease), visibility 0s linear 0.45s;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.primary-nav.is-open {
  clip-path: inset(0 0 0 0);
  visibility: visible;
  transition: clip-path 0.45s var(--ease), visibility 0s;
}

.primary-nav__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem var(--gutter);
  border-bottom: 1px solid var(--line);
}

.primary-nav__head img {
  height: 44px;
  width: auto;
}

.primary-nav .primary-nav__list {
  padding: 0.5rem var(--gutter);
}

.primary-nav__item {
  border-bottom: 1px solid var(--line);
}

.primary-nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 56px;
  padding: 0.75rem 0;
  border: 0;
  background: none;
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  text-align: left;
}

.primary-nav__item.is-active > .primary-nav__link {
  color: var(--red);
}

.icon--chevron {
  width: 18px;
  height: 18px;
  transition: transform var(--dur) var(--ease);
}

.primary-nav__link[aria-expanded="true"] .icon--chevron {
  transform: rotate(180deg);
}

.subnav {
  display: none;
  padding: 0 0 0.75rem;
}

.has-sub.is-open .subnav {
  display: block;
}

.subnav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 44px;
  padding: 0.5rem 0 0.5rem 1rem;
  border-left: 2px solid var(--line);
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.subnav__link:hover,
.subnav__link[aria-current="page"] {
  color: var(--red);
  border-color: var(--red);
}

.subnav__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  background: var(--yellow-wash);
  color: var(--ink);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.subnav__tag .icon {
  width: 12px;
  height: 12px;
}

.primary-nav__foot {
  margin-top: auto;
  display: grid;
  gap: 0.75rem;
  padding: 1.5rem var(--gutter) 2rem;
  background: var(--paper);
}

.primary-nav__contact {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
}

.primary-nav__contact .icon {
  color: var(--red);
}

.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(23, 23, 23, 0.5);
}

/* Desktop navigation */
@media (min-width: 1100px) {
  .navbar__toggle,
  .primary-nav__head,
  .primary-nav__foot,
  .nav-scrim {
    display: none !important;
  }

  .primary-nav {
    position: static;
    width: auto;
    clip-path: none;
    visibility: visible;
    background: none;
    overflow: visible;
    transition: none;
  }

  .primary-nav .primary-nav__list {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0;
  }

  .primary-nav__item {
    position: relative;
    border: 0;
  }

  .primary-nav__link {
    position: relative;
    gap: 0.35rem;
    min-height: 44px;
    padding: 0.5rem 0.85rem;
    font-size: var(--fs-sm);
    border-radius: var(--radius-sm);
  }

  .primary-nav__link::after {
    content: "";
    position: absolute;
    left: 0.85rem;
    right: 0.85rem;
    bottom: 4px;
    height: 2px;
    background: var(--red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--dur) var(--ease);
  }

  .primary-nav__link:hover::after,
  .primary-nav__item.is-active > .primary-nav__link::after {
    transform: scaleX(1);
  }

  .has-sub > .primary-nav__link::after {
    right: 2rem;
  }

  .icon--chevron {
    width: 14px;
    height: 14px;
  }

  .subnav {
    display: block;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 280px;
    padding: 0.5rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-top: 3px solid var(--red);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow-soft);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0s linear 0.25s;
  }

  /* Invisible bridge so the pointer can travel from the link to the panel */
  .subnav::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -14px;
    height: 14px;
  }

  .has-sub:hover .subnav,
  .has-sub.is-open .subnav {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0s;
  }

  .subnav__link {
    min-height: 40px;
    padding: 0.55rem 0.75rem;
    border-left: 0;
    border-radius: var(--radius-sm);
    font-size: var(--fs-sm);
    color: var(--ink-2);
  }

  .subnav__link:hover,
  .subnav__link:focus-visible {
    background: var(--paper);
    color: var(--red);
  }
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  background: var(--ink);
  color: #c9c6bf;
}

.site-footer__grid {
  position: relative;
  display: grid;
  gap: 2.5rem;
  padding-block: clamp(3.5rem, 2.5rem + 4vw, 6rem);
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .site-footer__grid {
    grid-template-columns: 1.3fr 1fr 1fr 1.4fr;
    gap: 0;
  }

  .site-footer__grid > * + * {
    padding-left: 2.5rem;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
  }
}

.site-footer__brand {
  display: grid;
  gap: 1.25rem;
  align-content: start;
  justify-items: start;
}

/* The logo has red lettering, so it sits on a white plate on the dark footer */
.site-footer__logo {
  display: block;
  padding: 0.5rem 0.9rem;
  background: var(--white);
  border-radius: var(--radius);
}

.site-footer__logo img {
  height: 52px;
  width: auto;
}

.social--footer a {
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
}

.social--footer a:hover {
  background: var(--yellow);
  color: var(--ink);
}

.link-arrow--light {
  color: var(--yellow);
}

.site-footer__heading {
  margin-bottom: 1.25rem;
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--white);
}

.site-footer__col li + li {
  margin-top: 0.65rem;
}

.site-footer__col a {
  color: #c9c6bf;
  text-decoration: none;
  font-size: var(--fs-sm);
  transition: color var(--dur) var(--ease);
}

/* Phones and tablets: give each footer link a ~44 px tall tap area (QA fix, 2026-12-02) */
@media (max-width: 1023px) {
  .site-footer__col li + li {
    margin-top: 0;
  }

  .site-footer__col li > a {
    display: inline-block;
    padding-block: 0.7rem;
  }

  /* Phone and email in "Get Contact": taller tap area without changing the spacing */
  .site-footer__contact a {
    display: inline-block;
    padding-block: 0.65rem;
    margin-block: -0.65rem;
  }
}

.site-footer__col a:hover {
  color: var(--yellow);
  text-decoration: underline;
}

.site-footer__contact li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: var(--fs-sm);
}

.site-footer__contact .icon {
  margin-top: 0.2em;
  color: var(--yellow);
}

.site-footer__bar {
  background: #0e0e0e;
  color: #a9a69f;
  font-size: var(--fs-sm);
}

.site-footer__bar-inner {
  padding-block: 1.1rem;
}

.site-footer__bar a {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
}

.site-footer__bar a:hover {
  color: var(--yellow);
}

/* ---------- Forms ---------- */
.form {
  display: grid;
  gap: 1.25rem;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field label {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--ink);
}

.field__req {
  color: var(--red);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 52px;
  padding: 0.8rem 1rem;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: var(--fs-base);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

/* Dropdown: same look as the text fields, with a chevron in the brand red */
.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.75rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%23c82026' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 18px 18px;
  cursor: pointer;
  text-overflow: ellipsis;
}

/* Placeholder option ("Select a course") shown in a softer colour until a course is picked */
.field select:has(option[value=""]:checked) {
  color: var(--muted);
}

.field select option {
  color: var(--ink);
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

.field input:hover,
.field textarea:hover,
.field select:hover {
  border-color: var(--muted);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px var(--yellow);
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"],
.field select[aria-invalid="true"],
.field .input-validation-error {
  border-color: var(--red);
  /* background-color (not the shorthand) so the dropdown arrow stays visible */
  background-color: var(--red-wash);
}

.field__error {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--red-deep);
}

.field__error:empty {
  display: none;
}

.field--trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Two fields side by side (moved from pages/home.css; also used on Contact) */
.form__row {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 560px) {
  .form__row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.form__alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: var(--fs-sm);
}

.form__alert .icon {
  margin-top: 2px;
}

.form__alert--success {
  background: #e8f5ec;
  color: #14532d;
  border: 1px solid #a7d7b5;
}

.form__alert--error {
  background: var(--red-wash);
  color: var(--red-ink);
  border: 1px solid #f0b8ba;
}

/* ---------- Scroll reveal (progressive enhancement) ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Pages not yet redesigned (Privacy, Error, 404) ---------- */
.page-basic {
  padding-block: clamp(3rem, 2rem + 4vw, 6rem);
  min-height: 50vh;
}

.page-basic h1 {
  font-weight: 800;
  font-size: var(--fs-h2);
  margin-bottom: 1rem;
}

.page-basic h2,
.page-basic h3 {
  margin: 1.5rem 0 0.75rem;
}

.page-basic p + p {
  margin-top: 0.75rem;
}

.page-basic .text-danger {
  color: var(--red);
}

.not-found {
  display: grid;
  justify-items: start;
  gap: 1.25rem;
  max-width: 40rem;
}

.not-found__code {
  font-weight: 800;
  font-size: clamp(5rem, 3rem + 10vw, 10rem);
  line-height: 0.9;
  color: var(--red);
}

/* ==========================================================================
   Shared components (used by more than one page)
   ========================================================================== */

/* ---------- Toppers card ---------- */
.toppers-card {
  position: relative;
  padding: 1.25rem;
  background: var(--ink);
  border-radius: var(--radius);
}

.toppers-card__title {
  margin-bottom: 1rem;
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--white);
}

.toppers-card__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.topper {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--ink-2);
}

.topper img {
  width: 100%;
  aspect-ratio: 350 / 380;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.topper:hover img {
  transform: scale(1.04);
}

.topper__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2rem 0.75rem 0.65rem;
  background: linear-gradient(to top, rgba(23, 23, 23, 0.9), rgba(23, 23, 23, 0));
  color: var(--white);
  font-size: var(--fs-xs);
  line-height: 1.3;
}

.topper__caption strong {
  display: block;
  font-size: var(--fs-base);
  font-weight: 800;
  color: var(--yellow);
}

.toppers-card__badge {
  position: absolute;
  right: -0.75rem;
  bottom: -1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.2rem;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 800;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
}

@media (max-width: 639px) {
  .toppers-card__badge {
    right: 0.75rem;
  }
}

/* ---------- Testimonials carousel ---------- */
.voices__carousel {
  position: relative;
}

.rail {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 0.5rem 0.25rem 1rem;
}

.rail::-webkit-scrollbar {
  display: none;
}

.rail:focus-visible {
  outline-offset: 2px;
}

.rail__track {
  display: flex;
  gap: 1.25rem;
}

.voice {
  flex: 0 0 100%;
  scroll-snap-align: start;
  display: flex;
}

@media (min-width: 700px) {
  .voice {
    flex-basis: calc((100% - 1.25rem) / 2);
  }
}

@media (min-width: 1100px) {
  .voice {
    flex-basis: calc((100% - 2.5rem) / 3);
  }
}

.voice figure {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  width: 100%;
  padding: 1.5rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(23, 23, 23, 0.04);
}

.voice__avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  background: var(--red-wash);
  color: var(--red);
  font-size: 1.25rem;
  font-weight: 800;
}

.voice:nth-child(3n + 2) .voice__avatar {
  background: var(--yellow-wash);
  color: #8a6300;
}

.voice:nth-child(3n) .voice__avatar {
  background: var(--paper-2);
  color: var(--ink);
}

.voice__quote {
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--ink-2);
}

.voice cite {
  display: block;
  margin-top: 0.75rem;
  font-style: normal;
  font-weight: 800;
  color: var(--ink);
}

.carousel-btn {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-top: -1.5rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.carousel-btn:hover {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

.carousel-btn:disabled {
  opacity: 0.4;
  pointer-events: none;
}

.carousel-btn .icon {
  width: 20px;
  height: 20px;
}

.carousel-btn--prev {
  left: -0.5rem;
}

.carousel-btn--next {
  right: -0.5rem;
}

@media (min-width: 1360px) {
  .carousel-btn--prev {
    left: -3.75rem;
  }

  .carousel-btn--next {
    right: -3.75rem;
  }
}

.rail-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

/* Dots + autoscroll Pause/Play button (added by carousel.js) */
.rail-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.rail-controls .rail-dots {
  margin-top: 0;
}

.rail-controls .rail-dots[hidden] + .rail-toggle {
  display: none;
}

.rail-toggle {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.rail-toggle:hover {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

.rail-toggle .icon {
  width: 14px;
  height: 14px;
}

.rail-dots span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--line-strong);
  transition: width var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.rail-dots span.is-active {
  width: 24px;
  background: var(--red);
}

/* ---------- Breadcrumb (inner pages) ---------- */
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--muted);
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.breadcrumb a {
  color: var(--ink-2);
  text-decoration: none;
  /* Taller tap area without moving the text (QA fix, 2026-12-02) */
  display: inline-block;
  padding-block: 0.65rem;
  margin-block: -0.65rem;
}

.breadcrumb a:hover {
  color: var(--red);
  text-decoration: underline;
}

.breadcrumb .icon {
  width: 14px;
  height: 14px;
  color: var(--muted);
}

.breadcrumb [aria-current="page"] {
  color: var(--red);
}

/* Toppers card badge showing a figure (e.g. "200+") */
.toppers-card__badge--figure {
  top: -1.5rem;
  bottom: auto;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  max-width: 15rem;
  line-height: 1.3;
}

.toppers-card__badge--figure strong {
  font-size: 1.75rem;
  line-height: 1;
}

.toppers-card__badge--figure span {
  font-size: var(--fs-xs);
  font-weight: 700;
}

/* ---------- Inner-page header with breadcrumb ---------- */
.page-hero {
  position: relative;
  overflow: hidden;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.page-hero__inner {
  position: relative;
  padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem);
}

.page-hero__title {
  margin-top: 0.75rem;
}

.page-hero__peaks,
.page-hero__chevron {
  position: absolute;
  aspect-ratio: 200 / 120;
  height: auto;
  pointer-events: none;
}

.page-hero__peaks {
  right: -30px;
  bottom: -20px;
  width: clamp(200px, 22vw, 360px);
  color: var(--yellow);
  opacity: 0.5;
}

.page-hero__chevron {
  right: clamp(60px, 12vw, 200px);
  top: -10px;
  width: clamp(90px, 9vw, 150px);
  color: var(--red);
  opacity: 0.9;
}

@media (max-width: 639px) {
  .page-hero__chevron {
    opacity: 0.25;
  }

  .page-hero__peaks {
    opacity: 0.3;
  }
}

/* ==========================================================================
   Shared course cards (Home, Courses) – moved from pages/home.css
   ========================================================================== */
/* ---------- Course cards ---------- */
.course-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .course-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Odd card count (three courses): centre the last card on the two-column layout */
  .course-grid > li:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc((100% - 1.25rem) / 2);
  }
}

@media (min-width: 1024px) {
  .course-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .course-grid > li:last-child:nth-child(odd) {
    grid-column: auto;
    width: auto;
    justify-self: stretch;
  }
}

.course-grid > li {
  display: flex;
}

.course-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.course-card:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: var(--shadow-soft);
}

/* Coloured panel at the top of each course card (owner request, 2026-12-02):
   white MACSA logo, a see-through circle with a pulsing ring, and a floating illustration. */
.course-card__panel {
  --panel: var(--red);
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  height: clamp(248px, 18vw + 140px, 277px);
  margin: 0.75rem 0.75rem 0;
  border-radius: calc(var(--radius) - 2px);
  background: var(--panel);
  isolation: isolate;
}

.course-card--2 .course-card__panel { --panel: var(--yellow-deep); }
.course-card--3 .course-card__panel { --panel: var(--ink); }
.course-card--4 .course-card__panel { --panel: var(--red-deep); }

/* Soft brand peaks in the panel corner */
.course-card__panel::before {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -18px;
  z-index: -1;
  width: 150px;
  height: 80px;
  background: #fff;
  opacity: 0.08;
  clip-path: polygon(0 100%, 25% 15%, 40% 65%, 50% 30%, 60% 65%, 75% 15%, 100% 100%);
}

/* Logo shown in white, like a reversed logo on the coloured panel */
.course-card__brand {
  position: absolute;
  top: 1.1rem;
  left: 1.25rem;
  width: auto;
  height: 34px;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

/* Yellow panel: the white logo was hard to see (1.8:1), so it is shown in near-black instead (QA fix, 2026-12-02) */
.course-card--2 .course-card__brand {
  filter: brightness(0);
  opacity: 0.85;
}

.course-card__orb {
  position: relative;
  display: grid;
  place-items: center;
  width: 188px;
  height: 188px;
  margin-top: 1.5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}

/* Pulsing ring behind the circle */
.course-card__orb::after {
  content: "";
  position: absolute;
  inset: -22px;
  z-index: -1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.13);
  animation: course-orb-pulse 3s ease-in-out infinite;
}

.course-card__art {
  width: 172px;
  height: 172px;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.22));
  animation: course-art-float 4s ease-in-out infinite;
}

/* Fallback when a course has no illustration */
.course-card__glyph {
  width: 64px;
  height: 64px;
  color: var(--white);
  animation: course-art-float 4s ease-in-out infinite;
}

/* Each card's animation is offset a little so they do not move in step */
.course-card--2 .course-card__art,
.course-card--2 .course-card__orb::after { animation-delay: -1.3s; }
.course-card--3 .course-card__art,
.course-card--3 .course-card__orb::after { animation-delay: -2.6s; }

@keyframes course-art-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-13px); }
}

@keyframes course-orb-pulse {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; }
  100% { opacity: 0; transform: scale(1.45); }
}

.course-card:hover .course-card__orb {
  background: rgba(255, 255, 255, 0.22);
}

/* Cards fade up one after another as they scroll into view (longer rise for each later card) */
.js .course-grid > li.reveal {
  transform: translateY(60px);
  transition-property: opacity, transform;
  transition-timing-function: var(--ease);
  transition-duration: 0.6s;
}

.js .course-grid > li.reveal:nth-child(2) { transition-duration: 0.9s; }
.js .course-grid > li.reveal:nth-child(3) { transition-duration: 1.2s; }
.js .course-grid > li.reveal:nth-child(n + 4) { transition-duration: 1.5s; }

.js .course-grid > li.reveal.is-visible {
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .course-card__art,
  .course-card__glyph,
  .course-card__orb::after {
    animation: none;
  }

  .js .course-grid > li.reveal {
    transform: none;
  }
}

.course-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 1.25rem 1.4rem;
}

.course-card__name {
  font-size: 1.1875rem;
  font-weight: 800;
  line-height: 1.25;
}

.course-card__tagline {
  font-size: var(--fs-sm);
  color: var(--muted);
}

/* Five-star rating under the tagline (owner request, as on the reference site) */
.course-card__rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--ink-2);
}

.course-card__stars {
  display: inline-flex;
  gap: 2px;
}

.course-card__stars .icon {
  width: 18px;
  height: 18px;
  color: var(--line-strong);
}

.course-card__stars .icon.is-on {
  color: var(--yellow-deep);
}

/* Dashed divider above the details removed (owner request, 2026-12-02) */
.course-card__facts {
  display: grid;
  gap: 0.45rem;
  margin: 0.5rem 0 1rem;
}

.course-card__facts li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink-2);
}

.course-card__facts .icon {
  width: 15px;
  height: 15px;
  margin-top: 0.1em;
  color: var(--red);
}

.course-card__cta {
  margin-top: auto;
  align-self: flex-start;
}

/* Moved from pages/about.css */
/* ---------- Feature cards (About Us, Courses) ---------- */
.feature-list {
  display: grid;
  gap: 1rem;
}

.feature-card {
  --tone: var(--red);
  --tone-bg: var(--red-wash);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.4rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.feature-card:hover {
  transform: translateX(4px);
  border-color: transparent;
  box-shadow: var(--shadow-soft);
}

.feature-card--2 { --tone: #8a6300; --tone-bg: var(--yellow-wash); }
.feature-card--3 { --tone: var(--white); --tone-bg: var(--red); }
.feature-card--4 { --tone: var(--ink); --tone-bg: var(--paper-2); }

.feature-card__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--tone-bg);
  color: var(--tone);
}

.feature-card__icon .icon {
  width: 24px;
  height: 24px;
}

.feature-card__title {
  font-size: var(--fs-md);
  font-weight: 800;
}

/* ==========================================================================
   Floating WhatsApp button (homepage) – bottom-right corner, separate from the social bar
   (owner request, 2026-12-02). The number slides out beside it on hover / keyboard focus.
   ========================================================================== */
.whatsapp-float {
  --wa: #25d366;
  position: fixed;
  right: clamp(1rem, 0.6rem + 1vw, 1.75rem);
  bottom: clamp(1rem, 0.6rem + 1vw, 1.75rem);
  z-index: 95; /* above the social bar (90), below the header (100) and mobile menu */
  display: flex;
  align-items: center;
  flex-direction: row-reverse;
  gap: 0.6rem;
  color: var(--white);
  text-decoration: none;
}

.whatsapp-float__icon {
  position: relative;
  flex: none;
  box-sizing: content-box;
  width: 32px;
  height: 32px;
  padding: 13px;
  border-radius: 50%;
  background: var(--wa);
  box-shadow: 0 10px 24px -8px rgba(18, 140, 64, 0.65);
  transition: transform var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

/* Soft pulsing ring to draw the eye */
.whatsapp-float::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--wa);
  opacity: 0.45;
  animation: whatsapp-pulse 2.4s ease-out infinite;
  pointer-events: none;
}

@keyframes whatsapp-pulse {
  0% { transform: scale(1); opacity: 0.45; }
  80%, 100% { transform: scale(1.6); opacity: 0; }
}

.whatsapp-float__label {
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font-size: var(--fs-sm);
  font-weight: 700;
  white-space: nowrap;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  transform: translateX(8px);
  pointer-events: none;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.whatsapp-float:hover .whatsapp-float__icon,
.whatsapp-float:focus-visible .whatsapp-float__icon {
  transform: scale(1.06);
  background: #1ebe5b;
}

.whatsapp-float:hover .whatsapp-float__label,
.whatsapp-float:focus-visible .whatsapp-float__label {
  opacity: 1;
  transform: none;
}

.whatsapp-float:focus-visible {
  outline: none;
}

.whatsapp-float:focus-visible .whatsapp-float__icon {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

@media (max-width: 639px) {
  .whatsapp-float__icon {
    width: 28px;
    height: 28px;
    padding: 12px;
  }

  .whatsapp-float::before {
    width: 52px;
    height: 52px;
  }

  /* No hover on touch screens: keep the number hidden */
  .whatsapp-float__label {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .whatsapp-float::before {
    animation: none;
    opacity: 0;
  }
}

/* ==========================================================================
   Floating social media bar (homepage) – right edge, vertically centred, like the live site's floater.
   ≥1440 px: the icons always show in the empty margin beside the 1240 px content.
   <1440 px: content reaches the screen edge, so a small tab opens the icons on demand.
   ========================================================================== */
.social-float {
  position: fixed;
  right: 0;
  top: 50%;
  z-index: 90; /* below the sticky header (100) and the mobile menu (110/120) */
  transform: translateY(-50%);
}

/* Tab (narrow screens) */
.social-float__toggle {
  display: grid;
  place-items: center;
  width: 40px;
  height: 44px;
  border: 0;
  border-radius: 10px 0 0 10px;
  background: var(--red);
  color: var(--white);
  box-shadow: 0 6px 16px -6px rgba(23, 23, 23, 0.5);
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), width var(--dur) var(--ease);
}

.social-float__toggle:hover {
  width: 46px;
}

.social-float__toggle .icon {
  width: 20px;
  height: 20px;
}

.social-float__toggle .icon--close,
.social-float.is-open .social-float__toggle .icon--open {
  display: none;
}

.social-float.is-open .social-float__toggle .icon--close {
  display: block;
}

.social-float.is-open .social-float__toggle {
  background: var(--ink);
}

.social-float__toggle:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}

/* Icon list: opens to the left of the tab */
.social-float__list {
  position: absolute;
  right: calc(100% + 0.6rem);
  top: 50%;
  display: grid;
  gap: 0.45rem;
  opacity: 0;
  visibility: hidden;
  transform: translate(10px, -50%);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility 0s linear var(--dur);
}

.social-float.is-open .social-float__list {
  opacity: 1;
  visibility: visible;
  transform: translate(0, -50%);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility 0s;
}

.social-float__link {
  --brand: var(--red);
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--white);
  box-shadow: 0 6px 16px -6px rgba(23, 23, 23, 0.45);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.social-float__link .icon {
  width: 20px;
  height: 20px;
}

/* Brand colours */
.social-float__link--facebook { --brand: #1877f2; }
.social-float__link--telegram { --brand: #229ed9; }
.social-float__link--youtube { --brand: #ff0000; }
.social-float__link--instagram {
  --brand: #d62976;
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
}

/* Name label slides out to the left on hover / keyboard focus */
.social-float__link::after {
  content: attr(data-label);
  position: absolute;
  right: calc(100% + 0.5rem);
  top: 50%;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--white);
  font-size: var(--fs-xs);
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(6px, -50%);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.social-float__link:hover,
.social-float__link:focus-visible {
  transform: translateX(-4px) scale(1.06);
  box-shadow: 0 10px 22px -8px rgba(23, 23, 23, 0.55);
}

.social-float__link:hover::after,
.social-float__link:focus-visible::after {
  opacity: 1;
  transform: translate(0, -50%);
}

.social-float__link:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}

/* Wide screens: always-visible vertical bar in the free margin, no tab */
@media (min-width: 1440px) {
  .social-float {
    right: 1.25rem;
  }

  .social-float__toggle {
    display: none;
  }

  .social-float__list {
    position: static;
    gap: 0.5rem;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
  }

  .social-float__link {
    width: 44px;
    height: 44px;
  }
}

/* Hidden while the mobile menu is open (the drawer covers that edge) */
body.is-locked .social-float {
  visibility: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .social-float__toggle,
  .social-float__list,
  .social-float__link,
  .social-float__link::after {
    transition: none;
  }
}

@media print {
  .social-float {
    display: none;
  }
}
