/* ==========================================================
   JUI CAMBRIDGE LEARNING — Home Page Styles
   ----------------------------------------------------------
   HOW TO CHANGE COLOURS / FONTS:
   Edit the values in :root below. Every section uses these,
   so one change updates the whole website.
   ========================================================== */

:root {
  /* ---- Brand colours ---- */
  --navy-900: #0B1B33;   /* darkest navy: dark sections, footer   */
  --navy-700: #16305A;   /* primary navy: headings, buttons       */
  --steel-500: #4C6A92;  /* steel blue: icons, accents            */
  --blue-100: #E9EFF7;   /* soft blue: tinted section backgrounds */
  --blue-50:  #F5F8FC;   /* very light blue: cards                */
  --gold-500: #B08D57;   /* muted gold: primary CTA, highlights   */
  --gold-600: #96753F;   /* darker gold: hover                    */
  --gold-200: #E6D6B8;   /* pale gold: on dark backgrounds        */
  --ink:      #1B2333;   /* main text                             */
  --muted:    #556070;   /* secondary text                        */
  --line:     #DCE3EC;   /* borders                               */
  --white:    #FFFFFF;

  /* ---- Typography ---- */
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans:  "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  /* ---- Layout ---- */
  --container: 1180px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 10px 30px rgba(11, 27, 51, 0.08);
  --header-h: 76px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--navy-700); }

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--navy-900);
  line-height: 1.2;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2.3rem, 4.6vw, 3.6rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.25rem; }
p  { margin: 0 0 1em; }

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

.skip-link {
  position: absolute; left: -999px; top: 8px;
  background: var(--navy-700); color: var(--white);
  padding: 8px 14px; border-radius: 6px; z-index: 200;
}
.skip-link:focus { left: 12px; }

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

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-600);
  margin-bottom: 14px;
}
.eyebrow-light { color: var(--gold-200); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 15px 28px;
  border-radius: 6px;
  font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: background .25s, color .25s, border-color .25s, transform .25s;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); }
.btn-sm { padding: 11px 18px; font-size: 0.74rem; }

.btn-gold { background: var(--gold-500); color: var(--navy-900); }
.btn-gold:hover { background: var(--gold-600); color: var(--white); }

.btn-navy { background: var(--navy-700); color: var(--white); }
.btn-navy:hover { background: var(--navy-900); }

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

.btn-outline-light { border-color: rgba(255,255,255,.55); color: var(--white); }
.btn-outline-light:hover { background: var(--white); color: var(--navy-900); }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0 26px; }
.btn-row.center { justify-content: center; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--navy-700); text-decoration: none;
  border-bottom: 1.5px solid var(--gold-500);
  padding-bottom: 4px;
}
.link-arrow i { transition: transform .25s; }
.link-arrow:hover i { transform: translateX(4px); }

/* ==========================================================
   SECTION 1 — NAVIGATION
   ========================================================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 4px 20px rgba(11,27,51,.06); }

.nav {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
}

.brand { display: flex; flex-direction: column; line-height: 1; text-decoration: none; }
.brand-name {
  font-family: var(--font-serif); font-size: 1.7rem; font-weight: 600;
  color: var(--navy-900); letter-spacing: 0.14em;
}
.brand-sub {
  font-size: 0.6rem; font-weight: 600; letter-spacing: 0.26em;
  color: var(--gold-600); margin-top: 5px;
}
.brand-light .brand-name { color: var(--white); }
.brand-light .brand-sub  { color: var(--gold-200); }

.nav-menu { display: flex; align-items: center; gap: 28px; }
.nav-links { list-style: none; display: flex; gap: 22px; margin: 0; padding: 0; }
.nav-links a {
  font-size: 0.88rem; font-weight: 500; color: var(--ink);
  text-decoration: none; padding: 6px 0; position: relative;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 0; height: 1.5px; background: var(--gold-500); transition: width .25s;
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px; border: 0; background: none; cursor: pointer;
  flex-direction: column; justify-content: center; gap: 6px; padding: 10px;
}
.nav-toggle span { display: block; height: 2px; background: var(--navy-900); transition: transform .3s, opacity .3s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ==========================================================
   SECTION 2 — HERO
   ========================================================== */
.hero {
  position: relative;
  padding: 80px 0 100px;
  background:
    linear-gradient(180deg, var(--white) 0%, var(--blue-50) 100%);
  overflow: hidden;
}
/* faint graph-paper grid: an academic texture */
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: .35;
  mask-image: linear-gradient(90deg, transparent 0%, #000 60%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 60%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid; grid-template-columns: 1.1fr 0.9fr;
  gap: 64px; align-items: center;
}
.hero h1 em { font-style: italic; color: var(--navy-700); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; }

.credibility-line {
  display: flex; flex-wrap: wrap; gap: 6px 0;
  font-size: 0.85rem; font-weight: 500; color: var(--muted);
}
.credibility-line span + span::before {
  content: "|"; color: var(--gold-500); margin: 0 12px;
}

.hero-visual { position: relative; padding: 30px; }

.portrait {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--navy-700);
}
.portrait img {
  position: relative; z-index: 1;
  width: 100%; height: 100%; object-fit: cover;
}
.portrait-hero { aspect-ratio: 4 / 5; box-shadow: 0 30px 60px rgba(11,27,51,.18); }
.portrait-hero::after {          /* thin gold frame offset behind the photo */
  content: ""; position: absolute; inset: 0; z-index: 2;
  border: 1px solid rgba(255,255,255,.18); border-radius: inherit; pointer-events: none;
}

.portrait-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background:
    radial-gradient(circle at 30% 20%, rgba(176,141,87,.25), transparent 55%),
    linear-gradient(160deg, var(--navy-700), var(--navy-900));
  color: var(--gold-200);
}
.monogram {
  font-family: var(--font-serif); font-size: 4.5rem; font-weight: 400;
  letter-spacing: 0.08em;
  width: 160px; height: 160px; border-radius: 50%;
  border: 1px solid rgba(230,214,184,.5);
  display: flex; align-items: center; justify-content: center;
}
.ph-note { font-size: 0.75rem; letter-spacing: 0.06em; opacity: .7; }

.float-tag {
  position: absolute; z-index: 3;
  background: var(--white);
  color: var(--navy-700);
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  padding: 9px 14px; border-radius: 4px;
  border-left: 2px solid var(--gold-500);
  box-shadow: var(--shadow);
  animation: drift 7s ease-in-out infinite;
}
.tag-1 { top: 8%;  left: -4%; }
.tag-2 { top: 34%; right: -6%; animation-delay: -2s; }
.tag-3 { bottom: 26%; left: -8%; animation-delay: -4s; }
.tag-4 { bottom: 4%; right: 6%; animation-delay: -1s; }

.hero-formula {
  position: absolute; z-index: 0; right: -10px; top: -14px;
  font-family: var(--font-serif); font-style: italic; font-size: 2.6rem;
  color: var(--gold-500); opacity: .35;
}

@keyframes drift {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

/* ==========================================================
   SECTION 3 — CREDIBILITY STRIP
   ========================================================== */
.cred-strip { margin-top: -50px; position: relative; z-index: 5; }
.cred-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 0;
}
.cred-card { padding: 30px 26px; text-align: left; }
.cred-card + .cred-card { border-left: 1px solid var(--line); }
.cred-card i { color: var(--gold-500); font-size: 1.3rem; margin-bottom: 14px; }
.cred-card h3 {
  font-family: var(--font-sans); font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--navy-900);
  margin-bottom: 6px;
}
.cred-card p { font-size: 0.92rem; color: var(--muted); margin: 0; }

/* ==========================================================
   GENERIC SECTION
   ========================================================== */
.section { padding: 110px 0; }
.section-tint { background: var(--blue-50); }
.section-navy { background: var(--navy-900); color: #D5DDE8; }
.section-navy h2 { color: var(--white); }

.section-head { max-width: 760px; margin-bottom: 56px; }
.section-intro { color: var(--muted); font-size: 1.05rem; }

/* ==========================================================
   SECTION 4 — INTRODUCING JUI
   ========================================================== */
.about-grid {
  display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 72px; align-items: center;
}
.portrait-about { aspect-ratio: 4 / 5; }
.about-photo { position: relative; }
.about-photo::before {   /* offset gold frame */
  content: ""; position: absolute; inset: 22px -22px -22px 22px;
  border: 1px solid var(--gold-500); border-radius: var(--radius-lg);
}
.about-text p { color: var(--muted); }
.about-text strong { color: var(--ink); font-weight: 600; }

.pull-quote {
  margin: 28px 0 32px; padding: 4px 0 4px 24px;
  border-left: 2px solid var(--gold-500);
  font-family: var(--font-serif); font-style: italic;
  font-size: 1.35rem; line-height: 1.5; color: var(--navy-700);
}

/* ==========================================================
   SECTION 5 — THE DIFFERENCE
   ========================================================== */
.journey {
  list-style: none; padding: 0; margin: 28px 0 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
}
.journey li {
  font-size: 0.74rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 30px; background: var(--white);
}
.journey li:not(:last-child)::after {
  content: "→"; margin-left: 18px; color: var(--gold-500);
  display: inline-block; /* keeps the arrow out of the strike-through */
}
.journey li:first-child { text-decoration: line-through; text-decoration-color: var(--gold-500); }
.journey .journey-end { background: var(--navy-700); color: var(--white); border-color: var(--navy-700); }

.card-grid { display: grid; gap: 24px; }
.card-grid.four { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 28px;
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--gold-200); }
.card h3 {
  font-family: var(--font-sans); font-size: 0.85rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 12px;
}
.card p { font-size: 0.97rem; color: var(--muted); margin: 0; }
.card-num {
  display: block; font-family: var(--font-serif); font-size: 2rem;
  color: var(--gold-500); margin-bottom: 18px; line-height: 1;
}
.card-icon i { font-size: 1.5rem; color: var(--steel-500); margin-bottom: 20px; }

.inline-cta {
  margin-top: 56px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
  padding: 26px 32px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--white);
}
.inline-cta p { margin: 0; font-family: var(--font-serif); font-size: 1.25rem; color: var(--navy-900); }

/* ==========================================================
   SECTION 6 — SUBJECTS
   ========================================================== */
.subject-grid {
  display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 24px;
}
.subject-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 36px 30px; background: var(--white);
  transition: transform .3s, box-shadow .3s;
}
.subject-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.subject-card .link-arrow { margin-top: auto; align-self: flex-start; }

.subject-top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin-bottom: 22px; }
.subject-top i { font-size: 1.4rem; color: var(--gold-500); }
.subject-top h3 { margin: 0; font-size: 1.6rem; }

.badge {
  font-size: 0.66rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--navy-900); background: var(--gold-200);
  padding: 5px 10px; border-radius: 30px;
}

.syllabus { list-style: none; padding: 0; margin: 0 0 22px; }
.syllabus li {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
  font-size: 0.95rem; color: var(--ink);
}
.syllabus span { font-weight: 600; color: var(--steel-500); white-space: nowrap; }

.focus-label {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 10px;
}
.focus-list {
  list-style: none; padding: 0; margin: 0 0 30px;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.focus-list li {
  font-size: 0.82rem; color: var(--navy-700);
  background: var(--blue-100); padding: 5px 12px; border-radius: 30px;
}

/* Lead (Mathematics) card */
.subject-lead { background: var(--navy-900); border-color: var(--navy-900); color: #D5DDE8; }
.subject-lead h3 { color: var(--white); }
.subject-lead .syllabus li { color: var(--white); border-color: rgba(255,255,255,.14); }
.subject-lead .syllabus span { color: var(--gold-200); }
.subject-lead .focus-label { color: #A9B6C8; }
.subject-lead .focus-list li { background: rgba(255,255,255,.08); color: var(--white); }
.subject-lead .link-arrow { color: var(--white); }

/* ==========================================================
   SECTION 7 — TIMELINE
   ========================================================== */
.timeline {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  position: relative;
}
.timeline::before {   /* the horizontal line */
  content: ""; position: absolute; left: 0; right: 0; top: 7px;
  height: 1px; background: var(--gold-500); opacity: .6;
}
.timeline li { position: relative; padding: 40px 28px 0 0; }
.timeline li::before {  /* the dot */
  content: ""; position: absolute; top: 0; left: 0;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--blue-50); border: 2px solid var(--gold-500);
}
.timeline .tl-current::before { background: var(--gold-500); box-shadow: 0 0 0 6px rgba(176,141,87,.2); }
.tl-date {
  display: block; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold-600); margin-bottom: 10px;
}
.timeline h3 { font-size: 1.15rem; margin-bottom: 8px; }
.timeline p { font-size: 0.93rem; color: var(--muted); }

/* ==========================================================
   SECTION 8 — BEYOND THE CLASSROOM
   ========================================================== */
.beyond-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 80px; align-items: center; }
.beyond-intro { font-size: 1.05rem; color: #C3CEDD; max-width: 36em; }
.beyond-list { list-style: none; padding: 0; margin: 30px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; }
.beyond-list li { display: flex; align-items: center; gap: 12px; font-size: 0.95rem; color: var(--white); }
.beyond-list i { color: var(--gold-500); width: 20px; text-align: center; }

.inquiry { list-style: none; padding: 0; margin: 0; position: relative; }
.inquiry::before {   /* vertical connector line */
  content: ""; position: absolute; left: 27px; top: 28px; bottom: 28px;
  width: 1px; background: rgba(230,214,184,.35);
}
.inquiry li {
  position: relative; display: flex; align-items: center; gap: 22px;
  padding: 10px 0;
  font-family: var(--font-serif); font-size: 1.6rem; color: var(--white);
}
.inquiry span {
  flex: 0 0 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-sans); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em;
  color: var(--gold-200); background: var(--navy-900);
  border: 1px solid rgba(230,214,184,.45);
}
.inquiry li:last-child span { background: var(--gold-500); color: var(--navy-900); border-color: var(--gold-500); }

/* ==========================================================
   SECTION 9 — ACHIEVEMENTS
   ========================================================== */
.achieve-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}
.achieve { padding: 34px 28px 10px 0; }
.achieve + .achieve { padding-left: 28px; border-left: 1px solid var(--line); }
.achieve-title {
  font-family: var(--font-serif); font-size: 1.35rem; color: var(--navy-900);
  margin-bottom: 8px;
}
.achieve p:last-child { color: var(--muted); font-size: 0.95rem; }

/* ==========================================================
   SECTION 11 — HOW IT WORKS
   ========================================================== */
.steps {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  counter-reset: none;
}
.step { position: relative; padding: 0 10px 0 0; }
.step:not(:last-child)::after {   /* connector dashes between steps */
  content: ""; position: absolute; top: 32px; left: 84px; right: 10px;
  border-top: 1px dashed var(--gold-500); opacity: .7;
}
.step-icon {
  width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--blue-100); color: var(--navy-700); font-size: 1.35rem;
  margin-bottom: 22px; transition: background .3s, color .3s;
}
.step:hover .step-icon { background: var(--navy-700); color: var(--gold-200); }
.step-num { display: block; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.16em; color: var(--gold-600); margin-bottom: 6px; }
.step h3 { font-size: 1.2rem; }

/* ==========================================================
   SECTION 12 — FINAL CTA
   ========================================================== */
.final-cta {
  position: relative; overflow: hidden;
  background: var(--navy-900);
  padding: 120px 0;
  text-align: center;
}
.final-cta::before {   /* soft gold glow */
  content: ""; position: absolute; width: 700px; height: 700px; left: 50%; top: -380px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(176,141,87,.22), transparent 65%);
}
.final-inner { position: relative; max-width: 780px; }
.final-cta h2 { color: var(--white); font-size: clamp(2rem, 4vw, 3rem); }
.final-cta p { color: #C3CEDD; font-size: 1.1rem; }

/* ==========================================================
   SECTION 13 — FOOTER
   ========================================================== */
.site-footer { background: #07142A; color: #A9B6C8; padding: 80px 0 30px; font-size: 0.93rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; }
.tagline { font-family: var(--font-serif); font-style: italic; color: var(--gold-200); margin-top: 18px; }
.site-footer h4 {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--white); margin: 0 0 18px;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: #A9B6C8; text-decoration: none; transition: color .2s; }
.site-footer a:hover { color: var(--gold-200); }
.contact-list i { color: var(--gold-500); width: 20px; }

.footer-bottom {
  margin-top: 60px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.1);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px;
  font-size: 0.8rem;
}
.footer-bottom p { margin: 0; }
.disclaimer { color: #7E8CA2; }

/* ---------- Toast ("coming soon") ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 300;
  transform: translate(-50%, 20px);
  background: var(--navy-900); color: var(--white);
  padding: 12px 20px; border-radius: 6px; font-size: 0.9rem;
  opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s;
  border-left: 3px solid var(--gold-500);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Scroll reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ==========================================================
   RESPONSIVE — Laptop / iPad landscape (≤ 1100px)
   ========================================================== */
@media (max-width: 1100px) {
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 0.82rem; }
  .card-grid.four { grid-template-columns: repeat(2, 1fr); }
  .subject-grid { grid-template-columns: 1fr 1fr; }
  .subject-lead { grid-column: 1 / -1; }
}

/* ---- Switch to hamburger menu (≤ 1024px: iPad and smaller) ---- */
@media (max-width: 1024px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h));
    flex-direction: column; align-items: stretch; gap: 24px;
    background: var(--white); padding: 24px;
    opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: opacity .3s ease, transform .3s ease, visibility .3s;
    overflow-y: auto;
  }
  .nav-menu.open { opacity: 1; visibility: visible; transform: none; }
  .nav-links { flex-direction: column; gap: 0; }
  .nav-links a { display: block; font-size: 1.05rem; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav-links a::after { display: none; }
  .nav-menu .btn { padding: 16px; font-size: 0.82rem; }
}

/* ==========================================================
   RESPONSIVE — iPad portrait / tablets (≤ 900px)
   ========================================================== */
@media (max-width: 900px) {
  .section { padding: 84px 0; }
  .hero { padding: 56px 0 90px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { max-width: 440px; margin: 0 auto; width: 100%; }

  .cred-grid { grid-template-columns: 1fr 1fr; }
  .cred-card:nth-child(3) { border-left: 0; }
  .cred-card:nth-child(n+3) { border-top: 1px solid var(--line); }

  .about-grid { grid-template-columns: 1fr; gap: 56px; }
  .about-photo { max-width: 400px; }

  .timeline { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .timeline::before { display: none; }

  .beyond-grid { grid-template-columns: 1fr; gap: 56px; }

  .achieve-grid { grid-template-columns: 1fr 1fr; }
  .achieve:nth-child(3) { padding-left: 0; border-left: 0; }

  .steps { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .step::after { display: none; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ==========================================================
   RESPONSIVE — Mobile phones (≤ 600px)
   ========================================================== */
@media (max-width: 600px) {
  body { font-size: 16px; }
  .container { padding: 0 18px; }
  .section { padding: 68px 0; }

  .btn-row .btn { width: 100%; }
  .credibility-line { flex-direction: column; }
  .credibility-line span + span::before { display: none; }

  .hero-visual { padding: 20px 10px; }
  .float-tag { font-size: 0.6rem; padding: 7px 10px; }
  .tag-1 { left: 0; } .tag-2 { right: 0; } .tag-3 { left: 0; } .tag-4 { right: 4%; }

  .cred-grid { grid-template-columns: 1fr; }
  .cred-card + .cred-card { border-left: 0; border-top: 1px solid var(--line); }

  .about-photo::before { inset: 14px -14px -14px 14px; }
  .about-photo { margin-right: 14px; }

  .card-grid.four, .subject-grid { grid-template-columns: 1fr; }
  .inline-cta { flex-direction: column; align-items: stretch; text-align: center; padding: 24px; }

  .journey li:not(:last-child)::after { margin-left: 10px; }

  /* timeline becomes vertical */
  .timeline { grid-template-columns: 1fr; row-gap: 0; }
  .timeline li { padding: 0 0 34px 34px; border-left: 1px solid var(--gold-500); margin-left: 7px; }
  .timeline li:last-child { border-left-color: transparent; }
  .timeline li::before { left: -8px; }

  .beyond-list { grid-template-columns: 1fr; }
  .inquiry li { font-size: 1.35rem; }

  .achieve-grid { grid-template-columns: 1fr; }
  .achieve, .achieve + .achieve { padding: 24px 0; border-left: 0; border-bottom: 1px solid var(--line); }

  .steps { grid-template-columns: 1fr; row-gap: 28px; }
  .step { display: grid; grid-template-columns: 64px 1fr; column-gap: 18px; align-items: center; }
  .step-icon { margin: 0; grid-row: 1 / 3; }
  .step h3 { margin: 0; }

  .final-cta { padding: 84px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
