@import url('https://fonts.googleapis.com/css2?family=Noto+Kufi+Arabic:wght@400;600;700;800&display=swap');

:root {
  --sky: #72cfe6;
  --cream: #fffceb;
  --ink: #382d27;
  --red: #d82839;
  --green: #168b57;
  --olive: #92c85e;
  --hill: #79b43f;
  --shadow: 0 18px 0 rgba(88, 64, 37, 0.14), 0 5px 18px rgba(55, 56, 43, 0.12);
}

* { box-sizing: border-box; }

html, body { min-height: 100%; margin: 0; }

body {
  overflow-x: hidden;
  background: var(--sky);
  color: var(--ink);
  font-family: "Noto Kufi Arabic", Tahoma, Arial, sans-serif;
}

button, input { font: inherit; }
button { cursor: pointer; }

.scene {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
  overflow: hidden;
  padding: 16px 20px 260px;
  background: linear-gradient(180deg, #70cee6 0%, #a6e4e2 42%, #fff2be 77%, #f6d98f 100%);
}

.scene::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  opacity: .42;
  background: radial-gradient(ellipse at 50% 16%, rgba(255,255,255,.62), transparent 34%), radial-gradient(ellipse at 19% 44%, rgba(255,255,255,.3), transparent 24%);
}

.sky-glow { position: absolute; top: 36px; right: 17%; width: 124px; height: 124px; border-radius: 50%; background: rgba(255,236,138,.75); filter: blur(3px); z-index: -2; }
.sun-ray { position: absolute; z-index: -1; width: 11px; height: 58px; border-radius: 9px; background: #f5b715; transform-origin: bottom center; }
.sun-ray-one { top: 18px; right: 13%; transform: rotate(16deg); }
.sun-ray-two { top: 44px; right: 6.5%; height: 49px; transform: rotate(-29deg); }
.sun-ray-three { top: 21px; right: 20%; height: 47px; transform: rotate(45deg); }

.cloud { position: absolute; z-index: -1; width: 148px; height: 42px; border-radius: 50px; background: rgba(255,255,255,.9); filter: blur(.2px); }
.cloud::before, .cloud::after { content: ""; position: absolute; bottom: 6px; border-radius: 50%; background: inherit; }
.cloud::before { right: 43px; width: 65px; height: 65px; }
.cloud::after { right: 91px; width: 48px; height: 48px; }
.cloud-one { top: 83px; left: -30px; transform: scale(1.07); }
.cloud-two { top: 170px; right: -90px; transform: scale(.78); opacity: .55; }

.topbar { position: relative; z-index: 5; display: flex; width: min(100%, 680px); margin: 0 auto; align-items: center; justify-content: space-between; gap: 12px; direction: ltr; }
.icon-button { display: grid; width: 42px; height: 42px; place-items: center; border: 3px solid #f5bd10; border-radius: 13px; color: #fff; background: #e32b31; box-shadow: 0 4px 0 rgba(96, 72, 29, .2); font-size: 22px; transition: transform .18s ease, filter .18s ease; }
.icon-button:hover, .icon-button:focus-visible { transform: translateY(-2px) rotate(-3deg); filter: brightness(1.08); outline: none; }
.progress-pill { display: flex; min-width: 360px; align-items: center; justify-content: center; gap: 10px; padding: 8px 18px; border: 2px solid #168b57; border-radius: 12px; color: #4c4a3c; background: rgba(255,255,246,.88); box-shadow: 0 3px 0 rgba(65, 79, 42, .12); direction: rtl; font-size: 15px; }
.progress-pill .star { color: #f0ae00; font-size: 19px; }
.progress-pill .trophy { font-size: 18px; }
.divider { color: #8f8a73; }

.guide-row { position: relative; z-index: 4; display: flex; width: min(100%, 650px); min-height: 80px; margin: 10px auto 10px; align-items: center; justify-content: center; }
.guide-bubble { position: relative; width: min(100%, 390px); margin-right: 45px; padding: 11px 16px 10px; border: 2px solid #168b57; border-radius: 15px; color: #38372f; background: #fffef3; box-shadow: 0 4px 0 rgba(90, 77, 51, .14); text-align: center; font-size: 13px; line-height: 1.6; }
.guide-bubble::after { content: ""; position: absolute; top: 14px; right: -15px; width: 22px; height: 22px; border-top: 2px solid #168b57; border-right: 2px solid #168b57; background: #fffef3; transform: rotate(45deg); }
.sunbird { position: absolute; z-index: 2; right: calc(50% - 248px); display: grid; width: 70px; height: 70px; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; filter: drop-shadow(0 4px 0 rgba(53, 99, 98, .18)); transition: transform .22s ease; }
.sunbird:hover, .sunbird:focus-visible { transform: translateY(-4px) rotate(-8deg); outline: none; }
.bird-face { position: relative; font-size: 53px; line-height: 1; transform: scaleX(-1); }
.bird-wing { position: absolute; z-index: 2; top: 29px; right: 10px; color: #f5a80a; font-size: 30px; transform: rotate(-17deg); }
.bird-spark { position: absolute; top: 1px; left: 4px; color: #efbd16; font-size: 17px; }

.adventure-card, .journey-card { position: relative; z-index: 3; width: min(100%, 650px); margin: 6px auto 0; overflow: hidden; border: 1px solid rgba(125, 86, 35, .2); border-radius: 18px; background: rgba(255, 253, 236, .95); box-shadow: var(--shadow); text-align: center; }
.adventure-card { animation: card-in .65s ease both; }
.candy-stripe { height: 10px; background: repeating-linear-gradient(90deg, #d52d45 0 12px, #f9f1c6 12px 21px, #198b58 21px 31px, #f9f1c6 31px 40px); }
.card-content { padding: 16px 38px 20px; }
.olive-branch { position: absolute; top: 10px; left: 15px; font-size: 25px; opacity: .8; transform: rotate(-24deg); }
.eyebrow { margin: 0 0 4px; color: #b17322; font-size: 11px; font-weight: 700; letter-spacing: .05em; }
.adventure-card .eyebrow { display: inline-block; margin-bottom: 7px; padding: 4px 12px; border: 1px solid rgba(177, 115, 34, .35); border-radius: 999px; color: #7b5425; background: rgba(245, 218, 135, .25); }
h1 { margin: 3px 0 3px; color: var(--red); font-size: clamp(30px, 5vw, 43px); line-height: 1.2; text-shadow: 1px 2px 0 rgba(168, 43, 27, .12); }
.adventure-card h2 { margin: 0; color: #107b4e; font-size: clamp(16px, 2.7vw, 21px); line-height: 1.7; }
.grade { margin: 7px 0 3px; color: #5b4731; font-size: 13px; font-weight: 600; }
.intro { margin: 0 auto 12px; max-width: 540px; font-size: 13px; line-height: 1.8; }
.name-field { display: block; margin: 0 auto 6px; max-width: 470px; }
.name-field input { width: 100%; border: 2px solid #168b57; border-radius: 10px; outline: 0; padding: 9px 14px; color: #3b342b; background: #fffef7; box-shadow: inset 0 2px 0 rgba(82, 61, 29, .05); text-align: center; transition: box-shadow .18s ease, border-color .18s ease; }
.name-field input::placeholder { color: #8e897c; }
.name-field input:focus { border-color: #d82839; box-shadow: 0 0 0 4px rgba(216, 40, 57, .13); }
.error-message { min-height: 19px; margin: 0; color: #c52333; font-size: 11px; font-weight: 700; }
.start-button, .next-button { border: 0; border-radius: 13px; padding: 11px 25px; color: #fffef1; background: linear-gradient(#e8353a, #c82336); box-shadow: 0 5px 0 #932538, 0 7px 15px rgba(128, 47, 25, .2); font-size: 16px; font-weight: 800; transition: transform .16s ease, box-shadow .16s ease, filter .16s ease; }
.start-button:hover, .next-button:hover, .start-button:focus-visible, .next-button:focus-visible { transform: translateY(-2px); filter: saturate(1.08); outline: none; }
.start-button:active, .next-button:active { transform: translateY(3px); box-shadow: 0 2px 0 #932538; }
.start-button span, .next-button span { margin-right: 5px; }
.credit { margin: 10px 0 0; color: #3e362d; font-size: 12px; }
.credit strong, footer strong { color: #7b4527; }

.journey-card { padding: 26px 30px 28px; animation: card-in .48s ease both; }
.journey-icon { font-size: 38px; }
.journey-card h2 { margin: 0 0 6px; color: #b32e34; font-size: 25px; }
.journey-card p:not(.eyebrow) { max-width: 470px; margin: 0 auto 15px; font-size: 14px; line-height: 1.9; }
.mini-grid { display: grid; grid-template-columns: repeat(5, 27px); grid-auto-rows: 27px; width: max-content; margin: 8px auto 19px; border: 2px solid #529a70; border-radius: 5px; background: repeating-linear-gradient(0deg, transparent 0 25px, rgba(59,126,83,.27) 25px 27px), repeating-linear-gradient(90deg, transparent 0 25px, rgba(59,126,83,.27) 25px 27px), #f4efc8; }
.mini-grid span { display: grid; place-items: center; color: #d94b3d; font-size: 22px; line-height: 1; }
.point { animation: pulse 1.5s ease-in-out infinite; }
.is-hidden { display: none; }

.landscape { position: absolute; z-index: -1; right: 0; bottom: 0; left: 0; height: 275px; overflow: hidden; }
.far-hill { position: absolute; right: -5%; bottom: 106px; width: 110%; height: 140px; border-radius: 50% 50% 0 0 / 72% 72% 0 0; background: #9dce63; transform: rotate(2deg); }
.near-hill { position: absolute; right: -5%; bottom: -66px; width: 110%; height: 215px; border-radius: 50% 50% 0 0 / 40% 40% 0 0; background: #79b43f; }
.ground-line { position: absolute; right: 18%; bottom: 102px; width: 42%; height: 5px; border-radius: 50%; background: #4d923d; transform: rotate(-5deg); opacity: .8; }
.house { position: absolute; right: 7%; bottom: 91px; width: 103px; height: 108px; border-radius: 47px 47px 3px 3px; background: #f4e6aa; box-shadow: inset 12px 0 rgba(215, 190, 120, .13); }
.house .roof { position: absolute; top: -12px; right: -7px; width: 116px; height: 50px; border-radius: 57% 57% 20% 20%; background: #d6ab5c; }
.house .door { position: absolute; z-index: 2; right: 39px; bottom: 0; width: 30px; height: 45px; border-radius: 16px 16px 0 0; background: #886260; }
.tree { position: absolute; bottom: 66px; width: 105px; height: 155px; }
.tree i, .tree b, .tree em { position: absolute; display: block; border-radius: 50%; background: #71ac50; }
.tree i { right: 20px; bottom: 52px; width: 64px; height: 82px; background: #4f984c; }
.tree b { right: 50px; bottom: 55px; width: 55px; height: 57px; }
.tree em { right: 2px; bottom: 44px; width: 64px; height: 69px; background: #8dbe5a; }
.tree span { position: absolute; right: 41px; bottom: 0; width: 18px; height: 68px; border-radius: 2px; background: #87543d; }
.tree-left { right: 42%; transform: scale(.82); }
.tree-right { right: 11%; transform: scale(1.17); }
.tree-center { right: 54%; bottom: 39px; transform: scale(.62); }

footer { position: absolute; z-index: 5; right: 0; bottom: 13px; left: 0; color: #4a392b; text-align: center; font-size: 12px; font-weight: 600; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

@keyframes card-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.23); } }

@media (max-width: 640px) {
  .scene { padding: 12px 12px 210px; }
  .topbar { gap: 7px; }
  .icon-button { width: 38px; height: 38px; font-size: 19px; }
  .progress-pill { min-width: 0; flex: 1; padding: 7px 9px; gap: 6px; font-size: 11px; }
  .guide-row { min-height: 75px; }
  .guide-bubble { margin-right: 31px; padding: 9px 10px; font-size: 11px; }
  .sunbird { right: calc(50% - 152px); width: 58px; height: 58px; }
  .bird-face { font-size: 42px; }
  .bird-wing { top: 24px; right: 9px; font-size: 25px; }
  .card-content { padding: 14px 17px 18px; }
  .olive-branch { left: 7px; top: 8px; font-size: 20px; }
  .grade, .intro { font-size: 11px; }
  .journey-card { padding: 20px 16px 23px; }
  .journey-card h2 { font-size: 21px; }
  .journey-card p:not(.eyebrow) { font-size: 12px; }
  .landscape { height: 206px; }
  .house { right: -10px; bottom: 61px; transform: scale(.72); transform-origin: bottom right; }
  .tree-left { right: 28%; bottom: 38px; transform: scale(.55); }
  .tree-right { right: -13px; bottom: 28px; transform: scale(.8); }
  .tree-center { right: 47%; bottom: 7px; transform: scale(.45); }
  .far-hill { bottom: 76px; }
  .near-hill { bottom: -90px; }
  .ground-line { bottom: 74px; right: 12%; width: 60%; }
  footer { bottom: 7px; font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
