:root {
  --ink: #0c241c;
  --ink-soft: #3d5a4d;
  --green: #176b48;
  --green-dark: #0f4630;
  --green-deep: #0a2f21;
  --mint: #e8f3ee;
  --gold: #b8953f;
  --gold-soft: #f3ead3;
  --cream: #f7faf8;
  --white: #ffffff;
  --line: #d7e5de;
  --danger: #b42318;
  --warning: #b54708;
  --info: #175cd3;
  --success: #027a48;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(12, 36, 28, 0.12);
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-dark); }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0 0 0.6rem;
  font-weight: 700;
}
p { margin: 0 0 1rem; }
ul { margin: 0; padding: 0; list-style: none; }

.container {
  width: min(1140px, calc(100% - 2.5rem));
  margin-inline: auto;
}

/* Topbar & Header */
.topbar {
  background: var(--green-deep);
  color: rgba(255,255,255,.85);
  font-size: 0.82rem;
  padding: 0.45rem 0;
}
.topbar-inner {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: space-between;
}

.site-header {
  background: rgba(247, 250, 248, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 74px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  flex-shrink: 0;
}
.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--green), var(--green-deep));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-text strong {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--ink);
}
.logo-text small {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
}

.main-nav {
  display: flex;
  gap: 0.15rem;
  margin-left: auto;
  flex-wrap: wrap;
}
.main-nav a {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--green);
  background: var(--mint);
}
.header-actions { display: flex; gap: 0.5rem; align-items: center; }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.4rem 0.7rem;
  font-size: 1.1rem;
  cursor: pointer;
}
.inline-form { display: inline; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.2rem;
  border-radius: 10px;
  border: 1.5px solid transparent;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--green);
  color: #fff;
}
.btn-primary:hover { background: var(--green-dark); color: #fff; }
.btn-gold {
  background: var(--gold);
  color: #fff;
}
.btn-gold:hover { background: #9a7a2e; color: #fff; }
.btn-outline {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn-outline:hover { border-color: var(--green); color: var(--green); }
.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
}
.btn-ghost:hover { color: var(--green); background: var(--mint); }
.btn-sm { padding: 0.4rem 0.75rem; font-size: 0.85rem; }
.btn-block { width: 100%; }
.btn-group { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Hero */
.hero {
  position: relative;
  min-height: min(92vh, 760px);
  display: grid;
  align-items: end;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(115deg, rgba(10, 47, 33, 0.88) 0%, rgba(15, 70, 48, 0.72) 45%, rgba(12, 36, 28, 0.55) 100%),
    url("../images/hero.svg") center/cover no-repeat,
    linear-gradient(160deg, #0a2f21, #176b48);
}
.hero-content {
  padding: 5.5rem 0 4.5rem;
  max-width: 640px;
  animation: rise 0.9s ease both;
}
.hero-brand {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 1rem;
}
.hero h1 {
  font-size: clamp(2.8rem, 6vw, 4.4rem);
  color: #fff;
  margin-bottom: 1rem;
}
.hero p {
  font-size: 1.15rem;
  color: rgba(255,255,255,.88);
  max-width: 34rem;
  margin-bottom: 1.75rem;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin-top: 2rem;
  font-size: 0.92rem;
  color: rgba(255,255,255,.8);
}
.hero-meta span::before {
  content: "✦";
  color: var(--gold);
  margin-right: 0.45rem;
}

.hero-charity {
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
  color: rgba(255,255,255,.82);
  max-width: 34rem;
}
.hero-charity a {
  color: #e4c878;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.charity-note {
  font-size: 0.9rem;
  line-height: 1.55;
  color: rgba(255,255,255,.72);
  margin-top: 0.85rem;
}
.charity-banner {
  background: linear-gradient(135deg, #f7f4ec 0%, #e8f3ee 100%);
  border-color: #d9c98a;
}
.panel .charity-note {
  color: var(--ink-soft);
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Sections */
.section { padding: 5rem 0; }
.section-muted { background: var(--mint); }
.section-dark {
  background: linear-gradient(145deg, var(--green-deep), var(--green-dark));
  color: #fff;
}
.section-head {
  max-width: 640px;
  margin-bottom: 2.5rem;
}
.section-head .eyebrow {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}
.section-dark .eyebrow { color: #e4c878; }
.section-head h2 { font-size: clamp(2rem, 4vw, 2.8rem); }
.section-dark .section-head p { color: rgba(255,255,255,.8); }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }

.feature {
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}
.feature h3 { font-size: 1.45rem; }
.feature-num {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--gold);
  font-weight: 700;
}

.course-tile {
  display: block;
  padding: 1.6rem;
  border-bottom: 1px solid var(--line);
  color: inherit;
  transition: 0.25s ease;
}
.course-tile:hover {
  background: var(--white);
  transform: translateX(6px);
  box-shadow: var(--shadow);
}
.course-tile .icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--mint);
  color: var(--green);
  display: grid;
  place-items: center;
  font-weight: 700;
  margin-bottom: 1rem;
}
.course-tile h3 { font-size: 1.4rem; }
.course-tile p { color: var(--ink-soft); margin-bottom: 0.5rem; }
.course-meta { font-size: 0.85rem; color: var(--gold); font-weight: 600; }

/* Pricing */
.price-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  align-items: stretch;
}
.price-card {
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem 1.4rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: 0.25s ease;
}
.price-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: #b7d4c6;
}
.price-card.popular {
  border-color: var(--green);
  background: linear-gradient(180deg, #fff 0%, #f0f8f4 100%);
}
.price-card .tag {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--green);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
}
.price-card h3 { font-size: 1.7rem; }
.price-card .price {
  font-family: var(--font-display);
  font-size: 2.8rem;
  color: var(--green);
  line-height: 1;
  margin: 0.5rem 0;
}
.price-card .price small {
  font-size: 1rem;
  color: var(--ink-soft);
  font-family: var(--font-body);
}
.price-card .was {
  text-decoration: line-through;
  color: #8aa396;
  font-size: 0.9rem;
}
.price-card ul {
  margin: 1rem 0 1.5rem;
  flex: 1;
}
.price-card li {
  padding: 0.4rem 0 0.4rem 1.3rem;
  position: relative;
  color: var(--ink-soft);
  font-size: 0.92rem;
}
.price-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}

/* Forms */
.form-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 640px;
  margin: 0 auto;
  box-shadow: var(--shadow);
}
.form-wide { max-width: 820px; }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-group { margin-bottom: 1rem; }
.form-group.full { grid-column: 1 / -1; }
.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  font: inherit;
  background: #fff;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(23, 107, 72, 0.12);
}
.form-group textarea { min-height: 110px; resize: vertical; }
.form-hint { font-size: 0.82rem; color: var(--ink-soft); margin-top: 0.35rem; }
.check-row { display: flex; gap: 1.25rem; flex-wrap: wrap; margin-top: 0.4rem; }
.check-row label { font-weight: 500; display: flex; gap: 0.4rem; align-items: center; }

.page-hero {
  padding: 3.5rem 0 2.5rem;
  background:
    linear-gradient(120deg, rgba(10,47,33,.92), rgba(23,107,72,.78)),
    url("../images/hero.svg") center/cover;
  color: #fff;
}
.page-hero h1 { font-size: clamp(2.2rem, 4vw, 3.2rem); color: #fff; }
.page-hero p { color: rgba(255,255,255,.85); max-width: 36rem; }

.auth-wrap {
  min-height: 70vh;
  display: grid;
  place-items: center;
  padding: 3rem 0;
  background:
    radial-gradient(circle at top right, rgba(184,149,63,.15), transparent 40%),
    var(--cream);
}

/* Flash & badges */
.flash-wrap { padding: 1rem 0 0; }
.flash {
  padding: 0.85rem 1.1rem;
  border-radius: 10px;
  margin-bottom: 0.75rem;
  font-weight: 500;
}
.flash-success { background: #e8f6ef; color: var(--success); }
.flash-error { background: #fef3f2; color: var(--danger); }

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: capitalize;
}
.badge-success { background: #dcfae6; color: var(--success); }
.badge-warning { background: #fef0c7; color: var(--warning); }
.badge-danger { background: #fee4e2; color: var(--danger); }
.badge-info { background: #d1e9ff; color: var(--info); }
.badge-muted { background: #eef2f0; color: #667085; }

/* Tables & dashboard panels */
.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem;
  margin-bottom: 1.25rem;
}
.panel h3 { font-size: 1.3rem; margin-bottom: 1rem; }
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
}
.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--green);
  line-height: 1;
}
.stat span { color: var(--ink-soft); font-size: 0.88rem; }

.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
th, td {
  text-align: left;
  padding: 0.75rem 0.6rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th { color: var(--ink-soft); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
.actions { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; }
.inline-select {
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  font-size: 0.85rem;
}

/* Dashboard shell */
.dashboard-body {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 100vh;
  background: #eef5f1;
}
.sidebar {
  background: var(--green-deep);
  color: #fff;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar-logo .logo-text strong,
.sidebar-logo .logo-text small { color: #fff; }
.sidebar-logo .logo-text small { color: #e4c878; }
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 2rem;
  flex: 1;
}
.sidebar-nav a {
  color: rgba(255,255,255,.78);
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  font-weight: 600;
}
.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: rgba(255,255,255,.1);
  color: #fff;
}
.sidebar-footer {
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 1rem;
  font-size: 0.9rem;
}
.sidebar-footer .btn-outline {
  color: #fff;
  border-color: rgba(255,255,255,.3);
  margin-top: 0.5rem;
}
.dashboard-main { padding: 0; }
.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.75rem;
  background: rgba(255,255,255,.8);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.dash-header h1 { margin: 0; font-size: 1.6rem; }
.dash-content { padding: 1.5rem 1.75rem 2.5rem; }
.dash-flash { padding: 1rem 1.75rem 0; }

.empty {
  text-align: center;
  padding: 2rem;
  color: var(--ink-soft);
}

/* CTA band */
.cta-band {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
  align-items: center;
}
.cta-band h2 { font-size: clamp(2rem, 4vw, 2.8rem); color: #fff; }
.cta-band p { color: rgba(255,255,255,.85); }

/* FAQ */
.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 1.25rem 0;
}
.faq-item h3 { font-size: 1.25rem; }
.faq-item p { color: var(--ink-soft); margin: 0; }

/* Footer */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,.75);
  padding: 4rem 0 1.5rem;
  margin-top: 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}
.site-footer h4 {
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.site-footer a {
  display: block;
  color: rgba(255,255,255,.7);
  margin-bottom: 0.45rem;
}
.site-footer a:hover { color: #fff; }
.footer-logo { margin-bottom: 1rem; }
.footer-logo .logo-text strong { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 1.25rem;
  font-size: 0.88rem;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.prose h3 { margin-top: 1.5rem; }
.prose li {
  padding-left: 1.2rem;
  position: relative;
  margin-bottom: 0.45rem;
  color: var(--ink-soft);
}
.prose li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--gold);
}

.mode-pills {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}
.mode-pill {
  background: var(--mint);
  color: var(--green);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

@media (max-width: 980px) {
  .price-grid,
  .grid-4,
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid-3, .cta-band, .split { grid-template-columns: 1fr; }
  .main-nav { display: none; }
  .main-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    background: #fff;
    padding: 1rem;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .nav-toggle { display: inline-flex; margin-left: auto; }
  .header-actions .btn-ghost { display: none; }
  .dashboard-body { grid-template-columns: 1fr; }
  .sidebar {
    position: relative;
    height: auto;
  }
  .sidebar-nav { flex-direction: row; flex-wrap: wrap; margin-top: 1rem; }
}

@media (max-width: 640px) {
  .price-grid,
  .grid-2,
  .grid-4,
  .footer-grid,
  .form-grid { grid-template-columns: 1fr; }
  .topbar { display: none; }
  .hero-content { padding: 4rem 0 3rem; }
}
