@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700&family=Nunito:wght@400;600;700;800&display=swap');

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

/* =========================
   ROOT THEME
========================= */
:root {
  --navy: #151f34;
  --navy-light: #31405c;
  --sky: #aee9ff;
  --mint: #bdf8d2;
  --green: #3cad77;
  --green-soft: #e1fce9;
  --coral: #ff735f;
  --pink: #ffd2e0;
  --gold: #ffd15c;
  --lavender: #d8d2ff;
  --bg: #fff9ed;
  --text: #151f34;
  --muted: #5f697c;
  --border: #151f34;
  --white: #ffffff;
  --shadow: 12px 12px 0 rgba(21, 31, 52, 0.13);
}

/* =========================
   BASE + PAGE TRANSITION
========================= */
body {
  font-family: "Nunito", system-ui, Arial, sans-serif;
  background:
    linear-gradient(90deg, rgba(21, 31, 52, 0.055) 1px, transparent 1px),
    linear-gradient(rgba(21, 31, 52, 0.055) 1px, transparent 1px),
    linear-gradient(180deg, #fff2b8 0, #fff9ed 360px),
    var(--bg);
  background-size: 44px 44px, 44px 44px, auto;
  color: var(--text);
  line-height: 1.6;

  opacity: 0;
  transition: opacity 0.3s ease;
}

body.loaded {
  opacity: 1;
}

body.fade-out {
  opacity: 0;
}

/* =========================
   LAYOUT
========================= */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px;
}

/* =========================
   NAV
========================= */
nav.nav {
  width: 100%;
  background: #fff;
  border-bottom: 3px solid var(--navy);
  box-shadow: none;
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav-inner {
  max-width: 1240px;
  margin: 0 auto;

  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 18px 28px;
}

.nav-inner strong {
  color: var(--navy);
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 24px;
  letter-spacing: 0;
}

.nav-inner div {
  display: flex;
  align-items: center;
}

.nav-inner a {
  margin-left: 26px;
  text-decoration: none;
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: color 0.15s ease, transform 0.15s ease;
}

.nav-inner a:hover {
  color: var(--coral);
  transform: translateY(-1px);
}

/* =========================
   HEADER
========================= */
header {
  min-height: min(720px, calc(100vh - 64px));
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(330px, 0.95fr);
  align-items: center;
  gap: 46px;
  text-align: left;
  padding: 82px 0 72px;
  animation: riseIn 0.55s ease both;
}

header > :not(.hero-image) {
  grid-column: 1;
}

h1 {
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: clamp(54px, 8vw, 104px);
  color: var(--navy);
  line-height: 0.92;
  letter-spacing: 0;
  max-width: 820px;
}

.subtitle {
  max-width: 560px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.55;
}

header .subtitle + p {
  max-width: 560px;
}

.eyebrow {
  margin-top: 14px;
  color: var(--muted);
  font-weight: 800;
}

/* =========================
   SECTIONS
========================= */
section {
  padding: 90px 0;
  text-align: left;
  border-top: 3px solid var(--border);
  animation: riseIn 0.55s ease both;
  animation-delay: 0.08s;
}

section > h2,
section > p {
  margin-left: auto;
  margin-right: auto;
}

section > h2 {
  text-align: center;
}

section > p {
  text-align: center;
}

h2 {
  font-family: "Fredoka", system-ui, sans-serif;
  color: var(--navy);
  margin-bottom: 18px;
  font-size: clamp(36px, 5vw, 74px);
  line-height: 0.95;
  max-width: 860px;
}

h3 {
  font-family: "Fredoka", system-ui, sans-serif;
  color: var(--navy);
  margin-bottom: 8px;
  font-size: 25px;
}

p {
  max-width: 800px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.statement-strip {
  background: var(--navy);
  color: white;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-left: max(28px, calc((100vw - 1240px) / 2 + 28px));
  padding-right: max(28px, calc((100vw - 1240px) / 2 + 28px));
}

.statement-strip h2,
.statement-strip p {
  color: white;
  margin-left: 0;
  margin-right: 0;
  text-align: left;
}

.statement-strip p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.78);
}

.content-block {
  max-width: 850px;
  margin: 0 auto;
  text-align: center;
}

.content-block p {
  margin-left: auto;
  margin-right: auto;
}

.long-form {
  max-width: 940px;
  margin: 0 auto;
  line-height: 1.8;
}

.long-form p {
  max-width: 900px;
}

.note {
  margin-top: 20px;
  font-size: 14px;
  color: var(--muted);
}

/* =========================
   GRID
========================= */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 34px;
}

.card {
  background: #fff;
  border: 3px solid var(--border);
  padding: 28px;
  border-radius: 0 34px 34px 34px;
  box-shadow: var(--shadow);
  animation: riseIn 0.45s ease both;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.card:hover {
  transform: translateY(-6px);
  border-color: var(--coral);
  box-shadow: var(--shadow);
}

/* =========================
   BUTTON
========================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 28px;
  padding: 15px 22px;
  min-width: 210px;
  min-height: 58px;
  width: fit-content;
  max-width: 100%;
  text-align: center;

  background: var(--coral);
  color: white;
  text-decoration: none;
  border-radius: 999px;
  border: 3px solid var(--navy);
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 17px;
  font-weight: 800;

  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  background: var(--green);
  transform: translateY(-3px) rotate(-1deg);
  box-shadow: 5px 5px 0 rgba(37, 54, 79, 0.16);
}

.image-frame {
  width: 100%;
  margin: 0;
  border: 3px solid var(--navy);
  border-radius: 0 44px 44px 44px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  background: #fff;
  animation: riseIn 0.5s ease both;
}

header .image-frame {
  margin-left: auto;
  margin-right: auto;
}

.image-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.64), transparent 70%);
  transform: translateX(-100%);
  animation: softShimmer 4s ease-in-out infinite;
  pointer-events: none;
}

.clipart-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-image {
  max-width: 860px;
  min-height: 320px;
  aspect-ratio: 16 / 8.2;
  grid-column: 2;
  grid-row: 1 / span 5;
  transform: rotate(1deg);
}

.inline-image {
  max-width: 820px;
  min-height: 230px;
  aspect-ratio: 16 / 7.2;
  margin: 36px auto 0;
}

.card-image {
  min-height: 145px;
  margin: 0 0 22px;
  border-radius: 0 28px 28px 28px;
  box-shadow: 5px 5px 0 rgba(37, 54, 79, 0.14);
  aspect-ratio: 16 / 8.4;
}

/* =========================
   COURSE GRID
========================= */
.course-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 22px;
  margin-top: 38px;
}

.course-card {
  flex: 0 1 calc((100% - 44px) / 3);
  min-width: 0;
  min-height: 178px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--white);
  border: 3px solid var(--border);
  padding: 28px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  border-radius: 0 30px 30px 30px;
  box-shadow: 7px 7px 0 rgba(21, 31, 52, 0.12);
  animation: riseIn 0.45s ease both;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.course-card:hover {
  transform: translateY(-7px) rotate(-1deg);
  border-color: var(--coral);
  box-shadow: var(--shadow);
}

.course-title {
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 700;
  font-size: 25px;
  line-height: 1;
  margin-bottom: 12px;
}

.course-desc {
  font-size: 15px;
  color: var(--muted);
}

/* =========================
   COURSE DETAIL
========================= */
.course-meta {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.pill {
  display: inline-block;
  background: var(--pink);
  border: 2px solid var(--navy);
  color: var(--navy);
  font-size: 14px;
  font-weight: 800;
  padding: 8px 12px;
  border-radius: 999px;
}

.course-detail {
  text-align: left;
}

.course-detail p {
  margin: 0;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 36px;
}

.detail-panel {
  background: var(--white);
  border: 3px solid var(--border);
  padding: 30px;
  border-radius: 0 30px 30px 30px;
  box-shadow: 7px 7px 0 rgba(21, 31, 52, 0.12);
  animation: riseIn 0.45s ease both;
}

.detail-panel.full {
  grid-column: 1 / -1;
}

.detail-panel h2 {
  margin-bottom: 10px;
  text-align: left;
}

.detail-panel ul {
  margin: 12px 0 0 18px;
  color: var(--muted);
}

.detail-panel li {
  margin-bottom: 8px;
}

.back-link {
  display: inline-block;
  margin-top: 22px;
  color: var(--green);
  text-decoration: none;
  font-weight: 600;
}

.back-link:hover {
  color: var(--navy-light);
}

/* =========================
   MODAL
========================= */
.modal {
  display: none;
  position: fixed;
  inset: 0;

  background: rgba(15, 23, 42, 0.65);

  justify-content: center;
  align-items: center;

  z-index: 9999;
}

.modal-content {
  background: white;
  width: min(650px, 92vw);
  max-height: 80vh;
  overflow-y: auto;

  padding: 26px;
  border-radius: 12px;

  animation: modalIn 0.18s ease-out;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes softShimmer {
  0%, 65% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.close {
  position: absolute;
  top: 10px;
  right: 12px;
  cursor: pointer;
  font-size: 18px;
  color: var(--muted);
}

/* =========================
   FOOTER
========================= */
footer {
  text-align: left;
  padding: 58px 0;
  font-size: 14px;
  color: var(--muted);
  border-top: 3px solid var(--border);
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 900px) {
  header {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 34px;
    text-align: left;
  }

  header > :not(.hero-image),
  .hero-image {
    grid-column: auto;
  }

  .hero-image {
    grid-row: auto;
    transform: none;
  }

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

  .course-card {
    flex-basis: calc((100% - 16px) / 2);
  }
}

@media (max-width: 800px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  body {
    background:
      linear-gradient(90deg, rgba(21, 31, 52, 0.055) 1px, transparent 1px),
      linear-gradient(rgba(21, 31, 52, 0.055) 1px, transparent 1px),
      linear-gradient(180deg, #fff3c4 0, #fffaf0 240px),
      var(--bg);
    background-size: 32px 32px, 32px 32px, auto;
  }

  .container {
    padding: 0 18px;
  }

  .nav-inner {
    align-items: center;
    gap: 10px;
    flex-direction: column;
    padding: 14px 18px;
  }

  .nav-inner div {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(5, auto);
    gap: 10px;
    justify-content: center;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .nav-inner a {
    margin-left: 0;
    font-size: 13px;
    white-space: nowrap;
  }

  header {
    padding: 54px 0 46px;
    text-align: center;
  }

  header .subtitle,
  header .subtitle + p {
    margin-left: auto;
    margin-right: auto;
  }

  section {
    padding: 54px 0;
  }

  .subtitle,
  p {
    font-size: 16px;
  }

  h1 {
    font-size: clamp(44px, 15vw, 64px);
  }

  h2 {
    font-size: clamp(34px, 11vw, 48px);
  }

  .hero-image {
    min-height: 210px;
    border-radius: 0 30px 30px 30px;
  }

  .inline-image {
    min-height: 175px;
    border-radius: 0 30px 30px 30px;
  }

  .course-grid {
    gap: 14px;
  }

  .course-card {
    flex-basis: 100%;
    min-height: 150px;
    padding: 24px 20px;
  }

  .detail-panel {
    padding: 24px 20px;
  }

  footer {
    padding: 38px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
