/*
 * Family homepage (index.html) — elevated visuals.
 * Comic-book language: cream paper, ink outlines, hard offset shadows.
 */

/* ── Hero: living doodle sky ───────────────────────────────────────── */
.hero-doodles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}
.hero-sun-eyes {
  animation: ia-blink 5.5s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}
.hero-rainbow path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: ia-draw 1.4s cubic-bezier(0.45, 0, 0.2, 1) forwards;
}
.hero-rainbow path:nth-child(2) { animation-delay: 0.12s; }
.hero-rainbow path:nth-child(3) { animation-delay: 0.24s; }
.hero-rainbow path:nth-child(4) { animation-delay: 0.36s; }

/* Prompt → page demo strip */
.hero-prompt-demo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 1.7rem;
  max-width: 560px;
}
.hero-prompt-demo__chip {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 8px 12px;
  background: #fff;
  border: 2px solid var(--ia-ink);
  border-radius: 12px;
  box-shadow: 3px 3px 0 var(--ia-ink);
  font-weight: 600;
  color: var(--ia-ink);
  font-size: 0.98rem;
  line-height: 1.25;
}
.hero-prompt-demo__label {
  flex-shrink: 0;
  padding: 3px 8px;
  border: 2px solid var(--ia-ink);
  border-radius: 8px;
  background: var(--ia-butter);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hero-prompt-demo__text { min-width: 0; }
.hero-prompt-demo__caret {
  width: 2px;
  height: 1.15em;
  background: var(--ia-cherry);
  border-radius: 2px;
  animation: caretBlinkHero 1s ease-in-out infinite;
}
@keyframes caretBlinkHero { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }
.hero-prompt-demo__arrow {
  width: 44px;
  height: 22px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}
.hero-prompt-demo.is-generating .hero-prompt-demo__arrow { animation: heroArrowNudge 0.65s ease-in-out infinite; }
@keyframes heroArrowNudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(8px); } }
.hero-prompt-demo__page {
  position: relative;
  width: 96px;
  height: 96px;
  flex-shrink: 0;
  background: #fff;
  border: 2.5px solid var(--ia-ink);
  border-radius: 12px;
  box-shadow: 4px 4px 0 var(--ia-ink);
  overflow: hidden;
}
.hero-prompt-demo__page img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 4px;
}
.hero-prompt-demo__page.is-empty img { opacity: 0; }
.hero-prompt-demo__page.is-empty::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 2px dashed var(--ia-sand-200);
  border-radius: 8px;
  background: repeating-linear-gradient(0deg, transparent 0 9px, var(--ia-sand-100) 9px 10px);
}
.hero-prompt-demo__page.is-drawing img {
  clip-path: inset(0 0 100% 0);
  animation: ia-fill-wipe 0.9s cubic-bezier(0.45, 0, 0.2, 1) forwards;
}
.hero-prompt-demo__sparkle {
  position: absolute;
  top: 4px;
  right: 6px;
  color: var(--ia-cherry);
  font-size: 1.1rem;
  opacity: 0;
}
.hero-prompt-demo__page.is-drawing .hero-prompt-demo__sparkle {
  animation: ia-pop-in 0.5s 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards, ia-twinkle 1.8s 1.3s ease-in-out infinite;
}

/* CTA card with Chives peeking over the top */
.desktop-email-cta-outer { position: relative; }
.desktop-email-cta-card { position: relative; z-index: 1; }
.hero-chives-peek {
  position: absolute;
  top: -78px;
  right: -22px;
  width: 138px;
  height: auto;
  z-index: 0;
  pointer-events: none;
  filter: drop-shadow(2px 3px 0 rgba(42, 30, 16, 0.18));
}
.hero-chives-peek--mobile {
  display: block;
  top: auto;
  bottom: 96px;
  right: -14px;
  width: 104px;
  z-index: 1;
}
@media (min-width: 768px) { .hero-chives-peek--mobile { width: 150px; bottom: 14%; right: 2%; } }
@media (min-width: 1024px) { .hero-chives-peek--mobile { display: none; } }
.desktop-email-cta-footnote {
  margin: 0.85rem 0 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ia-sand-500);
}
@media (min-width: 1024px) and (max-height: 720px) {
  .hero-prompt-demo { display: none; }
}

/* Explainer step 3: the page prints out of a slot */
.ia-printer { position: relative; padding-top: 18px; }
.ia-printer__slot {
  position: absolute;
  top: 0;
  left: 8%;
  right: 8%;
  height: 22px;
  background: var(--ia-ink);
  border-radius: 8px;
  z-index: 2;
}
.ia-printer__slot::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 8px;
  height: 6px;
  border-radius: 3px;
  background: #fff8ec;
  opacity: 0.35;
}
.ia-printer__paper { position: relative; z-index: 1; overflow: hidden; }
[data-reveal="print"] {
  opacity: 1;
  transform: translate3d(0, -100%, 0);
  transition-duration: 1.6s;
  transition-timing-function: cubic-bezier(0.3, 0.9, 0.3, 1);
}

/* ── Section chrome ────────────────────────────────────────────────── */
.ia-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 1rem;
  padding: 0.45rem 0.85rem;
  border: 2px solid var(--ia-ink);
  border-radius: 999px;
  background: #fff;
  box-shadow: 2px 2px 0 var(--ia-ink);
  color: var(--ia-cherry);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ia-kicker--teal { color: var(--ia-teal); }
.ia-kicker--bluebell { color: var(--ia-bluebell); }

/* Chives cameo: sits on a section edge and pops up when the section scrolls in */
.ia-cameo {
  position: absolute;
  width: clamp(88px, 10vw, 150px);
  height: auto;
  pointer-events: none;
  z-index: 2;
  filter: drop-shadow(2px 3px 0 rgba(42, 30, 16, 0.18));
}
.ia-cameo--br { right: 3%; bottom: -6px; }
.ia-cameo--bl { left: 3%; bottom: -6px; }
.ia-cameo--tr { right: 4%; top: -10px; --peek-y: -110%; }
@media (max-width: 640px) {
  .ia-cameo { width: 78px; }
  /* Keep the small-screen hero calm: drop the floating doodle layer */
  .hero-doodles { display: none; }
}

/* Mascot peeking over the top edge of a card */
.ia-peek-wrap { position: relative; }
.ia-peek-mascot {
  position: absolute;
  top: -70px;
  right: 6%;
  width: 128px;
  height: auto;
  z-index: 0;
  pointer-events: none;
  filter: drop-shadow(2px 3px 0 rgba(42, 30, 16, 0.18));
}
.ia-peek-front { position: relative; z-index: 1; }
.ia-peek-front li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--ia-teal);
  font-weight: 800;
}
@media (max-width: 640px) { .ia-peek-mascot { width: 96px; top: -52px; } }

/* Comic card: reusable */
.ia-card {
  background: #fff;
  border: 2.5px solid var(--ia-ink);
  border-radius: 18px;
  box-shadow: 6px 6px 0 var(--ia-ink);
}
.ia-card--butter { background: var(--ia-butter); }
.ia-card--cherry { background: var(--ia-cherry); color: #fff; }
.ia-card--cream  { background: var(--ia-sand-50); }

/* Sticky-note testimonials with washi tape */
.ia-note {
  position: relative;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border: 2.5px solid var(--ia-ink);
  border-radius: 6px 22px 8px 26px / 14px 6px 24px 8px;
  box-shadow: 6px 6px 0 var(--ia-ink);
  transform: rotate(var(--note-rot, -1.5deg));
  transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1), box-shadow 0.3s ease;
}
.ia-note:hover { transform: rotate(0deg) translateY(-6px); box-shadow: 9px 9px 0 var(--ia-ink); }
.ia-note--butter { background: #fff1b8; }
.ia-note--cherry { background: var(--ia-cherry); color: #fff; }
.ia-note--paper  { background: #fff; }
.ia-note__tape {
  position: absolute;
  top: -16px;
  left: 50%;
  width: 128px;
  height: 32px;
  transform: translateX(-50%) rotate(var(--tape-rot, -3deg));
  background: repeating-linear-gradient(90deg, rgba(42,157,143,0.85) 0 10px, rgba(255,214,106,0.9) 10px 20px);
  border: 2px solid var(--ia-ink);
  opacity: 0.92;
  -webkit-mask: linear-gradient(90deg, transparent 0, #000 6px, #000 calc(100% - 6px), transparent 100%);
          mask: linear-gradient(90deg, transparent 0, #000 6px, #000 calc(100% - 6px), transparent 100%);
}
.ia-note__tape--cherry { background: repeating-linear-gradient(90deg, rgba(231,111,81,0.9) 0 8px, #fff 8px 16px); }
.ia-note__tape--dots { background: #fff radial-gradient(circle, var(--ia-bluebell) 3px, transparent 3.5px) 0 0 / 14px 14px; }
.ia-note blockquote { position: relative; }
.ia-note blockquote::before {
  content: "”";
  position: absolute;
  top: -0.55em;
  right: -0.1em;
  font-family: 'Fredoka One', cursive;
  font-size: 4.5rem;
  line-height: 1;
  opacity: 0.16;
}

/* Card fan: stacked pages, drag/click through */
.ia-deck {
  position: relative;
  width: min(100%, 440px);
  aspect-ratio: 1 / 1.08;
  margin: 0 auto;
  outline: none;
}
.ia-deck:focus-visible { box-shadow: 0 0 0 4px rgba(231,111,81,0.45); border-radius: 22px; }
.ia-deck__card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 2.5px solid var(--ia-ink);
  border-radius: 20px;
  box-shadow: 7px 7px 0 var(--ia-ink);
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.45s ease;
  will-change: transform;
}
.ia-deck__card.is-dragging { transition: none; cursor: grabbing; }
.ia-deck__card img {
  flex: 1;
  width: 100%;
  min-height: 0;
  object-fit: contain;
  padding: 14px 14px 0;
  background: var(--card-bg, #fff);
  pointer-events: none;
}
.ia-deck__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px 14px;
  border-top: 2.5px solid var(--ia-ink);
  background: var(--ia-sand-50);
}
.ia-deck__tag {
  flex-shrink: 0;
  padding: 3px 8px;
  border: 2px solid var(--ia-ink);
  border-radius: 8px;
  background: var(--ia-butter);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ia-deck__prompt {
  margin: 0;
  font-family: 'Comic Neue', cursive;
  font-weight: 700;
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
  line-height: 1.25;
  color: var(--ia-ink);
}
.ia-deck__controls {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 1.2rem);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}
.creations-deck-wrap { padding: 12px 0 4.5rem; }
.creations-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
  margin: 1.6rem 0 0;
  padding: 0;
  list-style: none;
}
.creations-stats li { display: flex; flex-direction: column; }
.creations-stats strong {
  font-family: 'Fredoka One', cursive;
  font-weight: 400;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1;
  color: var(--ia-cherry);
}
.creations-stats span { font-size: 0.85rem; font-weight: 700; color: var(--ia-sand-500); }
@media (max-width: 900px) {
  .creations-stats { justify-content: center; gap: 1rem 1.5rem; }
  .creations-stats strong { font-size: 1.6rem; }
  .creations-stats span { font-size: 0.75rem; }
}
.ia-deck__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 2px solid var(--ia-ink);
  border-radius: 12px;
  background: #fff;
  color: var(--ia-ink);
  box-shadow: 3px 3px 0 var(--ia-ink);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.ia-deck__btn:hover { transform: translateY(-2px); background: var(--ia-cream); }
.ia-deck__hint {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ia-sand-500);
}

/* Parent / Teacher sliding pill tabs */
.ia-tabs {
  position: relative;
  display: inline-flex;
  padding: 4px;
  background: #fff;
  border: 2px solid var(--ia-ink);
  border-radius: 100px;
  box-shadow: 3px 3px 0 var(--ia-ink);
}
.ia-tabs__pill {
  position: absolute;
  top: 4px;
  left: 0;
  height: calc(100% - 8px);
  border-radius: 100px;
  background: var(--ia-cherry);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 0;
}
.ia-tabs__tab {
  position: relative;
  z-index: 1;
  padding: 12px 26px;
  border: 0;
  border-radius: 100px;
  background: transparent;
  color: var(--ia-ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.25s ease;
}
.ia-tabs__tab.is-active { color: #fff; }
.ia-tabs__tab:focus-visible { outline: 3px solid var(--ia-teal); outline-offset: 2px; }
.ia-tab-panel { animation: ia-pop-in 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
.ia-tab-panel[hidden] { display: none; }

/* Feature "challenge" rows get a wiggle icon on hover */
.ia-feature-row { transition: transform 0.2s ease; }
.ia-feature-row:hover { transform: translateX(6px); }
.ia-feature-row:hover i { animation: ia-wiggle 0.7s ease-in-out; }

/* Pricing */
.ia-price-card {
  position: relative;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}
.ia-price-card:hover { transform: translateY(-6px); box-shadow: 9px 9px 0 var(--ia-ink) !important; }
.ia-ribbon {
  position: absolute;
  top: 18px;
  right: -12px;
  padding: 6px 14px 6px 12px;
  background: var(--ia-cherry);
  color: #fff;
  border: 2px solid var(--ia-ink);
  box-shadow: 3px 3px 0 var(--ia-ink);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transform: rotate(3deg);
}
.ia-ribbon--teal { background: var(--ia-teal); }
.ia-price-stack {
  display: flex;
  justify-content: center;
  height: 42px;
  margin: 0 0 8px;
}
.ia-price-stack span {
  width: 26px;
  height: 34px;
  margin: 0 -8px;
  border: 2px solid var(--ia-ink);
  border-radius: 4px;
  background: #fff;
  transform: rotate(var(--r, 0deg)) translateY(4px);
  transition: transform 0.4s cubic-bezier(0.34, 1.4, 0.64, 1);
  background-image: repeating-linear-gradient(0deg, transparent 0 6px, var(--ia-sand-200) 6px 7px);
}
.ia-price-card:hover .ia-price-stack span { transform: rotate(calc(var(--r) * 2.2)) translateY(0); }

/* Samples grid */
.ia-sample {
  position: relative;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
  cursor: zoom-in;
}
.ia-sample:hover { transform: translateY(-8px) rotate(-1deg); box-shadow: 8px 8px 0 var(--ia-ink) !important; }
.ia-sample__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  border: 2px solid var(--ia-ink);
  border-radius: 999px;
  background: var(--ia-butter);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateY(-6px) rotate(-4deg);
  transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 1;
}
.ia-sample:hover .ia-sample__badge, .ia-sample:focus-visible .ia-sample__badge { opacity: 1; transform: translateY(0) rotate(-4deg); }

/* Colouring playground section wrapper */
.ia-playground-section { position: relative; overflow: hidden; }
.ia-playground-section .ia-colour { --cp-font: 'Poppins', sans-serif; }
.ia-playground-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

/* Section headings share one voice */
.ia-h2 {
  margin: 0;
  color: var(--ia-ink);
  font-family: 'Fredoka One', cursive;
  font-weight: 400;
  font-size: clamp(2rem, 4.4vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: 0;
}
.ia-h2 em {
  font-style: normal;
  color: var(--ia-cherry);
  background: linear-gradient(transparent 62%, rgba(255,214,106,0.9) 62%, rgba(255,214,106,0.9) 92%, transparent 92%);
}
.ia-lede {
  margin: 1rem 0 0;
  color: var(--ia-sand-700);
  font-family: 'Comic Neue', cursive;
  font-weight: 700;
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  line-height: 1.45;
}

/* Footer night sky */
.ia-footer-sky {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.ia-footer-sky span {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ffd66a;
  box-shadow: 0 0 6px rgba(255,214,106,0.8);
  animation: ia-twinkle 3s ease-in-out infinite;
}
.ia-footer-chives {
  position: absolute;
  right: 4%;
  bottom: 0;
  width: 120px;
  height: auto;
  pointer-events: none;
  transform: rotate(-4deg);
  filter: drop-shadow(0 4px 0 rgba(0,0,0,0.25));
}
.ia-footer-chives .zz { display: none; }

@media (prefers-reduced-motion: reduce) {
  .hero-sun-eyes, .hero-rainbow path, .hero-prompt-demo__caret, .hero-prompt-demo__arrow,
  .hero-prompt-demo__page img, .hero-prompt-demo__sparkle, .ia-footer-sky span, .ia-tab-panel {
    animation: none !important;
  }
  .hero-rainbow path { stroke-dasharray: none; stroke-dashoffset: 0; }
  .hero-prompt-demo__page.is-drawing img { clip-path: none; }
  .hero-prompt-demo__sparkle { opacity: 1; }
  .ia-note, .ia-note:hover, .ia-sample:hover, .ia-price-card:hover, .ia-feature-row:hover { transform: none; }
}
