/* ============================================================
   BenLimCW — shared styles for the sub-pages
   (index.html keeps its own inline styles)
   ============================================================ */

:root {
  --ink:        #131b1e;
  --ink-soft:   #1d272b;
  --mint:       #8ce2c8;
  --mint-deep:  #5fc9a8;
  --paper:      #ffffff;
  --paper-soft: #f3f3f3;
  --muted:      #595959;
  --muted-dark: #a8b4b8;
  --line:       rgba(255,255,255,0.12);

  --font: "Karla", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step-h1:   clamp(2.25rem, 6vw, 4rem);
  --step-h2:   clamp(1.6rem, 3.4vw, 2.5rem);
  --step-h3:   clamp(1.05rem, 1.6vw, 1.3rem);
  --step-lead: clamp(1.05rem, 1.5vw, 1.2rem);

  --gutter:  clamp(1.25rem, 5vw, 4rem);
  --section: clamp(4rem, 8vw, 7rem);
  --radius:  4px;
  --wrap:    1180px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3 {
  margin: 0;
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
h1 { font-size: var(--step-h1); }
h2 { font-size: var(--step-h2); }
h3 { font-size: var(--step-h3); letter-spacing: 0.05em; }
p  { margin: 0 0 1.25rem; }
p:last-child { margin-bottom: 0; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section); }
.section--dark  { background: var(--ink);   color: var(--paper); }
.section--light { background: var(--paper-soft); }
.section--dark p  { color: var(--muted-dark); }
.section--light p { color: var(--muted); }

.center { text-align: center; }
.lead { font-size: var(--step-lead); }

.eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mint);
  margin-bottom: 1rem;
}
.eyebrow--muted { color: var(--muted); }

.rule {
  width: 56px;
  height: 4px;
  background: var(--mint);
  border: 0;
  margin: 1.5rem 0 2.25rem;
}
.rule--center { margin-inline: auto; }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.75rem 1.25rem;
  background: var(--mint);
  color: var(--ink);
  font-weight: 700;
  z-index: 100;
}
.skip:focus { left: 1rem; top: 1rem; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-block;
  padding: 1rem 2.25rem;
  background: var(--mint);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.btn:hover { background: var(--mint-deep); transform: translateY(-2px); }
.btn:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }
.btn--ghost {
  background: transparent;
  color: var(--mint);
  box-shadow: inset 0 0 0 2px var(--mint);
}
.btn--ghost:hover { background: var(--mint); color: var(--ink); }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  background: var(--ink);
  color: var(--paper);
  padding-block: 1.35rem;
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.site-header__logo { display: inline-block; border-radius: 6px; }
.site-header__logo img { width: 190px; }
.site-header__logo:hover { opacity: 0.8; }
.site-header__logo:focus-visible { outline: 2px solid var(--mint); outline-offset: 5px; }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1rem, 2.5vw, 2.25rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav a {
  color: var(--paper);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.8;
  padding-block: 0.25rem;
  border-bottom: 2px solid transparent;
}
.nav a:hover { opacity: 1; color: var(--mint); }
.nav a[aria-current="page"] {
  opacity: 1;
  color: var(--mint);
  border-bottom-color: var(--mint);
}
.nav a:focus-visible { outline: 2px solid var(--mint); outline-offset: 4px; }

/* ============================================================
   PAGE HEAD
   ============================================================ */
.page-head {
  position: relative;
  background: var(--ink);
  color: var(--paper);
  padding-block: clamp(3.5rem, 8vw, 6rem);
  overflow: hidden;
}
.page-head::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("assets/grant-stage-10x.png") center / cover no-repeat;
  opacity: 0.12;
}
.page-head::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(19,27,30,0.6), rgba(19,27,30,0.95));
}
.page-head > .wrap { position: relative; z-index: 1; }
.page-head p { color: var(--muted-dark); max-width: 52ch; }

/* ============================================================
   GRID + CARDS
   ============================================================ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: clamp(1.25rem, 2.5vw, 2rem);
}
.grid--two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.card-plain {
  background: var(--paper);
  padding: 2.25rem 2rem;
  border-radius: var(--radius);
  border-top: 3px solid var(--mint);
  box-shadow: 0 1px 3px rgba(19,27,30,0.07);
  display: flex;
  flex-direction: column;
}
.card-plain h3 { margin-bottom: 0.9rem; }
.card-plain p { color: var(--muted); flex: 1; }
.card-plain .btn { align-self: flex-start; margin-top: 1.5rem; }

/* TODO markers for content that doesn't exist yet */
.todo {
  margin-top: 1.25rem;
  padding: 0.9rem 1rem;
  border: 2px dashed rgba(19,27,30,0.22);
  border-radius: var(--radius);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.8;
}
.todo--dark {
  border-color: rgba(255,255,255,0.25);
  color: var(--muted-dark);
}

/* ============================================================
   FORMS
   ============================================================ */
.form-card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  box-shadow: 0 1px 3px rgba(19,27,30,0.08);
}
.field { margin-bottom: 1.15rem; }
.field label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input,
.field textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  font: inherit;
  color: var(--ink);
  background: #f7f7f7;
  border: 1px solid #dcdcdc;
  border-radius: var(--radius);
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus,
.field textarea:focus {
  outline: none;
  background: var(--paper);
  border-color: var(--mint-deep);
  box-shadow: 0 0 0 3px rgba(140,226,200,0.35);
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: #d9534f; }
.error {
  display: block;
  min-height: 1.1rem;
  margin-top: 0.3rem;
  font-size: 0.78rem;
  color: #d9534f;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--ink);
  color: var(--muted-dark);
  padding-block: 3.25rem;
  text-align: center;
  border-top: 1px solid var(--line);
}
.site-footer img { width: 96px; margin: 0 auto 1.5rem; border-radius: 50%; }
.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--mint); }
.site-footer__entity { font-size: 0.85rem; margin-bottom: 0.35rem; }
.site-footer small { font-size: 0.78rem; opacity: 0.75; }

/* ============================================================
   STORE — product cards

   A pricing card has a different job to a content card: the price is the
   thing being scanned, so it gets the largest type on the card and every
   other element is arranged around it.
   ============================================================ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: clamp(1.25rem, 2.5vw, 2rem);
  align-items: stretch;
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid rgba(19, 27, 30, 0.12);
  border-radius: var(--radius);
  padding: 2.5rem 2rem 2rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.product-card:hover {
  border-color: rgba(19, 27, 30, 0.28);
  box-shadow: 0 18px 40px -22px rgba(19, 27, 30, 0.45);
  transform: translateY(-3px);
}

/* The tier being pushed. Only ever put this on one card. */
.product-card--featured {
  border-color: var(--ink);
  box-shadow: 0 18px 44px -20px rgba(19, 27, 30, 0.4);
}
.product-card--featured::before {
  content: attr(data-badge);
  position: absolute;
  top: 0;
  left: 2rem;
  transform: translateY(-50%);
  background: var(--ink);
  color: var(--mint);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
}

.product-card__eyebrow {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
.product-card h3 {
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}

.product-card__price {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin-bottom: 0.25rem;
}
.product-card__price b {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  /* Stops prices jittering between cards. */
  font-variant-numeric: tabular-nums;
}
.product-card__price span {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--muted);
}
.product-card__terms {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.product-card__desc {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.product-card__meta {
  list-style: none;
  margin: 0 0 1.75rem;
  padding: 1.25rem 0 0;
  border-top: 1px solid rgba(19, 27, 30, 0.1);
  flex: 1;
  font-size: 0.88rem;
}
.product-card__meta li {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.3rem 0;
  color: var(--muted);
}
.product-card__meta li::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--mint-deep);
}
.product-card__meta b { color: var(--ink); font-weight: 800; }

.product-card .btn { width: 100%; text-align: center; }
.product-card--owned .btn { background: var(--ink); color: var(--mint); }

/* ============================================================
   COURSE DETAIL — layout
   ============================================================ */
.course-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.5fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}
@media (max-width: 900px) {
  .course-layout { grid-template-columns: 1fr; }
  /* Price ahead of the curriculum on small screens. */
  .course-layout__aside { order: -1; }
}

.course-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  margin-bottom: 2rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.course-stats b { color: var(--ink); }

/* ============================================================
   CURRICULUM — accordion of modules
   ============================================================ */
.module {
  background: var(--paper);
  border: 1px solid rgba(19, 27, 30, 0.12);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
}
.module[open] { border-color: rgba(19, 27, 30, 0.24); }

.module__summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 1.5rem;
  cursor: pointer;
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.3;
  list-style: none;
  transition: background 0.15s ease;
}
.module__summary::-webkit-details-marker { display: none; }
.module__summary:hover { background: var(--paper-soft); }
.module__summary:focus-visible { outline: 2px solid var(--mint-deep); outline-offset: -2px; }

.module__title { flex: 1; }
.module__count {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
/* Chevron, drawn in CSS so there is no icon dependency. */
.module__summary::after {
  content: "";
  width: 9px;
  height: 9px;
  flex: none;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.2s ease;
}
.module[open] > .module__summary::after {
  transform: rotate(-135deg) translate(-2px, -2px);
}

.lesson-list { list-style: none; margin: 0; padding: 0; }
.lesson {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1.5rem;
  border-top: 1px solid rgba(19, 27, 30, 0.08);
  font-size: 0.95rem;
}
.lesson__num {
  font-size: 0.8rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.lesson--open .lesson__num { color: var(--mint-deep); }
.lesson__title a { text-decoration: none; border-bottom: 1px solid transparent; }
.lesson__title a:hover { border-bottom-color: var(--mint-deep); }
.lesson--locked .lesson__title { color: var(--muted); }

.tag {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  white-space: nowrap;
}
.tag--preview { background: var(--mint); color: var(--ink); }
.tag--locked  { color: var(--muted); border: 1px solid rgba(19, 27, 30, 0.18); }

.module__extras {
  padding: 1rem 1.5rem 1.25rem;
  border-top: 1px solid rgba(19, 27, 30, 0.08);
  background: var(--paper-soft);
  font-size: 0.88rem;
}
.module__extras ul { list-style: none; margin: 0; padding: 0; }
.module__extras li { padding: 0.25rem 0; }

/* ============================================================
   ACCESS PANEL — the buy box
   ============================================================ */
.access {
  position: sticky;
  top: 1.5rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  padding: 2rem;
}
.access__price {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.35rem;
}
.access__terms {
  font-size: 0.82rem;
  color: var(--muted-dark);
  margin-bottom: 1.5rem;
}
.access .btn { width: 100%; text-align: center; }
.access__note {
  margin-top: 1.25rem;
  font-size: 0.78rem;
  color: var(--muted-dark);
  line-height: 1.6;
}
.access__status {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mint);
  margin-bottom: 0.5rem;
}
.access__includes {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 1.5rem 0 0;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted-dark);
}
.access__includes li { padding: 0.3rem 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
