/* Learn with Emma website: the same world as the TV (night sky, meadow, sunflower and mint) in CSS. */
@font-face { font-family: "Varela Round"; src: url("VarelaRound-Regular.ttf") format("truetype"); font-display: swap; }
:root {
  --navy: #0F1B2D; --indigo: #1C1F4A; --sky-top: #141A3C; --sky-bottom: #3B1E5E;
  --coral: #FF6B6B; --sun: #FFB347; --mint: #7CE0C3; --sky: #5BC0EB; --lavender: #B197FC;
  --ink: #2B1B3D; --text: #FFFFFF; --muted: #A9B8CC; --card: #FFFFFF;
  --radius: 24px; --gutter: 16px; --max: 1080px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Varela Round", "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--text); background: var(--navy); line-height: 1.5; min-height: 100vh; }
body.sky { background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bottom) 70%, #2d7a46 100%); background-attachment: fixed; }
a { color: var(--mint); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .4em; }
h1 { font-size: clamp(2rem, 6vw, 3.4rem); }
h2 { font-size: clamp(1.4rem, 4vw, 2rem); }
p { margin: 0 0 1em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
header.site { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px var(--gutter); max-width: var(--max); margin: 0 auto; flex-wrap: wrap; }
header.site .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; font-size: 1.15rem; }
header.site .brand img { width: 40px; height: 40px; border-radius: 12px; }
header.site nav { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
header.site nav a { color: var(--text); text-decoration: none; padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,.08); font-size: .95rem; }
header.site nav a.cta { background: var(--mint); color: var(--ink); font-weight: 700; }
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; align-items: center; padding: 32px 0 16px; }
.hero .tag { color: var(--sun); font-weight: 700; letter-spacing: .02em; }
.hero p.lead { font-size: 1.15rem; color: #E6ECF5; }
.hero .art { position: relative; min-height: 320px; display: flex; align-items: flex-end; justify-content: center; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 22px; border-radius: 999px; font-weight: 800; text-decoration: none; border: 0; cursor: pointer; font-family: inherit; font-size: 1.05rem; }
.btn.mint { background: var(--mint); color: var(--ink); }
.btn.sun { background: var(--sun); color: var(--ink); }
.btn.ghost { background: rgba(255,255,255,.12); color: var(--text); }
.btn.coral { background: var(--coral); color: var(--ink); }
.btn[disabled] { opacity: .5; cursor: default; }
.btn.big { font-size: 1.35rem; padding: 18px 28px; width: 100%; justify-content: center; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card { background: rgba(255,255,255,.08); border-radius: var(--radius); padding: 20px; }
.card.white { background: var(--card); color: var(--ink); }
.card h3 { font-size: 1.15rem; }
.card .icon { font-size: 2rem; margin-bottom: 6px; }
section { padding: 28px 0; }
section h2 span { color: var(--sun); }
.muted { color: var(--muted); }
.pill { display: inline-block; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.12); font-size: .9rem; }
footer.site { padding: 28px var(--gutter) 40px; color: var(--muted); font-size: .9rem; text-align: center; }
footer.site a { color: var(--muted); margin: 0 8px; }
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.4em; }
.prose ul { padding-left: 1.2em; }
.packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.pack { background: var(--card); color: var(--ink); border-radius: 18px; padding: 14px; text-align: center; }
.pack b { font-size: 1.3rem; display: block; }
.pack small { color: #5a4a6e; }
input, select, textarea { font: inherit; width: 100%; padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: var(--text); }
input::placeholder { color: rgba(255,255,255,.5); }
label { display: block; font-weight: 700; margin: 10px 0 4px; font-size: .95rem; }
.field { margin-bottom: 10px; }
.card.white input, .card.white select, .card.white textarea { background: #fff; color: var(--ink); border-color: #ddd; }
.card.white input::placeholder { color: #999; }
.card.white label { color: var(--ink); }
.error { color: var(--coral); font-weight: 700; }
.ok { color: var(--mint); font-weight: 700; }
.hidden { display: none !important; }
/* The companion app */
.app { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; padding: 10px 0 30px; }
.app > * { min-width: 0; }
html, body { max-width: 100%; overflow-x: hidden; }
.stage { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 12px; }
/* The rig is drawn at the TV's pixel size (about 820 px tall, hips at the origin) and scaled to fit its box. */
.puppet { position: relative; width: 300px; height: 500px; overflow: visible; cursor: pointer; }
.puppet .rig { position: absolute; left: 150px; top: 300px; transform: scale(.6); transform-origin: 0 0; }
.puppet img { position: absolute; left: 0; top: 0; }
.puppet .j { position: absolute; left: 0; top: 0; width: 0; height: 0; transition: transform .5s ease-in-out; }
.puppet .j > img { pointer-events: none; }
.puppet .mouth { opacity: 0; }
.puppet .mouth.m0 { opacity: 1; }
.turncue { display: flex; align-items: center; gap: 12px; padding: 10px 18px; border-radius: 999px; background: var(--mint); color: var(--ink); font-weight: 800; font-size: 1.25rem; animation: pulse 1.5s ease-in-out infinite; }
.turncue .bars { display: flex; align-items: center; gap: 4px; height: 30px; }
.turncue .bars i { display: block; width: 6px; border-radius: 3px; background: var(--ink); height: 12px; animation: bar .9s ease-in-out infinite; }
.turncue .bars i:nth-child(2) { animation-delay: .22s; } .turncue .bars i:nth-child(3) { animation-delay: .44s; } .turncue .bars i:nth-child(4) { animation-delay: .66s; }
.thinkcue { display: flex; gap: 8px; padding: 14px 22px; border-radius: 22px; background: var(--lavender); }
.thinkcue i { width: 12px; height: 12px; border-radius: 50%; background: var(--ink); animation: bob 1.2s ease-in-out infinite; }
.thinkcue i:nth-child(2) { animation-delay: .2s; } .thinkcue i:nth-child(3) { animation-delay: .4s; }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes bar { 0%,100% { height: 10px; } 50% { height: 30px; } }
@keyframes bob { 0%,100% { transform: translateY(0); } 40% { transform: translateY(-8px); } }
.caption { background: rgba(43,27,61,.72); color: #fff; border-radius: 22px; padding: 14px 20px; font-size: 1.25rem; min-height: 60px; width: 100%; }
.caption.heard { background: rgba(255,255,255,.12); font-size: 1rem; color: #E6ECF5; }
.side { display: flex; flex-direction: column; gap: 14px; }
.card.media { padding: 0; overflow: hidden; }
.card.media img, .card.media video, .card.media iframe { width: 100%; display: block; aspect-ratio: 4/3; object-fit: cover; border: 0; }
.card.media .cap { padding: 10px 14px; font-weight: 700; }
.who { display: flex; flex-wrap: wrap; gap: 8px; }
.who button { border: 0; border-radius: 999px; padding: 8px 14px; font: inherit; font-weight: 700; background: rgba(255,255,255,.15); color: #fff; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.who button.here { background: var(--sun); color: var(--ink); }
.who button img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.status { color: var(--muted); font-size: .95rem; min-height: 1.4em; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; }
.modal { position: fixed; inset: 0; background: rgba(15,27,45,.8); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.modal .card { width: min(560px, 100%); max-height: 92vh; overflow: auto; }
.list { display: flex; flex-direction: column; gap: 8px; }
.list .item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: rgba(0,0,0,.05); }
.bigcode { font-size: 3rem; letter-spacing: .3em; font-weight: 900; text-align: center; }
.mic { width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, var(--mint) 0%, rgba(124,224,195,.2) 60%, transparent 70%); display: flex; align-items: center; justify-content: center; font-size: 3rem; transition: transform .1s; }
.gate { display: flex; align-items: center; gap: 12px; padding: 8px 14px; border-radius: 999px; background: rgba(255,107,107,.25); }
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .puppet { width: 220px; height: 370px; }
  .puppet .rig { left: 110px; top: 222px; transform: scale(.44); }
}
.popmenu { position: absolute; z-index: 60; min-width: 220px; background: #fff; color: var(--ink); border-radius: 16px; box-shadow: 0 12px 40px rgba(0,0,0,.35); padding: 6px; display: flex; flex-direction: column; }
.popmenu button { border: 0; background: transparent; font: inherit; text-align: left; padding: 10px 12px; border-radius: 10px; cursor: pointer; color: var(--ink); }
.popmenu button:hover { background: #f1ece4; }
#who button { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
