/* Eywa LXP OS landing page. Tokens and rules: docs/design/DESIGN-SYSTEM.md */

/* ── Fonts: self-hosted, subset by script. Latin is preloaded and "optional" (no
   swap, so no layout shift); Cyrillic and Arabic swap, since their glyphs matter more. */
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 400; font-display: optional; src: url(fonts/source-sans-3-latin-400-normal.woff2) format("woff2"); 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: "Source Sans 3"; font-style: normal; font-weight: 600; font-display: optional; src: url(fonts/source-sans-3-latin-600-normal.woff2) format("woff2"); 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: "Source Sans 3"; font-style: normal; font-weight: 700; font-display: optional; src: url(fonts/source-sans-3-latin-700-normal.woff2) format("woff2"); 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: "Source Sans 3"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/source-sans-3-cyrillic-400-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 600 700; font-display: swap; src: url(fonts/source-sans-3-cyrillic-600-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Noto Sans Arabic"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/noto-sans-arabic-arabic-400-normal.woff2) format("woff2"); 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; }
@font-face { font-family: "Noto Sans Arabic"; font-style: normal; font-weight: 600 700; font-display: swap; src: url(fonts/noto-sans-arabic-arabic-600-normal.woff2) format("woff2"); 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; }

/* ── Tokens ─────────────────────────────────────────────────────────────── */
:root {
  --navy: #12304A;
  --blue: #176B9A;
  --blue-strong: #0F5478;
  --accent: #0A84C1;          /* focus and selection only, never body text */
  --ink: #202B35;
  --ink-2: #4A5A68;
  --bg: #F7F9FB;
  --surface: #FFFFFF;
  --tint: #EAF4FA;
  --rule: #D9E2E8;            /* decorative dividers */
  --field: #738494;           /* control borders, 3:1 */
  --on-blue: #FFFFFF;
  --ok: #247A57;
  --warn: #A76512;
  --bad: #B42318;
  --header-bg: #FFFFFF;
  --font: "Source Sans 3", "Noto Sans Arabic", system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Roboto, sans-serif;
  --s1: .25rem; --s2: .5rem; --s3: 1rem; --s4: 1.5rem; --s5: 2rem; --s6: 3rem; --s7: 4.5rem; --s8: 7rem;
  --wrap: 1200px;
  --radius: 6px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --navy: #DCE8F2; --blue: #5BB4E5; --blue-strong: #84C8EE; --accent: #5BB4E5;
    --ink: #E7EDF2; --ink-2: #A9B6C2; --bg: #0F1A24; --surface: #172430; --tint: #13212D;
    --rule: #26384A; --field: #62788B; --on-blue: #0F1A24; --header-bg: #0F1A24;
    --ok: #6BC59B; --warn: #E2A957; --bad: #F2867E;
    color-scheme: dark;
  }
}

/* ── Base ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 clamp(1.0625rem, 1rem + .2vw, 1.125rem)/1.65 var(--font); }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-strong); }
h1, h2, h3, h4 { margin: 0; color: var(--navy); line-height: 1.15; letter-spacing: -.01em; }
h1 { font-size: clamp(2.5rem, 1.7rem + 3.2vw, 3.75rem); font-weight: 700; line-height: 1.08; max-width: 17ch; text-wrap: balance; }
h2 { font-size: clamp(1.875rem, 1.5rem + 1.4vw, 2.5rem); font-weight: 700; max-width: 26ch; text-wrap: balance; }
h3 { font-size: clamp(1.25rem, 1.15rem + .4vw, 1.375rem); font-weight: 600; line-height: 1.3; }
p { margin: 0; max-width: 68ch; }
p + p { margin-top: var(--s3); }
ul, ol { margin: 0; padding: 0; }
figure { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip { position: absolute; inset-inline-start: var(--s3); top: -5rem; z-index: 100; padding: var(--s2) var(--s3); background: var(--surface); color: var(--navy); font-weight: 600; border: 2px solid var(--accent); border-radius: 4px; }
.skip:focus { top: var(--s3); }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 1.25rem; }
@media (min-width: 768px) { .wrap { padding-inline: 2.5rem; } }

.eyebrow { margin-bottom: var(--s3); font-size: .875rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); }
.fine { margin-top: var(--s3); font-size: .9375rem; color: var(--ink-2); }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 44px; padding: .625rem 1.25rem; border: 1px solid transparent; border-radius: 4px; font: 600 1rem/1.2 var(--font); text-decoration: none; text-align: center; cursor: pointer; transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
.btn-lg { min-height: 52px; padding: .8rem 1.5rem; font-size: 1.0625rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--blue); color: var(--on-blue); }
.btn-primary:hover { background: var(--blue-strong); color: var(--on-blue); }
.btn-secondary { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-secondary:hover { background: var(--navy); color: var(--surface); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn .spinner { display: none; width: 16px; height: 16px; border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.btn[aria-busy="true"] .spinner { display: inline-block; }
.btn[aria-busy="true"] { cursor: progress; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Header ─────────────────────────────────────────────────────────────── */
.header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); border-bottom: 1px solid var(--rule); }
.header.is-condensed { box-shadow: 0 1px 8px rgb(18 48 74 / .08); }
.header-inner { display: flex; align-items: center; gap: var(--s5); min-height: 72px; }
.logo { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--navy); flex: none; }
.logo-mark { width: 32px; height: 32px; }
.logo-mark rect { fill: var(--navy); }
.logo-mark path { fill: none; stroke: var(--header-bg); stroke-width: 2.6; stroke-linecap: round; }
.logo-name { font-size: 1.375rem; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.logo-name span { font-weight: 600; color: var(--blue); }
.nav { display: flex; align-items: center; flex: 1; gap: var(--s5); }
.nav-list { display: flex; gap: var(--s4); list-style: none; margin-inline-start: auto; }
.nav-list a, .nav-utility { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-weight: 600; font-size: 1rem; text-decoration: none; white-space: nowrap; }
.nav-list a:hover, .nav-utility:hover { color: var(--blue); text-decoration: underline; }
.nav-actions { display: flex; align-items: center; gap: var(--s4); padding-inline-start: var(--s4); border-inline-start: 1px solid var(--rule); }
.nav-toggle { display: none; }
@media (max-width: 1180px) {
  .nav-toggle { display: inline-flex; align-items: center; gap: var(--s2); margin-inline-start: auto; min-height: 44px; padding: 0 var(--s3); border: 1px solid var(--field); border-radius: 4px; background: var(--surface); color: var(--navy); font: 600 1rem var(--font); cursor: pointer; }
  .nav-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
  .nav-toggle .sr-only { position: static; width: auto; height: auto; clip: auto; }
  .nav { position: absolute; inset: 100% 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; padding: var(--s3) 1.25rem var(--s5); background: var(--header-bg); border-bottom: 1px solid var(--rule); box-shadow: 0 12px 24px rgb(18 48 74 / .1); }
  .nav:not(.is-open) { display: none; }
  .nav-list { flex-direction: column; gap: 0; margin: 0; }
  .nav-list a { width: 100%; min-height: 52px; border-bottom: 1px solid var(--rule); }
  .nav-actions { flex-direction: column; align-items: stretch; gap: var(--s2); margin-top: var(--s3); padding: 0; border: 0; }
  .nav-utility { min-height: 48px; }
}

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero { padding-block: var(--s6) var(--s7); background: var(--surface); border-bottom: 1px solid var(--rule); }
.hero-grid { display: grid; gap: var(--s6); align-items: center; }
@media (min-width: 1000px) { .hero-grid { grid-template-columns: 1fr 1fr; gap: var(--s6); } .hero { padding-block: var(--s7) var(--s8); } }
.lede { margin-top: var(--s4); font-size: clamp(1.125rem, 1.05rem + .3vw, 1.25rem); color: var(--ink-2); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s5); }
.capabilities { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); margin-top: var(--s5); list-style: none; color: var(--ink); font-size: 1rem; font-weight: 600; }
.capabilities li { display: inline-flex; align-items: center; gap: var(--s2); }
.capabilities svg, .card-icon { width: 20px; height: 20px; fill: none; stroke: var(--blue); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.hero-figure img, .media img, .step img { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }
figcaption { margin-top: var(--s2); font-size: .9375rem; color: var(--ink-2); max-width: 60ch; }

/* ── Sections ───────────────────────────────────────────────────────────── */
.section { padding-block: var(--s7); }
@media (min-width: 1000px) { .section { padding-block: var(--s8); } }
.tint { background: var(--tint); }
.section-head { margin-bottom: var(--s6); }
.section-intro { margin-top: var(--s3); color: var(--ink-2); }
.split { display: grid; gap: var(--s5) var(--s7); align-items: start; }
@media (min-width: 1000px) { .split { grid-template-columns: 5fr 7fr; } .split-media { grid-template-columns: 7fr 5fr; align-items: center; } }
.split > div > p:not(.eyebrow):not(.fine) { margin-top: var(--s4); color: var(--ink-2); }
.prose p { color: var(--ink); font-size: clamp(1.0625rem, 1rem + .25vw, 1.1875rem); }

.cards { display: grid; gap: var(--s4); list-style: none; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
.card { padding: var(--s5); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); }
.card .card-icon { width: 28px; height: 28px; margin-bottom: var(--s4); }
.card p { margin-top: var(--s2); color: var(--ink-2); }

.steps { display: grid; gap: var(--s5); list-style: none; counter-reset: step; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step h3 { display: flex; align-items: center; gap: var(--s2); margin-top: var(--s4); }
.step-n { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--navy); color: var(--surface); font-size: 1rem; font-weight: 700; flex: none; }
.step p { margin-top: var(--s2); color: var(--ink-2); }

.checklist { display: grid; gap: var(--s3); margin-block: var(--s4); list-style: none; }
.checklist li { position: relative; padding-inline-start: 1.75rem; }
.checklist li::before { content: ""; position: absolute; inset-inline-start: .1rem; top: .45em; width: .9rem; height: .5rem; border-inline-start: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
[dir="rtl"] .checklist li::before { transform: rotate(45deg) scaleX(-1); }

.catalogue { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); }
.catalogue th, .catalogue td { padding: .8rem 1rem; text-align: start; border-bottom: 1px solid var(--rule); vertical-align: baseline; }
.catalogue th { font-size: .9375rem; font-weight: 600; color: var(--ink-2); background: var(--bg); }
.catalogue th:last-child, .catalogue td:last-child { text-align: end; width: 6rem; font-variant-numeric: tabular-nums; }
.catalogue tr:last-child td { border-bottom: 0; }
.tag { display: inline-block; margin-inline-start: var(--s2); padding: .05rem .45rem; border: 1px solid var(--warn); border-radius: 3px; color: var(--warn); font-size: .8125rem; font-weight: 600; vertical-align: .1em; }

.solutions { display: grid; gap: 0; list-style: none; border-top: 2px solid var(--navy); }
.solutions li { display: grid; gap: var(--s2) var(--s6); padding-block: var(--s4); border-bottom: 1px solid var(--rule); }
@media (min-width: 800px) { .solutions li { grid-template-columns: 4fr 8fr; } }
.solutions p { color: var(--ink-2); }

.langs { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); margin-top: var(--s5); list-style: none; font-size: clamp(1.25rem, 1.1rem + .6vw, 1.625rem); font-weight: 600; color: var(--navy); }

.timeline { list-style: none; border-top: 2px solid var(--navy); }
.timeline li { display: grid; gap: var(--s1) var(--s4); padding-block: var(--s4); border-bottom: 1px solid var(--rule); }
@media (min-width: 600px) { .timeline li { grid-template-columns: 8rem 1fr; } }
.when { font-weight: 700; color: var(--navy); }

.tiers { display: grid; gap: var(--s4); }
@media (min-width: 900px) { .tiers { grid-template-columns: repeat(3, 1fr); } }
.tier { display: flex; flex-direction: column; padding: var(--s5); background: var(--surface); border: 1px solid var(--rule); border-top: 4px solid var(--navy); border-radius: var(--radius); }
.price { margin-top: var(--s2); font-size: 1.125rem; font-weight: 700; color: var(--ink); }
.tier-for { margin-top: var(--s1); color: var(--ink-2); }
.tier ul { display: grid; gap: var(--s2); margin: var(--s4) 0 var(--s5); padding-inline-start: 1.2rem; }
.tier .btn { margin-top: auto; align-self: flex-start; }
.note { margin-top: var(--s4); color: var(--ink-2); }

.faq { border-top: 2px solid var(--navy); }
.faq-item { border-bottom: 1px solid var(--rule); }
.faq-item h3 { font-size: 1.125rem; }
.faq-item button { all: unset; box-sizing: border-box; display: flex; justify-content: space-between; align-items: center; gap: var(--s3); width: 100%; min-height: 56px; padding-block: var(--s3); color: var(--navy); font: 600 1.125rem/1.35 var(--font); cursor: pointer; }
.faq-item button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.faq-item button::after { content: "+"; flex: none; font-size: 1.5rem; font-weight: 400; color: var(--blue); }
.faq-item button[aria-expanded="true"]::after { content: "−"; }
.faq-a { padding-bottom: var(--s4); color: var(--ink-2); }

/* ── Contact form ───────────────────────────────────────────────────────── */
.contact { background: var(--surface); border-top: 1px solid var(--rule); }
.form { display: grid; gap: var(--s4); padding: clamp(1.25rem, 3vw, 2rem); background: var(--bg); border: 1px solid var(--rule); border-radius: var(--radius); }
.field { display: grid; gap: var(--s2); }
.field label { font-weight: 600; color: var(--ink); }
.opt { margin-inline-start: var(--s1); font-weight: 400; font-size: .9375rem; color: var(--ink-2); }
.field input, .field textarea { width: 100%; min-height: 48px; padding: .7rem .85rem; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--field); border-radius: 4px; }
.field textarea { min-height: 104px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--blue); }
.field input[aria-invalid="true"] { border: 2px solid var(--bad); }
.err { display: flex; gap: var(--s2); color: var(--bad); font-size: .9375rem; font-weight: 600; }
.err::before { content: "!"; display: inline-grid; place-items: center; width: 1.2em; height: 1.2em; border-radius: 50%; background: var(--bad); color: var(--surface); font-size: .8em; flex: none; margin-top: .15em; }
.form-status { min-height: 1.5em; font-weight: 600; }
.form-status.ok { color: var(--ok); }
.form-status.bad { color: var(--bad); }
.form.is-sent .field, .form.is-sent button { display: none; }
.form.is-sent .form-status { font-size: 1.125rem; }
.hp { position: absolute; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.footer { padding-block: var(--s6) var(--s4); background: #12304A; color: #DCE8F2; }
.footer a { color: #FFFFFF; text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer .logo, .footer .logo-name { color: #FFFFFF; }
.footer .logo-name span { color: #9CC9E6; }
.footer .logo-mark rect { fill: #FFFFFF; }
.footer .logo-mark path { stroke: #12304A; }
.footer-grid { display: grid; gap: var(--s5); grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.footer-brand { grid-column: 1 / -1; max-width: 28rem; }
@media (min-width: 1000px) { .footer-grid { grid-template-columns: 2fr repeat(4, 1fr); } .footer-brand { grid-column: auto; } }
.footer-brand p { margin-top: var(--s3); color: #C3D5E3; }
.footer-h { margin-bottom: var(--s3); font-size: .9375rem; font-weight: 700; color: #9CC9E6; }
.footer ul { display: grid; gap: var(--s2); list-style: none; }
.footer-base { margin-top: var(--s6); padding-top: var(--s4); border-top: 1px solid #2B4A66; font-size: .9375rem; color: #C3D5E3; }

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