/* Lets Create — member area.
   Hybrid brief: app-like structure (Thinkific/Kajabi), funnel's brand skin.
   Tokens lifted from life-in-color-site/public/css/site.css so the two properties feel
   like one business. This is the v1 skeleton — expect to restyle against the design refs. */

@font-face {
  font-family: "Ivy Presto Headline";
  src: url("/fonts/ivy-presto-headline.otf") format("opentype");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --ink: rgb(14, 23, 42);
  --body-ink: rgb(18, 18, 18);
  --muted: rgb(107, 107, 107);
  --gold: rgb(191, 175, 0);
  --cream: #faf8f0;
  --card-bg: #fffff8;
  --card-border: rgb(240, 241, 227);
  --line: rgb(226, 232, 240);
  --coral: rgb(255, 111, 97);
  --green: #3ec463;
  --navy: #1e293b;
  --shell: #ffffff;
  --radius: 12px;
  --max: 1140px;

  /* one action colour across buttons + progress (brand call, 2026-07-14) */
  --action: #D6994E;
  --action-dark: #c1873f;
}

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

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--body-ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: "Ivy Presto Headline", Georgia, serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
}
h1 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }

a { color: inherit; }

/* ---- chrome ---- */
.topbar {
  background: var(--shell);
  border-bottom: 1px solid var(--card-border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.wordmark {
  display: flex;
  align-items: center;
  margin-right: auto;
  text-decoration: none;
}
.wordmark img { height: 34px; width: auto; display: block; }
.topbar a.nav, .topbar button.nav {
  font: inherit;
  font-size: .9rem;
  color: var(--muted);
  background: none;
  border: 0;
  cursor: pointer;
  text-decoration: none;
}
.topbar a.nav:hover, .topbar button.nav:hover { color: var(--ink); }

main { max-width: var(--max); margin: 0 auto; padding: 36px 24px 80px; }

.page-head { margin-bottom: 28px; }
.page-head p { color: var(--muted); margin-top: 6px; }

.crumb {
  font-size: .85rem;
  color: var(--muted);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 10px;
}
.crumb:hover { color: var(--ink); }

/* ---- cards ---- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;              /* keeps the cover image inside the rounded corners */
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease;
}
a.card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(14, 23, 42, .08); }

.card .cover {
  aspect-ratio: 16 / 9;
  background: var(--card-border);
  overflow: hidden;
}
.card .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* a course with no artwork yet still gets a card with presence, in its own colour */
.card .cover.empty {
  background: color-mix(in srgb, var(--accent) 14%, #fff);
  display: grid;
  place-items: center;
  font-family: "Ivy Presto Headline", Georgia, serif;
  color: var(--accent);
  font-size: 1.05rem;
}
.card .swatch { height: 5px; background: var(--accent, var(--action)); }
.card .body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card .blurb { color: var(--muted); font-size: .92rem; flex: 1; }
.card.locked { border-style: dashed; }

/* ---- progress ---- */
.bar { height: 6px; background: var(--line); border-radius: 6px; overflow: hidden; }
.bar > span {
  display: block;
  height: 100%;
  background: var(--action);
  border-radius: 6px;
  transition: width .3s ease;
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: .82rem;
  color: var(--muted);
}

/* ---- buttons ---- */
.btn {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  border: 0;
  border-radius: 8px;
  padding: 12px 20px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  background: var(--action);
  color: #fff;
  transition: background .12s ease;
}
.btn:hover { background: var(--action-dark); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.ghost {
  background: none;
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn.ghost:hover { border-color: var(--ink); }
.btn.done { background: var(--green); }

/* ---- curriculum ---- */
.module { margin-bottom: 26px; }
.module h2 { font-size: 1.15rem; margin-bottom: 4px; }
.module .count { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.lessons { list-style: none; margin-top: 12px; border: 1px solid var(--card-border); border-radius: var(--radius); overflow: hidden; }
.lessons li + li { border-top: 1px solid var(--card-border); }
.lessons a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--card-bg);
  text-decoration: none;
}
.lessons a:hover { background: #fff; }
.lessons a[aria-current="true"] { background: #fff; box-shadow: inset 3px 0 0 var(--coral); }
.tick {
  width: 20px; height: 20px; flex: 0 0 20px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  font-size: .7rem;
  color: transparent;
}
.tick.done { background: var(--green); border-color: var(--green); color: #fff; }
.lessons .t { flex: 1; }
.lessons .meta { font-size: .78rem; color: var(--muted); }

/* ---- lesson player ---- */
.player {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: start;
}
@media (max-width: 900px) {
  .player { grid-template-columns: 1fr; }
  .player .rail { order: -1; }
}
.video {
  position: relative;
  padding-top: 56.25%;
  background: var(--navy);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 18px 0;
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.blocks p { margin: 14px 0; }
.blocks ul, .blocks ol { margin: 14px 0 14px 24px; }
.blocks li { margin: 6px 0; }
.blocks a { color: var(--action-dark); }
.blocks strong { color: var(--ink); }

/* a reference image inside a lesson — served gated from R2, same as a download */
.figure {
  margin: 20px 0;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card-bg);
}
.figure img { width: 100%; height: auto; display: block; }

/* the "share your sketch" call to action */
.cta { margin: 26px 0; text-align: center; }
.cta .btn { padding: 14px 28px; }
.dl {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  margin: 14px 0;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  text-decoration: none;
}
.dl:hover { border-color: var(--coral); }
.dl .ico { font-size: 1.1rem; }
.dl .label { font-weight: 600; flex: 1; }
.dl .hint { font-size: .8rem; color: var(--muted); }

.rail {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 18px;
  position: sticky;
  top: 84px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}
.rail h3 { font-size: .95rem; margin-bottom: 12px; }
.rail .lessons { margin-top: 0; }
.rail .lessons a { padding: 10px 12px; font-size: .9rem; }

.lesson-foot {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.lesson-foot .spacer { flex: 1; }

/* ---- auth pages ---- */
.auth {
  max-width: 460px;
  margin: 10vh auto;
  padding: 0 24px;
  text-align: center;
}
.auth .box {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-align: left;
  margin-top: 24px;
}
.auth p.lede { color: var(--muted); margin-top: 8px; }
label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: 6px; }
input[type="email"] {
  width: 100%;
  font: inherit;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  margin-bottom: 14px;
}
input[type="email"]:focus { outline: 2px solid var(--coral); outline-offset: 1px; }
.auth .btn { width: 100%; }

.note {
  padding: 12px 14px;
  border-radius: 8px;
  font-size: .9rem;
  margin-bottom: 16px;
}
.note.ok { background: #eaf8ee; color: #1c6b34; }
.note.err { background: #fdecea; color: #8b2c22; }
.note.info { background: #f3f6fd; color: #35507e; }

.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
.muted { color: var(--muted); }
.skeleton { color: var(--muted); padding: 40px 0; }
