:root {
  --sky: #22a9ee;
  --sky-deep: #087bd1;
  --leaf: #39b943;
  --leaf-dark: #188d33;
  --sun: #ffbd22;
  --sun-dark: #f07a11;
  --berry: #8b4cf5;
  --coral: #ff5a57;
  --cream: #fff7df;
  --ink: #174879;
  --muted: #5b7190;
  --white: #ffffff;
  --shadow: 0 16px 32px rgba(19, 79, 128, 0.24);
  --soft-shadow: 0 10px 20px rgba(19, 79, 128, 0.16);
  --radius: 28px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: #e7f7ff;
  line-height: 1.55;
  overflow-x: hidden;
}

body[dir="rtl"] {
  direction: ltr;
}

body[dir="ltr"] {
  direction: ltr;
}

.lang-he {
  direction: rtl;
  unicode-bidi: isolate;
}

body[data-lang="he"] .hero-copy,
body[data-lang="he"] .section-inner,
body[data-lang="he"] .legal-hero,
body[data-lang="he"] .legal-content,
body[data-lang="he"] .footer-inner {
  direction: rtl;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  min-height: 100vh;
  max-width: 100vw;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(232, 248, 255, 0) 0%, #e7f7ff 720px),
    url("assets/backgrounds/home.jpg") center top / cover fixed;
}

.nav {
  position: fixed;
  inset: 18px 18px auto 18px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  pointer-events: none;
}

.nav > * {
  pointer-events: auto;
}

body[data-lang="he"] .language-toggle {
  order: 1;
}

body[data-lang="he"] .nav-links {
  order: 2;
  direction: rtl;
}

body[data-lang="he"] .brand-mark {
  order: 3;
  direction: rtl;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 6px 14px;
  border: 4px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(10px);
  font-weight: 900;
}

.brand-mark img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 4px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  background: rgba(255, 250, 230, 0.86);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(10px);
}

.nav-link {
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #1a5790;
  font-size: 0.95rem;
  font-weight: 800;
}

.nav-link:hover,
.nav-link:focus-visible {
  background: rgba(34, 169, 238, 0.14);
  outline: none;
}

.language-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 52px;
  padding: 6px;
  border: 4px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  background: rgba(255, 250, 230, 0.9);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(10px);
}

.language-toggle button {
  min-width: 86px;
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #236092;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.language-toggle button[aria-pressed="true"] {
  color: var(--white);
  background: linear-gradient(#56c7ff, #148edf);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.32), 0 4px 10px rgba(20, 142, 223, 0.22);
}

.hero {
  position: relative;
  min-height: 92svh;
  padding: 104px 20px 48px;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.55), transparent 32%),
    linear-gradient(180deg, rgba(4, 144, 221, 0.05), rgba(20, 124, 84, 0.14));
}

.hero-inner {
  position: relative;
  width: min(1120px, 100%);
  min-height: 700px;
  display: grid;
  place-items: center;
}

.hero-copy {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: min(760px, 100%);
  margin: 0 auto;
  text-align: center;
  text-shadow: 0 3px 0 rgba(255, 255, 255, 0.54);
}

body[dir="rtl"] .hero-copy {
  align-items: center;
}

.hero-logo {
  width: min(560px, 92vw);
  filter: drop-shadow(0 12px 0 rgba(42, 104, 145, 0.18)) drop-shadow(0 18px 24px rgba(0, 74, 125, 0.18));
}

.hero h1,
.legal-hero h1 {
  margin: 0;
  max-width: 620px;
  color: var(--white);
  font-size: 2.95rem;
  line-height: 1.06;
  font-weight: 950;
  text-shadow: 0 5px 0 #155e9d, 0 12px 20px rgba(0, 83, 145, 0.3);
}

.hero p {
  margin: 0;
  max-width: 580px;
  color: #0f4e83;
  font-size: 1.28rem;
  font-weight: 850;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 58px;
  padding: 12px 24px;
  border: 4px solid var(--white);
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(#ffd84b, var(--sun) 52%, var(--sun-dark));
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.34), 0 9px 0 rgba(175, 91, 0, 0.24), var(--soft-shadow);
  font-size: 1.1rem;
  font-weight: 950;
  text-shadow: 0 2px 0 rgba(126, 73, 0, 0.28);
  transition: transform 150ms ease, filter 150ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  filter: saturate(1.06);
  outline: none;
}

.button.secondary {
  background: linear-gradient(#58c9ff, #1599ea 52%, #057ad2);
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.34), 0 9px 0 rgba(0, 94, 164, 0.24), var(--soft-shadow);
}

.hero-visual {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.phone-stack {
  position: absolute;
  inset: auto auto 34px -34px;
  width: min(285px, 25vw);
  transform: rotate(-4deg);
  filter: drop-shadow(0 28px 28px rgba(0, 72, 119, 0.28));
}

body[dir="rtl"] .phone-stack {
  inset: auto -34px 34px auto;
  transform: rotate(4deg);
}

.phone-stack img {
  border-radius: 34px;
}

.mascot-pop {
  position: absolute;
  width: min(260px, 23vw);
  inset: auto 24px 12px auto;
  filter: drop-shadow(0 18px 18px rgba(89, 45, 0, 0.2));
  animation: floaty 4.5s ease-in-out infinite;
}

body[dir="rtl"] .mascot-pop {
  inset: auto auto 12px 24px;
}

.animal-cloud {
  position: absolute;
  inset: auto 30px 118px auto;
  display: flex;
  gap: 8px;
}

body[dir="rtl"] .animal-cloud {
  inset: auto auto 118px 30px;
}

.animal-cloud img {
  width: 70px;
  height: 70px;
  object-fit: contain;
  padding: 8px;
  border: 4px solid var(--white);
  border-radius: 22px;
  background: rgba(255, 247, 223, 0.88);
  box-shadow: var(--soft-shadow);
}

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.section {
  position: relative;
  padding: 72px 20px;
}

.section-inner {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.section-title {
  margin: 0 auto 14px;
  max-width: 820px;
  color: var(--white);
  font-size: 2.65rem;
  line-height: 1.12;
  text-align: center;
  font-weight: 950;
  text-shadow: 0 4px 0 #155e9d, 0 12px 20px rgba(0, 83, 145, 0.24);
}

.section-lead {
  max-width: 780px;
  margin: 0 auto 34px;
  color: #1f5f8f;
  text-align: center;
  font-size: 1.16rem;
  font-weight: 780;
}

.ribbon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 10px 28px;
  border: 4px solid var(--white);
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(#57c4ff, #1593df);
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.26), var(--soft-shadow);
  font-weight: 950;
  text-shadow: 0 2px 0 rgba(0, 93, 150, 0.28);
}

.feature-grid,
.safety-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.feature-card,
.safety-card,
.world-card,
.legal-card {
  border: 5px solid var(--white);
  border-radius: var(--radius);
  background: rgba(255, 247, 223, 0.9);
  box-shadow: var(--shadow);
}

.feature-card,
.safety-card {
  min-height: 210px;
  padding: 24px;
  text-align: center;
}

.feature-icon,
.safety-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border: 4px solid var(--white);
  border-radius: 24px;
  color: var(--white);
  background: linear-gradient(#59cbff, #098de0);
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.3), var(--soft-shadow);
  font-size: 2.1rem;
  font-weight: 950;
}

.feature-card:nth-child(2) .feature-icon,
.safety-card:nth-child(2) .safety-icon {
  background: linear-gradient(#72e556, #23a632);
}

.feature-card:nth-child(3) .feature-icon,
.safety-card:nth-child(3) .safety-icon {
  background: linear-gradient(#b77cff, #7e43e8);
}

.feature-card:nth-child(4) .feature-icon,
.safety-card:nth-child(4) .safety-icon {
  background: linear-gradient(#ff8179, #f04b45);
}

.feature-card h3,
.safety-card h3,
.world-card h3,
.legal-card h3 {
  margin: 0 0 8px;
  font-size: 1.28rem;
  font-weight: 950;
}

.feature-card p,
.safety-card p,
.world-card p,
.legal-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 720;
}

.worlds-band {
  background:
    linear-gradient(rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.2)),
    url("assets/backgrounds/farm.jpg") center / cover;
}

.world-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.world-card {
  overflow: hidden;
  min-height: 306px;
}

.world-image {
  height: 170px;
  background-size: cover;
  background-position: center;
}

.world-body {
  padding: 20px;
}

.world-farm .world-image {
  background-image: url("assets/backgrounds/farm.jpg");
}

.world-jungle .world-image {
  background-image: url("assets/backgrounds/jungle.jpg");
}

.world-sea .world-image {
  background-image: url("assets/backgrounds/sea.jpg");
}

.world-polar .world-image {
  background-image: url("assets/backgrounds/polar.jpg");
}

.gallery {
  background: linear-gradient(180deg, #e8f8ff, #fef8df);
}

.screenshot-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.screen-shot {
  overflow: hidden;
  border: 5px solid var(--white);
  border-radius: 30px;
  background: #dff4ff;
  box-shadow: var(--shadow);
}

.screen-shot img {
  width: 100%;
  aspect-ratio: 9 / 19.5;
  object-fit: cover;
}

.safety {
  background:
    linear-gradient(180deg, rgba(255, 247, 223, 0.88), rgba(231, 247, 255, 0.92)),
    url("assets/backgrounds/home.jpg") center bottom / cover;
}

.legal-band {
  background: linear-gradient(180deg, #e7f7ff, #fff5dc);
}

.legal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.legal-card {
  min-height: 240px;
  padding: 24px;
}

.legal-card ul,
.legal-content ul {
  margin: 14px 0 0;
  padding-inline-start: 22px;
  color: var(--muted);
  font-weight: 720;
}

.legal-card li + li,
.legal-content li + li {
  margin-top: 6px;
}

.footer {
  padding: 36px 20px 46px;
  background: #0f7fd1;
  color: var(--white);
}

.footer-inner {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-weight: 850;
}

.legal-page {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(24, 165, 233, 0.2), rgba(255, 247, 223, 0.94) 430px),
    url("assets/backgrounds/home.jpg") center top / cover fixed;
}

.legal-hero {
  padding: 118px 20px 40px;
  text-align: center;
}

.legal-hero h1 {
  margin-inline: auto;
  text-align: center;
}

.legal-logo {
  width: min(420px, 86vw);
  margin: 0 auto 22px;
  filter: drop-shadow(0 12px 0 rgba(42, 104, 145, 0.18));
}

.legal-content {
  width: min(900px, calc(100% - 40px));
  margin: 0 auto 64px;
  padding: 34px;
  border: 5px solid var(--white);
  border-radius: var(--radius);
  background: rgba(255, 247, 223, 0.94);
  box-shadow: var(--shadow);
}

.legal-content h2 {
  margin: 28px 0 8px;
  font-size: 1.55rem;
  font-weight: 950;
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content p {
  margin: 0 0 14px;
  color: #385d7b;
  font-weight: 700;
}

.notice {
  padding: 18px;
  border: 4px solid #fff;
  border-radius: 22px;
  background: #e5f7ff;
  color: #1a5c8f;
  font-weight: 850;
}

.lang-en {
  display: none;
}

body[data-lang="en"] .lang-he {
  display: none;
}

body[data-lang="en"] .lang-en {
  display: revert;
}

body[data-lang="he"] .only-en,
body[data-lang="en"] .only-he {
  display: none;
}

body[data-lang="en"] .only-en,
body[data-lang="he"] .only-he {
  display: block;
}

@media (max-width: 980px) {
  .nav {
    position: absolute;
    flex-wrap: wrap;
  }

  .brand-mark {
    display: none;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: center;
    overflow-x: auto;
  }

  body[data-lang="he"] .nav-links {
    order: 3;
  }

  .hero {
    min-height: auto;
    padding-top: 150px;
  }

  .hero-inner {
    min-height: 760px;
  }

  .hero-copy,
  body[dir="rtl"] .hero-copy {
    align-items: center;
    text-align: center;
  }

  .hero h1,
  .legal-hero h1 {
    font-size: 2.4rem;
  }

  .hero-visual {
    inset: 0;
  }

  .phone-stack {
    inset: auto auto 16px -12px;
    transform: rotate(-3deg);
    width: min(310px, 70vw);
  }

  body[dir="rtl"] .phone-stack {
    inset: auto -12px 16px auto;
    transform: rotate(3deg);
  }

  .mascot-pop {
    width: min(240px, 48vw);
  }

  .feature-grid,
  .world-grid,
  .safety-grid,
  .legal-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .screenshot-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .nav {
    inset: 12px 12px auto 12px;
    justify-content: flex-end;
  }

  .nav-links {
    display: none;
  }

  .language-toggle {
    min-height: 48px;
    margin-inline-start: 0;
  }

  .language-toggle button {
    min-width: 72px;
  }

  .nav-link {
    padding: 8px 10px;
    font-size: 0.88rem;
  }

  .hero {
    padding: 96px 16px 30px;
    max-width: 100vw;
  }

  .hero-inner {
    min-height: 760px;
    align-items: start;
    padding-top: 0;
    overflow: hidden;
  }

  .hero-copy {
    width: 100%;
    max-width: 350px;
    gap: 14px;
  }

  .hero-logo {
    width: min(330px, 86vw);
  }

  .hero h1,
  .legal-hero h1 {
    max-width: 340px;
    font-size: 1.8rem;
  }

  .hero p {
    max-width: 335px;
    font-size: 1rem;
  }

  .button {
    width: 100%;
    min-height: 54px;
    padding: 10px 18px;
  }

  .hero-actions {
    width: 100%;
    gap: 10px;
    margin-top: 0;
  }

  .hero-visual {
    inset: 0;
  }

  .phone-stack {
    inset: auto auto 24px 8px;
    width: min(172px, 44vw);
    transform: rotate(-4deg);
    opacity: 0.92;
  }

  body[dir="rtl"] .phone-stack {
    inset: auto 8px 24px auto;
    transform: rotate(4deg);
  }

  .mascot-pop {
    inset: auto 12px 24px auto;
    width: min(156px, 40vw);
  }

  body[dir="rtl"] .mascot-pop {
    inset: auto auto 24px 12px;
  }

  .section {
    padding: 54px 16px;
  }

  .section-title {
    font-size: 2rem;
  }

  .feature-grid,
  .world-grid,
  .safety-grid,
  .legal-grid,
  .screenshot-row {
    grid-template-columns: 1fr;
  }

  .screenshot-row {
    width: min(330px, 100%);
    margin: 0 auto;
  }

  .animal-cloud {
    display: none;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .legal-content {
    width: calc(100% - 28px);
    padding: 22px;
  }
}
