/* IDEACHAIN TECHNOLOGY — site styles (brand: navy + blue→purple, Montserrat / Cairo) */
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/montserrat-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/montserrat-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Montserrat"; font-style: italic; font-weight: 100 900; font-display: swap;
  src: url("../fonts/montserrat-latin-wght-italic.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F; }
@font-face { font-family: "Montserrat"; font-style: italic; font-weight: 100 900; font-display: swap;
  src: url("../fonts/montserrat-latin-ext-wght-italic.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+1E00-1E9F; }
@font-face { font-family: "Cairo"; font-style: normal; font-weight: 200 1000; font-display: swap;
  src: url("../fonts/cairo-arabic-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }

:root {
  --navy: #101E4B;
  --navy-2: #0A1436;
  --blue: #016BFD;
  --cyan: #15C9EE;
  --purple: #7A2FE6;
  --lavender: #E9E4FB;
  --paper: #F4F6FE;
  --white: #FFFFFF;
  --ink: #101E4B;
  --slate: #5A6487;
  --line: #DDE2F2;
  --grad: linear-gradient(120deg, var(--cyan) 0%, var(--blue) 42%, var(--purple) 100%);
  --grad-text: linear-gradient(100deg, #8A3DF0 0%, var(--purple) 50%, #5B3BF5 100%);
  --accent: var(--blue);

  --f: "Montserrat", "Cairo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: clamp(1.9rem, 3.2vw, 2.6rem);
  --step-4: clamp(2.3rem, 5.4vw, 4.4rem);
  --wrap: 74rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --r-lg: 22px;
  --r-md: 14px;
}
[dir="rtl"] { --f: "Cairo", "Montserrat", system-ui, Tahoma, sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--f); font-size: var(--step-0); line-height: 1.65; font-weight: 450; }
[dir="rtl"] body { font-size: 1.1rem; line-height: 1.8; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { color: var(--blue); }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.15; margin: 0; font-weight: 750; letter-spacing: -0.02em; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { letter-spacing: 0; line-height: 1.4; font-weight: 800; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; inset-inline-start: 1rem; top: -4rem; background: var(--navy); color: #fff; padding: .6rem 1rem; z-index: 10; border-radius: 8px; }
.skip:focus { top: 1rem; }
.ltr { direction: ltr; unicode-bidi: isolate; }

/* ---------- wordmark (logo lockup) */
.wordmark { display: inline-flex; align-items: center; gap: .6rem; direction: ltr; }
.wm-mark svg { width: 2.5rem; height: 2.5rem; }
.wm-text { display: flex; flex-direction: column; line-height: 1; }
.wm-name { font-family: "Montserrat", sans-serif; font-style: italic; font-weight: 850; font-size: 1.3rem; letter-spacing: -0.01em; }
.wm-a { color: var(--navy); }
.wm-b { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wm-sub { font-family: "Montserrat", sans-serif; font-size: .52rem; font-weight: 650; letter-spacing: .42em; color: var(--navy); margin-top: .3rem; padding-inline-start: .1rem; }
.on-dark .wm-a, .on-dark .wm-sub { color: #fff; }
.on-dark .wm-b { background: linear-gradient(100deg, #A472FF, #7FB2FF); -webkit-background-clip: text; background-clip: text; }

/* ---------- header */
.site-head { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-head .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 4.6rem; }
.brand { text-decoration: none; }
.nav { margin-inline-start: auto; display: flex; gap: 1.8rem; }
.nav a { text-decoration: none; color: var(--slate); font-weight: 550; font-size: .95rem; }
.nav a:hover { color: var(--navy); }
.langs { display: flex; background: var(--paper); border-radius: 999px; padding: 4px; gap: 2px; }
.langs a { text-decoration: none; font-size: var(--step--1); padding: .25rem .75rem; border-radius: 999px; color: var(--slate); font-weight: 600; min-width: 2.4rem; text-align: center; }
.langs a[aria-current="true"] { background: var(--navy); color: #fff; }
@media (max-width: 820px) { .nav { display: none; } .langs { margin-inline-start: auto; } }
@media (max-width: 420px) { .wm-sub { display: none; } .wm-mark svg { width: 2.1rem; height: 2.1rem; } .wm-name { font-size: 1.1rem; } }

/* ---------- buttons */
.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2.2rem; }
.btn { display: inline-flex; align-items: center; gap: .55rem; padding: .85rem 1.5rem; border-radius: 12px; text-decoration: none; font-weight: 650; font-size: .98rem; border: 1.5px solid transparent; transition: transform .15s, box-shadow .15s, background .15s; }
.btn-solid { background: var(--grad); color: #fff; box-shadow: 0 8px 24px -10px rgba(1,107,253,.7); }
.btn-solid:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 12px 28px -10px rgba(122,47,230,.8); }
.btn-line { border-color: var(--line); color: var(--navy); background: var(--white); }
.btn-line:hover { border-color: var(--blue); color: var(--blue); }
.on-dark .btn-line { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.on-dark .btn-line:hover { border-color: #fff; color: #fff; }

/* ---------- hero (signature: dark navy stage with the glowing mark) */
.hero { background: var(--navy-2); color: #fff; position: relative; overflow: hidden; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: -30% -10% auto auto; width: 70vw; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(122,47,230,.55) 0%, rgba(1,107,253,.25) 40%, transparent 68%); z-index: -1; }
[dir="rtl"] .hero::before { inset: -30% auto auto -10%; }
.hero::after { content: ""; position: absolute; inset: auto auto -40% -15%; width: 50vw; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(21,201,238,.22), transparent 65%); z-index: -1; }
.hero .wrap { display: grid; grid-template-columns: 1.25fr 1fr; gap: 2rem; align-items: center; padding-block: clamp(3.5rem, 9vw, 6.5rem); }
.hero h1 { font-size: var(--step-4); font-weight: 800; max-width: 15ch; letter-spacing: -0.03em; }
[dir="rtl"] .hero h1 { letter-spacing: 0; font-weight: 900; max-width: 14ch; }
.hero .lede { font-size: var(--step-1); color: #B9C2E6; max-width: 40ch; margin-top: 1.4rem; font-weight: 400; }
.hero-tagline { display: inline-block; font-weight: 600; font-size: .95rem; margin-bottom: 1.4rem; padding: .35rem .9rem; border-radius: 999px; background: rgba(255,255,255,.08); color: #D6DCF5; border: 1px solid rgba(255,255,255,.14); }
.hero-mark { justify-self: center; width: min(100%, 22rem); position: relative; }
.hero-mark svg { width: 100%; height: auto; filter: drop-shadow(0 30px 60px rgba(122,47,230,.45)); }
@media (prefers-reduced-motion: no-preference) {
  .hero-mark svg { animation: mark-in 1s cubic-bezier(.2,.8,.2,1) both .1s; }
  @keyframes mark-in { from { opacity: 0; transform: scale(.88) rotate(-8deg); } }
}
@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-mark { width: 9rem; grid-row: 1; justify-self: start; }
}

/* ---------- sections */
.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section-alt { background: var(--white); }
.section-head { display: grid; gap: .8rem; margin-bottom: 2.6rem; max-width: 44rem; }
.section-head h2 { font-size: var(--step-3); }
.section-head p { color: var(--slate); margin: 0; }

/* services */
.services { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.service { background: var(--paper); border-radius: var(--r-lg); padding: 1.6rem 1.5rem 1.4rem; border: 1px solid transparent; transition: border-color .15s; }
.service:hover { border-color: var(--lavender); }
.service .ico { width: 3rem; height: 3rem; border-radius: 12px; display: grid; place-items: center; background: var(--white); color: var(--purple); box-shadow: 0 1px 0 var(--line); margin-bottom: 1.1rem; }
.service .ico svg { width: 1.5rem; height: 1.5rem; }
.service h3 { font-size: 1.12rem; font-weight: 700; margin-bottom: .4rem; }
.service p { color: var(--slate); font-size: .95rem; margin: 0; }
@media (max-width: 900px) { .services { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .services { grid-template-columns: 1fr; } }

/* apps list */
.app-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.app-row { display: grid; grid-template-columns: auto 1fr auto; gap: 1rem 1.4rem; align-items: center; padding: 1.3rem 1.5rem; background: var(--white); border-radius: var(--r-lg); border: 1px solid var(--line); }
.app-mark { display: block; width: 3.6rem; height: 3.6rem; border-radius: 22%; background: var(--grad); position: relative; }
.app-mark::after { content: ""; position: absolute; inset: 30% 28% 30% 36%; background: #fff; clip-path: polygon(0 0, 100% 50%, 0 100%); border-radius: 2px; }
.app-logo { width: 3.6rem; height: 3.6rem; border-radius: 22%; object-fit: cover; display: block; }
.app-row h3 { font-size: var(--step-1); font-weight: 700; }
.app-row h3 a { text-decoration: none; }
.app-meta { display: flex; flex-wrap: wrap; gap: .4rem .9rem; margin-top: .3rem; color: var(--slate); font-size: var(--step--1); align-items: center; }
.tag { display: inline-flex; align-items: center; gap: .4rem; }
.dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--slate); }
.dot-live { background: #1FA971; }
.dot-soon { background: var(--cyan); }
.dot-dev { background: var(--purple); }
.badge { font-size: .72rem; font-weight: 600; background: var(--lavender); color: var(--purple); border-radius: 999px; padding: .05rem .6rem; }
.app-tagline { grid-column: 2 / 4; color: var(--slate); margin: 0; max-width: 62ch; font-size: .97rem; }
.app-row .more { text-decoration: none; font-weight: 650; color: var(--blue); }
@media (max-width: 640px) { .app-row { grid-template-columns: auto 1fr; } .app-row .more { grid-column: 2; justify-self: start; } .app-tagline { grid-column: 1 / -1; } }
.empty { color: var(--slate); }

/* about */
.about { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.about h2 { font-size: var(--step-3); margin-bottom: 1.4rem; }
.about p { font-size: var(--step-1); max-width: 36ch; font-weight: 450; }
.facts { margin: 0; display: grid; grid-template-columns: auto 1fr; background: var(--paper); border-radius: var(--r-lg); padding: .5rem 1.5rem; }
.facts dt, .facts dd { padding-block: .95rem; border-bottom: 1px solid var(--line); margin: 0; }
.facts dt:nth-last-of-type(1), .facts dd:last-of-type { border-bottom: 0; }
.facts dt { color: var(--slate); padding-inline-end: 1.5rem; font-size: var(--step--1); padding-top: 1.1rem; }
.facts dd { font-weight: 600; }
@media (max-width: 820px) { .about { grid-template-columns: 1fr; } }

/* contact */
.contact-card { background: var(--navy-2); color: #fff; border-radius: 28px; padding: clamp(2rem, 5vw, 3.5rem); position: relative; overflow: hidden; isolation: isolate; }
.contact-card::before { content: ""; position: absolute; inset: auto -10% -60% auto; width: 32rem; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(122,47,230,.5), transparent 65%); z-index: -1; }
[dir="rtl"] .contact-card::before { inset: auto auto -60% -10%; }
.contact-card h2 { font-size: var(--step-3); margin-bottom: .8rem; }
.contact-card .lede { color: #B9C2E6; max-width: 46ch; }
.mail-big { display: inline-block; font-size: clamp(1.4rem, 4.5vw, 2.8rem); font-weight: 700; letter-spacing: -0.02em; text-decoration: none; margin-block: 1rem 1.8rem; overflow-wrap: anywhere; direction: ltr; unicode-bidi: isolate; background: linear-gradient(100deg, #7FD8FF, #A98BFF); -webkit-background-clip: text; background-clip: text; color: transparent; font-family: "Montserrat", sans-serif; }
.mail-big:hover { color: transparent; opacity: .85; }
.contact-lines { display: flex; flex-wrap: wrap; gap: 1rem 3rem; color: #B9C2E6; font-size: .97rem; }
.contact-lines strong { display: block; color: #fff; font-weight: 650; }

/* ---------- footer */
.site-foot { background: var(--navy-2); color: #AEB7DA; font-size: var(--step--1); padding-block: 3.2rem 2rem; }
.site-foot a { color: #fff; }
.site-foot a:hover { color: var(--cyan); }
.foot-brand { margin-bottom: 1rem; }
.foot-tagline { color: #D6DCF5; font-weight: 500; margin-bottom: 1.6rem; }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2rem; }
.site-foot h2 { font-size: var(--step-0); color: #fff; font-weight: 650; margin-bottom: .8rem; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.site-foot .legal-name { color: #fff; font-weight: 600; }
.foot-bottom { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,.1); display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; }
.todo { color: #FFC56B; font-style: normal; }
main .todo { color: #8A4B00; background: #FFF1D6; padding: 0 .3rem; border-radius: 4px; }
@media (max-width: 820px) { .foot-grid { grid-template-columns: 1fr; } }

/* ---------- app page */
.app-hero { background: var(--navy-2); color: #fff; position: relative; overflow: hidden; isolation: isolate; padding-block: clamp(2.5rem, 7vw, 4.5rem) clamp(2.5rem, 6vw, 4rem); }
.app-hero::before { content: ""; position: absolute; inset: -40% -10% auto auto; width: 50vw; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(122,47,230,.45), transparent 65%); z-index: -1; }
[dir="rtl"] .app-hero::before { inset: -40% auto auto -10%; }
.crumbs { font-size: var(--step--1); color: var(--slate); margin-bottom: 1.8rem; }
.crumbs a { color: inherit; }
.app-hero .crumbs { color: #AEB7DA; }
.app-hero .app-mark, .app-hero .app-logo { width: 5.5rem; height: 5.5rem; margin-bottom: 1.4rem; }
.app-hero h1 { font-size: var(--step-4); max-width: 16ch; }
.app-hero .app-meta { color: #AEB7DA; }
.app-hero .lede { font-size: var(--step-1); color: #B9C2E6; max-width: 46ch; margin-top: 1.1rem; }
.store-btns { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.note { color: #D6DCF5; font-size: var(--step--1); background: rgba(255,255,255,.07); border-radius: 12px; padding: .8rem 1rem; margin-top: 1.8rem; max-width: 52ch; }
.app-body { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(2rem, 6vw, 5rem); }
.app-body h2 { font-size: var(--step-2); margin-bottom: 1rem; }
.app-body .prose p { max-width: 62ch; }
.link-list { list-style: none; margin: 0; padding: .4rem 1.3rem; background: var(--white); border-radius: var(--r-lg); border: 1px solid var(--line); }
.link-list li + li a { border-top: 1px solid var(--line); }
.link-list a { display: flex; justify-content: space-between; align-items: center; padding-block: .95rem; text-decoration: none; font-weight: 600; }
.link-list svg { width: 1rem; height: 1rem; flex: none; color: var(--blue); }
[dir="rtl"] .link-list svg { transform: scaleX(-1); }
@media (max-width: 820px) { .app-body { grid-template-columns: 1fr; } }

/* ---------- legal pages */
.legal { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.legal-wrap { max-width: 46rem; background: var(--white); border-radius: 24px; padding: clamp(1.5rem, 5vw, 3.5rem); border: 1px solid var(--line); }
.legal-outer { padding-inline: var(--gutter); }
.legal h1 { font-size: var(--step-3); margin-bottom: .6rem; }
.legal .updated { color: var(--slate); font-size: var(--step--1); margin-bottom: 2.2rem; }
.legal h2 { font-size: var(--step-1); margin: 2.3rem 0 .8rem; font-weight: 700; }
.legal ul, .legal ol { padding-inline-start: 1.3rem; margin: 0 0 1em; }
.legal li { margin-bottom: .4em; }
.legal li::marker { color: var(--purple); font-weight: 700; }
.legal .box { background: var(--paper); border-radius: 14px; padding: 1.2rem 1.4rem; margin-block: 1.4rem; border-inline-start: 4px solid var(--purple); }
.legal .box p:last-child { margin: 0; }
.legal .link-list { background: var(--paper); border: 0; }

/* root chooser */
.chooser { min-height: 100vh; display: grid; place-content: center; justify-items: center; text-align: center; gap: 2rem; padding: 2rem; }
.chooser .langs-big { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }
.chooser .wm-mark svg { width: 3.5rem; height: 3.5rem; }

/* ---------- rich game page */
.game-hero { position: relative; color: #fff; isolation: isolate; overflow: hidden; background: var(--navy-2) var(--hero) center / cover no-repeat; }
.game-hero::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(10,20,54,.55) 0%, rgba(10,20,54,.35) 40%, rgba(10,20,54,.92) 100%); }
.game-hero .wrap { padding-block: clamp(2rem, 5vw, 3rem) clamp(3rem, 8vw, 5.5rem); min-height: min(78vh, 46rem); display: flex; flex-direction: column; justify-content: flex-end; }
.game-hero .crumbs { color: #E1E6FA; margin-bottom: auto; }
.game-title { margin: 2rem 0 0; }
.game-title img { width: min(100%, 40rem); height: auto; filter: drop-shadow(0 10px 30px rgba(0,0,0,.55)); }
.game-tagline { font-size: clamp(1.2rem, 2.4vw, 1.6rem); font-weight: 700; margin: 1.2rem 0 1rem; text-shadow: 0 2px 12px rgba(0,0,0,.6); max-width: 40ch; }
.game-hero .app-meta { color: #E1E6FA; font-size: .95rem; }
.app-logo-sm { width: 2.4rem; height: 2.4rem; border-radius: 22%; margin-inline-end: .2rem; }
.game-hero .note { background: rgba(10,20,54,.6); backdrop-filter: blur(6px); }
.trailer { width: 100%; max-width: 64rem; aspect-ratio: 16 / 9; border-radius: var(--r-lg); background: #000; display: block; box-shadow: 0 24px 60px -30px rgba(16,30,75,.6); }
.game-about { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.game-about h2, .app-body h2 { font-size: var(--step-2); margin-bottom: 1.1rem; }
.game-about .prose p { max-width: 62ch; font-size: 1.05rem; }
.features { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.features li { position: relative; padding: .7rem 1rem; padding-inline-start: 2.4rem; background: var(--white); border: 1px solid var(--line); border-radius: 12px; font-weight: 550; font-size: .97rem; }
.features li::before { content: ""; position: absolute; inset-inline-start: 1rem; top: 1.15rem; width: .6rem; height: .6rem; border-radius: 2px; transform: rotate(45deg); background: var(--accent); }
.shots { list-style: none; margin: 0; padding: 0 var(--gutter) .5rem; display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); }
.shots li { flex: 0 0 min(80vw, 38rem); scroll-snap-align: start; }
.shots img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-md); border: 1px solid var(--line); }
@media (min-width: 1200px) { .shots { padding-inline: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))); } }
.facts-wide { background: var(--white); border: 1px solid var(--line); }
@media (max-width: 820px) { .game-about { grid-template-columns: 1fr; } .game-hero .wrap { min-height: 34rem; } }
