/* ============================================================
   PoloEnglish — hull.ac.uk-inspired theme with palette system
   All colors flow from 6 semantic tokens set per palette:
     --c-primary   headings, body ink, navy bands/buttons
     --c-secondary badges, eyebrows, links
     --c-accent    ticker, CTAs, italic emphasis
     --c-dark      header, footer, hero overlay
     --c-bg        page background
     --c-paper     card surfaces
   ============================================================ */

:root {
  /* —— Palette 1 · Oxford & Lime (default) —— */
  /* Final palette: Slate & Saffron */
  --c-primary: #333c47;
  --c-secondary: #50749c;
  --c-accent: #f0a500;
  --c-dark: #1a1f26;
  --c-bg: #f5f6f7;
  --c-paper: #ffffff;

  --ink-soft: #555c78;
  --line: 1px solid color-mix(in srgb, var(--c-primary) 14%, transparent);
  --shadow-sm: 0 1px 2px rgba(15, 18, 30, 0.06), 0 2px 10px rgba(15, 18, 30, 0.06);
  --shadow-md: 0 2px 4px rgba(15, 18, 30, 0.06), 0 14px 36px rgba(15, 18, 30, 0.12);

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --t-fast: 140ms;
  --t-med: 220ms;

  --serif: "Sentient", Georgia, serif;
  --sans: "Satoshi", system-ui, sans-serif;

  --container: 1200px;
}









* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--c-bg);
  color: var(--c-primary);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color 250ms ease, color 250ms ease;
}
::selection { background: var(--c-accent); color: var(--c-primary); }
img { max-width: 100%; display: block; }

:focus-visible { outline: 3px solid var(--c-secondary); outline-offset: 3px; border-radius: 4px; }

.container { max-width: var(--container); margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 3rem); }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(3rem, 8vw, 6rem); line-height: 1.02; color: #fff; }
h1 em, h2 em { color: var(--c-accent); font-style: italic; }
h2 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); line-height: 1.08; margin-bottom: 0.9rem; }

.eyebrow {
  font-family: var(--sans); font-weight: 700;
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--c-secondary); margin-bottom: 1rem;
}

.section-head { max-width: 62ch; margin-bottom: 3rem; }
.section-head p:not(.eyebrow) { color: var(--ink-soft); font-size: 1.1rem; }

.section { padding: clamp(4rem, 9vw, 7.5rem) 0; }
.container-narrow { max-width: 820px; }

/* ---------- ticker ---------- */
.ticker {
  background: var(--c-accent); color: var(--c-primary);
  overflow: hidden; padding: 0.55rem 0;
  font-weight: 700; font-size: 0.85rem;
}
.ticker-track {
  display: flex; width: max-content; white-space: nowrap;
  animation: scroll-x 40s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes scroll-x { to { transform: translateX(-50%); } }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--c-dark); color: #fff;
}
.header-inner { display: flex; align-items: center; gap: 2rem; height: 76px; }
.logo {
  font-family: var(--serif); font-size: 1.55rem;
  color: #fff; text-decoration: none; letter-spacing: -0.01em;
  display: inline-flex; align-items: center; gap: 0.65rem;
}
.logo-brand-text,
.logo [data-cfg="branding.brand_text"] {
  color: #fff;
  font-style: normal;
}
.logo-brand-text span,
.logo [data-cfg="branding.brand_text"] span,
.logo > span > span {
  color: var(--c-accent);
  font-style: italic;
}
.logo img {
  height: 38px; width: auto; max-height: 38px; display: block; object-fit: contain; flex-shrink: 0;
}
.nav-links { display: flex; gap: 1.75rem; margin-left: auto; }
.nav-links a {
  color: #fff; text-decoration: none; font-weight: 500; font-size: 0.95rem;
  opacity: 0.92;
  transition: opacity var(--t-fast) ease;
}
.nav-links a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 5px; text-decoration-color: var(--c-accent); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--sans); font-weight: 700; font-size: 1rem;
  padding: 0.8rem 1.8rem; border-radius: 999px;
  text-decoration: none; cursor: pointer; border: none;
  transition: transform var(--t-fast) var(--ease-out), filter var(--t-fast) ease,
              background-color var(--t-fast) ease;
}
.btn:active { transform: scale(0.97); }
.btn-lg { font-size: 1.05rem; padding: 0.95rem 2.2rem; }
.btn-sm { padding: 0.55rem 1.35rem; font-size: 0.9rem; }

.btn-lime { background: var(--c-accent); color: var(--c-primary); }
@media (hover: hover) and (pointer: fine) {
  .btn-lime:hover { filter: brightness(0.93); transform: translateY(-1px); }
}
.btn-outline-light { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,0.85); }
.btn-outline-light:hover { background: rgba(255,255,255,0.12); }
.btn-navy { background: var(--c-primary); color: #fff; }
@media (hover: hover) and (pointer: fine) {
  .btn-navy:hover { filter: brightness(1.25); transform: translateY(-1px); }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: min(88vh, 860px);
  display: flex; align-items: center;
  padding: clamp(4rem, 8vw, 6rem) 0;
  isolation: isolate;
}
.hero-media { position: absolute; inset: 0; z-index: -1; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(78deg,
      color-mix(in srgb, var(--c-primary) 92%, transparent) 8%,
      color-mix(in srgb, var(--c-primary) 60%, transparent) 46%,
      color-mix(in srgb, var(--c-dark) 36%, transparent) 100%);
}
.hero-inner { width: 100%; }
.hero-kicker {
  display: inline-block;
  font-weight: 700; font-size: 0.82rem;
  text-transform: uppercase; letter-spacing: 0.1em;
  background: var(--c-accent); color: var(--c-primary);
  border-radius: 999px; padding: 0.4rem 1.1rem;
  margin-bottom: 1.75rem;
}
.hero-sub {
  max-width: 46ch;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.18rem; line-height: 1.65;
  margin: 1.75rem 0 2.25rem;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 1rem; }

/* ---------- stats band ---------- */
.stats-band { background: var(--c-primary); color: #fff; padding: clamp(2.75rem, 5vw, 4rem) 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; text-align: left; }
.stat + .stat { border-left: 1px solid rgba(255,255,255,0.16); padding-left: 2rem; }
.stat strong {
  display: block;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.4rem, 4.5vw, 3.4rem);
  line-height: 1.1; color: var(--c-accent);
  font-feature-settings: "tnum";
}
.stat span { font-size: 0.92rem; color: rgba(255,255,255,0.78); }

/* ---------- courses ---------- */
.course-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.course-card {
  position: relative;
  background: var(--c-paper); border-radius: 18px; overflow: visible;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  transition: transform 260ms var(--ease-out), box-shadow 260ms var(--ease-out);
}
.course-media { position: relative; border-radius: 18px 18px 0 0; overflow: hidden; }
.course-media img { aspect-ratio: 3/2; object-fit: cover; width: 100%; transition: transform 500ms var(--ease-out); }
.course-num {
  position: absolute; top: 0; left: clamp(1rem, 3vw, 1.75rem); transform: translateY(-50%);
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--c-secondary); color: #fff;
  font-family: var(--serif); font-size: 1.35rem;
  display: grid; place-items: center;
  box-shadow: 0 4px 14px rgba(14, 22, 71, 0.25);
}
.course-body {
  padding: 1.6rem 1.75rem 1.9rem;
  border: var(--line); border-top: none;
  border-radius: 0 0 18px 18px;
  display: flex; flex-direction: column; gap: 0.8rem; flex: 1;
}
.course-body > p { color: var(--ink-soft); font-size: 0.97rem; }
.course-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.tag {
  font-weight: 700; font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--c-primary);
  background: color-mix(in srgb, var(--c-secondary) 12%, #ffffff);
  border-radius: 999px; padding: 0.3rem 0.85rem;
}
.seats { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.7rem; color: var(--ink-soft); }
.seats-low { color: #c2410c; font-weight: 700; }
.course-meta { display: grid; gap: 0.3rem; }
.course-meta div { display: flex; gap: 0.75rem; font-size: 0.9rem; }
.course-meta dt {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-soft); min-width: 74px; padding-top: 0.2em;
}
.course-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: auto; padding-top: 1.15rem; border-top: var(--line);
}
.price { font-family: var(--serif); font-size: 1.7rem; font-feature-settings: "tnum"; }
.courses-note { margin-top: 2.25rem; color: var(--ink-soft); font-size: 0.95rem; }
.courses-note a { color: var(--c-secondary); font-weight: 700; }

@media (hover: hover) and (pointer: fine) {
  .course-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
  .course-card:hover .course-media img { transform: scale(1.04); }
}

/* ---------- statement / method ---------- */
.statement { background: var(--c-paper); border-block: var(--line); }
.statement-inner { padding-block: clamp(4rem, 8vw, 7rem); }
.statement h2 { max-width: 20ch; margin-bottom: 3rem; }
.statement-cols {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  border-top: 2px solid var(--c-primary);
  padding-top: 2.25rem;
}
.method h3 { font-size: 1.45rem; margin-bottom: 0.5rem; }
.method p { color: var(--ink-soft); font-size: 0.98rem; }

/* ---------- stories ---------- */
.story-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
.story-card {
  background: var(--c-paper); border-radius: 18px;
  box-shadow: var(--shadow-sm);
  padding: 1.9rem;
  display: flex; flex-direction: column; gap: 1.3rem;
  transition: transform 260ms var(--ease-out), box-shadow 260ms var(--ease-out);
}
.story-card blockquote { font-family: var(--serif); font-size: 1.15rem; line-height: 1.5; flex: 1; }
.story-card figcaption { font-size: 0.85rem; color: var(--ink-soft); line-height: 1.5; }
.story-card figcaption strong { display: block; color: var(--c-primary); font-size: 1rem; margin-bottom: 0.15rem; }
@media (hover: hover) and (pointer: fine) {
  .story-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
}

/* ---------- cta band ---------- */
.cta-band { background: var(--c-accent); color: var(--c-primary); }
.cta-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 2.5rem; flex-wrap: wrap;
  padding-block: clamp(2.75rem, 6vw, 4.25rem);
}
.cta-band h2 { margin-bottom: 0.4rem; }
.cta-band h2 em { color: var(--c-primary); }
.cta-band p { max-width: 52ch; font-weight: 500; }

/* ---------- faq ---------- */
.faq-section .section-head { margin-bottom: 2.25rem; }
.faq {
  background: var(--c-paper); border: var(--line); border-radius: 14px;
  margin-bottom: 0.9rem; overflow: hidden;
}
.faq summary {
  cursor: pointer; font-weight: 700; font-size: 1.05rem;
  list-style: none; display: flex; justify-content: space-between; align-items: center;
  padding: 1.15rem 1.5rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 1.25rem; color: var(--c-secondary);
  transition: rotate 220ms var(--ease-out);
}
.faq[open] summary::after { rotate: 45deg; }
.faq p { padding: 0 1.5rem 1.35rem; color: var(--ink-soft); }
.faq[open] p { animation: faq-in 280ms var(--ease-out); }
@keyframes faq-in { from { opacity: 0; transform: translateY(-4px); } }

/* ---------- footer ---------- */
.site-footer { background: var(--c-dark); color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-block: clamp(3.5rem, 7vw, 5.5rem) 2.5rem;
}
.logo-footer {
  font-size: 1.7rem;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}
.logo-footer img {
  height: 38px;
  width: auto;
  max-height: 38px;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}
.footer-brand p { color: rgba(255,255,255,0.72); font-size: 0.95rem; margin: 1rem 0 1.5rem; max-width: 34ch; }
.footer-brand address { font-style: normal; font-size: 0.9rem; color: rgba(255,255,255,0.6); line-height: 1.8; }
.footer-brand address a { color: var(--c-accent); text-decoration: none; }
.footer-col h3 {
  font-weight: 700; font-size: 0.8rem;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--c-accent); margin-bottom: 1.1rem;
}
.footer-col a {
  display: block; color: rgba(255,255,255,0.85);
  text-decoration: none; font-size: 0.95rem;
  padding-block: 0.3rem;
  transition: color var(--t-fast) ease;
}
.footer-col a:hover { color: var(--c-accent); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
  border-top: 1px solid rgba(255,255,255,0.14);
  padding-block: 1.4rem;
  font-size: 0.82rem; color: rgba(255,255,255,0.55);
}
.footer-bottom-links { display: flex; gap: 1.75rem; }
.footer-bottom-links a { color: inherit; text-decoration: none; }
.footer-bottom-links a:hover { color: var(--c-accent); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 1.5rem;
  transform: translateX(-50%) translateY(calc(100% + 2rem));
  background: var(--c-primary); color: #fff;
  font-size: 0.9rem; font-weight: 500;
  padding: 0.8rem 1.5rem; border-radius: 999px;
  box-shadow: var(--shadow-md);
  transition: transform 300ms var(--ease-out);
  z-index: 90; pointer-events: none;
  max-width: min(90vw, 480px); text-align: center;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ---------- reveal & stagger ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition:
      opacity 700ms var(--ease-out),
      transform 700ms var(--ease-out);
    transition-delay: var(--stagger, 0ms);
  }
  .reveal.in { opacity: 1; transform: none; }
  .stats-grid .reveal:nth-child(2), .course-grid .reveal:nth-child(2), .story-grid .reveal:nth-child(2), .statement-cols .reveal:nth-child(2) { --stagger: 90ms; }
  .stats-grid .reveal:nth-child(3), .course-grid .reveal:nth-child(3), .story-grid .reveal:nth-child(3), .statement-cols .reveal:nth-child(3) { --stagger: 180ms; }
  .course-grid .reveal:nth-child(4) { --stagger: 270ms; }
}

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .hero { min-height: unset; }
  .course-grid { grid-template-columns: 1fr; }
  .story-grid { grid-template-columns: 1fr; }
  .statement-cols { grid-template-columns: 1fr; gap: 1.75rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat + .stat { border-left: none; padding-left: 0; }
  .stat { padding-block: 0.5rem; }
}
@media (max-width: 700px) {
  .nav-links { display: none; }
  .nav-cta { margin-left: auto; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* ---------- reduced motion ---------- */
@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;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ================== PREMIUM THEMES ================== */
html[data-theme="theme-midnight"] {
  --c-primary: #f0f0f0;
  --c-secondary: #a0aab5;
  --c-accent: #ff6b6b;
  --c-dark: #121212;
  --c-bg: #1a1f26;
  --c-paper: #222831;
}
html[data-theme="theme-ocean"] {
  --c-primary: #162447;
  --c-secondary: #1F4068;
  --c-accent: #E43F5A;
  --c-dark: #1B1B2F;
  --c-bg: #F5F6F7;
  --c-paper: #ffffff;
}
html[data-theme="theme-forest"] {
  --c-primary: #2C363F;
  --c-secondary: #435058;
  --c-accent: #86C232;
  --c-dark: #222629;
  --c-bg: #F4F6F6;
  --c-paper: #ffffff;
}
html[data-theme="theme-sunset"] {
  --c-primary: #2B2E4A;
  --c-secondary: #53354A;
  --c-accent: #E84545;
  --c-dark: #212130;
  --c-bg: #FAF9F9;
  --c-paper: #ffffff;
}
html[data-theme="theme-teal"] {
  --c-primary: #222831;
  --c-secondary: #393E46;
  --c-accent: #00ADB5;
  --c-dark: #1A1E24;
  --c-bg: #EEEEEE;
  --c-paper: #ffffff;
}
html[data-theme="theme-berry"] {
  --c-primary: #24142C;
  --c-secondary: #48233C;
  --c-accent: #C43258;
  --c-dark: #1A0D20;
  --c-bg: #FBF7F9;
  --c-paper: #ffffff;
}
html[data-theme="theme-slate"] {
  --c-primary: #2C3E50;
  --c-secondary: #34495E;
  --c-accent: #3498DB;
  --c-dark: #1A252F;
  --c-bg: #ECF0F1;
  --c-paper: #ffffff;
}
html[data-theme="theme-amethyst"] {
  --c-primary: #331C54;
  --c-secondary: #4F3277;
  --c-accent: #9B59B6;
  --c-dark: #22123A;
  --c-bg: #F7F5FA;
  --c-paper: #ffffff;
}
html[data-theme="theme-terracotta"] {
  --c-primary: #3F332B;
  --c-secondary: #59483C;
  --c-accent: #D35400;
  --c-dark: #2C231D;
  --c-bg: #F7EFE9;
  --c-paper: #ffffff;
}
html[data-theme="theme-olive"] {
  --c-primary: #3B3A30;
  --c-secondary: #575549;
  --c-accent: #A3B18A;
  --c-dark: #292821;
  --c-bg: #DAD7CD;
  --c-paper: #ffffff;
}
html[data-theme="theme-navy"] {
  --c-primary: #0A192F;
  --c-secondary: #112240;
  --c-accent: #64FFDA;
  --c-dark: #020C1B;
  --c-bg: #F0F4F8;
  --c-paper: #ffffff;
}
html[data-theme="theme-mint"] {
  --c-primary: #1B1A30;
  --c-secondary: #3E4B5E;
  --c-accent: #569E9F;
  --c-dark: #10101C;
  --c-bg: #F2FAFA;
  --c-paper: #ffffff;
}

/* ================== MODAL & BUTTONS ================== */
.text-btn {
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity var(--t-fast);
  padding: 0;
}
.text-btn:hover {
  opacity: 1;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 18, 30, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-med) ease;
  padding: 1.5rem;
}
.modal-overlay[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}
.modal-content {
  background: var(--c-paper);
  color: var(--c-primary);
  max-width: 600px;
  width: 100%;
  border-radius: 1.5rem;
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  position: relative;
  transform: translateY(10px) scale(0.98);
  transition: transform var(--t-med) var(--ease-out);
  max-height: 85vh;
  overflow-y: auto;
}
.modal-overlay[aria-hidden="false"] .modal-content {
  transform: translateY(0) scale(1);
}
.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: var(--c-bg);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: var(--c-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t-fast);
}
.modal-close:hover {
  background: color-mix(in srgb, var(--c-primary) 10%, var(--c-bg));
}
.modal-content h2 {
  font-family: var(--serif);
  font-size: 2rem;
  margin-bottom: 1.5rem;
  padding-right: 2rem;
  color: var(--c-primary);
}
.terms-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.terms-list li {
  position: relative;
  padding-left: 1.5rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.terms-list li::before {
  content: "•";
  color: var(--c-accent);
  font-size: 1.25rem;
  position: absolute;
  left: 0;
  top: -0.1rem;
}
