/* QuantiMath — Global Styles (Neutral redesign) */

:root {
  /* ── Base palette — purple tint throughout for cohesion ── */
  --bg:         #f6f0ff;   /* faint purple-white page background */
  --white:      #ffffff;
  --border:     #1e1a38;   /* dark border — matches slideshow style */
  --border-lt:  #3a3256;   /* slightly lighter dark border */
  --text:       #1e1a38;   /* dark purple text */
  --text-mid:   #3a3256;   /* medium dark purple text */
  --gray:       #6e6882;   /* purple-tinted secondary text */
  --gray-lt:    #f6f0ff;   /* light purple fill */

  /* Purple variable aliases — all sharing the same tint family */
  --purple-light: #f6f0ff;
  --purple-soft:  #dddae6;
  --purple-mid:   #a8a4c0;
  --purple-main:  #1e1a38;
  --purple-dark:  #1e1a38;
  --purple-text:  #1e1a38;
  --off-white:    #f6f0ff;
  --gray-light:   #f6f0ff;

  /* ── Course accent colors ── */
  --c-gt: #ee6352;   /* Game Theory        — vibrant coral */
  --c-ml: #82204a;   /* Math in Motion      — dark raspberry */
  --c-cq: #03254e;   /* Cipher Quest / Financial Literacy — prussian blue */
  --c-ff: #6040a8;   /* Future Forecast     — purple      */
  --c-ea: #c1292e;   /* Everyday Algorithms — flag red */
  --c-dd: #e6a800;   /* Designing Democracy — bright yellow */
}

/* ── Course color classes (inherit --cc & --cc-lt via CSS custom props) ── */
.c-gt { --cc: var(--c-gt); --cc-lt: #fdf0e6; --cc-lt2: #fef9f5; }
.c-ml { --cc: var(--c-ml); --cc-lt: #f5e6ed; --cc-lt2: #faf3f6; }
.c-cq { --cc: var(--c-cq); --cc-lt: #e6ecf5; --cc-lt2: #f3f5fa; }
.c-ff { --cc: var(--c-ff); --cc-lt: #ede6f8; --cc-lt2: #f7f3fc; }
.c-ea { --cc: var(--c-ea); --cc-lt: #f8e6e6; --cc-lt2: #fcf3f3; }
.c-dd { --cc: var(--c-dd); --cc-lt: #fef7d6; --cc-lt2: #fffcee; }


/* Cards with a course class get a colored left border */
.card.c-gt, .card.c-ml, .card.c-cq,
.card.c-ff, .card.c-ea, .card.c-dd {
  border-left: 4px solid var(--cc);
}

/* Season tags directly on course cards get the light course tint */
.card.c-gt > .tag, .card.c-ml > .tag, .card.c-cq > .tag,
.card.c-ff > .tag, .card.c-ea > .tag, .card.c-dd > .tag,
.c-gt .card > .tag, .c-ml .card > .tag, .c-cq .card > .tag,
.c-ff .card > .tag, .c-ea .card > .tag, .c-dd .card > .tag {
  background: var(--cc-lt);
  color: var(--cc);
  font-weight: 700;
}

/* Course title in the course color */
.c-gt .course-title, .c-ml .course-title, .c-cq .course-title,
.c-ff .course-title, .c-ea .course-title, .c-dd .course-title {
  color: var(--cc);
}

/* Course detail hero: h1 in course color */
.hero.c-gt h1, .hero.c-ml h1, .hero.c-cq h1,
.hero.c-ff h1, .hero.c-ea h1, .hero.c-dd h1 {
  color: var(--cc);
}


/* Course detail pages: light accent background spanning full width */
#page-course-game-theory,
#page-course-cipher-quest,
#page-course-future-forecast,
#page-course-modeling-life,
#page-course-algorithms,
#page-course-democracy,
#page-course-iv {
  background: var(--cc-lt2);
}

/* Keep the hero banner white */
#page-course-game-theory > .hero,
#page-course-cipher-quest > .hero,
#page-course-future-forecast > .hero,
#page-course-modeling-life > .hero,
#page-course-algorithms > .hero,
#page-course-democracy > .hero,
#page-course-iv > .hero {
  background: var(--white);
}

/* Course detail: section-title, timeline dots, topic pills in course color */
.c-gt .section-title, .c-ml .section-title, .c-cq .section-title,
.c-ff .section-title, .c-ea .section-title, .c-dd .section-title {
  color: var(--cc);
}

.c-gt .timeline-dot, .c-ml .timeline-dot, .c-cq .timeline-dot,
.c-ff .timeline-dot, .c-ea .timeline-dot, .c-dd .timeline-dot {
  background: var(--cc);
}

.c-gt .topic-pill, .c-ml .topic-pill, .c-cq .topic-pill,
.c-ff .topic-pill, .c-ea .topic-pill, .c-dd .topic-pill {
  background: var(--cc-lt);
  color: var(--cc);
  border-color: transparent;
}

/* ── Reset ── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Raleway', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-weight: 400;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, serif;
}

/* ── Navigation ── */

nav {
  background: #c4b4e8;
  border-bottom: 1.5px solid var(--border);
  padding: 0 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  height: 76px;
}

.nav-logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.nav-logo span {
  color: var(--text-mid);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  border-bottom-color: var(--text);
}

.nav-cta {
  background: var(--text) !important;
  color: var(--white) !important;
  padding: 0.4rem 1.3rem !important;
  border-radius: 0;
  border-bottom: none !important;
  display: inline-flex !important;
  align-items: center;
  line-height: 1;
  transition: opacity 0.15s !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.8rem !important;
}

.nav-cta:hover {
  opacity: 0.75 !important;
}

/* ── Page visibility ── */

.page {
  display: none;
}

.page.active {
  display: block;
  /* opacity transition handled in JS (showPage) — no white-flash */
}

/* Hero elements: simple fade only, no translateY (less robotic) */
.page.active .hero h1 {
  animation: fadeIn 0.3s ease 0.04s both;
}
.page.active .hero p {
  animation: fadeIn 0.3s ease 0.1s both;
}
.page.active .hero .btn {
  animation: fadeIn 0.3s ease 0.15s both;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Hero ── */

.hero {
  background: var(--white);
  border-bottom: 1.5px solid var(--border);
  padding: 3.5rem 2.5rem 3rem;
  text-align: center;
}

.hero.hero-full {
  min-height: calc(100vh - 76px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2.5rem;
  background: #eeeaf7;
  border-bottom: 1.5px solid var(--border);
  position: relative;
  overflow: hidden;
}

.hero.hero-full p {
  margin: 0 auto 2rem;
}

/* Remove decorative circles and symbols from old design */
.hero-deco,
.hero-sym { display: none; }

.hero-full .hero-content {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 4rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
  letter-spacing: 0.01em;
}

.hero.hero-full h1 {
  font-size: 6.2rem;
}

.hero p {
  font-size: 1.08rem;
  color: var(--text-mid);
  max-width: 640px;
  margin: 0 auto 2rem;
  font-style: italic;
  font-family: 'Raleway', sans-serif;
}

/* ── Buttons ── */

.btn {
  display: inline-block;
  background: var(--text);
  color: var(--white);
  padding: 0.65rem 1.8rem;
  border-radius: 0;
  text-decoration: none;
  font-family: 'Raleway', sans-serif;
  font-size: 0.93rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn:hover {
  opacity: 0.72;
}

.btn:active {
  opacity: 0.55;
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-mid);
}

.btn-outline:hover {
  border-color: var(--text);
  color: var(--text);
  opacity: 1;
}

.btn-soft {
  background: var(--gray-lt);
  color: var(--text);
  border: none;
}

.btn-soft:hover {
  background: var(--border);
  opacity: 1;
}

/* Course-colored context: soft buttons get light course tint */
.c-gt .btn-soft, .c-ml .btn-soft, .c-cq .btn-soft,
.c-ff .btn-soft, .c-ea .btn-soft, .c-dd .btn-soft {
  background: var(--cc-lt);
  color: var(--cc);
}

.c-gt .btn-outline, .c-ml .btn-outline, .c-cq .btn-outline,
.c-ff .btn-outline, .c-ea .btn-outline, .c-dd .btn-outline {
  border-color: var(--cc);
  color: var(--cc);
}

.c-gt .btn-outline:hover, .c-ml .btn-outline:hover, .c-cq .btn-outline:hover,
.c-ff .btn-outline:hover, .c-ea .btn-outline:hover, .c-dd .btn-outline:hover {
  background: var(--cc);
  color: var(--white);
  border-color: var(--cc);
}

/* Strip button needs to be visible on dark background */
.strip .btn {
  background: var(--white);
  color: var(--text);
}
.strip .btn:hover {
  opacity: 0.85;
}

/* ── Layout sections ── */

.section {
  padding: 3rem 2.5rem;
  max-width: 1080px;
  margin: 0 auto;
}

.section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
  letter-spacing: 0em;
}

.section-sub {
  color: var(--gray);
  font-style: italic;
  margin-top: -0.5rem;
  margin-bottom: 2rem;
}

/* ── Cards ── */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 0;
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.card .tag {
  align-self: flex-start;
}

.card p {
  flex: 1;
}

.card h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
  font-size: 1.35rem;
}

.card p {
  font-size: 0.91rem;
  color: var(--gray);
  line-height: 1.65;
}

.card .tag {
  display: inline-block;
  background: var(--gray-lt);
  color: var(--text-mid);
  font-size: 0.72rem;
  padding: 0.22rem 0.75rem;
  border-radius: 0;
  margin-bottom: 0.1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-style: normal;
  font-weight: 700;
  font-family: 'Raleway', sans-serif;
}

/* ── Highlight Strip (Mission) ── */

.strip {
  background: #16122e;   /* deep dark purple */
  padding: 3.5rem 2.5rem;
  text-align: center;
}

.strip h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.65rem;
  font-weight: 700;
  color: #f5f4fb;
  margin-bottom: 0.6rem;
}

.strip p {
  color: #b0aac8;
  max-width: 580px;
  margin: 0 auto 1.8rem;
  font-size: 0.97rem;
}

/* ── Signup Info Banner ── */

.signup-info-banner {
  background: var(--purple-mid);
  padding: 2rem 0;
}

.signup-info-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2.5rem;
  display: flex;
  align-items: flex-start;
  gap: 0;
}

.signup-info-item {
  flex: 1;
  padding: 0 2rem;
}

.signup-info-item h3 {
  font-size: 1rem;
  color: var(--white);
  margin-bottom: 0.3rem;
}

.signup-info-item p {
  font-size: 0.84rem;
  color: rgba(255,255,255,0.8);
  line-height: 1.6;
}

.signup-info-divider {
  width: 1px;
  align-self: stretch;
  background: rgba(255,255,255,0.25);
  flex-shrink: 0;
}

.signup-pattern {
  height: 36px;
  background-image: repeating-linear-gradient(
    90deg,
    var(--purple-soft) 0px, var(--purple-soft) 1px,
    transparent 1px, transparent 36px
  ),
  repeating-linear-gradient(
    180deg,
    var(--purple-soft) 0px, var(--purple-soft) 1px,
    transparent 1px, transparent 36px
  );
  background-color: var(--bg);
  border-top: 1px solid var(--purple-soft);
  border-bottom: 1px solid var(--purple-soft);
}

/* ── Signup Course Picker ── */

.signup-course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.signup-course-card {
  border: 1.5px solid var(--cc, var(--border));
  background: var(--white);
  padding: 2rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: background 0.15s, transform 0.15s;
  text-decoration: none;
  color: inherit;
}

.signup-course-card:hover {
  background: var(--cc-lt, var(--purple-light));
  transform: translateY(-2px);
}

.signup-course-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cc, var(--purple-main));
  margin-bottom: 0.3rem;
}

.signup-course-card h3 {
  font-size: 1.2rem;
  color: var(--purple-dark);
  margin: 0;
}

.signup-course-card p {
  font-size: 0.88rem;
  color: var(--gray);
  margin: 0;
  flex: 1;
}

.signup-course-btn {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--cc, var(--purple-main));
  font-family: 'Raleway', sans-serif;
}

/* ── Materials ── */

.materials-banner {
  border: 1.5px solid var(--border);
  border-radius: 0;
  margin-bottom: 2rem;
  overflow: hidden;
}

.materials-banner-header {
  background: var(--cc-lt);
  padding: 1.4rem 2rem;
  border-bottom: 1.5px solid var(--border);
}

.materials-banner-header .tag {
  background: var(--cc);
  color: #fff;
  margin-bottom: 0.6rem;
  display: inline-block;
}

.materials-banner-header h2 {
  margin: 0;
  font-size: 1.55rem;
  color: var(--purple-dark);
}

.materials-banner-body {
  background: var(--white);
  padding: 1.8rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

h3.materials-sub {
  font-size: 1.55rem;
  color: var(--purple-dark);
  font-weight: 700;
  margin-bottom: 0.8rem;
}

/* ── About ── */

.team-rows {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-top: 1.5rem;
}

.team-row {
  display: flex;
  border: 1.5px solid var(--border);
  overflow: hidden;
}

.team-portrait-wrap {
  flex: 0 0 220px;
  width: 220px;
  align-self: stretch;
  overflow: hidden;
}

.team-portrait {
  width: 220px;
  height: 100%;
  object-fit: cover;
  display: block;
}

.team-bio {
  flex: 1;
  padding: 2rem 2.2rem;
  background: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 1.5px solid var(--border);
}

.team-bio h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  color: var(--text);
  font-size: 1.55rem;
  margin-bottom: 0.25rem;
}

.team-bio .role {
  color: var(--gray);
  font-style: italic;
  font-size: 0.88rem;
  margin-bottom: 0.75rem;
}

.team-bio p:last-child {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--gray);
  margin: 0;
}

.values-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.values-list li {
  background: var(--gray-lt);
  color: var(--text-mid);
  padding: 0.3rem 0.85rem;
  border-radius: 0;
  font-size: 0.85rem;
}

/* ── Forms ── */

.form-box {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 0;
  padding: 2rem;
  max-width: 520px;
}

.form-box h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.2rem;
  font-size: 1.15rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.form-row label {
  font-size: 0.85rem;
  color: var(--gray);
  letter-spacing: 0.02em;
}

.form-row input,
.form-row select,
.form-row textarea {
  font-family: 'Raleway', sans-serif;
  font-size: 0.93rem;
  border: 1.5px solid var(--border);
  border-radius: 0;
  padding: 0.5rem 0.75rem;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  border-color: var(--text);
}

/* ── Newsletter ── */

.newsletter-issue {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 0;
  padding: 1.2rem 1.6rem;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.newsletter-issue h4 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.15rem;
}

.newsletter-issue p {
  font-size: 0.84rem;
  color: var(--gray);
}

/* ── Competition / Timeline ── */

.timeline {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-top: 1.5rem;
}

.timeline-item {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
}

.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text);
  flex-shrink: 0;
  margin-top: 0.45rem;
}

.timeline-content h4 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.1rem;
}

.timeline-content p {
  font-size: 0.89rem;
  color: var(--gray);
}

/* ── Course cards ── */

.course-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.55rem;
  line-height: 1.3;
}

.course-featured .course-title {
  font-size: 1.4rem;
}

.course-featured p {
  font-size: 0.97rem !important;
  color: var(--gray);
  line-height: 1.7;
  margin-top: 0;
}

/* ── Course detail topic pills ── */

.topic-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}

.topic-pill {
  background: var(--gray-lt);
  color: var(--text-mid);
  border: 1.5px solid var(--border);
  padding: 0.28rem 0.8rem;
  border-radius: 0;
  font-size: 0.83rem;
  font-family: 'Raleway', sans-serif;
}

/* ── Footer ── */

footer {
  text-align: center;
  padding: 2rem;
  background: var(--white);
  border-top: 1.5px solid var(--border);
  font-size: 0.83rem;
  color: var(--gray);
  margin-top: 0;
}

footer a {
  color: var(--text-mid);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.88rem;
}

.footer-sep {
  color: var(--border);
}

/* ── Game customization ── */

.game-custom {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.custom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.custom-label {
  font-size: 0.81rem;
  color: var(--gray);
  min-width: 70px;
  white-space: nowrap;
  flex: 1;
}

.stepper {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid var(--border);
  border-radius: 0;
  overflow: hidden;
  background: var(--gray-lt);
}

.stepper-btn {
  font-family: 'Raleway', sans-serif;
  font-size: 1rem;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--gray-lt);
  color: var(--text);
  cursor: pointer;
  transition: background 0.12s;
  line-height: 1;
}

.stepper-btn:hover {
  background: var(--border);
}

.stepper-val {
  width: 36px;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text);
  font-weight: 600;
  background: var(--gray-lt);
}

/* ── Game outer wrapper + frame ── */

.game-outer {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-top: 1.5rem;
}

.game-frame {
  flex: 0 0 auto;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 0;
  padding: 1.8rem;
}

.game-frame-custom {
  flex: 0 0 148px;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding-top: 0.2rem;
}

.custom-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 0.2rem;
}

.game-apply-btn {
  font-family: 'Raleway', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.8rem;
  border-radius: 0;
  border: 1.5px solid var(--border);
  background: var(--gray-lt);
  color: var(--text);
  cursor: pointer;
  transition: background 0.12s;
  align-self: flex-start;
  margin-top: 0.4rem;
}

.game-apply-btn:hover {
  background: var(--border);
}

/* ── Game UI ── */

.game-container {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 0;
  padding: 1.8rem;
  margin-bottom: 1.5rem;
}

.game-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.game-desc {
  font-size: 0.87rem;
  color: var(--gray);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.game-mode-btns {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}

.game-mode-btn {
  font-family: 'Raleway', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.32rem 0.95rem;
  border-radius: 0;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--gray);
  cursor: pointer;
  transition: all 0.12s;
}

.game-mode-btn.game-btn-active,
.game-mode-btn:hover {
  background: var(--text);
  color: var(--white);
  border-color: var(--text);
}

.game-status {
  font-size: 0.87rem;
  color: var(--text);
  font-weight: 600;
  margin: 0.9rem 0 0.5rem;
  min-height: 1.4em;
}

.game-new-btn {
  font-family: 'Raleway', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.32rem 0.95rem;
  border-radius: 0;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-mid);
  cursor: pointer;
  transition: all 0.12s;
}

.game-new-btn:hover {
  background: var(--text);
  color: var(--white);
  border-color: var(--text);
}

/* ── Chomp ── */

.chomp-board {
  border-radius: 0;
  overflow: hidden;
  border: 1.5px solid var(--border);
  margin-top: 0.8rem;
}

.chomp-cell {
  aspect-ratio: 1;
  border: 1.5px solid #c5b4e8;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  box-sizing: border-box;
  min-width: 0;
  overflow: hidden;
}

.chomp-cell.present {
  background: var(--purple-light);
  cursor: pointer;
}

.chomp-cell.present:hover,
.chomp-cell.present.chomp-hover {
  background: #c5b4e8;
}

.chomp-cell.poison {
  background: #fce8e8;
  cursor: pointer;
  border-color: #e0b0b0;
}

.chomp-cell.poison:hover {
  background: #f8d0d0;
}

.chomp-cell.removed {
  background: var(--white);
  border-color: transparent;
  cursor: default;
  pointer-events: none;
}

/* ── Nim — horizontal piles ── */

.nim-board {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin: 0.5rem 0 0.8rem;
}

.nim-pile {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 5px;
}

.nim-pile-label,
.nim-pile-label-top {
  font-size: 0.74rem;
  color: var(--gray);
  min-width: 58px;
  text-align: right;
  margin: 0 0.4rem 0 0;
  white-space: nowrap;
}

.nim-stone {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gray-lt);
  border: 2px solid var(--border);
  cursor: pointer;
  transition: background 0.1s, border-color 0.1s;
}

.nim-stone:hover {
  background: var(--purple-mid);
  border-color: var(--purple-main);
}

.nim-stone.nim-highlight {
  background: var(--purple-mid);
  border-color: var(--purple-main);
  transform: scale(1.08);
}

.nim-stone.ta-invalid {
  background: #f5d0d0;
  border-color: #d08080;
  cursor: not-allowed;
}

/* ── Take-Away board ── */

.ta-board {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  min-height: 100px;
  padding: 2.5rem 0 1rem;
}

/* ── Divider ── */

.divider {
  border: none;
  border-top: 1.5px solid var(--border);
  margin: 2rem 0;
}

/* ══════════════════════════════════════════
   HOME PAGE — new layout
══════════════════════════════════════════ */

/* ── Checkerboard divider strip ── */
.checkerboard-strip {
  height: 40px;
  border-top: 1.5px solid var(--border);
  border-bottom: 1.5px solid var(--border);
  background-image: repeating-linear-gradient(90deg,
    var(--border) 0px, var(--border) 1.5px,
    #d3c1ee 1.5px, #d3c1ee 40px,
    var(--border) 40px, var(--border) 41.5px,
    #f6f0ff 41.5px, #f6f0ff 80px
  );
  background-size: 80px 100%;
  flex-shrink: 0;
}

/* ── Home Hero ── */
.home-hero {
  background: url('Home Page Banner.png') center center / cover no-repeat;
  padding: 4rem 2.5rem;
  min-height: calc(100vh - 76px);
  display: flex;
  align-items: center;
}

.home-hero-inner {
  max-width: 1080px;
  margin: 0 0 0 4rem;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 3rem;
}

.home-hero-text {
  flex: 0 0 auto;
  max-width: 700px;
}

.home-hero-doodles {
  flex: 1;
  height: 320px;
}

.home-label {
  font-size: 1rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #4a466a;
  margin-bottom: 1.6rem;
  font-style: normal;
  font-weight: 400;
}

.home-hero-text h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 4.4rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.12;
  margin-bottom: 2.55rem;
  letter-spacing: -0.02em;
}

.home-hero-btns {
  display: flex;
  gap: 1.15rem;
  flex-wrap: wrap;
}

.home-hero-btns .btn {
  background: #c4b4e8;
  color: var(--text);
  border: 1.5px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.9rem;
  padding: 0.85rem 2.3rem;
}

.home-hero-btns .btn:hover {
  background: #b4a0dc;
  opacity: 1;
}

.home-hero-btns .btn-outline {
  background: #f6f0ff;
  color: var(--text);
  border: 1.5px solid var(--border);
}

.home-hero-btns .btn-outline:hover {
  background: var(--gray-lt);
  opacity: 1;
}

/* ── Featured Course ── */
.featured-course-section {
  background: #f6f0ff;
  padding: 0 2.5rem 4rem;
}

.featured-label-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  border: 1.5px solid var(--border);
  border-top: none;
  background: #ffffff;
  width: fit-content;
  margin: 0 auto 2.5rem;
  padding: 0.9rem 2.2rem;
}

.featured-star {
  height: 1.5rem;
  width: auto;
  margin-bottom: 0.2rem;
}

.featured-label {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text);
  text-transform: uppercase;
}

.featured-course-inner {
  max-width: 1080px;
  margin: 0 auto 2rem;
  display: flex;
  gap: 3rem;
  align-items: center;
}

.featured-left-group {
  display: flex;
  gap: 3rem;
  align-items: stretch;
}

.featured-info-box {
  flex: 0 0 260px;
  background: #ffffff;
  border-radius: 0;
  padding: 0.6rem 1.4rem;
  text-align: left;
  border: 1.5px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  justify-content: center;
}

.featured-info-season,
.featured-info-line {
  font-family: 'Raleway', sans-serif;
  font-size: 0.7rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #4a4668;
  line-height: 1.4;
}

.featured-course-btns {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
}

.featured-btn {
  background: #d3c1ee;
  color: var(--text);
  border: 1.5px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.88rem;
  padding: 0.7rem 1.6rem;
  text-align: center;
  min-width: 150px;
}

.featured-course-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-self: flex-start;
}

.featured-course-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 5.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  line-height: 1;
  margin-bottom: 0.3rem;
  white-space: nowrap;
}

.featured-course-subtitle {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2rem;
  font-style: italic;
  font-weight: 400;
  color: var(--text-mid);
  margin-bottom: 0;
  letter-spacing: 0.01em;
}

.featured-course-desc {
  font-size: 1.08rem;
  color: #4a4668;
  max-width: 1080px;
  margin: 0 auto;
  line-height: 1.8;
}

/* ── Our Mission (light purple bg) ── */
.mission-section {
  background: var(--purple-dark);
}

.mission-section .section {
  padding-top: 2rem;
  padding-bottom: 3.5rem;
  text-align: center;
}

.mission-section .section-title {
  color: #ffffff;
  font-size: 3rem;
  margin-bottom: 1.2rem;
}

.mission-section p {
  max-width: 760px;
  margin: 0 auto 1.2rem;
  line-height: 1.8;
  color: #ffffff;
  font-size: 1.05rem;
  text-align: justify;
}

.mission-text-box {
  background: transparent;
  border: 1.5px solid #ffffff;
  max-width: 900px;
  margin: 1.5rem auto 1.5rem;
  padding: 1.4rem 2rem;
  text-align: left;
}

.mission-text-box p {
  max-width: none;
  margin: 0 0 1rem;
  line-height: 1.8;
  color: #ffffff;
  font-size: 0.88rem;
  text-align: justify;
}

.mission-text-box p:last-child {
  margin-bottom: 0;
}

.mission-btn {
  margin-top: 1.2rem;
  display: inline-block;
  background: #ffffff;
  color: var(--text);
  border: none;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.88rem;
  padding: 1rem 3rem;
}

/* ── What We Offer ── */
.offer-section {
  background: var(--white);
  text-align: center;
}

.offer-section .section {
  padding-bottom: 5rem;
}

.offer-rows {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-top: 2.5rem;
}

.offer-row {
  display: flex;
  border: 1.5px solid var(--border);
}

.offer-row-img {
  background: #ffffff;
  flex: 0 0 40%;
  min-height: 180px;
}

.offer-row-text {
  background: #f6f0ff;
  flex: 1;
  padding: 2rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.8rem;
  text-align: left;
  border-left: 1.5px solid var(--border);
}

.offer-row-reverse .offer-row-text {
  border-left: none;
  border-right: 1.5px solid var(--border);
}

.offer-row-text strong {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  display: block;
  white-space: nowrap;
}

.offer-row-text p {
  font-size: 0.95rem;
  color: var(--gray);
  line-height: 1.75;
  margin: 0;
}

.offer-box {
  background: var(--purple-light);
  border: 1.5px solid var(--border);
  padding: 2rem 2.5rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.offer-box strong {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  display: block;
}

.offer-box p {
  font-size: 1.05rem;
  color: var(--gray);
  line-height: 1.75;
  margin: 0;
}

/* ── Current Courses (light purple bg) ── */
.courses-home-section {
  background: #f6f0ff;
}

.courses-home-grid {
  grid-template-columns: repeat(2, 1fr) !important;
}

/* ── Contact Home ── */
.contact-home-text {
  display: block;
  width: 100%;
  text-align: center;
  font-family: 'Raleway', sans-serif;
  font-style: italic;
  font-size: 1.05rem;
  color: #ffffff;
  background: var(--text);
  padding: 1.2rem 2.5rem;
  margin: 0;
  box-sizing: border-box;
}

.contact-home-text a {
  color: #ffffff !important;
  text-decoration: none;
}

.contact-home-text a:hover {
  text-decoration: underline;
}

@media (max-width: 700px) {
  .hero h1 { font-size: 2rem; }
  .hero.hero-full h1 { font-size: 2.4rem; }
  .about-grid { grid-template-columns: 1fr; }
  .nav-links { gap: 1rem; }
  .nav-links a { font-size: 0.83rem; }
  .home-hero-inner { flex-direction: column; }
  .home-hero-doodles { display: none; }
  .home-hero-text h1 { font-size: 2.2rem; }
  .featured-course-inner { flex-direction: column; }
  .featured-course-name { font-size: 2.8rem; }
  .courses-home-grid { grid-template-columns: 1fr !important; }
  .contact-home-inner { flex-direction: column; text-align: center; }
}
