:root {
  --night: #14150f;
  --night-2: #1b1c15;
  --cream: #f1ece2;
  --paper: #fbf8f1;
  --paper-deep: #f4ede1;
  --ink: #23231d;
  --ink-soft: #4c4a40;
  --muted: #847e71;
  --line: #ded5c5;
  --line-light: rgba(240, 233, 218, .14);
  --gold: #b78645;
  --gold-bright: #d8b06c;
  --green: #466f59;
  --font-ui: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; display: block; }

.course-shell { min-height: 100vh; display: flex; flex-direction: column; }

.course-header {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.course-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.course-brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--gold);
}
.course-brand-mark svg { width: 30px; height: 30px; }
.course-brand-copy { display: flex; flex-direction: column; line-height: 1; }
.course-brand-copy b { font-family: var(--font-display); font-size: 21px; letter-spacing: .02em; }
.course-brand-copy small {
  margin-top: 5px;
  font-size: 8.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}
.course-header-link {
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 3px;
}
.course-header-link:hover { color: var(--ink); border-color: var(--gold); }

.course-main { flex: 1; }
.course-container { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }

.courses-hero {
  padding: 72px 0 52px;
  background:
    radial-gradient(circle at 80% 10%, rgba(183, 134, 69, .11), transparent 34%),
    var(--paper);
  border-bottom: 1px solid var(--line);
}
.courses-hero-inner { max-width: 760px; }
.courses-eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 18px;
  color: var(--gold);
  font-size: 10px;
  letter-spacing: .17em;
  text-transform: uppercase;
}
.courses-eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--gold);
}
.courses-hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(42px, 6vw, 76px);
  line-height: .98;
  letter-spacing: -.035em;
}
.courses-hero h1 em { color: var(--gold); font-style: italic; }
.courses-hero p {
  max-width: 560px;
  margin: 22px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.75;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  padding: 46px 0 80px;
}
.course-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  color: inherit;
  text-decoration: none;
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.course-card:hover {
  transform: translateY(-4px);
  border-color: rgba(183, 134, 69, .55);
  box-shadow: 0 24px 50px rgba(35, 35, 29, .09);
}
.course-card-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background:
    radial-gradient(circle at 70% 20%, rgba(216, 176, 108, .35), transparent 35%),
    linear-gradient(145deg, var(--night-2), var(--night));
}
.course-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.course-card-cover-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 22px;
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 44px;
  line-height: .9;
  opacity: .85;
}
.course-card-body { display: flex; flex: 1; flex-direction: column; padding: 24px 24px 22px; }
.course-card-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -.02em;
}
.course-card-subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.course-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: auto;
  padding-top: 22px;
}
.course-card-price { color: var(--ink-soft); font-size: 12px; letter-spacing: .04em; }
.course-card-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.course-card-arrow svg { width: 15px; height: 15px; transition: transform .3s ease; }
.course-card:hover .course-card-arrow svg { transform: translateX(3px); }

.courses-empty {
  grid-column: 1 / -1;
  padding: 70px 30px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 3px;
  color: var(--muted);
}
.courses-empty b { display: block; color: var(--ink); font-family: var(--font-display); font-size: 27px; font-weight: 400; }
.courses-empty a { display: inline-block; margin-top: 16px; color: var(--gold); }

.course-detail-hero {
  padding: 58px 0 56px;
  background: var(--night);
  color: var(--cream);
}
.course-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
  gap: 58px;
  align-items: center;
}
.course-detail-copy .courses-eyebrow { color: var(--gold-bright); }
.course-detail-copy h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(42px, 6vw, 76px);
  line-height: .98;
  letter-spacing: -.035em;
}
.course-detail-subtitle {
  max-width: 540px;
  margin: 22px 0 0;
  color: rgba(241, 236, 226, .68);
  font-size: 15px;
  line-height: 1.8;
}
.course-detail-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; margin-top: 28px; }
.course-detail-price {
  padding: 8px 13px;
  border: 1px solid rgba(216, 176, 108, .32);
  color: var(--gold-bright);
  font-size: 12px;
  letter-spacing: .06em;
}
.course-detail-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid var(--gold-bright);
  background: var(--gold-bright);
  color: var(--night);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background .25s ease, color .25s ease;
}
.course-detail-cta:hover { background: transparent; color: var(--gold-bright); }
.course-detail-cover {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid rgba(240, 233, 218, .13);
  background: linear-gradient(145deg, #22231b, #10110c);
}
.course-detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.course-detail-cover-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(216, 176, 108, .55);
  font-family: var(--font-display);
  font-size: 74px;
  letter-spacing: .06em;
}
.course-detail-body { padding: 58px 0 90px; background: var(--paper); }
.course-detail-layout { display: grid; grid-template-columns: minmax(0, 760px) minmax(220px, 280px); gap: 70px; align-items: start; }
.course-description {
  margin: 0 0 42px;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.85;
}
.course-section { padding: 30px 0; border-top: 1px solid var(--line); }
.course-section:first-of-type { border-top: 0; padding-top: 0; }
.course-section h2 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 31px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -.02em;
}
.course-section-body { margin: 0; color: var(--ink-soft); font-size: 15px; line-height: 1.85; white-space: pre-line; }
.course-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--night);
}
.course-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.course-aside {
  position: sticky;
  top: 24px;
  padding: 26px;
  border: 1px solid var(--line);
  background: var(--paper-deep);
}
.course-aside-label { margin: 0 0 8px; color: var(--gold); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.course-aside-price { margin: 0 0 18px; font-family: var(--font-display); font-size: 30px; line-height: 1.1; }
.course-aside .course-detail-cta { width: 100%; }
.course-aside-note { margin: 14px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.course-loading, .course-error { padding: 80px 0 110px; color: var(--muted); }
.course-error h1 { margin: 0 0 10px; font-family: var(--font-display); font-weight: 400; font-size: 42px; color: var(--ink); }
.course-error a { color: var(--gold); }

.course-footer {
  border-top: 1px solid var(--line);
  padding: 22px 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .03em;
}
.course-footer .course-container { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

@media (max-width: 960px) {
  .course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .course-detail-grid { grid-template-columns: 1fr; gap: 36px; }
  .course-detail-cover { max-width: 560px; }
  .course-detail-layout { grid-template-columns: 1fr; gap: 36px; }
  .course-aside { position: static; max-width: 480px; }
}
@media (max-width: 640px) {
  .course-header, .course-container { width: calc(100% - 32px); }
  .course-header { min-height: 72px; }
  .course-brand-copy small { display: none; }
  .courses-hero { padding: 48px 0 38px; }
  .course-grid { grid-template-columns: 1fr; padding-top: 30px; }
  .course-detail-hero { padding: 38px 0 40px; }
  .course-detail-grid { gap: 28px; }
  .course-detail-body { padding: 38px 0 60px; }
  .course-description { font-size: 15px; }
  .course-section h2 { font-size: 27px; }
  .course-footer .course-container { display: block; }
}
