/* AI Leadership components: page frames and app components on top of Basecoat (shadcn/ui as plain HTML).
   Needs tokens.css and type.css. Load order: basecoat.css, tokens.css, type.css, components.css.
   The app uses only these classes; it defines no colors, fonts or components of its own. */

body { background: var(--background); color: var(--foreground); font-family: var(--font-sans); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted-foreground); }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.reading { max-width: 680px; }
.note { font-size: 14px; color: var(--muted-foreground); }

/* ---- Button: the brand call to action (one per view). Other buttons use Basecoat variants. ---- */
.btn[data-variant="brand"], .btn-brand { background: var(--brand); color: var(--brand-foreground); border: 1px solid transparent; }
.btn[data-variant="brand"]:hover, .btn-brand:hover { background: color-mix(in srgb, var(--brand) 88%, var(--foreground)); }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

/* ---- Site frame (guests) ---- */
.site-header { position: absolute; inset: 0 0 auto 0; z-index: 10; }
.site-header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.site-header .wordmark { color: var(--on-image); }
.site-header .btn { color: var(--on-image); }
.site-header-solid { position: static; border-bottom: 1px solid var(--border); }
.site-header-solid .wordmark, .site-header-solid .btn { color: var(--foreground); }
.site-footer { border-top: 1px solid var(--border); margin-top: 96px; }
.site-footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-top: 32px; padding-bottom: 48px; font-size: 13px; color: var(--muted-foreground); }
.site-footer a { color: var(--muted-foreground); text-decoration: none; }
.site-footer a:hover { color: var(--foreground); }

.section { padding: 96px 0; border-top: 1px solid var(--border); }
.hero-slider + .section { border-top: 0; }
.section-head { display: grid; gap: 12px; margin-bottom: 48px; max-width: 680px; }
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.pillar { padding-top: 16px; border-top: 1px solid var(--primary); }
.pillar h3 { font: 400 24px/1.25 "Latin Modern Roman 12", var(--font-serif); margin: 12px 0 8px; }
.pillar p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--muted-foreground); }
@media (max-width: 900px) { .pillars { grid-template-columns: 1fr; } }

/* ---- Hero slider: dark photo, display title, lead, one brand call to action ----
   Markup: section.hero-slider > .hero-slide[data-active] (img.hero-image + .hero-copy) + nav.hero-dots.
   Motion: slow cross-fade with a gentle zoom; the copy rises 12 px. hero-slider.js turns the slides. */
.hero-slider { position: relative; min-height: min(92vh, 860px); overflow: hidden; background: var(--image-scrim); color: var(--on-image); isolation: isolate; }
.hero-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden;
              transition: opacity 1400ms cubic-bezier(.4, 0, .2, 1), visibility 0s linear 1400ms; }
.hero-slide[data-active] { opacity: 1; visibility: visible; transition: opacity 1400ms cubic-bezier(.4, 0, .2, 1), visibility 0s; }
.hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.06);
              filter: grayscale(.35) contrast(1.02); transition: transform 9000ms linear; }
.hero-slide[data-active] .hero-image { transform: scale(1); }
.hero-slide::after { content: ""; position: absolute; inset: 0;
                     background: linear-gradient(90deg, color-mix(in srgb, var(--image-scrim) 82%, transparent) 0%,
                     color-mix(in srgb, var(--image-scrim) 55%, transparent) 45%, color-mix(in srgb, var(--image-scrim) 15%, transparent) 100%); }
/* Film grain: the touch of retro */
.hero-slider::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: .14; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.hero-copy { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; justify-content: center;
             max-width: 1200px; margin: 0 auto; padding: 120px 24px 140px; min-height: min(92vh, 860px); box-sizing: border-box; }
.hero-copy > * { max-width: 760px; opacity: 0; transform: translateY(12px);
                 transition: opacity 900ms ease-out, transform 900ms cubic-bezier(.2, .7, .2, 1); }
.hero-slide[data-active] .hero-copy > * { opacity: 1; transform: none; }
.hero-slide[data-active] .hero-copy > :nth-child(2) { transition-delay: 250ms; }
.hero-slide[data-active] .hero-copy > :nth-child(3) { transition-delay: 400ms; }
.hero-slide[data-active] .hero-copy > :nth-child(4) { transition-delay: 550ms; }
.hero-copy .eyebrow { color: color-mix(in srgb, var(--on-image) 72%, transparent); }
.hero-copy .display { margin-top: 20px; color: var(--on-image); }
.hero-copy .lead { margin-top: 24px; max-width: 600px; color: color-mix(in srgb, var(--on-image) 78%, transparent); }
.hero-copy .row { margin-top: 40px; }
.hero-copy .btn[data-variant="brand"] { border-color: color-mix(in srgb, var(--on-image) 22%, transparent); }
.hero-copy .btn[data-variant="ghost"] { color: var(--on-image); }
.hero-copy .btn[data-variant="ghost"]:hover { background: color-mix(in srgb, var(--on-image) 10%, transparent); }
.hero-dots { position: absolute; z-index: 3; left: 0; right: 0; bottom: 40px; max-width: 1200px; margin: 0 auto; padding: 0 24px;
             display: flex; align-items: center; gap: 20px; }
.hero-dots button { all: unset; cursor: pointer; display: flex; align-items: center; gap: 10px;
                    font: 400 14px "Latin Modern Roman Caps", var(--font-serif); letter-spacing: .1em; text-transform: lowercase;
                    color: color-mix(in srgb, var(--on-image) 55%, transparent); }
.hero-dots button::after { content: ""; width: 48px; height: 1px; background: color-mix(in srgb, var(--on-image) 30%, transparent); }
.hero-dots button[aria-current="true"] { color: var(--on-image); }
.hero-dots button[aria-current="true"]::after { background: var(--on-image); }
.hero-dots button:focus-visible { outline: 2px solid var(--on-image); outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) {
  .hero-slide, .hero-image, .hero-copy > * { transition: none !important; transform: none !important; }
}
@media (max-width: 700px) { .hero-dots button::after { width: 24px; } }

/* ---- Auth pages ---- */
.auth { max-width: 440px; margin: 96px auto; padding: 0 24px; }
.auth .display { margin: 12px 0 8px; }
.auth form { margin-top: 28px; display: grid; gap: 16px; }
.code-input { font: 500 24px var(--font-mono); letter-spacing: .4em; text-align: center; height: 52px; }

/* ---- App shell (members): sidebar, header, content, footer ---- */
.app-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.app-sidebar { border-right: 1px solid var(--border); padding: 20px 14px; display: flex; flex-direction: column; gap: 2px;
               position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--background); box-sizing: border-box; }
.app-sidebar .wordmark { padding: 6px 10px 20px; color: var(--foreground); }
.app-sidebar .eyebrow { padding: 18px 10px 6px; }
.nav-link { display: flex; align-items: center; gap: 10px; font-size: 14px; padding: 7px 10px; border-radius: 6px;
            text-decoration: none; color: var(--muted-foreground); }
.nav-link:hover { background: var(--accent); color: var(--foreground); }
.nav-link[aria-current="page"] { background: var(--accent); color: var(--foreground); }
.nav-link svg { width: 16px; height: 16px; flex: none; }
.app-main { display: flex; flex-direction: column; min-width: 0; }
.app-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; padding: 0 32px;
              border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5;
              background: color-mix(in srgb, var(--background) 88%, transparent); backdrop-filter: blur(10px); }
.app-header .crumbs { font-size: 14px; color: var(--muted-foreground); display: flex; gap: 8px; align-items: center; }
.app-header .crumbs a { color: inherit; text-decoration: none; }
.app-header .crumbs a:hover { color: var(--foreground); }
.app-user { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted-foreground); }
.app-content { padding: 40px 32px 64px; flex: 1; }
.app-footer { border-top: 1px solid var(--border); padding: 20px 32px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
              font-size: 13px; color: var(--muted-foreground); }
.app-footer a { color: var(--muted-foreground); text-decoration: none; }
.menu-toggle { display: none; }
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .app-sidebar { display: none; position: fixed; inset: 0 30% 0 0; z-index: 20; height: auto; box-shadow: 0 0 0 100vmax color-mix(in srgb, var(--image-scrim) 30%, transparent); }
  .app-shell[data-menu="open"] .app-sidebar { display: flex; }
  .menu-toggle { display: inline-flex; }
  .app-header, .app-content, .app-footer { padding-left: 20px; padding-right: 20px; }
}

/* ---- Dashboard ---- */
.greeting { margin-bottom: 40px; }
.greeting .display { margin-top: 8px; }
.greeting .lead { margin-top: 16px; max-width: 680px; }
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 40px; align-items: start; }
@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } }
.block-head { display: flex; align-items: baseline; justify-content: space-between; margin: 48px 0 16px; }
.block-head:first-child { margin-top: 0; }
.block-head a { font-size: 13px; color: var(--muted-foreground); }

/* ---- Product grid and cards ---- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.product-card { display: flex; flex-direction: column; gap: 8px; padding: 20px; text-decoration: none; color: inherit; overflow: hidden;
                border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); transition: border-color .15s ease-out; }
.product-card:hover { border-color: var(--muted-foreground); }
.product-card .cover { aspect-ratio: 16 / 9; margin: -20px -20px 8px; background: var(--muted) center / cover no-repeat;
                       border-bottom: 1px solid var(--border); filter: grayscale(.35); }
.product-card h3 { font: 400 22px/1.25 "Latin Modern Roman 12", var(--font-serif); margin: 0; color: var(--primary); }
.product-card p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--muted-foreground); }
.product-card .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: auto; padding-top: 8px; font-size: 13px; color: var(--muted-foreground); }
.progress { height: 2px; background: var(--border); border-radius: 2px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--brand); }

/* ---- Product page ---- */
.product-header { padding-bottom: 32px; margin-bottom: 40px; border-bottom: 1px solid var(--border);
                  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: end; }
.product-header .display { margin: 10px 0 0; }
.product-header .lead { margin-top: 16px; }
.product-header .stats { min-width: 220px; display: grid; gap: 8px; font-size: 13px; color: var(--muted-foreground); }
.product-header .cover { grid-column: 1 / -1; aspect-ratio: 21 / 7; border-radius: var(--radius); border: 1px solid var(--border);
                         background: var(--muted) center / cover no-repeat; order: -1; filter: grayscale(.35); }
.terms { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 16px; }
@media (max-width: 900px) { .product-header { grid-template-columns: 1fr; } }
.module { margin-bottom: 40px; }
.module-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-bottom: 10px; }
.module-head h2 { font: 400 24px/1.25 "Latin Modern Roman 12", var(--font-serif); margin: 4px 0 0; color: var(--primary); }
.module-head p { margin: 6px 0 0; font-size: 14px; color: var(--muted-foreground); }
.unit-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.unit-list li { border-bottom: 1px solid var(--border); }
.unit-list a, .unit-list .locked { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: center;
                                   padding: 12px 4px; text-decoration: none; color: inherit; font-size: 15px; }
.unit-list a:hover { background: var(--accent); }
.unit-list .locked { color: var(--muted-foreground); }
.unit-list .device { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 4px; font-size: 15px; }
.unit-list .check { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--border); display: grid; place-items: center; box-sizing: border-box; }
.unit-list .check[data-done] { background: var(--brand); border-color: var(--brand); color: var(--brand-foreground); }
.unit-list .check svg { width: 12px; height: 12px; }
.unit-list .info { font-size: 13px; color: var(--muted-foreground); }

/* ---- Unit page ---- */
.unit-page { max-width: 820px; }
.unit-page .display { margin: 10px 0 24px; }
.video { aspect-ratio: 16 / 9; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--muted); }
.video iframe { width: 100%; height: 100%; border: 0; }
.unit-page .lead { margin-top: 32px; }
.unit-body { margin-top: 32px; }
.unit-actions { margin-top: 32px; }
.unit-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); }

/* ---- Schedule: a list, not a month grid ---- */
.schedule-month { margin-bottom: 40px; }
.schedule-month > .eyebrow { display: block; margin-bottom: 8px; }
.schedule-item { display: grid; grid-template-columns: 140px minmax(0, 1fr) auto; gap: 24px; align-items: center;
                 padding: 16px 0; border-top: 1px solid var(--border); }
.schedule-item:last-child { border-bottom: 1px solid var(--border); }
.schedule-item h3 { margin: 0; font: 400 19px/1.3 "Latin Modern Roman 12", var(--font-serif); color: var(--primary); }
.schedule-item p { margin: 4px 0 0; font-size: 14px; color: var(--muted-foreground); }
.schedule-item .when { font: 400 14px/1.4 var(--font-mono); color: var(--foreground); }
.schedule-item .when small { display: block; color: var(--muted-foreground); font-size: 12px; }
@media (max-width: 700px) { .schedule-item { grid-template-columns: 1fr; gap: 6px; } }

/* ---- Labels on badges: Latin Modern small caps, as in print (\badge{}) ---- */
.badge { font-family: "Latin Modern Roman Caps", var(--font-serif); font-weight: 400; font-size: 13px; letter-spacing: .08em; text-transform: lowercase; }

/* ---- Lesson content: the handout components on screen (same names as in ki-leadership.cls) ---- */
.callout, .caution { border-radius: 0 var(--radius) var(--radius) 0; padding: 16px 20px; font-size: 15px; font-family: var(--font-sans); }
.callout { background: var(--brand-soft); border-left: 2px solid var(--brand); }
.callout .eyebrow { color: var(--brand); }
.caution { background: var(--warning-soft); border-left: 2px solid var(--warning); }
.caution .eyebrow { color: var(--warning); }
.callout p, .caution p { margin: 4px 0 0; }
.prompt { position: relative; background: var(--muted); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; }
.prompt pre { margin: 8px 0 0; white-space: pre-wrap; font: 400 13px/1.7 var(--font-mono); color: var(--foreground); }
.prompt .btn { position: absolute; top: 10px; right: 10px; }
.pullquote { border-left: 1.5px solid var(--brand); padding: 4px 0 4px 24px; margin: 0; max-width: 760px;
             font: italic 400 28px/1.35 "Latin Modern Roman 12", var(--font-serif); color: var(--primary); }
.pullquote cite { display: block; margin-top: 12px; font-style: normal; }
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 40px 1fr; padding: 14px 0; border-top: 1px solid var(--border); }
.steps li::before { content: counter(step) "."; font: 700 16px/1.5 var(--font-serif); color: var(--brand); }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; gap: 12px; align-items: center; padding: 6px 0; font-size: 15px; }
.checklist input { width: 16px; height: 16px; accent-color: var(--brand); margin: 0; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; font-family: var(--font-sans); }
.data-table th { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--primary); }
.data-table td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose .callout, .prose .caution, .prose .prompt, .prose .steps, .prose .checklist, .prose .data-table, .prose .pullquote { margin: 1.5em 0; }

/* ---- Window frame for product shots and page previews ---- */
.frame { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--card); }
.frame-bar { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-bottom: 1px solid var(--border); background: var(--muted); }
.frame-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.frame-bar span { margin-left: 12px; font: 400 12px var(--font-mono); color: var(--muted-foreground); }
.frame-body { background: var(--background); }

/* ---- Empty state ---- */
.empty { padding: 32px; border: 1px dashed var(--border); border-radius: var(--radius); color: var(--muted-foreground); font-size: 14px; text-align: center; }
