:root {
  --bg: #0b0e17;
  --bg2: #111527;
  --card: #161b30;
  --line: #232a45;
  --txt: #eef1ff;
  --muted: #a3abd0;
  --acc: #7c6cff;
  --acc2: #38e1c6;
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--txt);
  line-height: 1.6;
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.center { text-align: center; }

/* nav */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(11,14,23,.85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; gap: 28px; height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--txt); text-decoration: none; }
.brand-logo { width: 30px; height: 30px; border-radius: 8px; }
.links { display: flex; gap: 22px; margin-left: auto; }
.links a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.links a:hover { color: var(--txt); }

/* buttons */
.btn {
  display: inline-block; padding: 12px 26px; border-radius: 999px;
  font-weight: 700; text-decoration: none; font-size: 1rem;
  border: 1px solid transparent; transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-small { padding: 8px 18px; font-size: .9rem; background: var(--acc); color: #fff; }
.btn-primary { background: linear-gradient(135deg, var(--acc), #4f8cff); color: #fff; box-shadow: 0 8px 28px rgba(124,108,255,.35); }
.btn-ghost { border-color: var(--line); color: var(--txt); background: rgba(255,255,255,.03); }
.btn-ghost:hover { border-color: var(--acc); }
.btn-big { padding: 15px 34px; font-size: 1.05rem; }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 26px; }
.cta-row.center { justify-content: center; }

/* hero */
.hero { padding: 84px 0 64px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.eyebrow { color: var(--acc2); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .8rem; margin-bottom: 14px; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.12; letter-spacing: -0.02em; }
.grad { background: linear-gradient(120deg, var(--acc), var(--acc2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { color: var(--muted); font-size: 1.12rem; margin-top: 18px; max-width: 34em; }
.lede strong { color: var(--txt); }
.trust { list-style: none; display: flex; gap: 18px; flex-wrap: wrap; margin-top: 22px; color: var(--acc2); font-size: .92rem; font-weight: 600; }
.hero-art img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(0,0,0,.45); }

/* stats */
.stats { }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); padding: 30px 24px; gap: 16px; text-align: center; }
.stat .num { display: block; font-size: 2rem; font-weight: 800; background: linear-gradient(120deg, var(--acc), var(--acc2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat .lbl { color: var(--muted); font-size: .9rem; }

/* sections */
.section { padding: 84px 0; }
.section.alt { }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); letter-spacing: -0.015em; }
.sub { color: var(--muted); margin-top: 8px; font-size: 1.05rem; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 36px; }
.step { background: transparent; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; }
.step-n { display: inline-flex; width: 38px; height: 38px; border-radius: 50%; align-items: center; justify-content: center; font-weight: 800; background: linear-gradient(135deg, var(--acc), #4f8cff); margin-bottom: 14px; }
.step h3 { margin-bottom: 8px; font-size: 1.1rem; }
.step p { color: var(--muted); font-size: .95rem; }
.how-art { margin-top: 40px; }
.how-art img { width: 100%; max-height: 380px; object-fit: cover; object-position: center 22%; border-radius: var(--radius); border: 1px solid var(--line); }

/* pricing */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 36px; }
.card { position: relative; background: transparent; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 24px; text-align: center; display: flex; flex-direction: column; gap: 6px; }
.card.hot { border-color: var(--acc); box-shadow: 0 12px 40px rgba(124,108,255,.25); transform: scale(1.03); }
.badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: linear-gradient(135deg, var(--acc), #4f8cff); font-size: .75rem; font-weight: 800; padding: 4px 14px; border-radius: 999px; white-space: nowrap; }
.card h3 { font-size: 1.05rem; color: var(--muted); font-weight: 700; }
.price { font-size: 2.6rem; font-weight: 800; }
.per { color: var(--muted); font-size: .92rem; margin-bottom: 16px; }
.card .btn { margin-top: auto; }
.note { color: var(--muted); font-size: .85rem; margin-top: 26px; text-align: center; }
.note a { color: var(--acc2); }

/* faq */
details { background: transparent; border: 1px solid var(--line); border-radius: 12px; margin-top: 14px; padding: 0 22px; }
summary { cursor: pointer; padding: 18px 0; font-weight: 700; font-size: 1.02rem; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.4rem; color: var(--acc); font-weight: 400; flex-shrink: 0; }
details[open] summary::after { content: "–"; }
details p { color: var(--muted); padding: 0 0 20px; font-size: .96rem; }

/* compare */
.table-scroll { overflow-x: auto; margin-top: 36px; }
.compare-table { display: grid; grid-template-columns: 1.1fr 1fr 1fr; min-width: 620px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.compare-table.cols-4 { grid-template-columns: 1.2fr 1fr 1fr 1fr; min-width: 760px; }
.compare-table > div { padding: 16px 20px; border-bottom: 1px solid var(--line); font-size: .95rem; }
.compare-table > div:nth-last-child(-n+3) { border-bottom: none; }
.compare-table.cols-4 > div:nth-last-child(-n+3) { border-bottom: 1px solid var(--line); }
.compare-table.cols-4 > div:nth-last-child(-n+4) { border-bottom: none; }
.compare-table .ch { font-weight: 800; font-size: 1rem; }
.compare-table .ch.hot { color: var(--acc2); }
.compare-table .dim { color: var(--muted); }
.compare-table strong { color: var(--txt); }
.benefits { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 28px; }
.benefits li { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 22px; color: var(--muted); font-size: .95rem; }
.benefits strong { display: block; color: var(--txt); margin-bottom: 8px; font-size: 1.02rem; }
.scenarios-title { margin-top: 56px; font-size: 1.4rem; }
.scenarios { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 24px; text-align: center; }
.scenario { border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 20px; }
.scenario .num { display: block; font-size: 2.4rem; font-weight: 800; background: linear-gradient(120deg, var(--acc), var(--acc2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.scenario .lbl { color: var(--muted); font-size: .9rem; display: block; margin-top: 6px; }

/* order */
.order { }

/* footer */
footer { border-top: 1px solid var(--line); padding: 34px 0; }
.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: .88rem; }
.fine { max-width: 34em; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .scenarios { grid-template-columns: 1fr; }
  .benefits { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .links { display: none; }
  .section { padding: 60px 0; }
}
@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; }
  .card.hot { transform: none; }
}

/* order builder */
.builder { max-width: 880px; margin: 36px auto 0; }
.b-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 26px; align-items: stretch; }
.b-cta { display: flex; flex-direction: column; justify-content: center; gap: 6px; }
@media (max-width: 720px) { .b-grid { grid-template-columns: 1fr; } }
.b-row label { display: block; font-weight: 700; margin-bottom: 10px; font-size: 1rem; }
.b-row label .dim { color: var(--muted); font-weight: 400; font-size: .85rem; }
.stepper { display: flex; align-items: stretch; height: 64px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: rgba(255,255,255,.03); }
.stepper button { width: 64px; font-size: 1.6rem; font-weight: 700; color: var(--txt); background: transparent; border: none; cursor: pointer; transition: background .15s; }
.stepper button:hover { background: rgba(124,108,255,.15); }
.stepper button:active { background: rgba(124,108,255,.3); }
.stepper input { flex: 1; min-width: 0; text-align: center; font-size: 1.8rem; font-weight: 800; color: var(--txt); background: transparent; border: none; border-left: 1px solid var(--line); border-right: 1px solid var(--line); padding: 14px 8px; outline: none; -moz-appearance: textfield; appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { background: rgba(124,108,255,.08); }
#icode { width: 100%; height: 64px; font-size: 1.05rem; color: var(--txt); background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 18px; outline: none; transition: border-color .15s; }
#icode:focus { border-color: var(--acc); }
#icode::placeholder { color: var(--muted); }
.b-total { display: flex; justify-content: space-between; align-items: center; height: 64px; padding: 0 22px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 1.05rem; color: var(--muted); }
.b-price { font-size: 1.7rem; font-weight: 800; background: linear-gradient(135deg, var(--acc), var(--acc2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
#getTokens { width: 100%; height: 64px; display: inline-flex; align-items: center; justify-content: center; padding: 0 34px; cursor: pointer; }
.b-hint { min-height: 1.5em; text-align: center; color: #ff9d9d; font-size: .92rem; margin: 0; }

/* order modal */
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(5,7,13,.75); backdrop-filter: blur(6px); }
.modal.open { display: flex; }
.modal-card { width: 100%; max-width: 440px; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 30px; box-shadow: 0 24px 80px rgba(0,0,0,.5); }
.modal-card h3 { font-size: 1.35rem; margin-bottom: 20px; text-align: center; }
.m-rows { display: flex; flex-direction: column; gap: 0; margin-bottom: 26px; }
.m-rows > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.m-rows dt { color: var(--muted); }
.m-rows dd { font-weight: 700; text-align: right; word-break: break-all; }
.m-rows .m-total { font-size: 1.25rem; color: var(--acc2); border-bottom: none; }
.m-btns { display: flex; gap: 12px; }
.m-btns .btn { flex: 1; text-align: center; padding: 13px 10px; font-size: .95rem; }
.m-btns button { cursor: pointer; font-family: inherit; }
.modal-card .note { margin-top: 18px; }
@media (max-width: 480px) { .m-btns { flex-direction: column; } }

/* in-section CTA → order builder */
.sec-cta { margin-top: 44px; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.sec-cta p { color: var(--muted); font-size: 1.02rem; margin: 0; }

/* ---------- language switcher ---------- */
.lang-wrap { position: relative; margin-left: auto; }
.links + .lang-wrap { margin-left: 0; }
.lang-btn { display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 1px solid var(--line); color: var(--txt); border-radius: 999px; padding: 8px 14px; font-size: .85rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.lang-btn:hover { border-color: var(--acc); }
.lang-menu { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; min-width: 158px; background: #0d1226; border: 1px solid var(--line); border-radius: 12px; padding: 6px; z-index: 80; box-shadow: 0 16px 40px rgba(0,0,0,.5); }
.lang-menu button { display: block; width: 100%; text-align: left; background: transparent; border: none; color: var(--txt); padding: 9px 12px; border-radius: 8px; cursor: pointer; font-size: .9rem; }
.lang-menu button:hover { background: rgba(124,108,255,.15); }
.lang-menu button.on { color: var(--acc2); font-weight: 700; }

/* ---------- translatable posters (HTML, replaces image posters) ---------- */
.poster { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: radial-gradient(120% 90% at 50% 0%, #0d1b3d 0%, #070b18 55%, #05070f 100%); box-shadow: 0 24px 60px rgba(0,0,0,.45); }
.poster-hero { aspect-ratio: 1 / 1; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 9% 7%; }
.poster-hero .p-top { letter-spacing: .5em; text-indent: .5em; font-size: .7rem; color: #7f93c9; text-transform: uppercase; margin: 0 0 4%; }
.poster-hero .p-big { margin: 0; font-size: clamp(3.2rem, 8.5vw, 5.6rem); font-weight: 900; letter-spacing: -.01em; line-height: 1; background: linear-gradient(100deg, #3b6cff 10%, #22d3ee 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.poster-hero .p-mid { margin: 4% 0 0; font-size: clamp(1.1rem, 2.4vw, 1.4rem); font-weight: 700; color: #fff; }
.poster-hero .p-sub { margin: 2.5% 0 0; color: var(--muted); font-size: .95rem; }
.poster-pills { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 7%; }
.poster-pills span { border: 1px solid rgba(120,160,255,.4); color: #7fd4ff; border-radius: 999px; padding: 10px 22px; font-weight: 600; font-size: .92rem; white-space: nowrap; }
.poster-flow { display: flex; align-items: center; gap: 7%; padding: 52px 7%; margin-top: 40px; }
.poster-flow .f-big { margin: 0; font-size: clamp(4rem, 11vw, 7.5rem); font-weight: 900; line-height: 1; background: linear-gradient(100deg, #3b6cff 10%, #22d3ee 90%); -webkit-background-clip: text; background-clip: text; color: transparent; white-space: nowrap; }
.poster-flow .f-right { min-width: 0; }
.poster-flow .f-top { letter-spacing: .45em; font-size: .68rem; color: #7f93c9; text-transform: uppercase; margin: 0 0 10px; }
.poster-flow .f-t { letter-spacing: .3em; font-size: clamp(1.2rem, 2.6vw, 1.7rem); color: #fff; font-weight: 700; margin: 0; }
.poster-flow .f-mid { font-size: clamp(1.15rem, 2.4vw, 1.45rem); font-weight: 700; color: #fff; margin: 8px 0 0; }
.poster-flow .f-pill { display: inline-block; margin-top: 14px; border: 1px solid rgba(120,160,255,.4); color: #7fd4ff; border-radius: 999px; padding: 8px 20px; font-weight: 600; font-size: .92rem; white-space: nowrap; }
@media (max-width: 640px) {
  .poster-flow { flex-direction: column; text-align: center; gap: 18px; padding: 40px 7%; }
  .poster-flow .f-top { letter-spacing: .3em; }
}

/* RTL: text-wrap:balance overflows the inline-start edge with mixed bidi text */
html[dir="rtl"] h1 { text-wrap: pretty; }

/* RTL: Arabic script must not be letter-spaced */
html[dir="rtl"] .poster-hero .p-top,
html[dir="rtl"] .poster-flow .f-top,
html[dir="rtl"] .poster-flow .f-t { letter-spacing: normal; }
html[dir="rtl"] .poster-hero .p-top { text-indent: 0; }

/* FAQ list auto-clip */
.faq-list.clipped details:nth-child(n+9) { display: none; }
.faq-more { margin: 26px auto 0; }

/* small phones: keep the nav to logo + language + order, nothing overflows */
@media (max-width: 560px) {
  .nav-inner { gap: 10px; }
  .brand-text { display: none; }
  /* all three nav buttons: same 40px height */
  .lang-btn { height: 40px; padding-top: 0; padding-bottom: 0; font-size: .78rem; }
  .nav-inner .btn-small { height: 40px; padding: 0 16px; font-size: .85rem; white-space: nowrap; }
}

/* hamburger nav (mobile: section links live here) */
.nav-hwrap { position: relative; display: none; }
.nav-menu-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: transparent; border: 1px solid var(--line); color: var(--txt); border-radius: 10px; font-size: 1.15rem; cursor: pointer; }
.nav-menu-btn:hover { border-color: var(--acc); }
.nav-drop { position: absolute; top: calc(100% + 10px); inset-inline-start: 0; min-width: 210px; background: #0d1226; border: 1px solid var(--line); border-radius: 12px; padding: 6px; z-index: 80; box-shadow: 0 16px 40px rgba(0,0,0,.5); }
.nav-drop a { display: block; padding: 10px 14px; color: var(--txt); text-decoration: none; border-radius: 8px; font-size: .95rem; white-space: nowrap; }
.nav-drop a:hover { background: rgba(124,108,255,.15); }
@media (max-width: 900px) { .nav-hwrap { display: block; } }
