/* Scenic and interactive treatments for the Academy. */
.home-hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  background:
    radial-gradient(ellipse at 14% 48%, #fff6d9 0, #fff6d900 54%),
    linear-gradient(142deg, #d2f2ff 4%, #a8e4ff 63%, #c4eed0 100%);
}
.hero-scenery { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-cloud, .hero-sun, .hero-hills {
  position: absolute;
  transition: transform 350ms ease-out;
}
.hero-cloud { width: clamp(106px, 18vw, 276px); opacity: .78; }
.cloud-left { top: 6%; left: -5%; transform: translate(calc(var(--pan-x, 0) * 24px), calc(var(--pan-y, 0) * 12px)); }
.cloud-right { top: 9%; right: -1%; transform: translate(calc(var(--pan-x, 0) * 34px), calc(var(--pan-y, 0) * 18px)); }
.hero-sun {
  top: 10%; right: 12%; width: clamp(90px,15vw,220px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, #fff9b4 0 60%, #fff2a300 71%);
  transform: translate(calc(var(--pan-x, 0) * 8px), calc(var(--pan-y, 0) * 6px));
}
.hero-hills {
  bottom: -28px; left: -26px; width: calc(100% + 52px); height: clamp(82px, 18vw, 213px);
  background: linear-gradient(105deg,#bdeaaa,#8edbb2 62%,#9bd9c3);
  clip-path: polygon(0 69%,5% 69%,5% 59%,11% 59%,11% 49%,19% 49%,19% 38%,25% 38%,25% 48%,31% 48%,31% 65%,37% 65%,37% 74%,53% 74%,53% 66%,61% 66%,61% 52%,68% 52%,68% 41%,77% 41%,77% 28%,84% 28%,84% 42%,91% 42%,91% 58%,100% 58%,100% 100%,0 100%);
  transform: translate(calc(var(--pan-x, 0) * -34px), calc(var(--pan-y, 0) * -15px));
}
.hero-copy .eyebrow { background: #fff8db; border-color: #708d7d; }
.hero-copy h1 span {
  position: relative; color: #104d45;
  text-decoration: underline #e9ad50 .075em;
  text-underline-offset: .14em;
  text-decoration-skip-ink: none;
}
.console {
  background: linear-gradient(150deg,#2f505b,#182d3d 85%);
  border-color: #132638;
  box-shadow: 0 7px 0 #172c3a, 0 22px 40px #22424f45, inset 0 0 0 2px #ffffff24;
}
.console-top { color: #fff5d9; }
.console .scene-clouds, .console .scene-hills-far, .console .scene-hills-near { transition: transform 320ms ease-out; }
.console .scene-clouds { transform: translate(calc(var(--pan-x, 0) * 25px),calc(var(--pan-y, 0) * 11px)); }
.console .scene-hills-far { transform: translate(calc(var(--pan-x, 0) * -16px),0); }
.console .scene-hills-near { transform: translate(calc(var(--pan-x, 0) * -28px),0); }
.button:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.jump { transition: background 150ms, transform 150ms; }
.jump:active { transform: translateY(2px); }
.quick-facts { position: relative; background: #ffdc63; }
.quick-facts::before {
  position: absolute; inset: -9px 0 auto; height: 8px; content: ""; pointer-events: none;
  background: repeating-linear-gradient(90deg,#3e9971 0 10px,#3e997100 10px 20px,#3e9971 20px 38px,#3e997100 38px 45px);
  opacity: .53;
}

.prompt-section {
  --lab-navy: #23354f;
  position: relative;
  background: radial-gradient(ellipse at 83% 25%,#fff0bc 0 4%,transparent 36%), linear-gradient(126deg,#e8e0ff,#edf1ff 55%,#d3effd);
  border-block: 1px solid #9ca8c4;
}
.prompt-section::before {
  position: absolute; content: ""; inset: -8px 0 auto; height: 8px;
  background: radial-gradient(ellipse at 50% 100%,#e8e0ff 67%,transparent 70%) 0 0 / 40px 12px repeat-x;
  pointer-events: none;
}
.prompt-workbench { display: grid; grid-template-columns: minmax(0,.77fr) minmax(0,1.23fr); align-items: center; gap: clamp(1.5rem,6vw,5rem); }
.lab-copy .section-head { margin-bottom: 1.25rem; }
.lab-controls { display: grid; gap: .85rem; justify-items: start; }
.prompt-chips { display: flex; gap: .75rem; flex-wrap: wrap; }
.prompt-chip {
  display: inline-flex; align-items: center; gap: .48rem; padding: .54rem .8rem; min-height: 44px;
  border: 2px solid var(--lab-navy); border-radius: 9px; box-shadow: 0 3px var(--lab-navy);
  background: #fffdf5; color: var(--lab-navy); font-weight: 780; text-align: left;
  transition: transform 150ms, background 150ms, box-shadow 150ms;
}
.prompt-chip svg, .lab-machine-bar svg { width: 19px; height: 19px; flex: none; }
.prompt-chip:hover, .prompt-chip[aria-pressed="true"] { background: #ffe78e; }
.prompt-chip:active { transform: translateY(2px); box-shadow: 0 1px var(--lab-navy); }
.prompt-chip[aria-disabled="true"] { box-shadow: none; background: #ebe4f6; cursor: default; }
.scene-reset { padding: .35rem .2rem; min-height: 37px; border: 0; color: #33467d; background: transparent; text-decoration: underline; text-underline-offset: .2em; font-weight: 720; }
p.demo-note { font-size: .89rem; margin-top: 1.05rem; }
.lab-machine { padding: .85rem; border: 2px solid #152637; border-radius: 20px; color: white; background: var(--lab-navy); box-shadow: 0 7px 0 #152637,0 19px 32px #283e6940; }
.lab-machine-bar { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .18rem .25rem .7rem; font-size: .87rem; }
.lab-machine-bar > b { display: flex; align-items: center; gap: .3rem; }
.lab-machine-bar svg { color: #ffdc6d; }
.lab-machine-bar > span { color: #f9e7a7; white-space: nowrap; }
.lab-response {
  background: #304967; border: 1px solid #6981a0; border-radius: 9px; display: flex; gap: .65rem;
  align-items: flex-start; padding: .6rem .7rem; margin-top: .66rem; min-height: 79px;
}
.lab-response > svg { width: 35px; height: 35px; flex: none; }
.lab-response span { color: #ffe797; font-weight: 800; font-size: .8rem; }
.lab-response p { color: #fff; font-size: .92rem; }
.scene-night, .scene-extra-coin, .scene-jump-guide { visibility: hidden; }
.is-night .scene-day { visibility: hidden; }
.is-night .scene-night, .scene-extra-coin.placed, .show-jump .scene-jump-guide { visibility: visible; }
#lab-genie { transform-box: fill-box; transform-origin: center; }

.skill-section { background: #fff0d3; border-block: 1px solid #dfc391; }
.skill-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .85rem; }
.skill-grid li {
  display: grid; grid-template-columns: auto minmax(0,1fr); align-content: start; gap: .85rem;
  min-width: 0; background: var(--white); border: 1px solid #a59279; border-radius: 15px; padding: clamp(.9rem,2vw,1.35rem);
  box-shadow: 0 3px 0 #b7a184;
}
.skill-badge { width: clamp(43px,5vw,63px); aspect-ratio: 1; background: var(--tone); border-radius: 12px; display: grid; place-items: center; }
.skill-badge svg { width: 80%; }
.skill-grid h3 { font-size: clamp(1.16rem,2vw,1.56rem); text-wrap: initial; }
.skill-grid p { margin-top: .38rem; }

.map-section { background: linear-gradient(170deg,#ddf6f4,#b6e9ed 90%); }
.map-board {
  position: relative; isolation: isolate; aspect-ratio: 1160 / 365; min-height: 314px;
  border: 2px solid #355c5c; border-radius: 20px; background: #94e0ee;
  box-shadow: 0 6px 0 #355c5c, inset 0 0 0 2px #ffffffb5;
}
.map-landscape { position: absolute; z-index: -1; inset: 0; overflow: hidden; border-radius: 18px; }
.map-landscape img { width: 100%; height: 100%; }
.world-map { list-style: none; padding: 0; margin: 0; }
.world-map li { position: absolute; top: calc(var(--y) - 77px); left: var(--x); width: min(15.5%, 168px); transform: translateX(-50%); }
.world-map a {
  display: grid; justify-items: center; position: relative; min-width: 0; color: var(--ink); text-align: center;
  text-decoration: none; border-radius: 12px;
}
.world-map a:focus-visible { z-index: 2; outline-offset: 2px; }
.world-map-art { display: grid; place-items: end center; height: 62px; width: 100%; }
.world-map-art svg { width: 97px; height: 62px; overflow: visible; filter: drop-shadow(0 4px 1px #36514930); transition: transform 180ms cubic-bezier(.2,.7,.3,1.3); }
.map-node {
  display: grid; place-items: center; width: 30px; height: 30px; background: var(--tone);
  color: var(--ink); font: 850 .84rem/1 ui-monospace, monospace; border: 2px solid var(--ink);
  border-radius: 50%; box-shadow: 0 2px 0 #263b38;
}
.map-caption {
  display: grid; justify-items: center; padding: .32rem .48rem; margin-top: .35rem; background: #fffbe9;
  border: 1px solid #5c7256; border-radius: 9px; min-width: 100px; box-shadow: 0 3px #5f785d65;
}
.world-map strong { font-size: clamp(.79rem,1.28vw,1.02rem); font-weight: 880; line-height: 1.12; }
.world-map-badge { display: flex; align-items: center; justify-content: center; gap: .25rem; font-size: .73rem; font-weight: 800; margin-top: .18rem; }
.world-map-badge svg { width: 15px; height: 15px; flex: none; }
.world-map a:hover .world-map-art svg, .world-map a:focus-visible .world-map-art svg { transform: translateY(-5px); }
.world-map a:hover .map-caption { background: #fff0a5; text-decoration: underline; }
.world-map a:active .map-caption { transform: translateY(2px); box-shadow: 0 1px #5f785d65; }
.map-marker {
  position: absolute; bottom: calc(100% - 4px); white-space: nowrap; padding: .22rem .48rem;
  border: 2px solid #583745; border-radius: 6px; background: #ffb697; color: #38212c; font-size: .74rem; font-weight: 850;
}
.map-marker::after {
  position: absolute; content: ""; top: 100%; left: calc(50% - 5px); width: 10px; height: 7px;
  clip-path: polygon(0 0,100% 0,50% 100%); background: #583745;
}

.feature-card { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding: clamp(1.12rem,3vw,2rem); }
.feature-card .button { margin-top: auto; }
.feature-download { background: linear-gradient(#ede5ff,#f3ebff); }
.feature-parents { background: linear-gradient(#d7f4df,#e7f6da); }
.editor-illustration, .family-art {
  display: block; width: 100%; margin: 0 0 1.4rem; border: 2px solid #263b43; border-radius: 12px;
  aspect-ratio: 540 / 250;
}
.family-art { height: auto; object-fit: cover; }
.editor-illustration { display: flex; flex-direction: column; background: #27374e; color: #f9f5fc; padding: .58rem; min-height: 168px; }
.editor-illustration figcaption { font-size: .77rem; font-weight: 800; margin: 0 0 .42rem; }
.editor-panels { flex: 1; display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); gap: .4rem; }
.editor-chat, .editor-preview { display: flex; flex-direction: column; min-width: 0; border-radius: 6px; overflow: hidden; background: #637195; }
.editor-tab { background: #3b4a69; color: white; padding: .26rem .38rem; font-size: .72rem; font-weight: 720; }
.feature-card .editor-chat p { max-width: none; margin: .25rem .32rem 0; padding: .26rem .34rem; color: #18263e; font-size: clamp(.71rem,1.05vw,.88rem); font-weight: 680; line-height: 1.3; border-radius: 4px; }
.editor-message { background: #e6d4ff; }
.editor-chat p.editor-reply { display: flex; gap: .32rem; align-items: flex-start; margin-bottom: .28rem; background: #ecf9dc; }
.editor-reply svg { width: 18px; height: 18px; flex: none; }
.editor-preview img { display: block; height: auto; min-height: 0; width: 100%; flex: 1; object-fit: cover; object-position: right; }

.faq-section { background: #f6ebd7; }
.faqs details { border-color: #af9a83; box-shadow: 0 2px #b5a08850; }
.faqs summary:hover { background: #fff3da; }
.faqs summary > span::after { transition: transform 180ms ease; }
.faqs details[open] summary > span::after { display: block; transform: rotate(0deg); }
.faqs details[open] > div { animation: reveal-answer 180ms ease-out both; }
@keyframes reveal-answer { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

.signup-block {
  position: relative; isolation: isolate; min-height: 336px;
  background:
    radial-gradient(ellipse at 9% 100%,#397d77 0,transparent 55%),
    radial-gradient(#ffdb8e76 1px,transparent 1.7px) 8px 7px / 28px 28px,
    linear-gradient(125deg,#163e48 5%,#2a3155 95%);
  border: 2px solid #162b3e; box-shadow: 0 6px 0 #162b3e;
}
.signup-invite h2 { font-size: clamp(2.45rem,5.4vw,4.25rem); text-wrap: initial; }
.signup-block > div .eyebrow { margin-top: 0; color: #ffecab; }
.signup-form { border: 2px solid #172b3a; box-shadow: 0 4px 0 #172b3a; }
.celebrate { position: relative; display: inline-block; }
.confetti { position: absolute; pointer-events: none; left: 50%; top: 55%; z-index: -1; }
.confetti i {
  position: absolute; width: 8px; height: 8px; background: var(--confetti-color,#ffd45c); opacity: 0; transform: scale(.2);
  transition: transform 320ms cubic-bezier(.18,.72,.45,1.12), opacity 200ms;
}
.confetti i:nth-child(1) { --tx: -116px; --ty: -33px; }
.confetti i:nth-child(2) { --tx: -88px; --ty: 31px; --confetti-color: #ffa38d; }
.confetti i:nth-child(3) { --tx: -58px; --ty: -47px; --confetti-color: #b9e1ff; }
.confetti i:nth-child(4) { --tx: -30px; --ty: 37px; }
.confetti i:nth-child(5) { --tx: 27px; --ty: -43px; --confetti-color: #cdbbff; }
.confetti i:nth-child(6) { --tx: 66px; --ty: 33px; --confetti-color: #a5edb3; }
.confetti i:nth-child(7) { --tx: 100px; --ty: -38px; --confetti-color: #ffa38d; }
.confetti i:nth-child(8) { --tx: 110px; --ty: 23px; --confetti-color: #b9e1ff; }
.celebrate:hover .confetti i, .celebrate:focus-within .confetti i { opacity: 1; transform: translate(var(--tx),var(--ty)) rotate(42deg); }

.site-footer { background: linear-gradient(#e2f5ec,#e9f3e5); }
.footer-top { display: grid; grid-template-columns: minmax(0,1fr) minmax(160px,290px); gap: 1rem; }
.footer-top nav { margin-top: .9rem; }
.footer-art { display: block; width: 100%; height: auto; justify-self: end; }

.lesson-hero {
  background: radial-gradient(circle at 85% 35%,#fff9cf 0,transparent 35%),linear-gradient(130deg,var(--tone),var(--world-bright));
  border-bottom: 4px solid var(--world-ink);
}
.lesson-hero.mint { --world-bright: #a8eac2; --world-ink: #256e51; }
.lesson-hero.peach { --world-bright: #ffc4a3; --world-ink: #924938; }
.lesson-hero.blue { --world-bright: #a9d8ff; --world-ink: #315f8c; }
.lesson-hero.yellow { --world-bright: #ffe092; --world-ink: #7d5723; }
.lesson-hero.lilac { --world-bright: #d4c2ff; --world-ink: #5f4b91; }
.lesson-hero.rose { --world-bright: #ffbbd0; --world-ink: #944161; }
.lesson-hero .eyebrow::before { background: var(--world-ink); }
.lesson-art svg { filter: drop-shadow(0 9px 0 #27384121); }
.world-track {
  display: flex; align-items: center; flex-wrap: wrap; row-gap: .45rem; column-gap: 1.05rem; width: fit-content;
  padding: .45rem .65rem .45rem .8rem; margin-top: 1.2rem; border: 1px solid var(--world-ink); border-radius: 11px; background: #fffdf4;
}
.world-track > div { display: grid; line-height: 1.22; }
.world-track > div b { font-size: .93rem; }
.world-track > div span { font-size: .77rem; color: var(--text); }
.world-track ol { display: flex; gap: .35rem; list-style: none; align-items: center; padding: 0; margin: 0; }
.world-track li { position: relative; }
.world-track li + li::before { position: absolute; content: ""; top: 50%; width: .35rem; height: 1px; right: 100%; background: var(--world-ink); }
.world-track a {
  display: grid; place-items: center; width: 34px; aspect-ratio: 1; border: 1px solid var(--world-ink); border-radius: 50%;
  background: var(--tone); text-decoration: none; font-size: .84rem; font-weight: 850;
}
.world-track a:hover { background: var(--world-bright); }
.world-track a[aria-current="page"] { border-width: 2px; outline: 2px solid var(--world-ink); outline-offset: 1px; }
.world-track a[aria-current="page"]:focus-visible { outline: 3px solid #3152b2; outline-offset: 4px; }
.world-track a.is-complete { background: var(--world-ink); color: #fff; }
.prompt { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: start; gap: .72rem; }
.prompt-avatar { width: 46px; }
.prompt-message { position: relative; background: #ebe1ff; border: 1px solid #776b9f; border-radius: 3px 14px 14px 14px; padding: .75rem .9rem; box-shadow: 0 3px #c3b8e0; }
.prompt-message::before {
  position: absolute; content: ""; top: 11px; right: 100%; width: 9px; height: 11px;
  clip-path: polygon(0 0,100% 0,100% 100%); background: #776b9f;
}
.prompt-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .45rem; font-weight: 850; }
.prompt-head button {
  display: inline-flex; align-items: center; gap: .38rem; background: var(--white); color: var(--ink); border: 1px solid #776b9f;
  border-radius: 7px; padding: .32rem .5rem; font-size: .82rem; font-weight: 800; min-height: 36px;
}
.prompt-head button:hover { background: #ffedac; }
.prompt-head button svg { width: 15px; height: 15px; flex: none; }
.prompt blockquote { margin: .56rem 0 .1rem; font-weight: 650; }

@media (max-width: 880px) {
  .map-board { aspect-ratio: auto; height: clamp(650px, 170vw, 655px); }
  .world-map li { left: var(--sx); top: calc(var(--sy) - 77px); width: min(45%, 180px); }
  .world-map strong { font-size: .94rem; }
  .prompt-workbench { grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr); gap: 1.4rem; }
  .skill-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 650px) {
  .prompt-workbench { grid-template-columns: 1fr; }
  .hero-sun { right: 4%; top: 6%; }
  .cloud-left { top: 32%; }
  .hero-hills { height: 185px; }
  .signup-block { min-height: 0; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-art { max-width: 175px; justify-self: end; }
}
@media (max-width: 480px) {
  .hero-copy h1 span { text-underline-offset: .12em; }
  .skill-grid { grid-template-columns: 1fr; }
  .skill-grid li { padding: .85rem; }
  .lab-machine { padding: .57rem; border-radius: 15px; }
  .lab-response { min-height: 76px; }
  .map-board { border-radius: 14px; }
  .map-landscape { border-radius: 12px; }
  .editor-illustration { min-height: 149px; }
  .footer-art { max-width: 154px; }
  .world-track { padding: .55rem; column-gap: .65rem; }
  .world-track a { width: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-cloud, .hero-sun, .hero-hills, .console .scene-clouds, .console .scene-hills-far, .console .scene-hills-near { transform: none; }
  .world-map a:hover .world-map-art svg, .world-map a:focus-visible .world-map-art svg { transform: none; }
  .celebrate:hover .confetti i, .celebrate:focus-within .confetti i { transform: translate(var(--tx),var(--ty)); }
}

