/* Full circle learning design — one screen, no scrolling.
   Change the three colours below to restyle the whole site. */
:root {
  --bg: #ebebe9;
  --ring: #ffffff;
  --ink: #0b0b0c;
  --soft: #66666b;
  --accent: #2a3df5;
  --sans: "Sora", "Helvetica Neue", Helvetica, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --D: min(64vh, 84vw, 640px);          /* diameter of the SVG box; the ring is two-thirds of it */
  --ease: cubic-bezier(.2, .7, .1, 1);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; overflow: hidden;
  background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-weight: 300;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

#field { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }

/* ── header: the name shrinks into a mark once you leave the circle ── */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 30;
  display: flex; justify-content: space-between; align-items: center;
  padding: 26px 34px;
  pointer-events: none;
}
.top > * { pointer-events: auto; }
.brand {
  display: inline-flex; align-items: center; justify-content: center;
  height: 52px; padding: 0 2px;
  font-size: 26px; font-weight: 400; letter-spacing: -.02em;
  color: var(--ink); text-decoration: none; white-space: nowrap;
  border: 1.5px solid transparent; border-radius: 999px;
  transition: padding .7s var(--ease), border-color .5s .25s, font-size .7s var(--ease), letter-spacing .7s var(--ease);
}
.brand .rest {
  display: inline-block; overflow: hidden; max-width: 6em; opacity: 1;
  transition: max-width .7s var(--ease), opacity .35s;
}
body.deep .brand, body.menu-open .brand { padding: 0 13px; border-color: currentColor; font-size: 19px; font-weight: 600; letter-spacing: .02em; }
body.deep .brand .rest, body.menu-open .brand .rest { max-width: 0; opacity: 0; }

.menu-btn {
  width: 52px; height: 52px; border-radius: 50%; background: var(--ink);
  display: grid; place-content: center; gap: 5px;
  transition: transform .3s var(--ease), background .3s;
}
.menu-btn:hover { transform: scale(1.08); }
.menu-btn i { display: block; width: 22px; height: 2.5px; border-radius: 2px; background: var(--bg); transition: transform .35s var(--ease), opacity .2s; }
body.menu-open .menu-btn { background: var(--bg); }
body.menu-open .menu-btn i { background: var(--ink); }
body.menu-open .menu-btn i:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
body.menu-open .menu-btn i:nth-child(2) { opacity: 0; }
body.menu-open .menu-btn i:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
body.menu-open .brand { color: var(--bg); }

/* ── menu overlay ── */
.menu {
  position: fixed; inset: 0; z-index: 20; background: var(--ink); color: var(--bg);
  display: flex; flex-direction: column; justify-content: center; gap: .15em;
  padding: 90px 34px 40px max(34px, 12vw);
  opacity: 0; transition: opacity .35s;
}
.menu[hidden] { display: none; }
body.menu-open .menu { opacity: 1; }
.menu a {
  display: flex; align-items: baseline; gap: 18px;
  font-size: clamp(22px, 4.4vh, 44px); line-height: 1.3; color: inherit; text-decoration: none;
  transition: transform .3s var(--ease), color .2s;
}
.menu a small { font-family: var(--mono); font-size: 13px; opacity: .55; width: 2.2em; }
.menu a:hover { transform: translateX(12px); color: #fff; }

/* ── state 1: the circle ── */
main { position: fixed; inset: 0; z-index: 10; }
.stage {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: opacity .8s, filter .8s, transform 1s var(--ease);
}
.ring-wrap { position: relative; width: var(--D); height: var(--D); margin-top: 3vh; }
#ring { position: relative; width: 100%; height: 100%; overflow: visible; display: block; }

/* the ring itself: thick, white, and turning slowly clockwise. The points on it stay still. */
.ring-spin {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--ring) 0deg, var(--ring) 190deg, #d6d6d2 352deg, var(--ring) 360deg);
  -webkit-mask: radial-gradient(closest-side, transparent calc(60% - 1px), #000 60%, #000 73.33%, transparent calc(73.33% + 1px));
          mask: radial-gradient(closest-side, transparent calc(60% - 1px), #000 60%, #000 73.33%, transparent calc(73.33% + 1px));
  animation: arrive 1.4s var(--ease) both, spin 38s linear infinite;
}
@keyframes arrive { from { opacity: 0; scale: .86; } }
@keyframes spin { to { rotate: 360deg; } }
.ring-base { fill: none; stroke: none; }

.pt { cursor: pointer; opacity: 0; animation: pop .5s var(--ease) forwards; }
@keyframes pop { from { opacity: 0; } to { opacity: 1; } }
.pt .hit { fill: transparent; }
.pt .dot { fill: var(--ink); stroke: var(--ink); stroke-width: 1.5; transition: r .3s var(--ease), fill .3s, stroke .3s; }
.pt .halo { fill: none; stroke: var(--c); stroke-width: 1.5; opacity: 0; transform-box: fill-box; transform-origin: center; }
.pt text { font-family: var(--mono); font-size: 16px; letter-spacing: .05em; text-transform: uppercase; fill: var(--soft); transition: fill .3s; }
.pt text .num { fill: var(--ink); }
.pt .glow { fill: var(--c); opacity: 0; pointer-events: none; transform-box: fill-box; transform-origin: center; animation: glow 38s linear infinite; }
@keyframes glow {
  0% { opacity: 1; transform: scale(1.35); }
  6% { opacity: 1; transform: scale(1.1); }
  26% { opacity: 0; transform: scale(1); }
  98% { opacity: 0; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.35); }
}
.pt.nextup .halo { animation: halo 2.2s ease-out infinite; }
.pt.nextup text, .pt:hover text, .pt:focus-visible text { fill: var(--ink); }
.pt:hover .dot, .pt:focus-visible .dot { r: 14; fill: var(--c); stroke: var(--c); }
.pt:focus-visible { outline: none; }
@keyframes halo { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(3.2); } }

.tagline {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; pointer-events: none;
}
.tagline h1 {
  margin: 0; font-weight: 300; letter-spacing: -.035em; line-height: 1.02;
  font-size: calc(var(--D) / 13.5);
}
.tagline p { margin: .9em 0 0; font-size: max(13px, calc(var(--D) / 31)); line-height: 1.3; max-width: 13em; text-wrap: balance; color: var(--soft); letter-spacing: .005em; }

.cap {
  margin: 2.2vh 0 0; min-height: 3em; max-width: min(92vw, 640px); text-align: center;
  font-size: 15px; line-height: 1.5; color: var(--soft);
}
.cap b { font-family: var(--mono); font-weight: 500; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); margin-right: .6em; }
.cap em { font-style: normal; color: var(--c, var(--accent)); margin-left: .5em; white-space: nowrap; }

/* leaving the circle: it dissipates */
body.leaving .stage, body.deep .stage { opacity: 0; filter: blur(18px); transform: scale(1.14); pointer-events: none; }

/* ── state 2: one point in depth ── */
.panel {
  position: absolute; inset: 100px 0 104px 0;
  display: grid; grid-template-columns: minmax(0, 480px) minmax(0, 620px); gap: 4vw;
  align-items: safe center; justify-content: center;
  padding: 0 34px; overflow-y: auto;   /* on a short screen a long panel scrolls inside itself */
  opacity: 0; filter: blur(12px); transform: scale(.97); pointer-events: none;
  transition: opacity .55s, filter .55s, transform .7s var(--ease);
}
body.deep .panel.in { opacity: 1; filter: none; transform: none; pointer-events: auto; }
.panel .meta { font-family: var(--mono); font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--soft); margin: 0 0 18px; }
.panel .meta span { color: var(--accent); margin-left: 1em; }
.panel h2 { margin: 0; font-weight: 300; font-size: clamp(34px, 5.4vh, 60px); line-height: 1.04; letter-spacing: -.035em; }
.panel .q { margin: 16px 0 0; font-size: clamp(17px, 2.3vh, 21px); font-weight: 400; }
.panel ul { list-style: none; margin: 22px 0 0; padding: 0; border-top: 1px solid var(--ink); }
.panel li { padding: 10px 0; border-bottom: 1px solid rgba(11, 11, 12, .16); font-size: 15.5px; line-height: 1.45; }
.panel .intro { margin: 14px 0 0; font-size: 15.5px; line-height: 1.5; color: var(--soft); max-width: 36em; }
.panel .txt ul { margin-top: 16px; }
.metrics { display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 18px 0 0; }
.metrics dt { font-weight: 600; font-size: clamp(22px, 3.2vh, 30px); letter-spacing: -.03em; line-height: 1; color: var(--accent); }
.metrics dd a { color: var(--ink); text-transform: none; letter-spacing: 0; font-size: 13px; }
.metrics dd { margin: 5px 0 0; font-family: var(--mono); font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--soft); max-width: 13em; }
.panel .ev { margin: 18px 0 0; font-size: 14px; color: var(--soft); }
.panel .ev b { font-weight: 600; color: var(--ink); font-size: 22px; letter-spacing: -.02em; margin-right: .5em; }
.schema svg { width: 100%; height: auto; display: block; overflow: visible; }
.schema .r { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.schema .d { fill: var(--ink); }
.schema .d2 { fill: var(--accent); }
.schema .r2 { fill: none; stroke: var(--accent); stroke-width: 1.5; }
.schema .link { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 4 5; }
.schema text { font-family: var(--mono); font-size: 12.5px; letter-spacing: .05em; text-transform: uppercase; fill: var(--ink); }
.schema text.c { font-family: var(--sans); font-size: 21px; font-weight: 400; letter-spacing: -.02em; text-transform: none; }
.schema text.a { fill: var(--accent); }
.schema text.s { fill: var(--soft); font-size: 11.5px; }
.schema .grow { transform-box: fill-box; transform-origin: center; animation: grow .9s var(--ease) both; }
@keyframes grow { from { transform: scale(.6) rotate(-40deg); opacity: 0; } }

/* ── moving around the circle from inside a point ── */
.around {
  position: absolute; inset: auto 0 22px 0; display: flex; align-items: center; justify-content: center; gap: 26px;
  opacity: 0; pointer-events: none; transition: opacity .5s;
}
body.deep .around { opacity: 1; pointer-events: auto; }
.around button { font-size: 14px; min-width: 9.5em; color: var(--soft); transition: color .2s; }
.around button:hover { color: var(--ink); }
#prev { text-align: right; } #next { text-align: left; }
#mini { width: 64px; height: 64px; overflow: visible; }
#mini .r { fill: none; stroke: var(--ink); stroke-width: 1; }
#mini .m { fill: var(--bg); stroke: var(--ink); stroke-width: 1; cursor: pointer; transition: r .2s; }
#mini .m.on { fill: var(--c); stroke: var(--c); r: 5.5; }
#mini .m:hover { r: 5.5; }
#mini .home { fill: transparent; cursor: pointer; }
#mini text { font-family: var(--mono); font-size: 7px; letter-spacing: .08em; text-anchor: middle; fill: var(--soft); pointer-events: none; text-transform: uppercase; }

/* ── layer three: the work behind one sub-point ── */
.schema .sub { cursor: pointer; }
.schema .sub .hit { fill: transparent; }
.schema .sub .d { transition: r .25s var(--ease), fill .25s; }
.schema .sub:hover .d, .schema .sub:focus-visible .d { r: 9; fill: var(--accent); }
.schema .sub:hover text, .schema .sub:focus-visible text { fill: var(--accent); }
.schema .sub:focus-visible { outline: none; }
.schema .hint { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); text-align: center; margin: 6px 0 0; }
.panel .up { font-family: var(--mono); font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin: 0 0 18px; display: inline-block; }
.panel .up:hover { color: var(--ink); }
.panel .txt p.body { margin: 20px 0 0; font-size: 16.5px; line-height: 1.55; max-width: 34em; }
.media { display: grid; gap: 12px; }
.media .frame {
  aspect-ratio: 16 / 10; width: 100%; background: var(--ring); border-radius: 14px; overflow: hidden;
  display: grid; place-items: center;
}
.media .frame img, .media .frame video { width: 100%; height: 100%; object-fit: contain; display: block; background: #fff; }
.media .frame.empty { background: transparent; border: 1.5px dashed var(--soft); font-family: var(--mono); font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); }
.media .caption { font-size: 14px; color: var(--soft); margin: 0; min-height: 1.4em; }
.media .thumbs { display: flex; gap: 8px; }
.media .thumbs button { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--ink); background: transparent; }
.media .thumbs button.on { background: var(--accent); border-color: var(--accent); }

/* ── one step of the pedagogy process ── */
.panel h2 small { font-family: var(--mono); font-size: .3em; letter-spacing: .08em; color: var(--accent); vertical-align: .9em; margin-right: .7em; }
.step { display: grid; gap: 8px; }
.step b { display: block; font-family: var(--mono); font-weight: 500; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--soft); margin-bottom: 5px; }
.step p { margin: 0; font-size: 14.5px; line-height: 1.45; }
.step .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.step .pair p, .step .to { padding: 11px 15px; border-radius: 11px; background: var(--ring); }
.step .to { box-shadow: inset 4px 0 0 var(--accent); }
.step .to b { color: var(--accent); }
.step .sci { padding: 6px 2px 0; }
.step .sci ul { list-style: none; margin: 0; padding: 0; }
.step .sci li { font-size: 13.5px; line-height: 1.4; padding: 5px 0; border-top: 1px solid rgba(11, 11, 12, .14); color: var(--soft); }
.step .sci i { font-style: normal; color: var(--ink); font-weight: 400; margin-right: .4em; }

.step .to a { color: var(--ink); text-decoration-color: var(--accent); text-underline-offset: 3px; }
.step .ai { padding: 11px 15px; border-radius: 11px; background: var(--ink); color: var(--bg); }
.step .ai b { color: color-mix(in srgb, var(--bg) 60%, transparent); }
.step .ba { padding: 11px 15px; border-radius: 11px; background: var(--ring); display: grid; gap: 3px; }
.step .ba b { margin-bottom: 2px; }
.step .ba s { color: var(--soft); text-decoration-color: var(--accent); }
.panel .time { margin: 10px 0 0; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); }
.ask [hidden] { display: none; }
.step .eg { padding: 13px 15px; border-radius: 11px; border: 1.5px dashed var(--accent); }
.step .eg b { color: var(--accent); }
.show-btn { margin-top: 18px; font-size: 14px; padding: 9px 18px; border-radius: 999px; background: var(--accent); color: #fff; transition: transform .2s var(--ease); }
.show-btn:hover { transform: scale(1.05); }

/* ── viewer: an example, video or image opened over the page ── */
.viewer { width: min(94vw, 1100px); border: 0; border-radius: 18px; padding: 16px 16px 12px; background: var(--bg); }
.viewer::backdrop { background: rgba(11, 11, 12, .6); backdrop-filter: blur(4px); }
.viewer .vbox { aspect-ratio: 16 / 9; max-height: 78vh; width: 100%; border-radius: 10px; overflow: hidden; background: var(--ring); }
.viewer .vbox > * { width: 100%; height: 100%; border: 0; display: block; object-fit: contain; }
.viewer .vcap { margin: 10px 4px 0; font-family: var(--sans); font-size: 13.5px; color: var(--soft); padding-right: 40px; }
.viewer .x { position: absolute; right: 18px; bottom: 8px; font-size: 26px; line-height: 1; color: var(--soft); }

/* ── the elements a course is built from ── */
.elements { display: grid; gap: 12px; }
.el-list { display: flex; flex-wrap: wrap; gap: 6px; }
.el-list button { font-size: 13px; padding: 6px 12px; border: 1.5px solid var(--ink); border-radius: 999px; transition: background .2s, color .2s; }
.el-list button:hover { background: var(--ring); }
.el-list button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.el-d { margin: 0; font-size: 14.5px; line-height: 1.5; min-height: 3em; }
.el-d b { font-weight: 600; }
.elements .media .frame { aspect-ratio: 16 / 8; }

/* ── the seven layers of a cmi5 course ── */
.layers { display: grid; gap: 5px; }
.lay { margin: 0; display: grid; grid-template-columns: 13.5em 1fr auto; gap: 14px; align-items: baseline; padding: 9px 14px; border-radius: 9px; background: var(--ring); font-size: 14px; line-height: 1.4; }
.lay b { font-weight: 400; font-size: 15.5px; letter-spacing: -.01em; }
.lay span { color: var(--soft); }
.lay i { font-style: normal; font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--soft); white-space: nowrap; }
.lay.in { background: transparent; border: 1.5px dashed var(--accent); margin-bottom: 6px; }
.lay.in i, .lay.yes i { color: var(--accent); }
.lay.yes { box-shadow: inset 4px 0 0 var(--accent); }
.lay.part { box-shadow: inset 4px 0 0 color-mix(in srgb, var(--accent) 40%, transparent); }
.lay-foot { margin: 8px 0 0; font-size: 13.5px; color: var(--soft); }

/* ── a real course, playing inside the one screen ── */
.player { display: grid; gap: 10px; min-height: 0; align-self: stretch; grid-template-rows: auto 1fr auto; }
.player .chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; }
.player .chips button, .player .chips select { font-size: 13px; padding: 5px 12px; border: 1.5px solid var(--ink); border-radius: 999px; background: transparent; }
.player .chips button.on { background: var(--ink); color: var(--bg); }
.player .screen { position: relative; min-height: 260px; background: var(--ring); border-radius: 14px; overflow: hidden; display: grid; place-items: center; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player .wait { margin: 0; padding: 20px; text-align: center; font-family: var(--mono); font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); }
.player .full { position: absolute; right: 10px; bottom: 8px; font-size: 12px; color: var(--soft); background: var(--ring); padding: 2px 8px; border-radius: 999px; }
.player .tiers { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; font-size: 13px; color: var(--soft); }
.player .tiers b { font-family: var(--mono); font-weight: 500; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); margin-right: .5em; }
.ask-btn { margin-left: auto; font-size: 13.5px; padding: 8px 16px; border-radius: 999px; background: var(--accent); color: #fff; transition: transform .2s var(--ease); }
.ask-btn:hover { transform: scale(1.05); }

/* ── request access ── */
.ask { width: min(92vw, 460px); border: 0; border-radius: 18px; padding: 30px 30px 26px; background: var(--bg); color: var(--ink); font-family: var(--sans); font-weight: 300; }
.ask::backdrop { background: rgba(11, 11, 12, .55); backdrop-filter: blur(4px); }
.ask h2 { margin: 0 0 8px; font-weight: 300; font-size: 30px; letter-spacing: -.03em; }
.ask p { margin: 0 0 16px; font-size: 14.5px; line-height: 1.5; color: var(--soft); }
.ask form { display: grid; gap: 12px; }
.ask label { display: grid; gap: 4px; font-size: 13px; }
.ask small { color: var(--soft); }
.ask input:not([type=checkbox]), .ask textarea { font: inherit; font-size: 15px; padding: 9px 11px; border: 1.5px solid var(--ink); border-radius: 9px; background: var(--ring); color: var(--ink); resize: none; }
.ask .tick { display: flex; gap: 8px; align-items: baseline; font-size: 13.5px; }
.ask form button { justify-self: start; margin-top: 4px; padding: 10px 20px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 14.5px; }
.ask .x { position: absolute; top: 14px; right: 16px; font-size: 26px; line-height: 1; color: var(--soft); }
.ask .sent { color: var(--ink); font-size: 16px; margin: 8px 0 0; }

/* ── small screens ── */
@media (max-width: 820px) {
  .top { padding: 16px 18px; }
  .brand { font-size: 21px; height: 46px; }
  .menu-btn { width: 46px; height: 46px; }
  .pt text { display: none; }
  .ring-wrap { margin-top: 0; }
  :root { --D: min(58vh, 118vw); }
  .panel { inset: 78px 0 92px 0; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; overflow-y: auto; padding: 8px 20px 0; }
  .schema, .media { max-width: 420px; }
  .step .pair { grid-template-columns: 1fr; }
  .lay { grid-template-columns: 1fr auto; }
  .lay span { grid-column: 1 / -1; grid-row: 2; }
  .player .screen { min-height: 420px; }
  .around { gap: 12px; }
  .around button { min-width: 0; flex: 1; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .pt .glow { display: none; }
  *, *::before, *::after { animation-duration: .01s !important; transition-duration: .01s !important; }
}
