

:root {
  --brand: #70d1c8;
  --brand-dark: #24988f;
  --pink: #AE40AF;
  --purple: #ff69b4;
  --red: #da4444;
  --blue: #24678d;
  --dark: #151e24;
  --muted: #7a858c;
  --light: #f6f8fa;
  --white: #ffffff;
  --border: #dfe6ea;
  --shadow: 0 12px 28px rgba(21, 30, 36, 0.07);
  --radius: 14px;
  --font-main: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-main);
  color: var(--dark);
  background: #f6f8f9;
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

/* Header */

.site-header {
  background: #ffffff;
  color: var(--dark);
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(223, 230, 234, 0.75);
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.site-header.scrolled {
  background: var(--brand);
  border-color: transparent;
  box-shadow: 0 8px 24px rgba(21, 30, 36, 0.12);
}

.top-nav {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logo {
  width: 138px;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Top menu */

.main-nav {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.main-nav a {
  text-decoration: none;
  font-family: var(--font-main);
  font-size: 0.8rem;
  text-transform: uppercase;
  font-weight: 400;
  letter-spacing: 0.065em;
  padding: 8px 11px;
  border-radius: 7px;
  color: #6f7a81;
  transition:
    background-color 0.18s ease,
    color 0.18s ease;
}

.main-nav a:hover {
  background: rgba(21, 30, 36, 0.06);
  color: #111820;
}

.site-header.scrolled .main-nav a {
  color: #364247;
}

.site-header.scrolled .main-nav a:hover {
  background: rgba(255, 255, 255, 0.34);
  color: #111820;
}

/* Next page link */

.next-page-wrap {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
}

.next-page-container {
  min-height: 58px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.course-tags-bar {
  margin: 0;
}

.next-page-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #6f7a81;
  text-decoration: none;
  font-size: 0.88rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  background: #ffffff;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}

.next-page-link:hover {
  background: #f7fbfb;
  border-color: var(--brand);
  color: #111820;
}

.next-page-label {
  color: #8a949a;
}

.next-page-title {
  color: #111820;
}

.next-page-arrow {
  color: var(--brand-dark);
  font-size: 1.1rem;
  line-height: 1;
}

/* Hero */

.hero {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 32px;
  padding: 34px 0;
  align-items: center;
}

.hero-content {
  min-width: 0;
}

.course-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.course-tags a {
  background: #ffffff;
  border: 1px solid var(--border);
  color: #46545d;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 400;
  text-decoration: none;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}

.course-tags a:hover {
  background: #f7fbfb;
  border-color: var(--brand);
  color: #111820;
}

.hero-subtitle {
  font-size: 1rem;
  color: #46545d;
  max-width: 760px;
  margin: 18px 0 0;
  line-height: 1.68;
}

.lesson-summary,
.future-box {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.lesson-summary h2,
.future-box h2 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.lesson-summary p,
.future-box p {
  margin: 0;
  color: #46545d;
}


.site-notice {
  padding: 12px 20px;
  background: #eaf7f5;
  border-bottom: 2px solid #24988f;
  color: inherit;
  text-align: center;
}

.site-notice p {
  max-width: 1100px;
  margin: 0 auto;
  font-size: inherit;
  line-height: 1.5;
}
/* Typography */

.eyebrow {
  color: var(--pink);
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.15em;
  margin: 0 0 8px;
}

h1,
h2,
h3 {
  line-height: 1.15;
  text-wrap: balance;
}

h1 {
  margin: 0;
  font-size: clamp(1.9rem, 3.1vw, 2.9rem);
  letter-spacing: -0.045em;
  font-weight: 650;
}

h2 {
  margin: 0 0 14px;
  font-size: clamp(1.3rem, 2vw, 1.85rem);
  letter-spacing: -0.035em;
  font-weight: 600;
}

h3 {
  margin: 0 0 10px;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
  font-weight: 600;
}

/* Layout */

.topic-layout {
  display: block;
  padding: 32px 0 60px;
}

/* Tabs */

.tabs {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.tab-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: #f1f4f5;
  border-bottom: 1px solid var(--border);
}

.tab-button {
  appearance: none;
  border: 0;
  border-right: 1px solid var(--border);
  background: transparent;
  padding: 14px 10px;
  cursor: pointer;
  font-family: var(--font-main);
  font-weight: 400;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #56636b;
  transition:
    background-color 0.18s ease,
    color 0.18s ease;
}

.tab-button:last-child {
  border-right: 0;
}

.tab-button:hover {
  background: rgba(112, 209, 200, 0.16);
  color: #111820;
}

.tab-button.active {
  background: #ffffff;
  color: #111820;
  border-top: 4px solid var(--brand);
}

.tab-panel {
  display: none;
  padding: 28px;
}

.tab-panel.active {
  display: block;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 22px;
}

/* Cards and content */

.content-card,
.quiz-card,
.download-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  margin-bottom: 18px;
}

.content-card p,
.content-card li,
.quiz-card p,
.download-card p {
  font-size: 0.98rem;
}

.content-card p {
  margin-top: 0;
}

.content-card ul,
.content-card ol {
  padding-left: 23px;
}

.content-card li {
  margin-bottom: 8px;
}

.image-placeholder {
  border: 2px dashed #bed1d6;
  background: #f6fafb;
  border-radius: 12px;
  padding: 26px;
  text-align: center;
  color: var(--muted);
  margin: 20px 0 6px;
}

.image-placeholder p {
  margin: 0;
  font-weight: 400;
}

.image-placeholder small {
  display: block;
  margin-top: 8px;
}

.formula-card {
  background: #ffffff;
}

.formula {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--red);
  text-align: center;
  padding: 16px;
  background: #fff6f6;
  border-radius: 12px;
}

.worked-example {
  background: #f5f8fb;
  border-left: 5px solid var(--blue);
  border-radius: 10px;
  padding: 18px;
}

/* Terminology */

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

.term-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
}

.term-card h3 {
  color: var(--blue);
  font-size: 1rem;
}

/* Quiz */

.quiz-card {
  background: #ffffff;
}

.quiz-question {
  font-size: 1.05rem;
  font-weight: 500;
}

.quiz-options {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.quiz-option {
  border: 2px solid var(--brand);
  background: #ffffff;
  border-radius: 10px;
  padding: 13px 15px;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-main);
  font-size: 0.96rem;
  line-height: 1.45;
}

.quiz-option:hover {
  background: #ebfbfa;
}

.quiz-option.correct {
  border-color: #28a745;
  background: #eaf8ee;
}

.quiz-option.wrong {
  border-color: #e05252;
  background: #fff1f1;
}

.quiz-feedback {
  font-weight: 500;
  color: var(--dark);
}

.question-list li {
  margin-bottom: 10px;
}

/* Flashcards */

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

.flip-card {
  position: relative;
  min-height: 190px;
  border: 0;
  background: transparent;
  perspective: 1000px;
  cursor: pointer;
  padding: 0;
  font-family: var(--font-main);
}

.flip-card-face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 22px;
  background: transparent;
  color: #111820;
  border-radius: 10px;
  backface-visibility: hidden;
  transition:
    transform 0.55s ease,
    border-color 0.2s ease,
    background-color 0.2s ease;
  box-sizing: border-box;
}

.flip-card-front {
  border: 2px solid var(--brand);
  transform: rotateY(0deg);
}

.flip-card-back {
  border: 2px solid var(--pink);
  transform: rotateY(180deg);
}

.flip-card-front span {
  font-size: 1rem;
  font-weight: 500;
}

.flip-card-back span {
  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.55;
}

.flip-card.revealed .flip-card-front {
  transform: rotateY(180deg);
}

.flip-card.revealed .flip-card-back {
  transform: rotateY(360deg);
}

/* Workbook */

.download-card {
  background: #fff7fc;
  border-color: #ffd1e8;
}

.button {
  display: inline-block;
  background: var(--brand);
  color: var(--dark);
  padding: 11px 17px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  margin-top: 8px;
  font-size: 0.92rem;
}

.button:hover {
  background: var(--brand-dark);
  color: #ffffff;
}

.centered-panel-header {
  justify-content: center;
  text-align: center;
}

.centered-panel-header > div {
  max-width: 760px;
  margin: 0 auto;
}


/* Site footer css */

.site-footer {
  background: #f1f3f4;
  color: #151e24;
  padding: 42px 0 24px;
  border-top: 1px solid #dfe6ea;
}

.footer-inner {
  text-align: center;
}

.footer-logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.footer-logo {
  width: 120px;
  height: auto;
  display: block;
}

.footer-disclaimer {
  max-width: 820px;
  margin: 0 auto 26px;
}

.footer-disclaimer p {
  margin: 0;
  color: #5f6b72;
  font-size: 0.9rem;
  line-height: 1.65;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  max-width: 900px;
  margin: 0 auto 24px;
}

.footer-links a {
  color: #5f6b72;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 400;
}

.footer-links a:hover {
  color: #151e24;
  text-decoration: underline;
  text-decoration-color: #70d1c8;
  text-underline-offset: 4px;
}

.footer-bottom {
  border-top: 1px solid #d8dee2;
  padding-top: 18px;
}

.footer-bottom p {
  margin: 0;
  color: #7a858c;
  font-size: 0.8rem;
}


.hero-coffee-logo {
  display: block;
  width: 80px;
  max-width: 80%;
  height: auto;
  margin: 0 auto 20px;
}

.home-hero-title {
  max-width: 760px;
  font-size: clamp(1.2rem, 2.5vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
  font-weight: 400;
}


/* Homepage section images */

.home-section-header {
  align-items: center;
}

.home-section-header > div:first-child {
  flex: 1;
}

.home-section-image {
  width: 180px;
  height: 110px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  padding: 12px;
  border: 2px dashed var(--border);
  border-radius: 14px;
  background: var(--light);
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}


.home-section-image {
  width: min(280px, 35%);
  flex-shrink: 0;
}

.course-section-image {
  display: block;
  width: 200px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(20, 35, 50, 0.12);
}

@media (max-width: 700px) {
  .home-section-image {
    width: 100%;
    max-width: 360px;
  }
}
@media (max-width: 720px) {
  .home-section-image {
    width: 100%;
    height: 130px;
  }
}
@media (max-width: 720px) {
  .site-footer {
    padding: 34px 0 22px;
  }

  .footer-logo {
    width: 105px;
  }

  .footer-links {
    gap: 9px 14px;
  }
}

@media (max-width: 760px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
/* Responsive */

@media (max-width: 960px) {
  .top-nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .brand-logo {
    width: 116px;
  }

  .main-nav {
    width: 100%;
  }

    .hero-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 28px 0;
    align-items: stretch;
    }

    .next-page-container {
    justify-content: flex-start;
    align-items: flex-start;
    flex-direction: column;
    padding-top: 10px;
    padding-bottom: 10px;
    }
}

@media (max-width: 720px) {
  .site-header {
    position: static;
  }

  .top-nav {
    min-height: auto;
  }

  .brand-logo {
    width: 104px;
  }

  .tab-list {
    display: flex;
    overflow-x: auto;
  }

  .tab-button {
    min-width: 150px;
  }

  .tab-panel {
    padding: 20px;
  }

  .panel-header {
    flex-direction: column;
  }

  .term-grid,
  .flashcard-grid {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    padding: 28px 0;
  }

  h1 {
    font-size: 2rem;
  }
}
/* GCSE course navigation: uses the same hero, tabs and cards as lesson pages. */
.lesson-summary h1 { margin: 0 0 12px; }
.lesson-summary .eyebrow { margin-bottom: 8px; }
.syllabus-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.syllabus-card { margin-bottom: 0; }
.syllabus-card h3 { text-transform: uppercase; }
.syllabus-card h4 { margin: 20px 0 8px; font-size: 0.98rem; font-weight: 600; text-transform: uppercase; }
.syllabus-card ul { list-style: none; padding: 0; margin: 0; }
.syllabus-card li { display: flex; align-items: baseline; gap: 10px; margin: 7px 0; }
.syllabus-card li::before { content: ""; display: block; flex: 0 0 9px; height: 9px; background: transparent; border: 2px solid #24988f; border-radius: 1px; }
.syllabus-card li a { text-decoration-color: var(--brand-dark); text-underline-offset: 3px; }
.syllabus-card li a:hover { color: var(--brand-dark); }
.syllabus-card .extras { margin-top: 20px; border-top: 1px solid var(--border); }
.syllabus-paper-heading { margin: 26px 0 16px; }
.syllabus-paper-heading:first-of-type { margin-top: 8px; }
@media (max-width: 780px) { .syllabus-grid { grid-template-columns: 1fr; } }

.course-tabs > .tab-list { grid-template-columns: repeat(3, 1fr); }
