/* AI Experience Starter Kit — "The family lab notebook"
   Graph paper, fountain-pen ink, crayon colors, die-cut stickers.
   Sticker = label = training data: the visual system mirrors what the kit teaches. */

:root {
  --paper: #fbfaf4;
  --card: #ffffff;
  --grid: rgba(52, 84, 176, .08);
  --ink: #2b3169;
  --ink-soft: #5c6188;
  --blue: #1f75fe;
  --blue-deep: #1553c4;
  --coral: #ff5349;
  --sun: #ffcb2e;
  --leaf: #1cac78;
  --sticker-shadow: rgba(43, 49, 105, .16);
  --radius: 20px;
  --font-display: 'Fredoka', 'Rubik', 'Arial Hebrew', system-ui, sans-serif;
  --font-body: 'Rubik', 'Segoe UI', 'Arial Hebrew', Tahoma, sans-serif;
  /* marker-drawn button outlines: one sketch box per fill color */
  --sketch-card: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 64' preserveAspectRatio='none'%3E%3Cpath d='M14 7 C60 1 150 6 205 5 C216 6 218 15 214 30 C211 45 219 52 204 58 C152 64 58 59 16 58 C4 57 2 45 7 31 C10 16 3 11 14 7 Z' fill='%23ffffff' stroke='%232b3169' stroke-width='3' stroke-linejoin='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
  --sketch-coral: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 64' preserveAspectRatio='none'%3E%3Cpath d='M14 7 C60 1 150 6 205 5 C216 6 218 15 214 30 C211 45 219 52 204 58 C152 64 58 59 16 58 C4 57 2 45 7 31 C10 16 3 11 14 7 Z' fill='%23ff5349' stroke='%232b3169' stroke-width='3' stroke-linejoin='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
  --sketch-blue: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 64' preserveAspectRatio='none'%3E%3Cpath d='M14 7 C60 1 150 6 205 5 C216 6 218 15 214 30 C211 45 219 52 204 58 C152 64 58 59 16 58 C4 57 2 45 7 31 C10 16 3 11 14 7 Z' fill='%231f75fe' stroke='%232b3169' stroke-width='3' stroke-linejoin='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
  --sketch-sun: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 64' preserveAspectRatio='none'%3E%3Cpath d='M14 7 C60 1 150 6 205 5 C216 6 218 15 214 30 C211 45 219 52 204 58 C152 64 58 59 16 58 C4 57 2 45 7 31 C10 16 3 11 14 7 Z' fill='%23ffcb2e' stroke='%232b3169' stroke-width='3' stroke-linejoin='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
  /* red crayon circle: "circle your answer" — shared by the language switcher and footer stats */
  --crayon-circle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 44' preserveAspectRatio='none'%3E%3Cpath d='M85 8 C62 1 18 4 9 18 C2 30 22 41 52 41 C78 41 95 33 93 20 C91 10 72 4 50 6' fill='none' stroke='%23ff5349' stroke-width='3.5' stroke-linecap='round' opacity='.9'/%3E%3C/svg%3E");
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 26px 26px;
  color: var(--ink);
  line-height: 1.65;
}

::selection { background: var(--sun); color: var(--ink); }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.25; }

.wrap { max-width: 1000px; margin: 0 auto; padding: 0 20px; }

/* Header / hero */
header { padding: 26px 0 64px; position: relative; }
/* washi-tape strip: the kit's four crayons, taped across the top of the page */
header::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 12px;
  background: repeating-linear-gradient(90deg,
    var(--blue) 0 64px, var(--coral) 64px 128px,
    var(--sun) 128px 192px, var(--leaf) 192px 256px);
}

.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.brand {
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
  display: flex; align-items: center; gap: 8px;
}
/* language switcher: circle your answer, like on a worksheet */
.lang-toggle { display: flex; gap: 6px; align-items: center; }
.lang-toggle button {
  border: none; background: transparent; color: var(--ink-soft);
  padding: 7px 13px; cursor: pointer;
  font-size: .92rem; font-weight: 600; font-family: var(--font-body);
}
.lang-toggle button:hover {
  color: var(--blue-deep);
  text-decoration: underline wavy 1.5px;
  text-underline-offset: 5px;
}
.lang-toggle button.active {
  color: var(--ink);
  text-decoration: none;
  background: var(--crayon-circle) center / 100% 100% no-repeat;
}

.hero { text-align: center; padding-top: 48px; }
.robot-icon {
  width: 92px; height: 92px; margin: 0 auto 22px;
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 46px;
  transform: rotate(-6deg);
  box-shadow: 6px 6px 0 var(--sticker-shadow);
}
.hero h1 {
  font-size: clamp(2.1rem, 6vw, 3.3rem);
  letter-spacing: -.5px;
}
.hero .subtitle {
  display: inline-block;
  font-family: var(--font-display); font-weight: 500;
  font-size: 1.2rem; margin: 10px 0 14px;
  padding-inline: 8px;
  background: linear-gradient(transparent 55%, rgba(255, 203, 46, .65) 55% 94%, transparent 94%);
}
.hero .lede { max-width: 620px; margin: 0 auto 30px; font-size: 1.08rem; color: var(--ink-soft); }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* Buttons: a marker-drawn outline (SVG sketch box, stretches with the label) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 30px; text-decoration: none;
  font-family: var(--font-display); font-weight: 600; font-size: 1rem;
  cursor: pointer;
  border: none; background-color: transparent;
  color: var(--ink);
  background-image: var(--sketch-card);
  background-size: 100% 100%; background-repeat: no-repeat;
  transition: transform .15s ease;
}
.btn:hover { transform: rotate(-1.2deg) scale(1.04); }
.btn:active { transform: rotate(-1.2deg) scale(.96); }
.hero-cta .btn:nth-child(even):hover, .quiz-buttons .btn:nth-child(even):hover { transform: rotate(1.2deg) scale(1.04); }
.hero-cta .btn:nth-child(even):active, .quiz-buttons .btn:nth-child(even):active { transform: rotate(1.2deg) scale(.96); }
.btn-primary { background-image: var(--sketch-coral); color: #fff; }
.btn-blue { background-image: var(--sketch-blue); color: #fff; }
.btn-ghost { background-image: var(--sketch-card); color: var(--ink); }

/* Sections */
section { padding: 60px 0; }
.section-title {
  font-size: 2rem; text-align: center;
  width: fit-content; margin: 0 auto 10px; padding-inline: 10px;
  background: linear-gradient(transparent 60%, rgba(255, 203, 46, .55) 60% 92%, transparent 92%);
}
.section-sub { text-align: center; color: var(--ink-soft); max-width: 640px; margin: 0 auto 38px; }

.card {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 8px 8px 0 var(--sticker-shadow);
  padding: 28px;
}

/* Demos */
.demo-tabs { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.demo-tab {
  border: none; background-color: transparent; color: var(--ink);
  background-image: var(--sketch-card);
  background-size: 100% 100%; background-repeat: no-repeat;
  padding: 12px 24px; font-weight: 600; cursor: pointer;
  font-size: .95rem; font-family: var(--font-display);
  transition: transform .15s ease;
}
.demo-tab:hover { transform: rotate(-1deg) scale(1.03); }
.demo-tab:nth-child(even):hover { transform: rotate(1deg) scale(1.03); }
.demo-tab.active { background-image: var(--sketch-sun); }
.demo-panel { display: none; max-width: 720px; margin: 0 auto; }
.demo-panel.active { display: block; animation: fadeIn .3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.demo-panel h3 { font-size: 1.35rem; margin-bottom: 4px; }
.demo-explain { color: var(--ink-soft); font-size: .95rem; margin-bottom: 20px; }

/* Quiz */
.quiz-card-text {
  background: var(--paper); border: 2px dashed var(--ink); border-radius: 14px; padding: 22px;
  font-size: 1.12rem; text-align: center; margin-bottom: 18px; min-height: 96px;
  display: flex; align-items: center; justify-content: center;
}
.quiz-buttons { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.quiz-feedback { margin-top: 16px; padding: 14px 18px; border-radius: 12px; font-size: .95rem; display: none; }
.quiz-feedback.correct { display: block; background: #e7f6ef; border: 2px solid var(--leaf); }
.quiz-feedback.wrong { display: block; background: #ffefed; border: 2px solid var(--coral); }
.quiz-progress { text-align: center; color: var(--ink-soft); font-size: .88rem; margin-bottom: 10px; }
.quiz-score { text-align: center; font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; padding: 12px; }

/* Teach the robot */
.robot-stage { text-align: center; font-size: 2.6rem; margin: 6px 0 2px; }
.robot-says {
  background: var(--paper); border: 2px solid var(--ink); border-radius: 14px; padding: 14px 18px;
  text-align: center; margin-bottom: 16px; font-size: .98rem; min-height: 52px;
}
.train-item { font-size: 2.6rem; text-align: center; margin: 8px 0; }
.bucket-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.bucket {
  border: 2.5px dashed var(--ink); border-radius: 16px;
  padding: 14px 22px; min-width: 130px; text-align: center;
  cursor: pointer; background: var(--card); font-family: var(--font-display);
  font-size: 1rem; font-weight: 600; color: var(--ink);
  transition: background .12s ease, transform .12s ease;
}
.bucket:hover { background: #fff6db; transform: translateY(-2px); }
.bucket .bucket-items { font-size: 1.4rem; min-height: 30px; margin-top: 6px; letter-spacing: 4px; }
.teach-controls { text-align: center; margin-top: 18px; }

/* Prompt builder */
.pb-groups { display: grid; gap: 14px; margin-bottom: 18px; }
.pb-group-label { font-family: var(--font-display); font-weight: 600; font-size: .95rem; margin-bottom: 6px; }
.pb-options { display: flex; gap: 8px; flex-wrap: wrap; }
.pb-opt {
  border: 2px solid var(--ink); background: var(--card); border-radius: 999px;
  padding: 7px 14px; cursor: pointer; font-size: .92rem; font-family: var(--font-body);
  color: var(--ink);
  transition: background .12s ease;
}
.pb-opt:hover { background: var(--paper); }
.pb-opt.selected { background: var(--sun); font-weight: 600; }
/* the one machine-voiced element on the page: the prompt the AI actually reads */
.pb-prompt {
  background: var(--ink); color: #cfe0ff; border-radius: 14px; padding: 14px 18px;
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .92rem; margin-bottom: 16px;
  min-height: 52px;
}
.pb-canvas {
  border: 2px solid var(--ink); border-radius: 14px;
  min-height: 180px; display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 6px; font-size: 3.4rem; transition: background .4s ease;
  background: linear-gradient(160deg, #dfeaf2, #f6fafc);
  position: relative; overflow: hidden;
}
.pb-canvas .pb-scene { display: flex; align-items: center; gap: 6px; }
.pb-canvas .pb-caption { font-size: .85rem; color: rgba(0, 0, 0, .55); background: rgba(255, 255, 255, .65); border-radius: 999px; padding: 3px 12px; }
.pb-tip {
  margin-top: 16px; font-size: .9rem; color: var(--ink);
  background: #fff6db; border: 2px dashed var(--sun); border-radius: 12px; padding: 10px 14px;
}

/* Activities */
.activities-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
details.activity {
  background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius);
  box-shadow: 5px 5px 0 var(--sticker-shadow);
  padding: 0; overflow: hidden;
  transition: transform .12s ease, box-shadow .12s ease;
}
details.activity:not([open]):hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--sticker-shadow); }
details.activity summary {
  list-style: none; cursor: pointer; padding: 18px 20px;
  display: flex; align-items: center; gap: 12px;
}
details.activity summary::-webkit-details-marker { display: none; }
.act-emoji { font-size: 1.7rem; }
.act-title { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.act-skills { font-size: .8rem; color: var(--ink-soft); }
.act-body { padding: 0 20px 18px; }
.act-body ol { padding-inline-start: 20px; font-size: .93rem; color: var(--ink); }
.act-body li { margin-bottom: 6px; }
.badge-bonus {
  display: inline-block;
  background: var(--sun); color: var(--ink); border: 1.5px solid var(--ink);
  font-family: var(--font-display); font-size: .7rem; font-weight: 600;
  border-radius: 999px; padding: 2px 9px;
  transform: rotate(-3deg);
}

/* Rules */
.rules-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.rule {
  background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius);
  box-shadow: 5px 5px 0 var(--sticker-shadow); padding: 20px; text-align: center;
}
.rule .rule-emoji { font-size: 2rem; margin-bottom: 8px; }
.rule h4 { margin-bottom: 6px; font-size: 1.05rem; }
.rule p { font-size: .88rem; color: var(--ink-soft); }

/* How AI works: one dark "ink page" in the notebook */
.how-strip {
  background-color: var(--ink);
  background-image:
    linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
  background-size: 26px 26px;
  color: #fff;
}
.how-strip .section-title { color: #fff; background: none; }
.how-strip .section-sub { color: rgba(255, 255, 255, .8); }
.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.how-item {
  background: var(--card); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 16px;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .35);
  padding: 18px; text-align: center; font-size: .95rem;
}
.how-item .n {
  font-family: var(--font-display); font-weight: 700; color: var(--coral);
  font-size: 1.6rem; display: block; margin-bottom: 6px;
}

/* Playground tools */
.tools-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.tool-chip {
  border: none; background-color: transparent;
  background-image: var(--sketch-card);
  background-size: 100% 100%; background-repeat: no-repeat;
  padding: 10px 20px; font-size: .9rem; font-weight: 600; color: var(--ink);
  font-family: var(--font-display);
  text-decoration: none;
  transition: transform .15s ease;
}
.tool-chip:hover { transform: rotate(-1deg) scale(1.04); }
.tools-row .tool-chip:nth-child(even):hover { transform: rotate(1deg) scale(1.04); }

/* Talk */
.video-embed {
  position: relative; padding-bottom: 56.25%;
  border: 3px solid var(--ink); border-radius: var(--radius); overflow: hidden;
  box-shadow: 8px 8px 0 var(--sticker-shadow);
}
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Downloads: the big yellow "take it home" sticker */
.dl-card {
  background: var(--sun); color: var(--ink);
  border: 3px solid var(--ink); border-radius: 26px;
  box-shadow: 8px 8px 0 var(--sticker-shadow);
  transform: rotate(-1deg);
  text-align: center; padding: 36px 26px;
}
.dl-card h2 { margin-bottom: 6px; font-size: 1.7rem; }
.dl-card p { margin-bottom: 22px; }
.dl-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-white { background-image: var(--sketch-card); color: var(--ink); }
.dl-alt { margin-top: 14px; font-size: .88rem; }
.dl-alt a { color: var(--ink); text-decoration: underline; }

footer { text-align: center; padding: 36px 20px 46px; color: var(--ink-soft); font-size: .92rem; }
footer a { color: var(--blue-deep); font-weight: 600; }

/* Live stats (kept intentionally quiet) */
.stats-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 18px; }
.stat-chip { padding: 4px 6px; font-size: .85rem; color: var(--ink-soft); }
.stat-chip b {
  color: var(--ink); font-weight: 700;
  display: inline-block; padding: 3px 9px;
  background: var(--crayon-circle) center / 100% 100% no-repeat;
}

/* Page-load moment: the robot sticker gets slapped on, the rest settles in */
@media (prefers-reduced-motion: no-preference) {
  .robot-icon { animation: stick .55s cubic-bezier(.2, 1.6, .4, 1) both; }
  .hero h1, .hero .subtitle, .hero .lede, .hero-cta { animation: rise .5s ease both; }
  .hero .subtitle { animation-delay: .1s; }
  .hero .lede { animation-delay: .18s; }
  .hero-cta { animation-delay: .26s; }
  .robot-icon:hover { animation: wiggle .4s ease; }
}
@keyframes stick {
  from { opacity: 0; transform: rotate(4deg) scale(1.3); }
  to { opacity: 1; transform: rotate(-6deg) scale(1); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes wiggle {
  0%, 100% { transform: rotate(-6deg); }
  33% { transform: rotate(-1deg); }
  66% { transform: rotate(-9deg); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

@media (max-width: 640px) {
  section { padding: 44px 0; }
  .hero h1 { font-size: 2rem; }
  .card { padding: 20px; }
}
