/* BrainForKids — Midnight Signal
   Logical properties throughout (inline-start/end) so the Hebrew RTL version mirrors. */

:root {
  --midnight: #0A0F1F;
  --ink: #141C33;
  --ink-2: #0E1528;
  --line: #26304F;
  --faint: #1A2342;
  --cyan: #3DE0FF;
  --blue: #2F6BFF;
  --silver: #9AA6C4;
  --soft: #C9D1E4;
  --white: #FFFFFF;

  --latin: 'Space Grotesk', system-ui, sans-serif;
  --hebrew: 'Heebo', 'Space Grotesk', system-ui, sans-serif;
  --japanese: 'Noto Sans JP', 'Space Grotesk', system-ui, sans-serif;
  --font: var(--latin);

  --wrap: 1120px;
  --gutter: 24px;
  color-scheme: dark;
}
html[lang="he"] { --font: var(--hebrew); }
html[lang="ja"] { --font: var(--japanese); }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--midnight);
  color: var(--white);
  font-family: var(--font);
  font-weight: 300;
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
html[lang="ja"] body { line-break: strict; font-size: 17px; line-height: 1.85; }
a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--white); }
a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; border-radius: 4px; }
h1, h2, h3, p, ol { margin: 0; }
.latin { font-family: var(--latin); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 820px; }
.center { text-align: center; }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(10, 15, 31, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-block-end: 1px solid var(--faint);
}
.top-row { display: flex; align-items: center; gap: 32px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 14px; color: var(--white); }
.brand .mark { width: 62px; height: 30px; color: var(--white); }
.brand-word { font-size: 12px; font-weight: 500; letter-spacing: 5px; }
.nav { display: flex; gap: 28px; margin-inline-start: auto; }
.nav a, .langs a { color: var(--silver); font-size: 14px; font-weight: 400; }
.nav a:hover, .langs a:hover { color: var(--white); }
.langs { display: flex; gap: 14px; padding-inline-start: 24px; border-inline-start: 1px solid var(--line); }
.langs a[aria-current="page"] { color: var(--cyan); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; min-height: calc(100vh - 68px); display: flex; align-items: center; padding-block: 96px; }
.big-four {
  position: absolute; inset-inline-end: 4%; top: 6%;
  height: 88%; width: auto;
  fill: none; stroke: var(--faint); stroke-width: 5; stroke-linejoin: bevel;
}
.big-four circle { fill: var(--cyan); stroke: none; filter: drop-shadow(0 0 6px var(--cyan)); animation: pulse 4s ease-in-out infinite; }
html[dir="rtl"] .big-four { transform: none; }
.hero-inner { position: relative; display: flex; flex-direction: column; gap: 28px; }
.hero-mark { width: min(360px, 70vw); height: auto; color: var(--white); }
.hero-mark { filter: drop-shadow(0 0 0 transparent); }
.eyebrow { color: var(--cyan); font-size: 14px; font-weight: 500; letter-spacing: 3px; text-transform: uppercase; }
html[lang="he"] .eyebrow, html[lang="ja"] .eyebrow { letter-spacing: 1px; font-size: 16px; }
.hero-title { font-size: clamp(52px, 9vw, 120px); font-weight: 300; line-height: 1; letter-spacing: -0.03em; }
html[lang="ja"] .hero-title { letter-spacing: 0.02em; font-size: clamp(44px, 7.5vw, 96px); }
.hero-title .t1, .hero-title .t2 { display: block; }
.hero-title .t2 { font-weight: 500; }
.hero-title .dot { color: var(--cyan); }
.hero-lead { max-width: 640px; color: var(--soft); font-size: clamp(18px, 2vw, 22px); }
.link-cta {
  align-self: flex-start; color: var(--white); font-size: 15px; font-weight: 500;
  padding-block: 12px; border-block-end: 1px solid var(--cyan);
}
.link-cta:hover { color: var(--cyan); }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

/* ---------- Sections ---------- */
.section { padding-block: 128px; border-block-start: 1px solid var(--faint); }
.label { color: var(--cyan); font-size: 13px; font-weight: 500; letter-spacing: 4px; text-transform: uppercase; margin-block-end: 40px; }
html[lang="he"] .label, html[lang="ja"] .label { letter-spacing: 1px; font-size: 15px; }
h2 { font-size: clamp(36px, 5vw, 60px); font-weight: 300; line-height: 1.08; letter-spacing: -0.02em; }
html[lang="ja"] h2 { letter-spacing: 0.02em; line-height: 1.3; }
h3 { font-size: 22px; font-weight: 500; line-height: 1.3; }

/* Declaration */
.decl { font-size: clamp(22px, 2.6vw, 32px); line-height: 1.45; color: var(--soft); margin-block-end: 32px; }
.decl-2 { color: var(--white); font-weight: 400; }
.ages { margin-block-start: 48px; padding-block-start: 24px; border-block-start: 1px solid var(--line); color: var(--silver); font-size: 16px; }

/* Pillars */
.pillar-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; }
.num { color: var(--cyan); font-size: 15px; font-weight: 500; letter-spacing: 3px; margin-block-end: 20px; }
.pillar-lead { margin-block-start: 24px; color: var(--soft); font-size: 20px; }
.pillar-body > p { color: var(--soft); }
.steps { list-style: none; padding: 0; margin-block-start: 40px; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding-block: 20px; padding-inline-start: 56px; border-block-start: 1px solid var(--line); }
.steps li:last-child { border-block-end: 1px solid var(--line); }
.steps li::before {
  content: counter(s, decimal-leading-zero);
  position: absolute; inset-inline-start: 0; top: 22px;
  font-family: var(--latin); font-size: 13px; font-weight: 500; letter-spacing: 2px; color: var(--cyan);
}

.cards { display: grid; gap: 16px; margin-block-start: 64px; }
.cards.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { background: var(--ink-2); border: 1px solid var(--line); border-radius: 18px; padding: 32px 28px; display: flex; flex-direction: column; gap: 12px; }
.card p { color: var(--silver); font-size: 16px; }
.card-research { border-color: rgba(61, 224, 255, 0.45); }
.tag {
  display: inline-block; vertical-align: middle; margin-inline-start: 8px;
  font-size: 11px; font-weight: 500; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--cyan); border: 1px solid var(--cyan); border-radius: 999px; padding: 2px 10px;
}
.aside { margin-block-start: 48px; max-width: 760px; color: var(--soft); font-size: 20px; padding-inline-start: 24px; border-inline-start: 1px solid var(--cyan); }

/* Journey */
.journey h2 { margin-block-end: 72px; }
.path { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; position: relative; }
.path::before {
  content: ""; position: absolute; top: 9px; inset-inline: 16.66%; height: 1px;
  background: linear-gradient(90deg, var(--line), var(--cyan), var(--line));
  background-size: 200% 100%; animation: flow 6s linear infinite;
}
.path li { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.node { width: 19px; height: 19px; border-radius: 50%; background: var(--midnight); border: 1px solid var(--cyan); position: relative; margin-block-end: 16px; }
.node::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.path p { color: var(--silver); font-size: 16px; max-width: 260px; }
@keyframes flow { from { background-position: 200% 0; } to { background-position: 0 0; } }

/* Stage */
.stage { background: var(--ink-2); }
.stage .wrap { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.stage-four { width: 54px; height: 77px; fill: none; stroke: var(--white); stroke-width: 11; stroke-linejoin: bevel; }
.stage-four circle { fill: var(--cyan); stroke: none; filter: drop-shadow(0 0 8px var(--cyan)); animation: pulse 4s ease-in-out infinite; }
.stage-body { max-width: 600px; color: var(--soft); font-size: 20px; }
.pill { font-size: 14px; font-weight: 500; letter-spacing: 1px; color: var(--cyan); border: 1px solid var(--cyan); border-radius: 999px; padding: 12px 26px; }

/* Pilot */
.pilot-body { font-size: clamp(22px, 2.6vw, 30px); line-height: 1.45; color: var(--soft); }

/* Footer */
.foot { border-block-start: 1px solid var(--faint); padding-block: 48px; }
.foot-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot-brand { display: flex; align-items: center; gap: 16px; }
.foot-brand .mark { width: 72px; height: 35px; color: var(--white); }
.foot-tag { color: var(--silver); font-size: 14px; }
.foot-meta { display: flex; gap: 24px; flex-wrap: wrap; color: var(--silver); font-size: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .cards.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards.three { grid-template-columns: minmax(0, 1fr); }
  .pillar-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}
@media (max-width: 768px) {
  body { font-size: 17px; }
  .nav { display: none; }
  .langs { margin-inline-start: auto; border: 0; padding: 0; }
  .brand-word { display: none; }
  .section { padding-block: 88px; }
  .big-four { opacity: 0.6; height: 60%; top: auto; bottom: 4%; }
  .cards.four { grid-template-columns: minmax(0, 1fr); }
  .path { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .path::before { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .big-four circle, .stage-four circle, .path::before { animation: none; }
}
