/* =====================================================================
   IntelliLabs AI — inner-page building blocks
   Page hero, topic lists, steps, level track, learning wheel, launch
   timeline, project explorer, circuit, FAQ, channels, call-to-action.
   ===================================================================== */

/* ---------- Page hero ------------------------------------------------ */
.page-hero { position: relative; isolation: isolate; overflow: hidden; background: var(--navy-950); color: var(--on-dark); }
.page-hero::before {
  content: ""; position: absolute; inset: auto -10% -40% -10%; height: 90%; z-index: -1;
  background: radial-gradient(55% 60% at 78% 55%, rgba(31, 91, 255, 0.3), transparent 70%),
              radial-gradient(35% 45% at 92% 80%, rgba(240, 60, 203, 0.16), transparent 70%);
}
.page-hero__grid {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.7fr); gap: 32px clamp(24px, 4vw, 64px); align-items: center;
  padding-block: clamp(36px, 5vw, 68px) clamp(88px, 10vw, 140px);
}
.page-hero--plain .page-hero__grid { grid-template-columns: minmax(0, 1fr); }
.page-hero__copy { display: grid; gap: 22px; justify-items: start; max-width: 780px; min-width: 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: var(--fs-small); color: var(--on-dark-soft); }
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { color: var(--on-dark); text-decoration: underline; text-underline-offset: 4px; }
.page-hero h1 { font-size: var(--fs-h1); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
.page-hero .formula { color: var(--on-dark); font-size: clamp(0.82rem, 0.7rem + 0.45vw, 1.02rem); --accent: var(--hero-accent, var(--cyan)); }
.page-hero__lead { font-size: var(--fs-lead); color: var(--on-dark-soft); max-width: 58ch; }
.page-hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.page-hero__wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: clamp(32px, 5vw, 72px); color: var(--paper); }
.page-hero--to-mist .page-hero__wave { color: var(--mist); }
.page-hero--flush .page-hero__grid { padding-bottom: 0; }
.page-hero--ai { --hero-accent: var(--cyan); }
.page-hero--robotics { --hero-accent: #7fa6ff; }
.page-hero--studio { --hero-accent: #b79bff; }
.page-hero--launchpad { --hero-accent: #ff7ddf; }

.page-hero__art { position: relative; width: 100%; max-width: 330px; aspect-ratio: 1 / 1; justify-self: center; display: grid; place-items: center; color: var(--hero-accent, var(--cyan)); }
.page-hero__art::before, .page-hero__art::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid currentColor; opacity: 0.22; }
.page-hero__art::after { inset: 15%; border-style: dashed; opacity: 0.45; animation: spin 70s linear infinite; }
.page-hero__art svg { width: 44%; height: 44%; overflow: visible; filter: drop-shadow(0 0 16px currentColor); }
.page-hero__art svg * { vector-effect: non-scaling-stroke; }
.page-hero__orbit { position: absolute; inset: 0; animation: spin 20s linear infinite; }
.page-hero__orbit::before { content: ""; position: absolute; top: -6px; left: calc(50% - 6px); width: 12px; height: 12px; border-radius: 50%; background: var(--magenta); box-shadow: 0 0 16px var(--magenta); }
.page-hero__orbit--inner { inset: 15%; animation-duration: 13s; animation-direction: reverse; }
.page-hero__orbit--inner::before { background: var(--cyan); box-shadow: 0 0 16px var(--cyan); width: 9px; height: 9px; top: -5px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 820px) {
  .page-hero__grid { grid-template-columns: minmax(0, 1fr); }
  .page-hero__art { display: none; }
}

/* ---------- Generic layout helpers ------------------------------------ */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.split__head { display: grid; gap: 20px; justify-items: start; }
.split__head h2 { font-size: var(--fs-h2); font-weight: 700; }
.split__head > p:not(.eyebrow) { color: var(--ink-soft); max-width: 52ch; }
.section--navy .split__head > p:not(.eyebrow) { color: var(--on-dark-soft); }
@media (min-width: 901px) { .split__head--sticky { position: sticky; top: calc(var(--header-h) + 32px); } }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); } }

.prose { display: grid; gap: 1.15em; max-width: 68ch; font-size: 1.125rem; }
.prose p { color: var(--ink-soft); }
.prose .lede { font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.45rem); color: var(--ink); font-weight: 500; line-height: 1.5; }
.prose h2 { font-size: var(--fs-h3); font-weight: 700; margin-top: 0.6em; }
.note-line { font-size: var(--fs-small); color: var(--ink-soft); max-width: 70ch; margin-top: clamp(24px, 3vw, 40px); }

/* pipe-bullet lists */
.ticks { display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 20px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.42em; width: 3px; height: 0.9em; border-radius: 2px; background: var(--accent, var(--blue)); }
.ticks--cols { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 32px; }
.ticks--strong li { font-weight: 500; }

.link-list { display: grid; gap: 2px; justify-items: start; }

.tags { display: flex; flex-wrap: wrap; gap: 10px; }
.tags li { padding: 9px 18px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--paper); font-family: var(--font-display); font-size: 0.925rem; font-weight: 500; }

/* tags that are links */
.tags--links li { padding: 0; transition: border-color 0.2s, color 0.2s; }
.tags--links li:hover { border-color: var(--blue); color: var(--blue-deep); }
.tags--links a { display: block; padding: 9px 18px; border-radius: 999px; text-decoration: none; }
.page-hero--flush + .section { padding-top: clamp(40px, 5vw, 64px); }

/* large single-line rows */
.rows { display: grid; }
.rows li { padding-block: 18px; border-top: 1px solid var(--line); font-family: var(--font-display); font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem); font-weight: 500; line-height: 1.35; }
.rows li:last-child { border-bottom: 1px solid var(--line); }
.section--navy .rows li { border-color: var(--on-dark-line); }

/* ---------- Topic groups ---------------------------------------------- */
.topics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.2vw, 28px); }
.topic { display: grid; gap: 18px; align-content: start; padding: clamp(22px, 3vw, 38px); border-radius: var(--r-lg); background: var(--paper); border: 1.5px solid var(--line); min-width: 0; }
.section--mist .topic { border-color: transparent; }
.topic h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: var(--fs-h3); font-weight: 700; }
.topic > p { color: var(--ink-soft); font-size: var(--fs-small); }
.topic:nth-child(4n + 1) { --accent: var(--cyan-deep); }
.topic:nth-child(4n + 2) { --accent: var(--blue); }
.topic:nth-child(4n + 3) { --accent: var(--purple-deep); }
.topic:nth-child(4n + 4) { --accent: var(--magenta-deep); }
.topic__letter { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--accent); color: #fff; font-size: 1rem; }
.topics--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 960px) { .topics--3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .topics { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Steps (real sequences only) ------------------------------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 28px clamp(16px, 2vw, 28px); counter-reset: step; }
.step { display: grid; gap: 8px; align-content: start; padding-top: 16px; border-top: 3px solid var(--line); counter-increment: step; }
.step::before { content: counter(step, decimal-leading-zero); font-family: var(--font-display); font-size: var(--fs-label); font-weight: 700; letter-spacing: 0.14em; color: var(--blue-deep); }
.step h3 { font-size: 1.1rem; font-weight: 700; }
.step p { font-size: var(--fs-small); color: var(--ink-soft); }
.section--navy .step { border-color: var(--on-dark-line); }
.section--navy .step::before { color: var(--cyan); }
.section--navy .step p { color: var(--on-dark-soft); }

/* ---------- Level track (uses the journey rail) ------------------------ */
.level__motto { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 14px; font-family: var(--font-display); font-size: var(--fs-label); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue-deep); }
.level__motto span + span::before { content: "•"; margin-right: 12px; color: var(--magenta); }
.journey__stop small { font-size: 0.72em; letter-spacing: 0.14em; color: var(--ink-soft); font-weight: 600; }

/* ---------- Workshops and events --------------------------------------- */
.workshops { display: grid; grid-template-columns: repeat(auto-fit, minmax(235px, 1fr)); gap: 16px; }
.workshop { display: grid; gap: 10px; align-content: start; padding: 24px; border-radius: var(--r-md); background: var(--paper); border: 1.5px solid var(--line); }
.workshop__ages { font-family: var(--font-display); font-size: var(--fs-label); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cyan-deep); }
.workshop h3 { font-size: 1.3rem; font-weight: 700; }
.workshop p { font-size: var(--fs-small); color: var(--ink-soft); }
.workshop .link-arrow { justify-self: start; }
.events { display: grid; gap: 12px; }
.event { display: grid; gap: 4px; padding: 20px 24px; border-radius: var(--r-md); background: var(--paper); border: 1.5px solid var(--line); }
.event strong { font-family: var(--font-display); font-size: 1.15rem; }
.event span { font-size: var(--fs-small); color: var(--ink-soft); }
.events__empty { padding: 24px; border-radius: var(--r-md); border: 1.5px dashed #b4c0e6; color: var(--ink-soft); }

/* ---------- Learning cycle wheel --------------------------------------- */
.cycle { position: relative; width: 100%; max-width: 560px; aspect-ratio: 1 / 1; margin-inline: auto; }
.cycle::before { content: ""; position: absolute; inset: 8%; border-radius: 50%; border: 2px dashed #b4c0e6; }
.cycle__tabs { position: absolute; inset: 0; }
.cycle__tab {
  position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); width: 118px;
  display: grid; justify-items: center; gap: 8px; padding: 0; border: 0; background: none; text-align: center;
  font-family: var(--font-display); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft);
}
.cycle__tab::before {
  content: attr(data-n); display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%;
  background: var(--paper); border: 3px solid var(--line); font-size: 1.05rem; letter-spacing: 0; color: var(--ink);
  transition: background-color 0.3s, border-color 0.3s, color 0.3s, box-shadow 0.3s, transform 0.3s var(--ease);
}
.cycle__tab span { background: var(--mist); padding: 2px 6px; border-radius: 6px; }
.cycle__tab:hover::before, .cycle__tab.is-done::before { border-color: var(--blue); }
.cycle__tab[aria-selected="true"] { color: var(--ink); }
.cycle__tab[aria-selected="true"]::before { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 0 0 7px rgba(31, 91, 255, 0.18); transform: scale(1.08); }
.cycle__panels { position: absolute; inset: 26%; display: grid; place-items: center; text-align: center; }
.cycle__panel { display: grid; gap: 10px; }
.cycle__panel h3 { font-size: clamp(1.3rem, 1rem + 1.2vw, 1.8rem); font-weight: 700; }
.cycle__panel p { font-size: var(--fs-small); color: var(--ink-soft); }
@media (max-width: 620px) {
  .cycle { aspect-ratio: auto; max-width: none; }
  .cycle::before { display: none; }
  .cycle__tabs { position: static; display: flex; flex-wrap: wrap; gap: 8px; }
  .cycle__tab { position: static; transform: none; width: auto; grid-auto-flow: column; align-items: center; padding: 5px 14px 5px 5px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper); }
  .cycle__tab::before { width: 32px; height: 32px; font-size: 0.9rem; border-width: 2px; }
  .cycle__tab span { background: none; padding: 0; }
  .cycle__panels { position: static; margin-top: 18px; padding: 22px; place-items: start; text-align: left; background: var(--mist); border-radius: var(--r-md); }
}

/* ---------- Launch timeline (fills as the page scrolls) ---------------- */
.pipeline { --p: 0; position: relative; display: grid; padding-left: 58px; }
.pipeline::before, .pipeline::after { content: ""; position: absolute; left: 19px; top: 10px; width: 4px; border-radius: 4px; }
.pipeline::before { bottom: 44px; background: var(--line); }
.pipeline::after { height: calc((100% - 54px) * var(--p)); background: linear-gradient(var(--blue), var(--purple) 60%, var(--magenta)); }
.pipeline__marker { position: absolute; left: 21px; top: calc(10px + (100% - 54px) * var(--p)); width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; background: var(--paper); border: 3px solid var(--magenta); box-shadow: 0 0 0 6px rgba(240, 60, 203, 0.16); z-index: 2; display: grid; place-items: center; color: var(--magenta-deep); }
.pipeline__marker svg { width: 16px; height: 16px; }
.stage { position: relative; display: grid; gap: 6px; padding-bottom: 34px; }
.stage::before { content: ""; position: absolute; left: -47px; top: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--paper); border: 3px solid var(--line); z-index: 1; transition: background-color 0.4s, border-color 0.4s; }
.stage.is-reached::before { background: var(--blue); border-color: var(--blue); }
.stage h3 { font-size: 1rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); transition: color 0.4s; }
.stage.is-reached h3 { color: var(--ink); }
.stage p { color: var(--ink-soft); max-width: 54ch; }
.pipeline:not(.is-live) .stage h3 { color: var(--ink); }

/* ---------- Project explorer ------------------------------------------- */
.filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.filter__btn { padding: 9px 20px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--paper); font-family: var(--font-display); font-size: 0.925rem; font-weight: 600; transition: background-color 0.2s, color 0.2s, border-color 0.2s; }
.filter__btn:hover { border-color: var(--ink); }
.filter__btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 14px; }
.project { display: grid; gap: 6px; align-content: start; padding: 18px 20px; border-radius: var(--r-md); background: var(--paper); border: 1.5px solid var(--line); }
.project small { font-family: var(--font-display); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cyan-deep); }
.project[data-age="older"] small { color: var(--purple-deep); }
.project strong { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; line-height: 1.3; }

/* ---------- Try-it circuit ---------------------------------------------- */
.circuit { display: grid; gap: 18px; padding: clamp(20px, 3vw, 36px); border-radius: var(--r-lg); background: var(--navy-950); color: var(--on-dark); }
.circuit svg { width: 100%; height: auto; }
.circuit__wire { fill: none; stroke: #5a6aa8; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.circuit__flow { fill: none; stroke: var(--cyan); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 2 16; opacity: 0; transition: opacity 0.3s; }
.circuit__lever { stroke: var(--on-dark); stroke-width: 5; stroke-linecap: round; transform-origin: 150px 44px; transform: rotate(-32deg); transition: transform 0.3s var(--ease); }
.circuit__switch { cursor: pointer; }
.circuit__glow { opacity: 0; transition: opacity 0.35s; }
.circuit__led { fill: #2a356b; stroke: #8f9bc8; stroke-width: 3; transition: fill 0.3s, stroke 0.3s; }
.circuit__label { fill: var(--on-dark-soft); font-family: var(--font-display); font-size: 13px; font-weight: 600; letter-spacing: 0.12em; }
.circuit.is-on .circuit__lever { transform: rotate(0deg); }
.circuit.is-on .circuit__flow { opacity: 1; animation: flow 0.9s linear infinite; }
.circuit.is-on .circuit__glow { opacity: 1; }
.circuit.is-on .circuit__led { fill: var(--magenta); stroke: #ffd0f4; }
@keyframes flow { to { stroke-dashoffset: -18; } }
@media (max-width: 620px) { .circuit__label { font-size: 19px; } }
.circuit__controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.circuit__status { font-size: var(--fs-small); color: var(--on-dark-soft); min-width: 0; flex: 1 1 240px; }

/* ---------- FAQ ----------------------------------------------------------- */
.faq-tools { display: grid; gap: 8px; max-width: 520px; margin-bottom: 28px; }
.faq { display: grid; gap: 10px; max-width: 880px; }
.faq details { border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--paper); transition: border-color 0.2s; }
.faq details[open] { border-color: var(--blue); }
.faq summary { position: relative; list-style: none; cursor: pointer; padding: 20px 60px 20px 24px; font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; line-height: 1.35; border-radius: var(--r-md); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after { content: ""; position: absolute; right: 24px; top: 50%; width: 16px; height: 2.5px; margin-top: -1px; border-radius: 2px; background: var(--blue-deep); transition: transform 0.25s var(--ease); }
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq__answer { padding: 0 24px 22px; color: var(--ink-soft); max-width: 70ch; }
.faq__answer a { color: var(--blue-deep); font-weight: 600; }
.faq__none { color: var(--ink-soft); }

/* ---------- Channels (social) --------------------------------------------- */
.channels { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.channel { display: grid; gap: 14px; align-content: start; padding: 26px; border-radius: var(--r-md); background: var(--paper); border: 1.5px solid var(--line); }
.channel h3 { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; font-weight: 700; }
.channel h3 svg { width: 24px; height: 24px; color: var(--blue-deep); }
.channel .ticks { font-size: var(--fs-small); color: var(--ink-soft); gap: 8px; }

/* ---------- Big statements ------------------------------------------------- */
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 64px); }
.duo > div { display: grid; gap: 16px; align-content: start; padding-top: 22px; border-top: 3px solid var(--cyan); }
.duo > div + div { border-color: var(--magenta); }
.duo h2 { font-size: var(--fs-label); font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); }
.duo .pull { font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); }
.duo p:not(.pull) { color: var(--ink-soft); }
.section--navy .duo h2, .section--navy .duo p:not(.pull) { color: var(--on-dark-soft); }
@media (max-width: 760px) { .duo { grid-template-columns: minmax(0, 1fr); } }

.belief { display: grid; gap: 20px; max-width: 900px; }
.belief .pull { font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.5rem); }
.section--navy .pull em { color: var(--cyan); }
.belief .hand { color: var(--note); font-size: 1.35rem; }

.deflist { display: grid; }
.deflist > div { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 6px 32px; padding-block: 20px; border-top: 1px solid var(--line); }
.deflist dt { font-family: var(--font-display); font-size: 0.95rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.deflist dd { margin: 0; color: var(--ink-soft); }
@media (max-width: 620px) { .deflist > div { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Call-to-action band --------------------------------------------- */
.cta-band { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: center; }
.cta-band h2 { font-size: var(--fs-h2); font-weight: 700; max-width: 20ch; }
.cta-band p { color: var(--on-dark-soft); margin-top: 14px; max-width: 56ch; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 820px) { .cta-band { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Founder story page ----------------------------------------------- */
.story { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
@media (min-width: 901px) { .story .founder__photos { position: sticky; top: calc(var(--header-h) + 32px); } }
@media (max-width: 900px) { .story { grid-template-columns: minmax(0, 1fr); } .story .founder__photos { max-width: 360px; } }

/* ---------- Not found ---------------------------------------------------------- */
.notfound { display: grid; gap: 22px; justify-items: start; padding-block: clamp(64px, 10vw, 140px); }
.notfound h1 { font-size: var(--fs-h1); font-weight: 700; letter-spacing: -0.03em; }
.notfound p { font-size: var(--fs-lead); color: var(--on-dark-soft); max-width: 52ch; }
