/* ===================================================================
   EconXL — shared brand stylesheet
   Palette + type derived from EconXL Brand Guidelines (2024)
   ------------------------------------------------------------------
   FONT SUBSTITUTION NOTE
   The brand calls for Freight Display Pro + Acumin Variable Concept,
   both Adobe Fonts. Adobe Fonts needs a paid kit URL, so this build
   uses the closest free stand-ins:
     Freight Display Pro  ->  Newsreader
     Acumin Variable      ->  Archivo
   To swap in the real faces, see README.md (two-line change).
   =================================================================== */

:root {
  /* Brand palette — do not add colours outside this set */
  --yellow:      #F4BB47;   /* Cambridge Yellow — primary background */
  --blue:        #092044;   /* Oxford Blue — typographic anchor      */
  --red:         #CE3135;   /* LSE Red — accent only                 */
  --cream:       #FAFAF8;   /* EconXL Cream — supporting background  */
  --white:       #FFFFFF;

  /* Opacity steps of Oxford Blue (same hue, used for hierarchy) */
  --blue-72: rgba(9, 32, 68, 0.72);
  --blue-52: rgba(9, 32, 68, 0.52);
  --blue-16: rgba(9, 32, 68, 0.16);
  --blue-08: rgba(9, 32, 68, 0.08);

  /* Cambridge Yellow, darkened — interaction states only */
  --yellow-deep: #E0A72E;

  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans:  'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --gutter: clamp(1.25rem, 5vw, 5.5rem);
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--blue);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

::selection { background: var(--yellow); color: var(--blue); }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 1px;
}
.on-blue :focus-visible { outline-color: var(--yellow); }

/* ---------- Layout primitives ---------- */

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

section { padding: clamp(4rem, 9vw, 7.5rem) 0; }

.band-cream  { background: var(--cream); }
.band-white  { background: var(--white); }
.band-yellow { background: var(--yellow); }
.band-blue   { background: var(--blue); color: var(--cream); }

/* ---------- Type ---------- */

.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--blue-72);
}
.band-blue .eyebrow { color: var(--yellow); }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; }

.display {
  font-size: clamp(2.7rem, 6.6vw, 5rem);
  line-height: 0.99;
  letter-spacing: -0.028em;
  font-weight: 600;
}

h2 {
  font-size: clamp(1.95rem, 3.7vw, 2.9rem);
  line-height: 1.08;
  letter-spacing: -0.018em;
}

h3 {
  font-size: 1.3rem;
  line-height: 1.25;
  letter-spacing: -0.012em;
  font-weight: 600;
}

.lede {
  font-size: clamp(1.06rem, 1.6vw, 1.24rem);
  line-height: 1.6;
  color: var(--blue-72);
  max-width: 46ch;
}
.band-blue .lede { color: rgba(250, 250, 248, 0.76); }

p + p { margin-top: 1.1em; }

a { color: inherit; }

/* ---------- Wordmark (per brand spec) ---------- */

.wordmark {
  font-family: var(--serif);
  font-size: 1.6rem;         /* > 32px minimum enforced by line-height */
  line-height: 1;
  letter-spacing: -0.03em;
  text-decoration: none;
  white-space: nowrap;
}
.wordmark .econ { font-weight: 700; }
.wordmark .xl   { font-weight: 400; opacity: 0.55; }

/* ---------- Navigation ---------- */

.nav {
  background: var(--blue);
  position: sticky;
  top: 0;
  z-index: 90;
  border-bottom: 1px solid rgba(244, 187, 71, 0.18);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.nav .wordmark { color: var(--yellow); }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 2.1rem);
  list-style: none;
}
.nav-links a {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--cream);
  text-decoration: none;
  padding: 0.4rem 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.18s, color 0.18s;
}
.nav-links a:hover { color: var(--yellow); border-bottom-color: var(--yellow); }
.nav-links a[aria-current="page"] { color: var(--yellow); border-bottom-color: var(--yellow); }

@media (max-width: 720px) {
  .nav-links .hide-sm { display: none; }
  /* "A-Level Fast Track" is too long for a narrow bar — drop to "Fast Track" */
  .nav-links .nav-long { display: none; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.95rem 1.75rem;
  border: 1px solid var(--blue);
  border-radius: 2px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, transform 0.18s;
}
.btn-primary { background: var(--blue); color: var(--yellow); }
.btn-primary:hover { background: #0d2c5c; transform: translateY(-1px); }

.btn-ghost { background: transparent; color: var(--blue); }
.btn-ghost:hover { background: var(--blue); color: var(--yellow); }

.btn-yellow { background: var(--yellow); color: var(--blue); border-color: var(--yellow); }
.btn-yellow:hover { background: var(--yellow-deep); border-color: var(--yellow-deep); }

/* ---------- Tier + grade chips (brand difficulty system) ----------
   Beginner      = Cambridge Yellow
   Intermediate  = Oxford Blue
   Advanced / A* = LSE Red  (rare, earned, never decorative)
------------------------------------------------------------------ */

.chip {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  padding: 0.34rem 0.6rem;
  border-radius: 2px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.chip-beginner     { background: var(--yellow); color: var(--blue); }
.chip-intermediate { background: var(--blue); color: var(--yellow); }
.chip-advanced     { background: transparent; color: var(--red); border-color: var(--red); }

/* ---------- Rules ---------- */

.rule { height: 1px; background: var(--blue-16); border: 0; }

.triad {
  display: flex;
  gap: 4px;
  margin-bottom: 1.6rem;
}
.triad span { height: 4px; width: 34px; border-radius: 1px; }
.triad .t-y { background: var(--blue); opacity: 0.9; }
.triad .t-b { background: var(--blue); opacity: 0.45; }
.triad .t-r { background: var(--red); }

/* ---------- Facts list (used on both pages) ---------- */

.facts div { padding: 0.85rem 0; border-bottom: 1px solid rgba(9, 32, 68, 0.18); }
.facts dt {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(9, 32, 68, 0.6);
  margin-bottom: 0.2rem;
}
.facts dd { font-family: var(--serif); font-size: 1.1rem; font-weight: 500; line-height: 1.35; }

/* ---------- Footer ---------- */

.footer { background: var(--blue); color: rgba(250, 250, 248, 0.7); padding: 3.5rem 0 2.5rem; }
.footer .wordmark { color: var(--yellow); font-size: 1.45rem; }
.footer a { color: var(--yellow); text-decoration: none; border-bottom: 1px solid rgba(244,187,71,0.35); }
.footer a:hover { border-bottom-color: var(--yellow); }
.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 2.25rem;
  border-bottom: 1px solid rgba(244, 187, 71, 0.18);
}
.footer-nav { list-style: none; display: flex; flex-wrap: wrap; gap: 1.4rem; }
.footer-nav a { border: 0; font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase; }
.footer-legal { padding-top: 1.75rem; font-size: 0.8rem; line-height: 1.7; }

/* ---------- Forms ---------- */

.field { margin-bottom: 1.1rem; }
.field label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
  color: var(--blue-72);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--blue);
  background: var(--white);
  border: 1px solid var(--blue-16);
  border-radius: 2px;
  padding: 0.8rem 0.9rem;
  transition: border-color 0.15s;
}
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--blue); }
.field textarea { min-height: 110px; resize: vertical; }

.consent {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--blue-72);
  margin: 1.3rem 0;
}
.consent input { margin-top: 0.22rem; flex-shrink: 0; width: 16px; height: 16px; accent-color: var(--blue); }

.form-note { font-size: 0.78rem; color: var(--blue-52); margin-top: 1rem; line-height: 1.6; }

/* ---------- HubSpot embedded forms ----------
   These selectors style the form when HubSpot renders it into the page.
   If HubSpot renders inside a shadow root or iframe on your portal, these
   won't apply — in that case set colours and fonts in the HubSpot form
   editor instead (Marketing > Forms > Style). The panel around the form
   is ours either way, so it stays on-brand regardless.
------------------------------------------------------------------------ */

.hs-form-frame { min-height: 320px; }

.hs-form-frame .hs-form-field { margin-bottom: 1.1rem; }

.hs-form-frame label,
.hs-form-frame .hs-form-field > label {
  display: block;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--blue-72);
  margin-bottom: 0.45rem;
}

.hs-form-frame input[type="text"],
.hs-form-frame input[type="email"],
.hs-form-frame input[type="tel"],
.hs-form-frame input[type="number"],
.hs-form-frame select,
.hs-form-frame textarea {
  width: 100% !important;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--blue);
  background: var(--white);
  border: 1px solid var(--blue-16);
  border-radius: 2px;
  padding: 0.8rem 0.9rem;
}
.hs-form-frame input:focus,
.hs-form-frame select:focus,
.hs-form-frame textarea:focus { border-color: var(--blue); outline: none; }
.hs-form-frame textarea { min-height: 110px; resize: vertical; }

.hs-form-frame .hs-form-booleancheckbox label,
.hs-form-frame .hs-form-checkbox label {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.5;
}

.hs-form-frame .hs-button,
.hs-form-frame input[type="submit"] {
  width: 100%;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.95rem 1.75rem;
  background: var(--blue);
  color: var(--yellow);
  border: 1px solid var(--blue);
  border-radius: 2px;
  cursor: pointer;
}
.hs-form-frame .hs-button:hover { background: #0d2c5c; }

.hs-form-frame .hs-error-msg,
.hs-form-frame .hs-error-msgs label { color: var(--red); text-transform: none; letter-spacing: 0; font-size: 0.8rem; }

.form-success {
  display: none;
  background: var(--white);
  border: 1px solid var(--blue-16);
  border-left: 4px solid var(--blue);
  border-radius: 2px;
  padding: 1.5rem 1.6rem;
}
.form-success h3 { margin-bottom: 0.4rem; }
.form-success p { color: var(--blue-72); font-size: 0.95rem; }
.is-sent .form-success { display: block; }
.is-sent .form-body { display: none; }

.hp { position: absolute; left: -9999px; opacity: 0; }

/* ---------- Embedded HubSpot forms ---------- */
/* HubSpot injects its own markup here. Field styling is controlled in the
   HubSpot form editor; these rules only make it sit correctly in the panel. */
.hs-form-frame { width: 100%; }
.hs-form-frame iframe { width: 100% !important; border: 0; }
.hs-form-frame input[type="submit"],
.hs-form-frame button { cursor: pointer; }

/* ---------- Motion ---------- */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Preview banner (delete before publishing) ---------- */

.preview-banner {
  background: var(--red);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-align: center;
  padding: 0.6rem 1rem;
  line-height: 1.4;
}
