/* Sero website (index.html = English, he.html = Hebrew, dir="rtl").
   Storybook look of the app: sky-to-sand background, white rounded cards, Montserrat / Noto Sans Hebrew.
   Logical properties (inline-start/end) everywhere, so the Hebrew page mirrors without extra rules. */

:root {
    --ink: #22324a;
    --ink-2: #4a5a70;
    --ink-3: #6b788c;
    --brand: #3a8ada;
    --brand-ink: #1f5e9c;
    --brand-edge: #1f5e9c;
    --line: #e6ebf1;
    --card-shadow: 0 18px 40px -22px rgba(31, 52, 82, 0.35);
    --radius: 26px;
    --page: 1160px;
    --gutter: clamp(16px, 4vw, 48px);
    --font: "Montserrat", "Noto Sans Hebrew", system-ui, -apple-system, "Segoe UI", sans-serif;
    /* the five skills, as on the app's Games page */
    --attention: #ece6fd;  --attention-ink: #4b3a99;
    --perception: #dff6f7; --perception-ink: #186a70;
    --learning: #e4f6e2;   --learning-ink: #2c6a28;
    --memory: #e3eefb;     --memory-ink: #24548c;
    --executive: #f9e3f3;  --executive-ink: #8a2a6f;
}
html[lang="he"] { --font: "Noto Sans Hebrew", "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: linear-gradient(180deg, #dfeefa 0%, #eef3f9 30%, #f9f5ee 100%) fixed, #eef3f9;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-ink); }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 8px; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; padding: 10px 14px; border-radius: 10px; background: #fff; z-index: 50; }
.skip:focus { top: 12px; }

.wrap { max-width: var(--page); margin: 0 auto; padding-inline: var(--gutter); }
section { padding-block: 48px; }
section[id] { scroll-margin-top: 76px; }
.section-head { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; margin-bottom: 26px; }
.section-head h2, .science h2 { margin: 0; font-size: clamp(30px, 3.4vw, 42px); font-weight: 900; letter-spacing: -0.01em; line-height: 1.15; }
html[lang="he"] .section-head h2, html[lang="he"] .science h2, html[lang="he"] h1 { letter-spacing: 0; }
.section-head p { margin: 0; max-width: 40rem; font-size: 17px; line-height: 1.6; color: var(--ink-2); }
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--card-shadow); }

/* ---- header ---- */
.top { position: sticky; top: 0; z-index: 20; background: rgba(238, 243, 249, 0.86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.top .wrap { display: flex; align-items: center; gap: 20px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-inline-end: auto; }
.brand img { width: 40px; height: 40px; }
.brand span { font-family: "Montserrat", sans-serif; font-size: 26px; font-weight: 900; color: #3f86e3; }
.nav { display: flex; align-items: center; gap: 24px; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 15px; font-weight: 600; }
.nav a:hover { color: var(--ink); }
.nav button.linklike { padding: 0; border: 0; background: none; font: inherit; font-size: 15px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border: 0; border-radius: 999px; background: var(--brand); color: #fff; font: inherit; font-size: 15px; font-weight: 800; text-decoration: none; box-shadow: 0 3px 0 var(--brand-edge); cursor: pointer; }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--brand-edge); }
.menu-btn { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; border: 0; border-radius: 12px; background: #fff; box-shadow: 0 2px 6px -2px rgba(31, 52, 82, 0.25); cursor: pointer; }

/* ---- hero ---- */
.hero .wrap { display: flex; align-items: center; gap: 48px; }
.hero-text { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.hero h1 { margin: 0; font-size: clamp(38px, 5.2vw, 64px); line-height: 1.04; font-weight: 900; letter-spacing: -0.02em; }
.hero-sub { margin: 0; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; color: var(--ink-2); max-width: 32rem; }
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.stores img { height: 52px; width: auto; }
.hero-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.hero-links a, .hero-links button { padding: 0; text-align: start; border: 0; background: none; font: inherit; font-size: 15px; font-weight: 700; color: var(--brand-ink); text-decoration: none; cursor: pointer; }
.credential { display: flex; align-items: center; gap: 12px; font-size: 14px; line-height: 1.4; color: var(--ink-2); }
.credential img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px #fff; }
.credential b { color: var(--ink); white-space: nowrap; }
.hero-art { flex: 1 1 420px; min-width: 0; padding: 20px 0 30px; }
/* Two phones: the home screen in front, the Tower being played behind it. Everything is placed in % of
   the box (460 x 620 at full size), so the picture scales down as one on smaller screens. */
.phones { position: relative; width: 100%; max-width: 460px; margin: 0 auto; aspect-ratio: 460 / 620; }
.phone { position: absolute; border-radius: 38px; padding: 9px; background: #1b2236; box-shadow: 0 30px 60px -24px rgba(31, 52, 82, 0.55); }
.phone img { width: 100%; border-radius: 30px; }
.phone-front { z-index: 1; top: 9.7%; inset-inline-start: 6.3%; width: 54.3%; transform: rotate(-3deg); }
.phone-back { top: 1.6%; inset-inline-start: 46.6%; width: 47.8%; transform: rotate(5deg); }
html[dir="rtl"] .phone-front { transform: rotate(3deg); }
html[dir="rtl"] .phone-back { transform: rotate(-5deg); }
.face { position: absolute; z-index: 2; filter: drop-shadow(0 8px 12px rgba(31, 52, 82, 0.24)); }
.face-1 { top: 4%; inset-inline-start: -2%;; width: 21.7%; transform: rotate(8deg); }
.face-2 { top: 0; inset-inline-end: -2%; width: 17%; transform: rotate(-8deg); }
.face-3 { bottom: 30%; inset-inline-start: 52%; width: 16%; transform: rotate(-12deg); }
.face-4 { bottom: 3%; inset-inline-start: 4%; width: 18%; transform: rotate(6deg); }
.face-5 { bottom: 22%; inset-inline-end: 1%; width: 18%; transform: rotate(-6deg); }

/* ---- press ---- */
.press { padding-block: 8px 40px; }
.press .wrap { display: flex; align-items: center; justify-content: center; gap: 14px 22px; }
.press-label { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
html[lang="he"] .press-label { letter-spacing: 0; font-size: 14px; }
.press-logos { display: flex; gap: 12px; }
.press-logos a { display: flex; align-items: center; height: 52px; padding: 0 18px; border-radius: 14px; background: #fff; box-shadow: 0 2px 8px -3px rgba(31, 52, 82, 0.2); }
.press-logos img { width: auto; }
.press-logos .ynet { height: 34px; }
.press-logos .globes { height: 22px; }
.press-logos .news08 { height: 30px; }

/* ---- what it helps with ---- */
.goals { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 52rem; margin: 0 auto 26px; padding: 0; list-style: none; }
.goals li { padding: 9px 16px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1.5px #d7e3f2; font-size: 15px; font-weight: 700; color: var(--brand-ink); }
.cards-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.feature { display: flex; flex-direction: column; gap: 12px; padding: 24px; }
.feature h3 { margin: 0; font-size: 20px; font-weight: 800; line-height: 1.3; }
.feature p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.feature .icon { width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; }
.step-num { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 900; }
.tint-purple { background: #ece6fd; color: #4b3a99; }
.tint-gold { background: #fff3d6; color: #8a5f0e; }
.tint-green { background: #e0f4eb; color: #1d7454; }
.tint-blue { background: #e4f0fc; color: #1f5e9c; }
.feature .visual { margin-top: auto; padding-top: 6px; }
.mini-games { display: flex; gap: 8px; }
.mini-games img { width: 31%; border-radius: 14px; }
.mini-moods { display: flex; gap: 4px; direction: ltr; }
.mini-moods img { width: 13.5%; }
.mini-bars { display: flex; align-items: flex-end; gap: 6px; height: 50px; direction: ltr; }
.mini-bars i { flex: 1; border-radius: 4px; }

/* ---- games ---- */
.skills { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.skill { display: flex; flex-direction: column; gap: 10px; padding: 16px 12px; border-radius: 24px; }
.skill h3 { margin: 0; font-size: 17px; font-weight: 800; }
.skill-icons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.skill.attention { background: var(--attention); } .skill.attention h3 { color: var(--attention-ink); }
.skill.perception { background: var(--perception); } .skill.perception h3 { color: var(--perception-ink); }
.skill.learning { background: var(--learning); } .skill.learning h3 { color: var(--learning-ink); }
.skill.memory { background: var(--memory); } .skill.memory h3 { color: var(--memory-ink); }
.skill.executive { background: var(--executive); } .skill.executive h3 { color: var(--executive-ink); }

/* ---- science ---- */
.science .wrap { display: flex; align-items: center; gap: 32px; }
.science-text { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.science-text p { margin: 0; font-size: 17px; line-height: 1.65; color: var(--ink-2); }
.person { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 14px; padding: 26px; border-radius: 28px; }
.person-head { display: flex; align-items: center; gap: 16px; }
.person-head img { width: 84px; height: 84px; border-radius: 22px; object-fit: cover; flex: none; }
.person-head > div { display: flex; flex-direction: column; gap: 4px; }
.person-name { font-size: 20px; font-weight: 800; }
.person-role { font-size: 14px; line-height: 1.4; color: var(--ink-3); }
.person p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink-2); }

/* ---- organizations ---- */
.orgs-box { display: flex; gap: 32px; padding: clamp(24px, 4vw, 44px); border-radius: 32px; background: linear-gradient(160deg, #3a8ada, #2f6fb8); color: #fff; box-shadow: 0 24px 50px -24px rgba(31, 94, 156, 0.6); }
.orgs-text { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.orgs-text h2 { margin: 0; font-size: clamp(28px, 3vw, 38px); font-weight: 900; line-height: 1.15; }
.orgs-text p { margin: 0; font-size: 17px; line-height: 1.55; color: #e4f0fc; }
.orgs-text ul { margin: 4px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 16px; font-weight: 600; }
.orgs-text li { display: flex; gap: 10px; }
.orgs-text li::before { content: "●"; color: #ffd77a; }
.contact { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 8px; padding: 22px; border-radius: 22px; background: #fff; color: var(--ink); }
.contact label { font-size: 13px; font-weight: 700; color: var(--ink-2); margin-top: 4px; }
.contact input { height: 46px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 12px; font: inherit; font-size: 16px; color: var(--ink); background: #fff; }
.contact input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(58, 138, 218, 0.15); }
.contact .btn { margin-top: 10px; border-radius: 14px; height: 50px; font-size: 16px; }
.contact .msg { margin: 0; min-height: 1.2em; font-size: 14px; font-weight: 600; color: #c0392b; }
.contact .msg.ok { color: #1d7454; }
.contact .done { margin: 0; padding: 24px 6px; text-align: center; font-size: 17px; font-weight: 700; color: var(--ink); }

/* ---- footer ---- */
footer .wrap { display: flex; align-items: center; justify-content: space-between; gap: 14px 24px; padding-block: 28px 40px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-3); }
footer .copy { display: flex; align-items: center; gap: 8px; }
footer .copy img { width: 24px; height: 24px; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
footer nav a { color: var(--ink-2); text-decoration: none; }
footer nav a:hover { color: var(--ink); text-decoration: underline; }
.lang-switch { font-weight: 700; color: var(--brand-ink) !important; }
html:not(.il) .lang-switch.il-only { display: none; }

/* ---- plans popup ---- */
dialog.plans { width: min(860px, calc(100% - 32px)); max-height: calc(100% - 32px); padding: 0; border: 0; border-radius: 30px; color: var(--ink); background: #fff; box-shadow: 0 40px 80px -30px rgba(10, 16, 32, 0.6); }
dialog.plans::backdrop { background: rgba(20, 28, 48, 0.55); }
.plans-body { position: relative; display: flex; flex-direction: column; gap: 18px; padding: 34px 36px 30px; }
.plans-close { position: absolute; top: 16px; inset-inline-end: 16px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: #f2f5f9; cursor: pointer; }
.plans h2 { margin: 0; font-size: 32px; font-weight: 900; }
.plans-sub { margin: -10px 0 0; font-size: 17px; line-height: 1.5; color: var(--ink-2); }
.plan-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.plan { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 22px; border-radius: 22px; background: #f6f8fb; box-shadow: inset 0 0 0 1.5px var(--line); }
.plan.best { background: #eef6fe; box-shadow: inset 0 0 0 2.5px var(--brand); }
.plan .name { font-size: 16px; font-weight: 800; color: var(--ink-2); }
.plan .price { font-size: 34px; font-weight: 900; letter-spacing: -0.02em; }
html[lang="he"] .plan .price { letter-spacing: 0; }
.plan .price small { font-size: 15px; font-weight: 700; color: var(--ink-3); }
.plan .desc { font-size: 14px; line-height: 1.5; color: var(--ink-3); }
.plan .tag { position: absolute; top: -12px; inset-inline-end: 18px; padding: 4px 12px; border-radius: 999px; background: #f0ad35; color: #3b2a05; font-size: 13px; font-weight: 800; }
.plans-note { margin: 0; font-size: 14px; color: var(--ink-3); }
.plans-orgs { display: flex; align-items: center; gap: 18px; padding: 18px 20px; border-radius: 20px; background: #fff7e6; }
.plans-orgs .icon { flex: none; width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: #ffe7b0; }
.plans-orgs .text { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.plans-orgs b { font-size: 16px; color: var(--ink); }

/* ---- tablet and phone ---- */
@media (max-width: 960px) {
    .nav { display: none; position: absolute; top: 100%; inset-inline: 12px; flex-direction: column; align-items: stretch; gap: 0; padding: 8px; border-radius: 20px; background: #fff; box-shadow: 0 20px 40px -18px rgba(31, 52, 82, 0.4); }
    .nav.open { display: flex; }
    .nav a, .nav button.linklike { padding: 14px 12px; font-size: 17px; text-align: start; border-radius: 12px; }
    .menu-btn { display: inline-flex; }
    .hero .wrap { flex-direction: column; align-items: stretch; gap: 8px; }
    .hero-text, .hero-art, .science-text, .person, .orgs-text, .contact { flex: none; }  /* stacked: no desktop widths as heights */
    .hero-art { width: 100%; padding: 16px 0 28px; }
    .science .wrap, .orgs-box { flex-direction: column; }
    .skills { grid-template-columns: 1fr; gap: 12px; }
    .skill { padding: 14px; }
    .skill-icons { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    footer .wrap { flex-direction: column-reverse; text-align: center; }
    footer nav { justify-content: center; }
}
@media (max-width: 700px) {
    .cards-3 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    section { padding-block: 30px; }
    .top .wrap { min-height: 64px; gap: 10px; }
    .brand img { width: 32px; height: 32px; }
    .brand span { font-size: 22px; }
    .hero h1 { font-size: 38px; }
    .stores { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stores img { height: auto; width: 100%; }
    .hero-links { flex-direction: column; align-items: flex-start; gap: 10px; }
    .phone { border-radius: 28px; padding: 6px; }
    .phone img { border-radius: 22px; }
    .press .wrap { flex-direction: column; gap: 12px; }
    .press-logos a { height: 46px; padding: 0 12px; }
    .press-logos .ynet { height: 28px; } .press-logos .globes { height: 17px; } .press-logos .news08 { height: 25px; }
    .goals li { padding: 8px 13px; font-size: 14px; }
    .feature { padding: 20px; }
    .plans-body { padding: 26px 18px 22px; }
    .plan-list { grid-template-columns: 1fr; gap: 10px; }
    .plan { flex-direction: row; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 10px; padding: 16px; }
    .plan .price { font-size: 22px; }
    .plan .desc { flex-basis: 100%; }
    .plan .tag { position: static; display: inline-block; margin-inline-start: 6px; padding: 2px 8px; font-size: 11px; vertical-align: 2px; }
    .plans-orgs { flex-direction: column; align-items: stretch; gap: 10px; padding: 16px; }
    .plans-orgs .icon { display: none; }
    dialog.plans { margin-bottom: 0; border-radius: 28px 28px 0 0; width: 100%; max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; animation: none !important; }
}
