/* =========================================================
   edu2uk — route-line design system
   ========================================================= */

:root {
  /* palette */
  --ink: #14142b;
  --ink-soft: #3a3a52;
  --paper: #f6f2e9;
  --paper-dim: #ece5d5;
  --paper-panel: #fffdf8;
  --line-red: #d0102a;      /* visa */
  --line-red-dark: #9c0b21;
  --line-green: #0b6e4f;    /* application */
  --line-green-dark: #084f39;
  --line-blue: #1b3a8a;     /* matching */
  --line-blue-dark: #14226b;
  --line-amber: #e8a93b;    /* funding */
  --line-teal: #0e7c86;     /* offer & interview prep */
  --line-plum: #5b3a6b;     /* settling-in */

  --radius-s: 8px;
  --radius-m: 16px;
  --radius-l: 28px;
  --radius-full: 999px;

  --shadow-card: 0 6px 24px rgba(20, 20, 43, 0.08);
  --shadow-lift: 0 14px 40px rgba(20, 20, 43, 0.14);

  --font-display: "Archivo", "Arial Narrow", sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Consolas", monospace;

  --container: 1180px;
}

/* =========================================================
   Reset & base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.05;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5vw + 1rem, 4.4rem); text-transform: uppercase; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.9rem, 3vw + 0.8rem, 2.8rem); text-transform: uppercase; }
h3 { font-size: clamp(1.25rem, 1.4vw + 0.8rem, 1.6rem); }
h4 { font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.02em; }

p { margin: 0 0 1em; color: var(--ink-soft); max-width: 62ch; }
a { color: var(--line-blue); }
a:not([class]) { color: var(--line-blue); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }

ul, ol { padding-left: 1.2em; color: var(--ink-soft); }
li { margin-bottom: 0.4em; }

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

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 88px 0; }
@media (max-width: 720px) { section { padding: 56px 0; } }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--paper-panel);
  border: 1.5px solid var(--ink);
  padding: 6px 14px 6px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 20px;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-red); flex: none; }

.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head p { font-size: 1.08rem; }

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 14px 26px;
  border-radius: var(--radius-full);
  border: 2px solid var(--ink);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--line-red);
  border-color: var(--line-red);
  color: #fff;
}
.btn-primary:hover { background: var(--line-red-dark); border-color: var(--line-red-dark); transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.btn-outline {
  background: transparent;
  color: var(--ink);
}
.btn-outline:hover { background: var(--ink); color: var(--paper); transform: translateY(-2px); }
.btn-light {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--ink);
}
.btn-light:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.btn-arrow { transition: transform 0.15s ease; }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* =========================================================
   Roundel (logo mark / station markers)
   ========================================================= */
.roundel {
  --rc: var(--line-red);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid var(--rc);
  flex: none;
  background: var(--paper-panel);
}
.roundel::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  top: 50%;
  height: 6px;
  transform: translateY(-50%);
  background: var(--rc);
  border-radius: 3px;
}
.roundel.small { width: 22px; height: 22px; border-width: 2px; }
.roundel.small::after { height: 4px; left: 4px; right: 4px; }
.roundel.large { width: 64px; height: 64px; border-width: 4px; }
.roundel.large::after { height: 8px; left: 9px; right: 9px; }

/* =========================================================
   Header / Nav
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 242, 233, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1.5px solid rgba(20, 20, 43, 0.12);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.brand-word {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.brand-word span { color: var(--line-red); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--paper-panel);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-full);
  padding: 5px;
}
.main-nav a {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  text-decoration: none;
  color: var(--ink);
  padding: 9px 16px;
  border-radius: var(--radius-full);
  transition: background 0.15s ease, color 0.15s ease;
}
.main-nav a:hover { background: var(--paper-dim); }
.main-nav a[aria-current="page"] {
  background: var(--ink);
  color: var(--paper);
}
.header-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  background: var(--paper-panel);
  cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }

@media (max-width: 900px) {
  .main-nav {
    position: fixed;
    inset: 78px 16px auto 16px;
    flex-direction: column;
    align-items: stretch;
    border-radius: var(--radius-m);
    padding: 10px;
    box-shadow: var(--shadow-lift);
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 13px 16px; text-align: left; }
  .nav-toggle { display: inline-flex; }
  .header-cta .btn span.btn-label-full { display: none; }
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  padding: 72px 0 40px;
  position: relative;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero h1 { margin-bottom: 22px; }
.hero .lede { font-size: 1.2rem; max-width: 50ch; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 32px; }

.hero-panel {
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius-l);
  padding: 32px;
  position: relative;
  overflow: hidden;
}
.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(246,242,233,0.06) 1.5px, transparent 1.5px);
  background-size: 18px 18px;
  pointer-events: none;
}
.hero-panel-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--line-amber);
  margin-bottom: 18px;
  position: relative;
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
}

/* =========================================================
   Route line — signature element
   ========================================================= */
.route-line {
  --n: 6;
  display: flex;
  align-items: flex-start;
  position: relative;
  padding: 10px 4px 0;
}
.route-line::before {
  content: "";
  position: absolute;
  left: calc(100% / (var(--n) * 2));
  right: calc(100% / (var(--n) * 2));
  top: 21px;
  height: 5px;
  background: var(--line-track, var(--line-red));
  border-radius: 3px;
  z-index: 0;
}
.route-stop {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 1;
  padding: 0 4px;
}
.route-stop .roundel { --rc: var(--line-track, var(--line-red)); margin-bottom: 14px; background: var(--paper-panel); }
.route-stop .stop-code {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--line-track, var(--line-red));
  text-transform: uppercase;
  margin-bottom: 4px;
}
.route-stop .stop-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  text-transform: uppercase;
}
.route-stop .stop-desc { font-size: 0.85rem; margin-top: 6px; color: var(--ink-soft); }

@media (max-width: 780px) {
  .route-line { flex-direction: column; gap: 26px; padding-left: 30px; }
  .route-line::before { left: 20px; right: auto; top: 10px; bottom: 10px; width: 5px; height: auto; }
  .route-stop { flex-direction: row; text-align: left; align-items: flex-start; gap: 16px; }
  .route-stop .roundel { margin-bottom: 0; margin-left: -30px; }
}

.hero-panel .route-line { --n: 4; }

/* =========================================================
   Pillars / service cards
   ========================================================= */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 980px) { .pillars-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .pillars-grid { grid-template-columns: 1fr; } }

.pillar-card {
  background: var(--paper-panel);
  border: 1.5px solid rgba(20,20,43,0.14);
  border-left: 6px solid var(--pc, var(--line-red));
  border-radius: var(--radius-m);
  padding: 26px 24px;
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.pillar-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.pillar-top { display: flex; align-items: center; justify-content: space-between; }
.pillar-code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--pc, var(--line-red));
  text-transform: uppercase;
}
.pillar-card h3 { margin-bottom: 4px; }
.pillar-card p { font-size: 0.95rem; margin-bottom: 0; }

/* line colour utility classes */
.line-blue   { --pc: var(--line-blue);  --line-track: var(--line-blue); }
.line-green  { --pc: var(--line-green); --line-track: var(--line-green); }
.line-red    { --pc: var(--line-red);   --line-track: var(--line-red); }
.line-amber  { --pc: var(--line-amber); --line-track: var(--line-amber); }
.line-teal   { --pc: var(--line-teal);  --line-track: var(--line-teal); }
.line-plum   { --pc: var(--line-plum);  --line-track: var(--line-plum); }

/* =========================================================
   Panels / info blocks
   ========================================================= */
.panel {
  background: var(--paper-panel);
  border: 1.5px solid rgba(20,20,43,0.12);
  border-radius: var(--radius-l);
  padding: 40px;
}
@media (max-width: 640px) { .panel { padding: 26px; } }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

.stat-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.stat-chip {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  background: var(--paper-panel);
}

/* =========================================================
   Dark band (CTA / footer-adjacent sections)
   ========================================================= */
.band-dark {
  background: var(--ink);
  color: var(--paper);
}
.band-dark h2, .band-dark h3 { color: var(--paper); }
.band-dark p { color: rgba(246,242,233,0.78); }
.band-dark .eyebrow { background: transparent; border-color: rgba(246,242,233,0.4); color: var(--paper); }

.cta-band {
  text-align: center;
  padding: 80px 0;
}
.cta-band h2 { margin-bottom: 16px; }
.cta-band p { margin: 0 auto 32px; }
.cta-band .hero-actions { justify-content: center; }

/* =========================================================
   Journey / steps (How It Works)
   ========================================================= */
.journey {
  position: relative;
  padding-left: 46px;
}
.journey::before {
  content: "";
  position: absolute;
  left: 21px;
  top: 8px;
  bottom: 8px;
  width: 5px;
  background: linear-gradient(var(--line-blue), var(--line-green) 20%, var(--line-teal) 40%, var(--line-amber) 60%, var(--line-red) 80%, var(--line-plum));
  border-radius: 3px;
}
.journey-step {
  position: relative;
  padding-bottom: 52px;
}
.journey-step:last-child { padding-bottom: 0; }
.journey-step .roundel {
  position: absolute;
  left: -46px;
  top: 0;
}
.journey-step .step-code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sc, var(--line-blue));
  margin-bottom: 6px;
}
.journey-step h3 { margin-bottom: 8px; }
.journey-step p:last-child { margin-bottom: 0; }

/* =========================================================
   Service detail sections
   ========================================================= */
.service-block {
  border-top: 1.5px solid rgba(20,20,43,0.14);
  padding: 56px 0;
  scroll-margin-top: 100px;
}
.service-block:first-of-type { border-top: none; }
.service-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}
.service-head .pillar-code { font-size: 0.82rem; }
.service-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
}
@media (max-width: 860px) { .service-grid { grid-template-columns: 1fr; } }
.service-list {
  background: var(--paper-panel);
  border: 1.5px solid rgba(20,20,43,0.12);
  border-radius: var(--radius-m);
  padding: 26px 28px;
}
.service-list h4 { margin-bottom: 14px; }
.service-list ul { margin: 0; padding-left: 1.1em; }

/* =========================================================
   Table (Study in the UK — course structures)
   ========================================================= */
.info-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper-panel);
  border-radius: var(--radius-m);
  overflow: hidden;
  border: 1.5px solid rgba(20,20,43,0.14);
}
.info-table th, .info-table td {
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(20,20,43,0.1);
  font-size: 0.95rem;
}
.info-table th {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--ink);
  color: var(--paper);
}
.info-table tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; border-radius: var(--radius-m); }

/* =========================================================
   Contact / form
   ========================================================= */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 13px 14px;
  border-radius: var(--radius-s);
  border: 1.5px solid rgba(20,20,43,0.3);
  background: #fff;
  color: var(--ink);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--line-blue);
  outline: none;
  box-shadow: 0 0 0 3px rgba(27,58,138,0.18);
}
.field textarea { resize: vertical; min-height: 130px; }
.form-note {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-top: 6px;
}
.form-status {
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: var(--radius-s);
  background: var(--paper-dim);
  border: 1.5px solid rgba(20,20,43,0.2);
  font-size: 0.95rem;
  display: none;
}
.form-status.visible { display: block; }

.placeholder-card {
  background: repeating-linear-gradient(
    135deg,
    rgba(20,20,43,0.05),
    rgba(20,20,43,0.05) 10px,
    transparent 10px,
    transparent 20px
  );
  border: 1.5px dashed rgba(20,20,43,0.4);
  border-radius: var(--radius-m);
  padding: 22px 24px;
}
.placeholder-card .tbd-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  background: var(--line-amber);
  color: var(--ink);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 10px;
}
.contact-detail { margin-bottom: 22px; }
.contact-detail:last-child { margin-bottom: 0; }
.contact-detail h4 { margin-bottom: 6px; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: 64px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }
.footer-brand .brand-word { color: var(--paper); }
.footer-brand p { color: rgba(246,242,233,0.7); margin-top: 14px; max-width: 42ch; }
.footer-col h4 { color: var(--paper); font-size: 0.85rem; margin-bottom: 16px; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col a {
  color: rgba(246,242,233,0.78);
  text-decoration: none;
  font-size: 0.95rem;
  display: inline-block;
  padding: 4px 0;
}
.footer-col a:hover { color: var(--paper); text-decoration: underline; }
.footer-bottom {
  border-top: 1px solid rgba(246,242,233,0.16);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: rgba(246,242,233,0.6);
}

/* =========================================================
   Misc utilities
   ========================================================= */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 18px;
  border-radius: var(--radius-s);
  z-index: 200;
  transition: top 0.15s ease;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }
