/* New Cambridge Education Group — site styles */

:root {
  --heading: #1a1a1a;
  --heading-2: #2e2e2e;
  --accent: #a51c30;
  --accent-dark: #821424;
  --accent-light: #e8566b;
  --accent-soft: #f7e6e9;
  --steel: #8a8b8c;
  --ink: #1f1f1f;
  --muted: #5c5c5c;
  --line: #e3e1de;
  --paper: #faf9f7;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(26, 26, 26, 0.08);
  --max: 1160px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html { scroll-behavior: smooth; }

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

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

a { color: var(--heading-2); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
  color: var(--heading);
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; }

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

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.8rem;
}

.lead { font-size: 1.15rem; color: var(--muted); max-width: 640px; }

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.97rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-light { background: var(--white); color: var(--accent); }
.btn-light:hover { background: var(--accent-soft); }
.btn-outline { border-color: currentColor; color: var(--white); background: transparent; }
.btn-outline:hover { background: rgba(255, 255, 255, 0.1); }
.btn-dark { background: var(--heading); color: var(--white); }
.btn-dark:hover { background: var(--heading-2); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--heading);
}
.brand-mark {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}
.brand-text { line-height: 1.1; }
.brand-name { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; }
.brand-sub { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { border-bottom-color: var(--accent); color: var(--heading); }
.nav-links .btn { padding: 10px 20px; border-bottom: 0; }
.nav-links .btn:hover { border-bottom: 0; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
  color: var(--heading);
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 20%, rgba(165, 28, 48, 0.35), transparent 50%),
    linear-gradient(135deg, #141414 0%, #2a2a2a 100%);
  color: var(--white);
  border-top: 6px solid var(--accent);
  padding: 110px 0 120px;
}
.hero h1 { color: var(--white); max-width: 760px; }
.hero h1 em { font-style: italic; color: var(--accent-light); }
.hero .eyebrow, .page-hero .eyebrow { color: var(--accent-light); }
.hero .lead { color: rgba(255, 255, 255, 0.82); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 2rem; }
.hero-art {
  position: absolute;
  right: -80px;
  top: 50%;
  transform: translateY(-50%);
  width: 520px;
  opacity: 0.16;
  pointer-events: none;
}

.page-hero {
  background:
    radial-gradient(circle at 90% 10%, rgba(165, 28, 48, 0.3), transparent 50%),
    linear-gradient(135deg, #141414 0%, #2a2a2a 100%);
  color: var(--white);
  border-top: 6px solid var(--accent);
  padding: 80px 0 70px;
}
.page-hero h1 { color: var(--white); }
.page-hero .lead { color: rgba(255, 255, 255, 0.82); }

/* Sections */
.section { padding: 96px 0; }
.section-alt { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 680px; margin-bottom: 52px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .lead { margin-left: auto; margin-right: auto; }

.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(26, 26, 26, 0.12); }
.card p { color: var(--muted); }
.card .link { font-weight: 600; text-decoration: none; color: var(--heading-2); }
.card .link:hover { color: var(--accent-dark); }
.card .link { color: var(--accent); }

.icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}
.icon svg { width: 26px; height: 26px; }

/* Values strip */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line); }
.pillar { padding: 32px 28px; border-right: 1px solid var(--line); }
.pillar:last-child { border-right: 0; }
.pillar h3 { font-size: 1.15rem; }
.pillar p { color: var(--muted); font-size: 0.95rem; margin: 0; }

/* Split */
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; }
.split-visual {
  aspect-ratio: 4 / 3.4;
  border-radius: 20px;
  background:
    radial-gradient(circle at 30% 30%, rgba(165, 28, 48, 0.35), transparent 55%),
    linear-gradient(145deg, var(--heading-2), var(--heading));
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.split-visual svg { width: 60%; opacity: 0.9; }

.checklist { list-style: none; padding: 0; margin: 1.5rem 0 2rem; }
.checklist li { position: relative; padding-left: 34px; margin-bottom: 14px; }
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a51c30' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* Steps */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.step { position: relative; padding-top: 64px; }
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: 0;
  left: 0;
  font-family: var(--serif);
  font-size: 2.6rem;
  color: var(--accent);
  line-height: 1;
}
.step p { color: var(--muted); }

/* Quote */
.quote {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}
.quote blockquote {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  line-height: 1.45;
  color: var(--heading);
  margin: 0 0 1.5rem;
}
.quote cite { font-style: normal; color: var(--muted); font-weight: 500; }

/* CTA band */
.cta {
  background: var(--accent);
  color: var(--white);
  border-radius: 24px;
  padding: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta h2 { color: var(--white); margin-bottom: 0.3em; }
.cta p { color: rgba(255, 255, 255, 0.85); margin: 0; }

/* Program detail */
.program {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  padding: 56px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 90px;
}
.program:last-child { border-bottom: 0; }
.program-meta { color: var(--muted); font-size: 0.95rem; }
.program-meta dt { font-weight: 600; color: var(--heading); margin-top: 14px; }
.program-meta dd { margin: 2px 0 0; }
.tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  margin: 0 6px 6px 0;
}

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; }
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.08rem;
  color: var(--heading);
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--accent); transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 14px 0 0; color: var(--muted); }

/* Forms */
.form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; color: var(--heading); }
.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid #cfcabd;
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.field .error { color: #b3261e; font-size: 0.85rem; margin-top: 4px; display: none; }
.field.invalid input,
.field.invalid select,
.field.invalid textarea { border-color: #b3261e; }
.field.invalid .error { display: block; }
.form-status {
  display: none;
  padding: 16px 18px;
  border-radius: 10px;
  background: #e8f3ea;
  color: #1e5b2b;
  font-weight: 500;
}
.form-status.show { display: block; }

.contact-info { list-style: none; padding: 0; margin: 0; }
.contact-info li { display: flex; gap: 16px; margin-bottom: 26px; }
.contact-info .icon { margin: 0; width: 46px; height: 46px; flex-shrink: 0; }
.contact-info strong { display: block; color: var(--heading); }
.contact-info span { color: var(--muted); }

/* Footer */
.site-footer {
  background: #161616;
  border-top: 6px solid var(--accent);
  color: rgba(255, 255, 255, 0.72);
  padding: 72px 0 32px;
  font-size: 0.95rem;
}
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.site-footer h4 { color: var(--white); font-family: var(--sans); font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: rgba(255, 255, 255, 0.72); text-decoration: none; }
.site-footer a:hover { color: var(--accent-light); }
.site-footer .brand { color: var(--white); margin-bottom: 18px; }
.site-footer .brand-sub { color: rgba(255, 255, 255, 0.55); }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 56px;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
}

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* Responsive */
@media (max-width: 1000px) {
  .grid-4, .steps, .pillars { grid-template-columns: repeat(2, 1fr); }
  .pillar:nth-child(2) { border-right: 0; }
  .pillar:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 8px 24px 20px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li a { display: block; padding: 12px 0; }
  .nav-links .btn { justify-content: center; margin-top: 10px; }
  .grid-2, .grid-3, .split, .program { grid-template-columns: 1fr; }
  .split { gap: 40px; }
  .program { gap: 20px; }
  .hero { padding: 80px 0 90px; }
  .hero-art { display: none; }
  .section { padding: 72px 0; }
  .cta { padding: 44px 32px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .grid-4, .steps, .pillars, .footer-grid, .form-row { grid-template-columns: 1fr; }
  .pillar { border-right: 0; border-bottom: 1px solid var(--line); }
  .card { padding: 26px; }
  .brand-sub { display: none; }
}

/* Stats / formats */
.formats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.split-visual { background: radial-gradient(circle at 30% 30%, rgba(165, 28, 48, 0.45), transparent 55%), linear-gradient(145deg, #2a2a2a, #121212); }
.split-visual img { width: 70%; }
.form.card:hover { transform: none; box-shadow: var(--shadow); }
.anchor { scroll-margin-top: 90px; }
.split-top { align-items: start; }
