/* The homepage (index.html). Builds on style.css and pages.css.
   Animations are done with GSAP in js/pages/home.js; this file sets the
   starting looks. */

.home main { width: 100%; }
.home .page-foot { margin-top: 80px; }
html:has(body.home) { scroll-padding-top: 60px; }

.btn.big { padding: 11px 18px; font-size: 13.5px; border-radius: 10px; }
.btn { transition: background 0.12s, border-color 0.12s, transform 0.15s, box-shadow 0.15s; }
.btn.big:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(30, 40, 60, 0.1); }
.btn.primary.big:hover:not(:disabled) { box-shadow: 0 10px 24px rgba(76, 151, 255, 0.35); }
.home-top .topbar-right { align-items: center; }

.kicker { display: inline-block; font-size: 11.5px; font-weight: 700; color: var(--blue-d); letter-spacing: 0.04em; margin-bottom: 10px; }
.home h2 { font-size: 24px; line-height: 1.3; letter-spacing: -0.01em; margin: 0; }
.home h3 { font-size: 14px; margin: 0 0 6px; }

/* things GSAP animates in start hidden (only when scripts run) */
.js [data-hero], .js [data-up] { visibility: hidden; }

/* ---------- hero ---------- */

/* fills the first screen exactly (between the top bar and the credit bar), so
   the walkthrough starts just below it */
.hero {
  --top-bar: 52px;
  --credit-bar: 35px;
  position: relative;
  max-width: 1240px;
  min-height: calc(100vh - var(--top-bar) - var(--credit-bar));
  margin: 0 auto;
  padding: 40px 32px 70px;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 56px;
  align-items: center;
}
.hero-text { display: flex; flex-direction: column; align-items: flex-start; }
.hero h1 { font-size: 40px; line-height: 1.2; letter-spacing: -0.02em; margin: 22px 0 18px; }
.hero h1 em { font-style: normal; color: var(--blue-d); }
.lead { font-size: 14.5px; line-height: 1.75; color: #5b6275; margin: 0 0 28px; max-width: 36em; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 10px; }

/* who made it: the first thing in the hero */
.uoft-badge {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin: 0;
  padding: 6px 16px 6px 6px;
  border: 1px solid #dfe3ea;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(30, 40, 60, 0.07);
  font-size: 13px;
  color: #3b4252;
}
.uoft-badge b { color: var(--ink); font-weight: 700; }
.uoft-icon { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #eef5ff; color: var(--blue-d); flex: none; }
.uoft-icon svg { width: 18px; height: 18px; }
.hero .scroll-cue { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); margin: 0; }

/* blocks in, Python out */
.hero-demo { display: flex; flex-direction: column; }
.convert-card {
  border: 1px solid #dfe3ea;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(30, 40, 60, 0.1);
  overflow: hidden;
}
.convert-label { display: flex; align-items: center; gap: 9px; font-size: 11.5px; font-weight: 600; color: #5b6275; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fbfcfd; }
.convert-label .logo { width: 14px; height: 14px; }
.convert-dest { margin-left: auto; font-weight: 500; color: var(--muted); }
.py-badge { font-size: 10px; font-weight: 700; color: var(--blue-d); background: #eef5ff; border: 1px solid #b9d3ff; border-radius: 5px; padding: 1px 5px; }
.convert-blocks {
  position: relative;
  height: 236px;
  background: radial-gradient(circle, #dde2ea 1px, transparent 1.2px) 0 0 / 18px 18px, #fff;
}
.convert-blocks .stack { left: 20px; top: 18px; transform-origin: 0 0; pointer-events: none; }
.convert-blocks .block { cursor: default; }
.convert-arrow { display: flex; align-items: center; gap: 10px; padding: 10px 24px; color: var(--muted); font-size: 11px; }
.convert-line { flex: 1; height: 1px; background: repeating-linear-gradient(90deg, #cfd5df 0 6px, transparent 6px 11px); }
.convert-note { display: inline-flex; align-items: center; gap: 6px; }
.convert-note::after { content: "↓"; color: var(--blue-d); font-weight: 700; }
.convert-card.code pre { margin: 0; padding: 12px 16px 14px; height: 168px; font: 11.5px/1.7 var(--mono); color: #3b4252; white-space: pre; overflow: hidden; background: var(--soft); }
.convert-card.code .line { display: block; border-radius: 4px; }
.convert-card.code .muted-line { color: #a0a8b5; }
.py-fn { color: var(--blue-d); }
.py-num { color: #b7791f; }
.py-str { color: #2f8a3a; }
.py-kw { color: #9966ff; font-weight: 600; }

/* "See How It Works" and "Skip the Demo": the same small pill */
.scroll-cue {
  font-size: 12px;
  color: var(--muted) !important;
  text-decoration: none;
  white-space: nowrap;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  transition: color 0.15s, border-color 0.15s;
}
.scroll-cue span { display: inline-block; margin-left: 4px; }
.scroll-cue:hover { color: var(--ink) !important; border-color: #cfd5df; }
.skip-demo {
  position: fixed;
  left: 50%;
  bottom: 49px; /* just above the credit bar */
  transform: translateX(-50%);
  z-index: 55;
  visibility: hidden; /* GSAP shows it while the walkthrough is pinned */
  opacity: 0;
}
.walk.static ~ .skip-demo { display: none; }

/* ---------- the walkthrough ---------- */

.walk { position: relative; background: linear-gradient(#fff, var(--soft) 18%, var(--soft) 80%, #fff); }
/* only as tall as the copy of the builder: it's pinned while centred on screen,
   and once it lets go, the next section follows straight after */
.walk-inner {
  max-width: 1560px;
  margin: 0 auto;
  padding: 24px 40px;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 44px;
  align-items: center;
}
.walk-text { position: relative; display: flex; flex-direction: column; gap: 26px; }
.walk-progress { list-style: none; margin: 0; padding: 0; display: flex; gap: 5px; }
.walk-progress li { flex: 1; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.walk-progress li i { display: block; height: 100%; width: 100%; background: var(--blue); transform-origin: left; transform: scaleX(0); }
.walk-steps { position: relative; min-height: 250px; }
.walk-step { position: absolute; inset: 0 0 auto 0; }
.walk-step .n { font-size: 12px; font-weight: 700; color: var(--c, var(--blue-d)); letter-spacing: 0.04em; }
.walk-step h2 { margin: 10px 0 14px; font-size: 26px; }
.walk-step p { margin: 0; color: #5b6275; line-height: 1.75; font-size: 13.5px; }
.walk-nav { display: flex; align-items: center; gap: 12px; }
.walk-nav .btn { padding: 9px 16px; }
.walk-nav .muted { font-size: 11.5px; }
.walk.static .walk-nav { display: none; }
.walk-stage { position: relative; }
.walk-try {
  margin: 0;
  align-self: flex-start;
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 12.5px;
  color: #3b4252;
  background: #eef5ff;
  border: 1px solid #b9d3ff;
  border-radius: 10px;
  padding: 9px 12px;
  visibility: hidden;
}
.walk-try b { color: var(--blue-d); white-space: nowrap; }
.walk.static .walk-try { display: none; }
.mock-fit { position: absolute; left: 0; top: 0; transform-origin: 0 0; }

/* phones, small windows and "reduce motion": no pinning, every step listed */
.walk.static .walk-inner { grid-template-columns: minmax(0, 1fr); padding: 60px 24px; }
.walk.static .walk-progress { display: none; }
.walk.static .walk-steps { min-height: 0; display: grid; gap: 28px; }
.walk.static .walk-step { position: static; }
.walk.static .mock-fit { position: relative; top: 0; }

/* ---------- a copy of the builder (fixed size, scaled to fit) ---------- */

.mock {
  position: relative;
  width: 1360px;
  height: 740px;
  background: #fff;
  border: 1px solid #dfe3ea;
  border-radius: 16px;
  box-shadow: 0 40px 90px rgba(30, 40, 60, 0.16), 0 2px 6px rgba(30, 40, 60, 0.05);
  overflow: hidden;
  font: 13px/1.45 var(--mono);
  color: var(--ink);
  text-align: left;
  user-select: none;
}
.mock * { pointer-events: none; }
/* "Try it": only what the current step showed can be used */
.mock .m-live { pointer-events: auto; }
.mock .m-live[data-cursor="grab"] { cursor: grab; }
.mock .m-live[data-cursor="pointer"] { cursor: pointer; }
.mock .m-grabbing, .mock .m-grabbing * { cursor: grabbing !important; }
.mock .m-live.block:hover { filter: brightness(1.04); }
.mock .slot.m-live:hover { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(76, 151, 255, 0.15); }
/* !important: GSAP writes translate: none on elements it animates, and this
   offset (the visitor's own moves) has to sit on top of the walkthrough's */
.m-drag { translate: var(--ux, 0px) var(--uy, 0px) !important; }
.m-pan { position: absolute; inset: 0; transform-origin: 0 0; }
.m-try-ghost { position: absolute; left: 0; top: 0; z-index: 45; opacity: 0; pointer-events: none; filter: drop-shadow(0 12px 18px rgba(30, 40, 60, 0.25)); }
.m-try-marker { position: absolute; left: 0; top: 0; z-index: 44; opacity: 0; }
.mock .m-item.m-live:hover .block { filter: brightness(1.05); }
.m-search-live {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  padding: 7px 10px;
  font: 12px var(--mono);
  color: var(--ink);
  outline: none;
}
.m-input:has(.m-search-live:focus) { border-color: var(--blue); background: #fff; }
.m-top { height: 52px; display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.m-top .brand > span:last-child { display: inline; }
.m-name { font-weight: 600; padding: 5px 9px; }
.m-top .actions { flex: 1; }
.m-top .btn { padding: 6px 9px; }
.m-right { display: flex; align-items: center; gap: 14px; }
.m-body { position: absolute; top: 52px; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 64px 320px minmax(0, 1fr) 300px; }

.m-rail { width: 64px; }
.m-rail .cat { width: 100%; }
.m-palette { border-right: 1px solid var(--line); padding: 6px 12px; overflow: hidden; }
.m-palette .pal-search { position: static; margin: 0; padding: 8px 0 4px; }
.m-input {
  display: block;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  background: var(--soft);
  font-size: 12px;
  height: 32px;
  white-space: nowrap;
}
.m-input.focus { border-color: var(--blue); background: #fff; }
.m-ph { color: #a7adba; position: absolute; left: 10px; top: 7px; }
.m-caret { display: inline-block; width: 1px; height: 14px; background: var(--ink); vertical-align: -2px; margin-left: 1px; opacity: 0; }
.m-input.focus .m-caret { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 1; } }
.m-palette h3 { display: flex; align-items: center; gap: 8px; font-size: 12.5px; margin: 12px 0 9px; overflow: hidden; }
.m-palette h3 .dot { width: 10px; height: 10px; border-radius: 50%; }
.m-palette .pal-item { margin: 0 0 10px; overflow: hidden; }
.m-palette .pal-item.found .block { filter: drop-shadow(0 0 0 rgba(76, 151, 255, 0)); }

.m-ws {
  position: relative;
  overflow: hidden;
  background-color: #fff;
  background-image: radial-gradient(#dfe3eb 1px, transparent 1.2px);
  background-size: 24px 24px;
}
.m-canvas { position: absolute; left: 0; top: 0; width: 1600px; height: 1200px; transform-origin: 0 0; }
.m-canvas .stack { left: 20px; top: 26px; }
.m-canvas .note { left: 40px; top: 352px; width: 250px; height: 92px; }
.m-note-text { padding: 6px 10px; font-size: 12px; color: #5b5320; line-height: 1.5; }
.m-ws .ws-zoom { right: 18px; bottom: 18px; }
.ws-zoom .btn-z { min-width: 30px; height: 28px; display: grid; place-items: center; font-size: 12px; border-radius: 6px; padding: 0 4px; }
.m-ws .drop-marker { position: absolute; width: 230px; opacity: 0; }

.m-side { display: flex; flex-direction: column; border-left: 1px solid var(--line); min-height: 0; }
.m-side .tabs { flex: none; }
.m-panels { position: relative; flex: 1; min-height: 0; }
.m-panel { position: absolute; inset: 0; padding: 14px; overflow: hidden; }
.m-panel .deck { padding: 10px 10px 10px 6px; gap: 6px; }
.m-panel .slot { padding: 14px 6px 6px; gap: 2px; }
.m-panel .slot .trash-icon svg { width: 24px; height: 24px; }
.m-panel .slot-id { font-size: 9.5px; top: 3px; left: 5px; }
.m-slotwrap { position: relative; min-width: 0; }
.m-slotwrap > .slot.placed { position: absolute; inset: 0; aspect-ratio: auto; border-style: solid; border-color: #d8dde6; opacity: 0; }
.m-liquids { margin-top: 14px; }
.m-liquids .panel-h { margin: 0 0 8px; }
.m-liquid { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 12px; }
.m-liquid i { width: 12px; height: 12px; border-radius: 4px; background: #4c97ff; flex: none; }
.m-liquid span { color: var(--muted); font-size: 11px; margin-left: auto; }
.m-side .credit { flex: none; }

.m-checks .checks li { font-size: 12px; }
.m-checks .checks-ok { padding: 30px 6px; }
.m-preview .estimate { padding: 10px 12px; margin-bottom: 12px; }
.m-preview .est-row { grid-template-columns: 6.5em 1fr; font-size: 11.5px; padding: 4px 0; }
.m-preview .mini-deck { width: 100%; padding: 6px; gap: 5px; }
.m-pdeck { position: relative; }
.m-head {
  position: absolute;
  left: 0;
  top: 0;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: 1.6px solid var(--blue-d);
  box-shadow: 0 0 0 4px rgba(76, 151, 255, 0.18);
}
.m-head b { position: absolute; left: 15px; top: -14px; font-size: 9px; color: var(--ink); white-space: nowrap; }
.m-caption { margin-top: 10px; font-size: 11.5px; line-height: 1.5; min-height: 3em; }
.m-caption .muted { display: block; font-size: 10.5px; }

/* pop-ups inside the copy */
.mock .popover { position: absolute; opacity: 0; z-index: 40; }
.mock .well-grid { --cell: 14px; }
.m-dim { position: absolute; inset: 0; background: rgba(40, 48, 64, 0.25); opacity: 0; z-index: 40; }
.m-dialog {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 440px;
  margin: -110px 0 0 -220px;
  background: #fff;
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 0 20px 60px rgba(30, 40, 60, 0.25);
  opacity: 0;
  z-index: 41;
}
.m-dialog h2 { font-size: 15px !important; margin: 0 0 12px !important; }
.m-dialog p { margin: 0 0 10px; font-size: 12.5px; }
.m-dialog .share-row { display: flex; gap: 8px; }
.m-dialog .share-link { flex: 1; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font-size: 11.5px; color: var(--muted); background: var(--soft); overflow: hidden; white-space: nowrap; }
.m-download {
  position: absolute;
  right: 16px;
  top: 62px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px 10px 10px;
  box-shadow: 0 14px 34px rgba(30, 40, 60, 0.16);
  opacity: 0;
  z-index: 42;
}
.m-download .file { width: 34px; height: 40px; border-radius: 6px; background: #eef5ff; border: 1px solid #b9d3ff; color: var(--blue-d); font-weight: 700; font-size: 11px; display: grid; place-items: center; }
.m-download b { display: block; font-size: 12.5px; }
.m-download span { font-size: 11px; color: var(--muted); }
.m-ghost { position: absolute; left: 0; top: 0; z-index: 45; opacity: 0; filter: drop-shadow(0 12px 18px rgba(30, 40, 60, 0.25)); }
.m-cursor { position: absolute; left: 0; top: 0; z-index: 60; width: 22px; height: 26px; }
.m-cursor svg { width: 22px; height: 26px; display: block; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.25)); }
.m-ripple { position: absolute; left: 0; top: 0; z-index: 59; width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%; border: 2px solid var(--blue); opacity: 0; }
.m-badge { opacity: 0; }

/* ---------- why ---------- */

.home-section { max-width: 1240px; margin: 0 auto; padding: 96px 32px 0; }
.home-section.narrow { max-width: 760px; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 32px; }
.home-section.why { padding-top: 140px; }
.why-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.why-text p { color: #5b6275; line-height: 1.8; margin: 16px 0 0; }
.why-text h2 { font-size: 28px; }
.why-badge { margin-top: 26px !important; }
.why-cards { display: flex; flex-direction: column; gap: 14px; }
.why-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.why-card:hover { border-color: color-mix(in srgb, var(--c) 40%, white); box-shadow: 0 12px 30px rgba(30, 40, 60, 0.07); }
.why-card i {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-style: normal;
  font-weight: 700;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 13%, white);
}
.why-card p { margin: 0; font-size: 12.5px; color: #5b6275; line-height: 1.65; }

/* questions */
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq details { border: 1px solid var(--line); border-radius: 12px; background: #fff; transition: border-color 0.2s, box-shadow 0.2s; }
.faq details[open] { border-color: #cfd8e6; box-shadow: 0 8px 22px rgba(30, 40, 60, 0.06); }
.faq summary { list-style: none; cursor: pointer; padding: 14px 16px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--blue-d); font-size: 16px; transition: transform 0.25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0; padding: 0 16px 16px; color: #5b6275; line-height: 1.65; }

/* last call: real blocks on the left, lined up the way they snap together */
.cta {
  max-width: 1176px;
  margin: 96px auto 0;
  padding: 44px 48px;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 40px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: radial-gradient(circle, #dde2ea 1px, transparent 1.2px) 0 0 / 18px 18px, var(--soft);
}
.cta-stack { position: relative; height: 220px; }
.cta-stack .stack { left: 0; top: 0; transform-origin: 0 0; }
.cta-stack .block { cursor: default; }
.cta-text p { color: #5b6275; margin: 10px 0 22px; }
.cta-text .hero-ctas { justify-content: flex-start; }

@media (max-width: 1000px) {
  .home-top .page-nav { display: none; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 36px; padding-bottom: 80px; }
  .hero h1 { font-size: 32px; }
  .why-grid, .cta { grid-template-columns: minmax(0, 1fr); }
  .home-section { padding: 72px 16px 0; }
  .cta { margin: 72px 16px 0; padding: 32px 24px; }
}
