/* The sleeper: indigo ground, one dark line, Bagel Fat One for big things, Figtree for the rest. */
@font-face { font-family: "Bagel Fat One"; src: url("/fonts/BagelFatOne-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/fonts/Figtree-Variable.ttf") format("truetype"); font-weight: 300 900; font-display: swap; }

:root {
  --ground: #2A2472; --ink: #17123D; --cream: #FFF7E4; --coral: #FF6F9F; --yellow: #FFD84D; --soft: #5B5680;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; background: var(--ground); color: var(--cream); }
body { font: 600 16px/1.4 "Figtree", system-ui, sans-serif; -webkit-text-size-adjust: 100%; }
a { color: inherit; }

.screen { width: 100%; max-width: 430px; min-height: 100dvh; margin: 0 auto; padding: max(22px, env(safe-area-inset-top)) 26px max(22px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; }
.screen > section { display: flex; flex-direction: column; gap: 12px; flex: 1; }
.top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.clock, h1 { font-family: "Bagel Fat One", sans-serif; font-weight: 400; margin: 0; }
.clock { font-size: 72px; line-height: 1; }
h1 { font-size: 40px; line-height: 1.05; }
h2 { font-family: "Bagel Fat One", sans-serif; font-weight: 400; font-size: 26px; line-height: 1.15; margin: 0; }
.belly { font-size: 15px; text-align: right; line-height: 1.35; padding-top: 8px; }
.caption { margin: 0; text-align: center; min-height: 44px; }
.small { font-size: 14px; font-weight: 500; margin: 0; }
.center { text-align: center; }
.grow { flex: 1; }
.brand { font-family: "Bagel Fat One", sans-serif; font-size: 26px; text-decoration: none; }

/* The creature */
.stage { flex: 1; min-height: 300px; display: flex; align-items: center; justify-content: center; position: relative; }
.sleeper { position: relative; width: 100%; max-width: 340px; aspect-ratio: 340 / 380; transform-origin: 50% 100%; }
.sleeper svg { width: 100%; height: 100%; overflow: visible; display: block; }
.sleeper.sleep { animation: breathe 3.4s ease-in-out infinite; }
.sleeper.gulp { animation: gulp .65s ease-in-out; }
.zed { position: absolute; font-family: "Bagel Fat One", sans-serif; left: 80%; top: 3%; font-size: 30px; opacity: 0; animation: zed 2.6s ease-out infinite; pointer-events: none; }
.zed.two { left: 74%; top: 8%; font-size: 22px; animation-delay: 1.1s; }
.sleeper:not(.sleep) .zed { display: none; }
@keyframes breathe { 0%,100% { transform: scale(1,1); } 50% { transform: scale(1.025,.965); } }
@keyframes gulp { 0% { transform: scale(1,1); } 35% { transform: scale(.88,1.12); } 70% { transform: scale(1.1,.9); } 100% { transform: scale(1,1); } }
@keyframes zed { 0% { transform: translate(0,0); opacity: 0; } 25% { opacity: 1; } 100% { transform: translate(26px,-64px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01s !important; } }

/* Poking it */
.poke { width: 100%; padding: 0; background: none; border: 0; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.shout { font-family: "Bagel Fat One", sans-serif; font-weight: 400; font-size: 24px; line-height: 1.15; color: var(--yellow); min-height: 84px; }
.qa { margin-top: 10px; }
.qa p { margin-bottom: 12px; font-weight: 500; }
.qa b { font-weight: 800; }

/* Buttons: fat with a hard shadow, or a plain outline */
.btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 68px; padding: 0 16px; border: 0; border-radius: 46px; background: var(--coral); color: var(--ink); font: 700 19px "Figtree", sans-serif; text-decoration: none; text-align: center; cursor: pointer; box-shadow: 0 7px 0 var(--ink); margin-bottom: 7px; transition: transform .1s, box-shadow .1s; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
.btn:active, .btn.down { transform: translateY(6px); box-shadow: 0 1px 0 var(--ink); }
.btn:disabled { opacity: .6; }
.btn.big { min-height: 92px; touch-action: none; }
.btn.outline { min-height: 50px; background: none; color: var(--cream); border: 2px solid var(--cream); box-shadow: none; font-size: 15px; margin: 0; }
.btn.outline:active { transform: none; opacity: .7; }
.btn.yellow { background: var(--yellow); }
.btn.quiet { opacity: .85; cursor: default; }
.row { display: flex; gap: 10px; }
.spinner { width: 18px; height: 18px; border: 3px solid var(--ink); border-right-color: transparent; border-radius: 50%; margin-right: 8px; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Panels */
.panel { background: var(--cream); color: var(--ink); border: 3px solid var(--ink); border-radius: 26px; padding: 18px 20px; }
.panel p { margin: 0 0 8px; } .panel p:last-child { margin: 0; }
input.name { width: 100%; min-height: 62px; padding: 0 22px; background: var(--cream); color: var(--ink); border: 3px solid var(--ink); border-radius: 26px; font: 600 18px "Figtree", sans-serif; outline: none; }
input.name::placeholder { color: var(--soft); }
input.name:focus { border-color: var(--yellow); }
input.name.shake { animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.error { color: var(--yellow); min-height: 20px; margin: 0; text-align: center; font-size: 14px; }
.foot { font-size: 13px; font-weight: 500; text-align: center; opacity: .85; padding-top: 6px; }
.foot a { margin: 0 6px; }

/* Long text */
.prose { font-weight: 500; }
.prose h1 { margin: 10px 0 2px; }
.prose h2 { margin: 26px 0 6px; font-size: 22px; }
.prose p, .prose ul { margin: 0 0 10px; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 6px; }
.steps { margin: 0; padding-left: 22px; }
.steps li { margin-bottom: 8px; }
.steps li:last-child { margin: 0; }
