:root {
  --cream: #F3F6EC;
  --cream-deep: #E3EBD8;
  --paper: #FAFDF6;
  --ink: #24312A;
  --muted: #3E4B44;
  --line: #D4DFD0;
  --green: #24613F;
  --green-soft: #CDE5D4;
  --sage: #2F6B56;
  --gold: #D4B45A;
  --sun: #F0C96A;
  --shadow: 0 10px 30px rgba(43, 36, 32, 0.07);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Noto Sans Hebrew", sans-serif;
  --radius: 1.25rem;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 10% -10%, rgba(196, 214, 140, 0.28), transparent 60%),
    radial-gradient(700px 380px at 100% 8%, rgba(180, 216, 196, 0.72), transparent 55%),
    var(--cream);
  min-height: 100vh;
}
h1, h2, .serif {
  font-family: var(--font);
  letter-spacing: -0.02em;
  line-height: 1.25;
}
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] .serif { letter-spacing: 0; }

.skip {
  position: absolute;
  inset-inline-start: 1rem;
  top: -4rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 0.9rem;
  border-radius: 0.5rem;
  z-index: 50;
  min-height: 44px;
  text-decoration: none;
}
.skip:focus { top: 0.7rem; }

.wrap { width: min(44rem, calc(100% - 2rem)); margin-inline: auto; }

header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0;
  position: relative;
  z-index: 40;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: inherit;
  text-decoration: none;
  min-height: 44px;
  margin-inline-end: auto;
}
.brand-mark { width: 2.5rem; height: 2.5rem; flex: none; }
.brand-name { font-weight: 700; font-size: 1.1rem; letter-spacing: -0.03em; }

.langs {
  display: flex;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 999px;
  padding: 0.15rem;
  box-shadow: var(--shadow);
  flex: none;
}
.langs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  border-radius: 999px;
  padding: 0.25rem 0.45rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
}
.langs a:hover { color: var(--ink); }
.langs a[aria-current="page"] {
  background: var(--ink);
  color: var(--paper);
}

:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}

.kicker {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  margin: 0 0 0.45rem;
  text-align: center;
}
html[dir="rtl"] .kicker { letter-spacing: 0.04em; text-transform: none; }

.panel { display: none; padding: 0.4rem 0 2rem; text-align: center; }
.panel.is-on { display: block; }

.panel h1, .panel h2:not(.step-meta) {
  font-weight: 700;
  font-size: clamp(1.85rem, 7vw, 2.8rem);
  margin: 0 auto 0.75rem;
  text-wrap: balance;
  max-width: 16ch;
}
h2.step-meta {
  font-size: 0.95rem;
  letter-spacing: 0;
  max-width: none;
  margin: 0 0 0.7rem;
}

.lede {
  color: var(--muted);
  max-width: 32rem;
  margin: 0 auto 1.2rem;
  font-size: 1.125rem;
  text-wrap: balance;
}

.scene-frame {
  width: 100%;
  max-width: 28rem;
  margin: 0 auto 1.1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 0.2rem);
  box-shadow: var(--shadow);
  overflow: hidden;
  aspect-ratio: 360 / 260;
}
.scene-frame svg { width: 100%; height: auto; display: block; }

.stars {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin: 0.2rem 0 0.45rem;
}
.star {
  width: 1.7rem;
  height: 1.7rem;
  color: #E3D7B0;
}
.star svg { width: 100%; height: 100%; display: block; }
.star.is-on {
  color: var(--sun);
  animation: pop 0.45s ease;
}
.star.is-on svg path { stroke: #E0A454; }

@keyframes pop {
  0% { transform: scale(0.4); }
  70% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

.step-meta {
  margin: 0 0 0.7rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--muted);
}

.step-line {
  font-size: clamp(1.35rem, 5.4vw, 1.85rem);
  line-height: 1.35;
  font-weight: 700;
  text-wrap: balance;
  max-width: 22ch;
  margin: 0 auto 1.15rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 999px;
  padding: 0.85rem 1.4rem;
  min-height: 64px;
  min-width: 64px;
  width: 100%;
  max-width: 24rem;
  font: inherit;
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  background: var(--green);
  color: var(--paper);
  border-color: var(--green);
}
.btn:hover { background: var(--sage); border-color: var(--sage); }
.btn:active { transform: scale(0.98); }
.btn[disabled] {
  cursor: default;
  transform: none;
}
.btn-ink {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.btn-ink:hover { background: #1a2420; border-color: #1a2420; }

.live {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

footer {
  padding: 0.5rem 0 1.6rem;
  color: var(--muted);
  font-size: 0.95rem;
}
footer p { margin: 0 0 0.7rem; }
footer p:last-child { margin-bottom: 0; }
footer a { color: var(--green); }
.noscript {
  max-width: 32rem;
  margin: 1rem auto;
  text-align: center;
  color: var(--muted);
}

/* Scene animations */
.sun-rise { animation: rise 1.1s ease-out both; }
@keyframes rise {
  from { transform: translateY(16px); opacity: 0.6; }
  to { transform: translateY(0); opacity: 1; }
}
.stretch-arms {
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: stretch 1.6s ease-in-out infinite;
}
@keyframes stretch {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
.bubble {
  animation: float-up 2.4s ease-in infinite;
  transform-box: fill-box;
}
.bubble:nth-of-type(2) { animation-delay: 0.4s; }
.bubble:nth-of-type(3) { animation-delay: 0.9s; }
.bubble:nth-of-type(4) { animation-delay: 1.3s; }
@keyframes float-up {
  0% { transform: translateY(0) scale(0.8); opacity: 0.15; }
  20% { opacity: 0.85; }
  100% { transform: translateY(-28px) scale(1.1); opacity: 0; }
}
.water {
  transform-box: fill-box;
  transform-origin: top center;
  animation: pour 1s ease-in-out infinite;
}
@keyframes pour {
  0%, 100% { transform: scaleY(0.9); }
  50% { transform: scaleY(1.08); }
}
.brush {
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: wiggle 0.55s ease-in-out infinite;
}
@keyframes wiggle {
  0%, 100% { transform: rotate(-16deg); }
  50% { transform: rotate(16deg); }
}
.tail {
  transform-box: fill-box;
  transform-origin: 10% 90%;
  animation: wag 0.7s ease-in-out infinite;
}
@keyframes wag {
  0%, 100% { transform: rotate(-8deg); }
  50% { transform: rotate(16deg); }
}
.sock {
  transform-box: fill-box;
  transform-origin: center center;
  animation: sock-wiggle 1.2s ease-in-out infinite;
}
@keyframes sock-wiggle {
  0%, 100% { transform: rotate(-8deg); }
  50% { transform: rotate(10deg); }
}
.steam {
  animation: steam 2s ease-in infinite;
  transform-box: fill-box;
}
.steam-b { animation-delay: 0.5s; }
.steam-c { animation-delay: 1s; }
@keyframes steam {
  0% { transform: translateY(0); opacity: 0.1; }
  30% { opacity: 0.7; }
  100% { transform: translateY(-16px); opacity: 0; }
}
.shoes {
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: shoe-bounce 1.1s ease-in-out infinite;
}
@keyframes shoe-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
.bag {
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: bag-sway 1.6s ease-in-out infinite;
}
@keyframes bag-sway {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}
.sparkle {
  transform-box: fill-box;
  transform-origin: center;
  animation: twinkle 1.4s ease-in-out infinite;
}
.sparkle-b { animation-delay: 0.4s; }
.sparkle-c { animation-delay: 0.8s; }
@keyframes twinkle {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.1); }
}
.celebrate-sun {
  transform-box: fill-box;
  transform-origin: center;
  animation: sun-pulse 2.2s ease-in-out infinite;
}
@keyframes sun-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

@media (min-width: 800px) {
  body { font-size: 1.125rem; }
  .panel { padding-top: 0.8rem; }
}
