:root {
  --ink: #111827;
  --navy: #172554;
  --paper: #fffaf0;
  --cream: #fff7e6;
  --gold: #f3b23f;
  --red: #c7353f;
  --teal: #0f766e;
  --blue: #2563eb;
  --green: #2f8f46;
  --muted: #5b6472;
  --line: rgba(17, 24, 39, 0.14);
  --shadow: 0 24px 70px rgba(17, 24, 39, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.site-header {
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 56px);
  color: white;
  background: linear-gradient(180deg, rgba(8, 13, 28, 0.82), rgba(8, 13, 28, 0));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: 220px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 2px solid rgba(255, 255, 255, 0.68);
  border-radius: 50%;
  background: rgba(199, 53, 63, 0.82);
  color: white;
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 0.98rem;
}

.brand small {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
}

nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

nav a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-size: 0.92rem;
}

nav a:hover {
  background: rgba(255, 255, 255, 0.14);
  color: white;
}

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  padding: 124px clamp(18px, 5vw, 72px) 56px;
  color: white;
}

.hero-media,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media {
  background-image: url("assets/cambridge-hero.png");
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(8, 13, 28, 0.9) 0%, rgba(8, 13, 28, 0.66) 42%, rgba(8, 13, 28, 0.2) 100%),
    linear-gradient(0deg, rgba(8, 13, 28, 0.66) 0%, rgba(8, 13, 28, 0) 44%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(830px, 100%);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-weight: 800;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(2.7rem, 7vw, 6.8rem);
  line-height: 0.94;
  letter-spacing: 0;
  max-width: 900px;
}

.hero-copy {
  width: min(720px, 100%);
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.05rem, 2vw, 1.36rem);
  line-height: 1.55;
}

.hero-actions,
.contact {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-actions {
  margin-top: 30px;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 0;
  border-radius: 8px;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
}

.button-primary {
  background: var(--gold);
  color: #241303;
  box-shadow: 0 14px 30px rgba(243, 178, 63, 0.28);
}

.button-primary:hover {
  background: #ffd36d;
}

.button-secondary {
  border: 1px solid rgba(255, 255, 255, 0.34);
  color: white;
  background: rgba(255, 255, 255, 0.12);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  width: min(760px, 100%);
  margin: 42px 0 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow);
}

.hero-stats div {
  padding: 18px;
  background: rgba(8, 13, 28, 0.58);
  backdrop-filter: blur(12px);
}

.hero-stats dt {
  font-weight: 900;
  font-size: clamp(1.45rem, 3vw, 2.15rem);
}

.hero-stats dd {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.75);
}

section:not(.hero) {
  padding: 76px clamp(18px, 5vw, 72px);
}

.section-heading {
  display: grid;
  gap: 0;
  max-width: 820px;
  margin-bottom: 30px;
}

h2 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.02;
}

h3 {
  margin: 0;
  font-size: 1.35rem;
}

.intro-band {
  background: linear-gradient(135deg, #fff7e6 0%, #f8fbff 54%, #e8f7f4 100%);
}

.proof-grid,
.method-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.proof-grid article,
.method-strip article,
.subject-panel,
.summary {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 16px 36px rgba(17, 24, 39, 0.08);
}

.proof-grid article {
  padding: 24px;
}

.proof-number {
  display: inline-flex;
  margin-bottom: 28px;
  color: var(--red);
  font-size: 0.86rem;
  font-weight: 900;
}

.proof-grid p,
.subject-panel p,
.topic-list,
.method-strip p,
.contact p,
.summary p {
  color: var(--muted);
  line-height: 1.68;
}

.subjects {
  background: #fbfdff;
}

.subject-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.subject-panel {
  position: relative;
  overflow: hidden;
  padding: 28px;
}

.subject-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 8px;
}

.politics-panel::before {
  background: linear-gradient(90deg, var(--red), var(--gold), var(--teal));
}

.economics-panel::before {
  background: linear-gradient(90deg, var(--blue), var(--green), var(--gold));
}

.panel-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}

.subject-tag,
.mini-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.subject-tag {
  color: white;
  background: var(--navy);
}

.mini-badge {
  color: var(--teal);
  background: #e5fbf6;
}

.topic-list {
  display: grid;
  gap: 14px;
  padding: 0;
  margin: 22px 0 0;
  list-style: none;
}

.topic-list li {
  padding-left: 16px;
  border-left: 4px solid rgba(199, 53, 63, 0.28);
}

.topic-list span {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-weight: 900;
}

.choose {
  background:
    radial-gradient(circle at 16% 8%, rgba(199, 53, 63, 0.12), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(15, 118, 110, 0.14), transparent 30%),
    #fffaf0;
}

.chooser-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.6fr);
  gap: 20px;
  align-items: start;
}

.chooser {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

fieldset,
.form-row {
  min-width: 0;
  margin: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

legend {
  padding: 0 8px;
  color: var(--navy);
  font-weight: 900;
}

label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  color: #2f3745;
  line-height: 1.35;
}

input[type="radio"],
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--red);
  flex: 0 0 auto;
}

.form-row {
  display: grid;
  gap: 8px;
}

.form-row label {
  margin: 0;
  color: var(--navy);
  font-weight: 900;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
textarea {
  width: 100%;
  border: 1px solid rgba(17, 24, 39, 0.18);
  border-radius: 8px;
  padding: 12px 14px;
  font: inherit;
  resize: vertical;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus,
textarea:focus {
  outline: 3px solid rgba(243, 178, 63, 0.42);
  border-color: var(--gold);
}

.summary {
  position: sticky;
  top: 92px;
  padding: 24px;
  background: #102039;
  color: white;
}

.summary h3 {
  font-size: 1.75rem;
}

.summary p {
  color: rgba(255, 255, 255, 0.78);
}

.summary .button {
  width: 100%;
  margin-top: 10px;
}

.summary .button-secondary {
  color: white;
}

.copy-note {
  min-height: 24px;
  margin-bottom: 0;
  font-size: 0.9rem;
}

.lesson-options {
  background: #fbfdff;
}

.lesson-slider-shell {
  position: relative;
}

.lesson-slider-controls {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: -58px 0 18px;
}

.slider-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: white;
  background: var(--navy);
  font: inherit;
  font-size: 1.2rem;
  font-weight: 900;
  cursor: pointer;
}

.slider-button:hover {
  background: #243b79;
}

.lesson-option-grid {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 2px 2px 18px;
  scroll-behavior: smooth;
  scroll-padding-left: 2px;
  scroll-snap-type: x mandatory;
  scrollbar-color: var(--navy) rgba(17, 24, 39, 0.08);
}

.lesson-panel {
  flex: 0 0 min(370px, 84vw);
  position: relative;
  overflow: hidden;
  scroll-snap-align: start;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 16px 36px rgba(17, 24, 39, 0.08);
}

.lesson-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 8px;
}

.lesson-panel:nth-child(1)::before {
  background: linear-gradient(90deg, var(--red), var(--gold));
}

.lesson-panel:nth-child(2)::before {
  background: linear-gradient(90deg, var(--gold), var(--teal));
}

.lesson-panel:nth-child(3)::before {
  background: linear-gradient(90deg, var(--teal), var(--blue));
}

.lesson-panel:nth-child(4)::before {
  background: linear-gradient(90deg, var(--blue), var(--green));
}

.lesson-icon {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: white;
  background: var(--navy);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: none;
}

.lesson-panel h3 {
  margin: 0 0 12px;
}

.lesson-option-grid p {
  color: var(--muted);
  line-height: 1.65;
}

.method {
  background: #f6fbff;
}

.method-strip,
.resource-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.method-strip article {
  padding: 22px;
}

.method-strip article:nth-child(1) {
  border-top: 5px solid var(--red);
}

.method-strip article:nth-child(2) {
  border-top: 5px solid var(--gold);
}

.method-strip article:nth-child(3) {
  border-top: 5px solid var(--teal);
}

.method-strip article:nth-child(4) {
  border-top: 5px solid var(--blue);
}

.resource-band {
  background: linear-gradient(135deg, #fffaf0 0%, #eef8ff 52%, #f0fbf6 100%);
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.resource-grid article {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 16px 36px rgba(17, 24, 39, 0.08);
}

.resource-grid article:nth-child(1) {
  border-top: 5px solid var(--red);
}

.resource-grid article:nth-child(2) {
  border-top: 5px solid var(--gold);
}

.resource-grid article:nth-child(3) {
  border-top: 5px solid var(--teal);
}

.resource-grid p {
  color: var(--muted);
  line-height: 1.68;
}

.contact {
  justify-content: space-between;
  background: var(--navy);
  color: white;
}

.contact div {
  max-width: 760px;
}

.contact h2 {
  color: white;
}

.contact p {
  max-width: 690px;
  color: rgba(255, 255, 255, 0.76);
}

footer {
  padding: 24px clamp(18px, 5vw, 72px);
  background: #090d1c;
  color: rgba(255, 255, 255, 0.68);
}

footer p {
  margin: 0;
}

.admin-page {
  background: #f7fafc;
}

.admin-header {
  position: sticky;
  background: #090d1c;
}

.admin-main {
  padding-top: 0;
}

.admin-locked {
  min-height: calc(100vh - 78px);
  display: grid;
  place-items: center;
  padding: 110px clamp(18px, 5vw, 72px) 72px;
  background:
    linear-gradient(135deg, rgba(9, 13, 28, 0.92), rgba(23, 37, 84, 0.86)),
    url("assets/cambridge-hero.png") center / cover;
}

.login-panel {
  width: min(520px, 100%);
}

.login-card {
  display: grid;
  gap: 14px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.login-card h1 {
  color: var(--navy);
  font-size: clamp(2rem, 5vw, 3.2rem);
}

.login-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.login-card label {
  margin: 0;
  color: var(--navy);
  font-weight: 900;
}

.admin-hero {
  padding-top: 96px;
  background:
    linear-gradient(135deg, rgba(9, 13, 28, 0.94), rgba(23, 37, 84, 0.9)),
    url("assets/cambridge-hero.png") center / cover;
  color: white;
}

.admin-hero h1 {
  max-width: 760px;
}

.admin-hero p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.65;
}

.admin-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.danger-button {
  color: white;
  background: rgba(199, 53, 63, 0.78);
  border-color: rgba(255, 255, 255, 0.22);
}

.admin-settings {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 0.7fr);
  gap: 22px;
  align-items: start;
  background: #fffaf0;
}

.admin-settings h2 {
  font-size: clamp(1.8rem, 3vw, 3rem);
}

.admin-settings p {
  color: var(--muted);
  line-height: 1.65;
}

.email-settings {
  display: grid;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 16px 36px rgba(17, 24, 39, 0.08);
}

.email-settings label {
  margin: 0;
  color: var(--navy);
  font-weight: 900;
}

.admin-board {
  background: #f7fafc;
}

.board-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.board-heading h2 {
  font-size: clamp(1.8rem, 3vw, 3rem);
}

#enquiry-count {
  margin: 0;
  color: var(--muted);
  font-weight: 900;
}

.admin-list {
  display: grid;
  gap: 16px;
}

.empty-state,
.enquiry-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 16px 36px rgba(17, 24, 39, 0.08);
}

.empty-state {
  padding: 28px;
}

.empty-state p {
  color: var(--muted);
}

.enquiry-card {
  padding: 22px;
}

.enquiry-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.enquiry-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}

.enquiry-details div {
  padding: 14px;
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 8px;
  background: #f8fbff;
}

.enquiry-details dt {
  color: var(--navy);
  font-weight: 900;
  font-size: 0.82rem;
}

.enquiry-details dd {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.48;
}

@media (max-width: 900px) {
  .site-header {
    position: absolute;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    background: linear-gradient(180deg, rgba(8, 13, 28, 0.88), rgba(8, 13, 28, 0));
  }

  nav {
    justify-content: flex-start;
  }

  .lesson-slider-controls {
    justify-content: flex-start;
    margin: 0 0 18px;
  }

  .hero {
    min-height: 96vh;
    padding-top: 184px;
  }

  .hero-stats,
  .proof-grid,
  .subject-layout,
  .chooser-shell,
  .chooser,
  .admin-settings,
  .enquiry-details,
  .resource-grid,
  .lesson-option-grid,
  .method-strip {
    grid-template-columns: 1fr;
  }

  .summary {
    position: static;
  }
}

@media (max-width: 560px) {
  .brand {
    min-width: 0;
  }

  nav a {
    padding: 0 9px;
    font-size: 0.84rem;
  }

  .hero {
    padding-bottom: 34px;
  }

  h1 {
    font-size: 2.56rem;
  }

  .hero-stats div {
    padding: 14px;
  }

  section:not(.hero) {
    padding-top: 54px;
    padding-bottom: 54px;
  }

  .subject-panel,
  .proof-grid article,
  .method-strip article,
  .resource-grid article,
  .lesson-panel,
  .enquiry-card,
  .email-settings,
  fieldset,
  .form-row,
  .summary {
    padding: 18px;
  }
}
