/*
  Huixian Global Education Group — Base Styles
  Modern reset + typography + shared component/layout utilities.
  Brand colors, type scale, spacing etc. come from tokens.css — load it first.
*/

/* ============ Modern reset ============ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
/* Ensure the [hidden] attribute always wins over component display rules */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html:focus-within { scroll-behavior: smooth; }
html, body { overflow-x: hidden; }
body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--fs-300);
  line-height: var(--lh-body);
  color: var(--color-text);
  background: var(--color-bg);
}
img, picture, svg, video { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration-thickness: from-font; }
ul[class], ol[class] { list-style: none; padding: 0; }
table { border-collapse: collapse; width: 100%; }

@media (prefers-reduced-motion: reduce) {
  html:focus-within { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============ Typography ============ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  color: var(--color-text);
}
h1 { font-size: var(--fs-800); }
h2 { font-size: var(--fs-700); }
h3 { font-size: var(--fs-600); }
h4 { font-size: var(--fs-500); }
p { max-width: 70ch; }
p.lead { font-size: var(--fs-400); color: var(--color-text-soft); }
small, .text-fine { font-size: var(--fs-100); }

a.link {
  color: var(--color-primary);
  text-underline-offset: 0.15em;
}
a.link:hover { color: var(--color-primary-hover); }

:focus-visible {
  outline: 3px solid var(--color-focus-ring);
  outline-offset: 2px;
}

/* ============ Layout ============ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* ============ Section bands ============ */
.band { padding-block: var(--space-9); }
.band--white { background: var(--hx-white); }
.band--parchment { background: var(--hx-parchment); }
.band--red {
  background: var(--hx-red);
  color: var(--hx-white);
}
.band--red h1, .band--red h2, .band--red h3 { color: var(--hx-white); }
.band--red-dark {
  background: var(--hx-red-dark);
  color: var(--hx-white);
}

/* ============ Double-rule divider motif (red over gold) ============ */
.hx-rule {
  width: 96px;
  height: 6px;
  margin-block: var(--space-4);
  border: 0;
  background: none;
  position: relative;
}
.hx-rule::before,
.hx-rule::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
}
.hx-rule::before { top: 0; background: var(--hx-red); }
.hx-rule::after { top: 4px; background: var(--hx-gold); }
.hx-rule--center { margin-inline: auto; }
.band--red .hx-rule::before,
.band--red-dark .hx-rule::before { background: var(--hx-white); }
.band--red .hx-rule::after,
.band--red-dark .hx-rule::after { background: var(--hx-gold); }

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-pill);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-300);
  border: 2px solid transparent;
  transition: background var(--duration-base) var(--ease-standard),
              color var(--duration-base) var(--ease-standard),
              border-color var(--duration-base) var(--ease-standard);
  text-decoration: none;
}
.btn--primary {
  background: var(--color-primary);
  color: var(--hx-white);
  border-color: var(--color-primary);
}
.btn--primary:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); }
.btn--outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn--outline:hover { background: var(--color-primary); color: var(--hx-white); }
.band--red .btn--outline, .band--red-dark .btn--outline {
  color: var(--hx-white);
  border-color: var(--hx-white);
}
.band--red .btn--outline:hover, .band--red-dark .btn--outline:hover {
  background: var(--hx-white);
  color: var(--hx-red);
}
.btn--gold {
  background: var(--hx-gold);
  color: var(--hx-ink);
  border-color: var(--hx-gold);
}
.btn--gold:hover { background: var(--hx-gold-dark); border-color: var(--hx-gold-dark); }
.btn:disabled, .btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ============ Cards ============ */
.card {
  background: var(--hx-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.card__body { padding: var(--space-5); }
/* Fixed size so the title renders identically whether it's an h2 (top-level
   card sections, e.g. programs page) or h3 (cards under an h2, e.g. home). */
.card__title { color: var(--color-primary); font-size: var(--fs-500); }

/* ============ Accessibility helpers ============ */
.hx-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;
}
.hx-skip-link {
  position: absolute;
  left: var(--space-4);
  top: -60px;
  z-index: 1000;
  background: var(--hx-red);
  color: var(--hx-white);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  transition: top var(--duration-fast) var(--ease-standard);
}
.hx-skip-link:focus { top: var(--space-3); }

/* ============================================================================
   HEADER  (utility bar + sticky main nav + Programs dropdown + hamburger)
   ============================================================================ */
.hx-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--hx-white);
  box-shadow: var(--shadow-sm);
}

/* Utility bar */
.hx-utility {
  background: var(--hx-red-dark);
  color: var(--hx-white);
  font-size: var(--fs-100);
}
.hx-utility a { color: var(--hx-white); text-decoration: none; }
.hx-utility a:hover { text-decoration: underline; }
.hx-utility__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  min-height: var(--header-height-utility);
  padding-block: var(--space-1);
}
.hx-utility__contact {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  min-width: 0;
}
.hx-utility__contact a,
.hx-footer__contact a,
.hx-footer a[href^="mailto:"] {
  overflow-wrap: anywhere;
}
.hx-langswitch { display: flex; align-items: center; gap: var(--space-2); }
.hx-langswitch a { opacity: 0.8; }
.hx-langswitch a[aria-current="true"] { opacity: 1; font-weight: var(--fw-semibold); text-decoration: underline; }

/* Main navbar */
.hx-navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  min-height: calc(var(--header-height) - var(--header-height-utility));
  padding-block: var(--space-3);
}
.hx-logo { display: inline-flex; align-items: center; }
.hx-logo img { height: 48px; width: auto; }

.hx-primary__list {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.hx-primary__list > li > a:not(.btn),
.hx-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
  font-weight: var(--fw-medium);
  color: var(--hx-ink);
  text-decoration: none;
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.hx-primary__list > li > a:not(.btn):hover,
.hx-dropdown-toggle:hover,
.hx-primary__list > li > a[aria-current="page"] {
  color: var(--hx-red);
}
.hx-primary__list > li > a[aria-current="page"] { font-weight: var(--fw-semibold); }
.hx-primary__cta { margin-left: var(--space-2); }
.hx-primary__cta .btn { padding: var(--space-2) var(--space-5); }

/* Dropdown */
.hx-has-dropdown { position: relative; }
.hx-caret { transition: transform var(--duration-fast) var(--ease-standard); }
.hx-dropdown-toggle[aria-expanded="true"] .hx-caret { transform: rotate(180deg); }
.hx-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--hx-white);
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--hx-red);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: var(--space-2);
  display: none;
}
.hx-dropdown-toggle[aria-expanded="true"] + .hx-dropdown { display: block; }
.hx-dropdown a {
  display: block;
  padding: var(--space-2) var(--space-3);
  color: var(--hx-ink);
  text-decoration: none;
  border-radius: var(--radius-sm);
}
.hx-dropdown a:hover, .hx-dropdown a:focus-visible {
  background: var(--hx-parchment);
  color: var(--hx-red);
}

/* Hamburger (hidden on desktop) */
.hx-hamburger { display: none; background: none; border: 0; padding: var(--space-2); }
.hx-hamburger__box { display: block; width: 26px; height: 20px; position: relative; }
.hx-hamburger__bar,
.hx-hamburger__bar::before,
.hx-hamburger__bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--hx-red);
  border-radius: 2px;
  transition: transform var(--duration-base) var(--ease-standard),
              opacity var(--duration-base) var(--ease-standard);
}
.hx-hamburger__bar { top: 50%; transform: translateY(-50%); }
.hx-hamburger__bar::before { top: -8px; }
.hx-hamburger__bar::after { top: 8px; }
.hx-hamburger[aria-expanded="true"] .hx-hamburger__bar { background: transparent; }
.hx-hamburger[aria-expanded="true"] .hx-hamburger__bar::before { transform: translateY(8px) rotate(45deg); }
.hx-hamburger[aria-expanded="true"] .hx-hamburger__bar::after { transform: translateY(-8px) rotate(-45deg); }

/* Below 1024px: collapse to hamburger + slide-down panel */
@media (max-width: 1023px) {
  .hx-hamburger { display: inline-flex; align-items: center; }
  .hx-primary {
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    background: var(--hx-white);
    border-top: 3px solid var(--hx-red);
    box-shadow: var(--shadow-lg);
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height var(--duration-base) var(--ease-standard),
                visibility var(--duration-base) var(--ease-standard);
  }
  .hx-navbar { position: relative; }
  .hx-primary.is-open { max-height: calc(100vh - var(--header-height)); overflow-y: auto; visibility: visible; }
  .hx-primary__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--space-3);
  }
  .hx-primary__list > li > a:not(.btn),
  .hx-dropdown-toggle { width: 100%; justify-content: space-between; padding: var(--space-3) var(--space-3); }
  .hx-dropdown {
    position: static;
    box-shadow: none;
    border: 0;
    border-radius: 0;
    padding-left: var(--space-4);
  }
  .hx-primary__cta { margin: var(--space-3) 0 0; }
  .hx-primary__cta .btn { width: 100%; justify-content: center; }
}

/* ============================================================================
   FOOTER
   ============================================================================ */
.hx-footer {
  position: relative;
  color: var(--hx-white);
  padding-top: var(--space-8);
  overflow: hidden;
}
.hx-footer a { color: var(--hx-white); text-decoration: none; }
.hx-footer a:hover { text-decoration: underline; }
/* Low-opacity ink-wash mountain silhouette along the top edge */
.hx-footer__wash {
  position: absolute;
  inset: 0 0 auto 0;
  height: 120px;
  opacity: 0.12;
  pointer-events: none;
  background: no-repeat top center / cover
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'><path d='M0 120 L0 70 Q 120 20 240 55 T 480 45 Q 620 10 760 50 T 1000 40 Q 1100 25 1200 60 L1200 120 Z' fill='%23FFFFFF'/></svg>");
}
.hx-footer__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.4fr 1fr;
  gap: var(--space-6);
  padding-bottom: var(--space-8);
}
.hx-footer__inner > * { min-width: 0; }
.hx-footer__logo { height: 46px; width: auto; margin-bottom: var(--space-4); }
.hx-footer__mission { color: rgba(255,255,255,0.85); max-width: 32ch; }
.hx-footer__heading {
  font-family: var(--font-body);
  font-size: var(--fs-200);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--hx-gold);
  margin-bottom: var(--space-4);
}
.hx-footer__col ul { display: flex; flex-direction: column; gap: var(--space-2); }
.hx-footer__contact li { margin-bottom: var(--space-4); line-height: var(--lh-snug); }
.hx-footer__contact strong { color: var(--hx-white); }

.hx-social { flex-direction: row !important; flex-wrap: wrap; gap: var(--space-3) !important; }
.hx-social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.10);
  color: var(--hx-white);
  border: 0;
}
.hx-social__link:hover { background: var(--hx-gold); color: var(--hx-red-dark); }

.hx-footer__legal {
  position: relative;
  background: rgba(0,0,0,0.18);
  padding-block: var(--space-4);
  font-size: var(--fs-100);
}
.hx-footer__legal-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.hx-footer__legal-links { display: flex; gap: var(--space-4); }

@media (max-width: 1023px) {
  .hx-footer__inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .hx-footer__inner { grid-template-columns: 1fr; gap: var(--space-6); }
}

/* ============================================================================
   MODAL (WeChat QR)
   ============================================================================ */
.hx-modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; }
.hx-modal[hidden] { display: none; }
.hx-modal__backdrop { position: absolute; inset: 0; background: rgba(43,38,34,0.6); }
.hx-modal__dialog {
  position: relative;
  background: var(--hx-white);
  color: var(--hx-ink);
  border-radius: var(--radius-lg);
  padding: var(--space-7) var(--space-6) var(--space-6);
  max-width: 340px;
  width: calc(100% - var(--space-6));
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.hx-modal__close {
  position: absolute;
  top: var(--space-2); right: var(--space-3);
  background: none; border: 0;
  font-size: var(--fs-700);
  line-height: 1;
  color: var(--hx-ink-soft);
}
.hx-modal__title { font-size: var(--fs-500); margin-bottom: var(--space-4); }
.hx-modal__qr {
  width: 200px; height: 200px;
  margin: 0 auto var(--space-3);
  display: flex; align-items: center; justify-content: center;
  background: var(--hx-parchment);
  border: 2px dashed var(--hx-mist);
  border-radius: var(--radius-md);
  color: var(--hx-ink-soft);
  text-align: center;
}

/* ============================================================================
   HOME PAGE SECTIONS
   ============================================================================ */

/* ---- Hero (full-bleed background image + ink gradient overlay) ---- */
.hx-hero {
  position: relative;
  min-height: 640px;
  display: flex;
  align-items: center;
  color: var(--hx-white);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.hx-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(43,38,34,0.55) 0%, rgba(43,38,34,0.75) 55%, rgba(43,38,34,0.88) 100%);
}
.hx-hero__inner {
  position: relative;
  z-index: 1;
  padding-block: var(--space-9);
}
.hx-hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: var(--fs-200);
  color: var(--hx-gold);
  font-weight: var(--fw-semibold);
}
.hx-hero h1 {
  color: var(--hx-white);
  font-size: var(--fs-900);
  max-width: 18ch;
}
.hx-hero .hx-rule::before { background: var(--hx-white); }
.hx-hero .hx-rule::after { background: var(--hx-gold); }
.hx-hero__subhead {
  color: rgba(255,255,255,0.92);
  font-size: var(--fs-400);
  max-width: 56ch;
}
.hx-hero__ctas {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-top: var(--space-6);
}
.hx-hero__ctas .btn--outline { color: var(--hx-white); border-color: var(--hx-white); }
.hx-hero__ctas .btn--outline:hover { background: var(--hx-white); color: var(--hx-red); }

/* Photo-first hero variant: sized to the image's exact aspect ratio so the
   ENTIRE photo is visible (no cropping). Text overlays the bottom, over a
   bottom-weighted gradient that leaves faces and the backdrop clear. */
.hx-hero--photo {
  aspect-ratio: 4 / 3;
  min-height: 0;
  background-position: top center;
  align-items: flex-end;
}
.hx-hero--photo::before {
  background: linear-gradient(180deg, rgba(43,38,34,0.05) 0%, rgba(43,38,34,0.18) 50%, rgba(43,38,34,0.88) 100%);
}
.hx-hero--photo .hx-hero__inner { padding-block: var(--space-7); }
.hx-hero--photo h1 { font-size: var(--fs-800); }
/* Legibility over the busy photo without darkening it further */
.hx-hero--photo h1,
.hx-hero--photo .hx-hero__eyebrow,
.hx-hero--photo .hx-hero__subhead,
.hx-hero--photo .hx-hero__stats {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55), 0 2px 12px rgba(0, 0, 0, 0.35);
}

/* ---- Program cards grid ---- */
.hx-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}
.hx-cards-grid > * { min-width: 0; }
.hx-program-card { display: flex; flex-direction: column; height: 100%; }
.hx-program-card__img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.hx-program-card .card__body { display: flex; flex-direction: column; gap: var(--space-2); flex: 1; }
.hx-program-card__teaser { color: var(--color-text-soft); flex: 1; }
.hx-program-card__link {
  color: var(--hx-red);
  font-weight: var(--fw-semibold);
  text-decoration: none;
  align-self: flex-start;
}
.hx-program-card__link:hover { color: var(--hx-red-dark); text-decoration: underline; }

/* ---- Stats band ---- */
.hx-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  text-align: center;
}
.hx-stats-grid > * { min-width: 0; }
.hx-stat__number {
  font-family: var(--font-display);
  font-size: var(--fs-800);
  font-weight: var(--fw-bold);
  color: var(--hx-red);
  line-height: 1;
}
.hx-stat__label {
  margin-top: var(--space-2);
  color: var(--color-text-soft);
  font-size: var(--fs-200);
}

/* ---- Two-column story rows (dual-track, partnership teaser) ---- */
.hx-story {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: center;
}
.hx-story > * { min-width: 0; }
.hx-story--reverse .hx-story__text { order: 2; }
.hx-story--reverse .hx-story__media { order: 1; }
.hx-story__media img {
  width: 100%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}
.hx-story__caption {
  margin-top: var(--space-2);
  font-size: var(--fs-100);
  color: var(--color-text-soft);
}
.hx-story__text p { max-width: 60ch; }
.hx-story__link {
  display: inline-block;
  margin-top: var(--space-4);
  color: var(--hx-red);
  font-weight: var(--fw-semibold);
  text-decoration: none;
}
.hx-story__link:hover { color: var(--hx-red-dark); text-decoration: underline; }

/* ---- Featured / news card ---- */
.hx-featured {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
}
.hx-featured > * { min-width: 0; }
.hx-featured__media { min-height: 320px; }
.hx-featured__media img { width: 100%; height: 100%; object-fit: cover; }
.hx-featured__body {
  background: var(--hx-parchment);
  padding: var(--space-7);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hx-featured__stat-strip {
  display: flex;
  gap: var(--space-5);
  flex-wrap: wrap;
  margin: var(--space-4) 0 var(--space-5);
  font-weight: var(--fw-semibold);
  color: var(--hx-red);
}

/* ---- CTA band ---- */
.hx-cta-band { text-align: center; }
.hx-cta-band h2 { color: var(--hx-white); }

/* ============================================================================
   ABOUT PAGE: mission quote, 3-step process, four-pillar grid, founder quote
   ============================================================================ */

/* ---- Simple hero (no background image; parchment band) ---- */
.hx-page-hero { text-align: center; }
.hx-page-hero .hx-rule--center { margin-top: var(--space-4); }
.hx-page-hero__lead { max-width: 60ch; margin-inline: auto; }

/* ---- Mission statement ---- */
.hx-mission {
  text-align: center;
  font-family: var(--font-display);
  font-size: var(--fs-600);
  line-height: var(--lh-snug);
  max-width: 44ch;
  margin-inline: auto;
  color: var(--hx-ink);
}

/* ---- 3-step process visual (domestic -> exchange -> global admission) ---- */
.hx-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  counter-reset: hx-step;
}
.hx-steps__item {
  position: relative;
  text-align: center;
  padding: var(--space-6) var(--space-4);
  background: var(--hx-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.hx-steps__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-pill);
  background: var(--hx-red);
  color: var(--hx-white);
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: var(--fs-500);
  margin-bottom: var(--space-4);
}
.hx-steps__item h3 { margin-bottom: var(--space-2); }
.hx-steps__item p { margin-inline: auto; color: var(--color-text-soft); }
.hx-steps__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hx-gold);
}

/* ---- Four-pillar framework grid ---- */
.hx-pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}
.hx-pillar {
  text-align: center;
  padding: var(--space-6) var(--space-4);
  background: var(--hx-white);
  border-radius: var(--radius-md);
  border-top: 4px solid var(--hx-gold);
  box-shadow: var(--shadow-sm);
}
.hx-pillar h3 { font-size: var(--fs-400); margin-bottom: var(--space-2); }
.hx-pillar p { font-size: var(--fs-200); color: var(--color-text-soft); margin-inline: auto; }

/* ---- Founder quote ---- */
.hx-founder {
  text-align: center;
  max-width: 60ch;
  margin-inline: auto;
}
.hx-founder__quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--fs-500);
  line-height: var(--lh-snug);
  color: var(--hx-ink);
}
.hx-founder__attribution {
  margin-top: var(--space-4);
  color: var(--hx-red);
  font-weight: var(--fw-semibold);
}

/* ---- 5-step process strip (admissions page) ---- */
.hx-process-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-4);
  counter-reset: hx-process;
}
.hx-process-strip__item { text-align: center; }
.hx-process-strip__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--radius-pill);
  background: var(--hx-parchment);
  border: 2px solid var(--hx-gold);
  color: var(--hx-red);
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-3);
}
.hx-process-strip__item h3 { font-size: var(--fs-300); margin-bottom: var(--space-1); }
.hx-process-strip__item p { font-size: var(--fs-100); color: var(--color-text-soft); }

/* ============ Breakpoints (literal values — mirror tokens.css docs) ============ */
/* sm: 360px · md: 768px · lg: 1024px · xl: 1440px */
/* ============================================================================
   PROGRAM PAGES: hero stat strip, university stop cards, itinerary table,
   gallery, course cards, pricing block, payment placeholder
   ============================================================================ */

/* ---- Hero stat strip (study tour) ---- */
.hx-hero__stats {
  display: flex;
  gap: var(--space-6);
  flex-wrap: wrap;
  margin-top: var(--space-6);
}
.hx-hero__stats strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-600);
  color: var(--hx-gold);
}
.hx-hero__stats span { font-size: var(--fs-100); color: rgba(255,255,255,0.85); }

/* ---- Mission / highlight list ---- */
.hx-check-list { display: flex; flex-direction: column; gap: var(--space-4); }
.hx-check-list li {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}
.hx-check-list li::before {
  content: "";
  flex-shrink: 0;
  width: 22px; height: 22px;
  margin-top: 2px;
  border-radius: var(--radius-pill);
  background: var(--hx-red);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M9 16.2l-3.5-3.5-1.4 1.4L9 19 20 8l-1.4-1.4z' fill='black'/></svg>") center/60% no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M9 16.2l-3.5-3.5-1.4 1.4L9 19 20 8l-1.4-1.4z' fill='black'/></svg>") center/60% no-repeat;
}

/* ---- University stop cards (numbered, 7 items) ---- */
.hx-uni-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}
.hx-uni-card {
  position: relative;
  background: var(--hx-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  padding-top: var(--space-7);
}
.hx-uni-card__number {
  position: absolute;
  top: var(--space-4);
  left: var(--space-5);
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: var(--fs-500);
  color: var(--hx-gold);
}
.hx-uni-card h3 { font-size: var(--fs-400); margin-bottom: var(--space-2); }
.hx-uni-card p { font-size: var(--fs-200); color: var(--color-text-soft); }

/* ---- Responsive itinerary table (stacks to label:value rows on mobile) ---- */
.hx-itinerary { width: 100%; }
.hx-itinerary th {
  text-align: left;
  background: var(--hx-red);
  color: var(--hx-white);
  padding: var(--space-3) var(--space-4);
  font-weight: var(--fw-semibold);
}
.hx-itinerary td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}
.hx-itinerary tr:nth-child(even) td:not(:first-child) { background: var(--hx-parchment); }
.hx-itinerary td:first-child { font-weight: var(--fw-semibold); color: var(--hx-red); white-space: nowrap; }

@media (max-width: 767px) {
  .hx-itinerary thead { display: none; }
  .hx-itinerary, .hx-itinerary tbody, .hx-itinerary tr, .hx-itinerary td { display: block; width: 100%; }
  .hx-itinerary tr {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
    overflow: hidden;
  }
  .hx-itinerary tr:nth-child(even) td:not(:first-child) { background: var(--hx-white); }
  .hx-itinerary td { border-bottom: 1px solid var(--color-mist, var(--hx-mist)); padding: var(--space-3) var(--space-4); }
  .hx-itinerary td:last-child { border-bottom: 0; }
  .hx-itinerary td::before {
    content: attr(data-label);
    display: block;
    font-size: var(--fs-100);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--hx-gold);
    margin-bottom: var(--space-1);
  }
  .hx-itinerary td:first-child { background: var(--hx-red-dark); color: var(--hx-white); }
  .hx-itinerary td:first-child::before { color: rgba(255,255,255,0.75); }
}

/* ---- Photo gallery ----
   Masonry columns so every photo shows COMPLETE at its natural aspect ratio
   (no cropping). Images flow top-to-bottom within each column. */
.hx-gallery {
  columns: 4;
  column-gap: var(--space-3);
}
.hx-gallery img {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: var(--space-3);
  border-radius: var(--radius-sm);
  break-inside: avoid;
}

/* ---- Booking CTAs (dual button row with note) ---- */
.hx-booking-ctas {
  display: flex;
  gap: var(--space-5);
  flex-wrap: wrap;
  align-items: flex-start;
}
.hx-booking-ctas__group { display: flex; flex-direction: column; gap: var(--space-2); }
.hx-booking-ctas__note { font-size: var(--fs-100); color: var(--color-text-soft); max-width: 32ch; }

/* ---- Course card grid (11 online course subcategories) ---- */
.hx-course-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}
.hx-course-card {
  position: relative;
  background: var(--hx-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}
.hx-course-card h3 { font-size: var(--fs-400); margin-bottom: var(--space-2); }
.hx-course-card p { font-size: var(--fs-200); color: var(--color-text-soft); }
.hx-ribbon {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  background: var(--hx-gold);
  color: var(--hx-ink);
  font-size: var(--fs-100);
  font-weight: var(--fw-semibold);
  padding: 2px var(--space-3);
  border-radius: var(--radius-pill);
}
.hx-ribbon--soon { background: var(--hx-mist); color: var(--hx-ink-soft); }

/* ---- Pricing block ---- */
.hx-pricing {
  display: flex;
  gap: var(--space-6);
  flex-wrap: wrap;
  align-items: center;
  padding: var(--space-6);
  background: var(--hx-white);
  border: 2px solid var(--hx-gold);
  border-radius: var(--radius-md);
}
.hx-pricing__amount {
  font-family: var(--font-display);
  font-size: var(--fs-700);
  color: var(--hx-red);
  white-space: nowrap;
}
.hx-pricing__detail { color: var(--color-text-soft); }

/* ---- Payment placeholder (Phase 7 slot, built now per CLAUDE.md spec) ---- */
.hx-pay-placeholder {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
}
.hx-pay-group {
  background: var(--hx-parchment);
  border: 2px dashed var(--hx-mist);
  border-radius: var(--radius-md);
  padding: var(--space-5);
}
.hx-pay-group h3 { font-size: var(--fs-300); margin-bottom: var(--space-3); }
.hx-pay-group__options { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-3); }
.hx-pay-group .btn:disabled { background: var(--hx-mist); color: var(--hx-ink-soft); border-color: var(--hx-mist); }
.hx-pay-group__qr {
  width: 96px; height: 96px;
  background: var(--hx-white);
  border: 2px dashed var(--hx-mist);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-100);
  color: var(--color-text-soft);
  text-align: center;
}
.hx-pay-note { font-size: var(--fs-100); color: var(--color-text-soft); margin-top: var(--space-3); }

/* ============================================================================
   CONTACT PAGE: office cards, map placeholder, booking form
   ============================================================================ */

/* ---- Office cards ---- */
.hx-office-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5);
}
.hx-office-card {
  background: var(--hx-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.hx-office-card__body { padding: var(--space-5); }
.hx-office-card h2,
.hx-office-card h3 { color: var(--hx-red); font-size: var(--fs-600); margin-bottom: var(--space-3); }
.hx-office-card address {
  font-style: normal;
  line-height: var(--lh-body);
  color: var(--color-text-soft);
}
.hx-office-card address a { color: var(--hx-red); text-decoration: none; }
.hx-office-card address a:hover { text-decoration: underline; }
.hx-map-placeholder {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--hx-parchment)
    repeating-linear-gradient(45deg, transparent, transparent 12px, rgba(201,162,39,0.08) 12px, rgba(201,162,39,0.08) 24px);
  color: var(--hx-ink-soft);
  font-size: var(--fs-200);
  border-bottom: 1px solid var(--color-border);
}

/* ---- Booking form ---- */
.hx-form { max-width: 720px; }
.hx-form__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4) var(--space-5);
}
.hx-field { display: flex; flex-direction: column; gap: var(--space-2); }
.hx-field--full { grid-column: 1 / -1; }
.hx-field label {
  font-weight: var(--fw-medium);
  font-size: var(--fs-200);
}
.hx-field .hx-required { color: var(--hx-red); }
.hx-field input,
.hx-field select,
.hx-field textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--hx-white);
  color: var(--hx-ink);
  transition: border-color var(--duration-fast) var(--ease-standard);
}
.hx-field input:focus,
.hx-field select:focus,
.hx-field textarea:focus {
  outline: none;
  border-color: var(--hx-red);
  box-shadow: 0 0 0 3px rgba(163, 33, 38, 0.12);
}
.hx-field textarea { min-height: 140px; resize: vertical; }
.hx-field input[aria-invalid="true"],
.hx-field select[aria-invalid="true"],
.hx-field textarea[aria-invalid="true"] {
  border-color: var(--hx-red);
  box-shadow: 0 0 0 3px rgba(163, 33, 38, 0.12);
}
.hx-field__error {
  font-size: var(--fs-100);
  color: var(--hx-red);
  min-height: 1em;
}
.hx-consent-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: var(--space-3);
}
.hx-consent-row input { width: auto; margin-top: 4px; flex-shrink: 0; }
.hx-consent-row label { font-weight: var(--fw-regular); font-size: var(--fs-200); }
.hx-consent-row a { color: var(--hx-red); }

/* Honeypot: hidden from humans, visible to bots */
.hx-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.hx-form__actions { margin-top: var(--space-5); }
.hx-form-status {
  margin-top: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  background: var(--hx-parchment);
  border-left: 4px solid var(--hx-gold);
}
.hx-form-status--success { border-left-color: var(--hx-red); background: var(--hx-parchment); }
.hx-form-status--error { border-left-color: var(--hx-red-dark); background: #fbeceb; }

/* ============ Breakpoints (literal values — mirror tokens.css docs) ============ */
/* sm: 360px · md: 768px · lg: 1024px · xl: 1440px */
@media (max-width: 1023px) {
  .hx-cards-grid { grid-template-columns: repeat(2, 1fr); }
  .hx-stats-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-6) var(--space-5); }
  .hx-story { grid-template-columns: 1fr; }
  .hx-story--reverse .hx-story__text,
  .hx-story--reverse .hx-story__media { order: initial; }
  .hx-featured { grid-template-columns: 1fr; }
  .hx-featured__media { min-height: 240px; }
  .hx-steps { grid-template-columns: 1fr; }
  .hx-steps__arrow { display: none; }
  .hx-pillars { grid-template-columns: repeat(2, 1fr); }
  .hx-process-strip { grid-template-columns: repeat(2, 1fr); gap: var(--space-5); }
  .hx-uni-grid { grid-template-columns: repeat(2, 1fr); }
  .hx-course-grid { grid-template-columns: repeat(2, 1fr); }
  .hx-gallery { columns: 3; }
  .hx-pay-placeholder { grid-template-columns: 1fr; }
  .hx-office-grid { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .container { padding-inline: var(--space-4); }
  h1 { font-size: var(--fs-700); }
  h2 { font-size: var(--fs-600); }
  .hx-utility__inner { font-size: var(--fs-100); justify-content: center; }
  .hx-utility__contact { font-size: var(--fs-100); justify-content: center; width: 100%; }
  .hx-langswitch { flex-shrink: 0; }
  .hx-hero { min-height: 520px; }
  .hx-hero h1 { font-size: var(--fs-700); }
  .hx-cards-grid { grid-template-columns: 1fr; }
  .hx-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .hx-uni-grid { grid-template-columns: 1fr; }
  .hx-course-grid { grid-template-columns: 1fr; }
  .hx-gallery { columns: 2; }
  .hx-process-strip { grid-template-columns: 1fr; }
  .hx-pricing { flex-direction: column; align-items: flex-start; text-align: left; }
  .hx-form__grid { grid-template-columns: 1fr; }
  .hx-consent-banner__inner { flex-direction: column; align-items: stretch; }
  .hx-consent-banner__actions { justify-content: stretch; }
  .hx-consent-banner__actions .btn { flex: 1; }
}

/* ============================================================================
   COOKIE CONSENT BANNER
   ============================================================================ */
.hx-consent-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 300;
  background: var(--hx-ink);
  color: var(--hx-white);
  box-shadow: 0 -4px 16px rgba(0,0,0,0.2);
}
.hx-consent-banner[hidden] { display: none; }
.hx-consent-banner__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  padding-block: var(--space-4);
}
.hx-consent-banner__text { font-size: var(--fs-200); color: rgba(255,255,255,0.9); max-width: 70ch; }
.hx-consent-banner__text a { color: var(--hx-gold); text-decoration: underline; }
.hx-consent-banner__actions { display: flex; gap: var(--space-3); flex-wrap: wrap; flex-shrink: 0; }
.hx-consent-banner__actions .btn--outline { color: var(--hx-white); border-color: var(--hx-white); }
.hx-consent-banner__actions .btn--outline:hover { background: var(--hx-white); color: var(--hx-ink); }

/* ============================================================================
   LEGAL PAGES (privacy / terms)
   ============================================================================ */
.hx-legal { max-width: 78ch; }
.hx-legal h2 { margin-top: var(--space-8); }
.hx-legal h2:first-of-type { margin-top: 0; }
.hx-legal h3 { margin-top: var(--space-6); font-size: var(--fs-400); }
.hx-legal p, .hx-legal li { color: var(--color-text-soft); }
.hx-legal ul, .hx-legal ol { padding-left: var(--space-6); display: flex; flex-direction: column; gap: var(--space-2); }
.hx-legal ul { list-style: disc; }
.hx-legal ol { list-style: decimal; }
.hx-legal__updated { color: var(--color-text-soft); font-size: var(--fs-200); }
.hx-legal-review {
  display: inline-block;
  margin: var(--space-2) 0;
  padding: var(--space-1) var(--space-3);
  background: #fbeceb;
  border: 1px solid var(--hx-red);
  border-radius: var(--radius-sm);
  color: var(--hx-red-dark);
  font-size: var(--fs-100);
  font-weight: var(--fw-semibold);
}
.hx-legal-toc {
  background: var(--hx-parchment);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  margin-bottom: var(--space-7);
}
.hx-legal-toc h2 { margin-top: 0; font-size: var(--fs-400); }
.hx-legal-toc ol { padding-left: var(--space-5); }
.hx-legal-toc a { color: var(--hx-red); text-decoration: none; }
.hx-legal-toc a:hover { text-decoration: underline; }
