/* Opti System landing page — design tokens come from the brand board (logo colors + Readex Pro) */

:root {
    --sky: #4CB2D8;
    --ocean: #1F8FCC;
    --royal: #2C67AD;
    --royal-hover: #24578F;
    --indigo: #3E4D92;
    --violet: #633283;

    --ink: #141833;
    --ink-2: #1C2147;
    --ink-3: #24305E;
    --ink-line: #2A3060;
    --slate: #3A4160;
    --muted: #5A6178;
    --muted-on-dark: #A9B1CC;
    --line: #E3E8F2;
    --line-strong: #D4DBE8;
    --surface: #F6F8FC;
    --tint: #EAF3FB;
    --tint-text: #1F4E86;
    --violet-tint: #F3ECF8;
    --white: #FFFFFF;

    --gradient: linear-gradient(120deg, var(--ocean) 0%, var(--royal) 35%, var(--indigo) 70%, var(--violet) 100%);
    --gradient-text: linear-gradient(90deg, var(--ocean), var(--violet));

    --font: 'Readex Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --shadow-sm: 0 4px 14px rgba(20, 24, 51, 0.06);
    --shadow: 0 16px 40px rgba(20, 24, 51, 0.10);
    --shadow-lg: 0 30px 80px rgba(20, 24, 51, 0.12);
    --gutter: clamp(16px, 4vw, 32px);
    --section-y: clamp(64px, 9vw, 120px);
    --header-h: 72px;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--white);
    overflow-x: hidden;
}
html[dir="rtl"] body { line-height: 1.8; }
img, svg, video { display: block; max-width: 100%; }
a { color: var(--royal); }
a:hover { color: var(--royal-hover); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; }
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3 { letter-spacing: 0; line-height: 1.4; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--ocean); outline-offset: 3px; border-radius: 6px; }

.container { max-width: 1200px; margin: 0 auto; padding-inline: var(--gutter); }
.container-narrow { max-width: 880px; }
.center { text-align: center; }

.skip-link {
    position: absolute; inset-inline-start: 16px; top: -60px; z-index: 100;
    background: var(--ink); color: var(--white); padding: 10px 16px; border-radius: var(--radius);
}
.skip-link:focus { top: 12px; color: var(--white); }

/* Content fades in once the CMS data has arrived */
main, .site-footer { transition: opacity .4s ease; }
body.is-loading main, body.is-loading .site-footer { opacity: 0; }

/* ---------- buttons, pills ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 48px; padding: 0 24px; border-radius: var(--radius); border: 1px solid transparent;
    font-weight: 500; font-size: 16px; text-decoration: none; cursor: pointer;
    transition: background-color .2s, border-color .2s, box-shadow .2s, transform .2s;
}
.btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 15px; }
.btn-lg { min-height: 52px; padding: 0 26px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--royal); color: var(--white); box-shadow: 0 8px 24px rgba(44, 103, 173, 0.25); }
.btn-primary:hover { background: var(--royal-hover); color: var(--white); transform: translateY(-1px); }
.btn-primary:disabled { opacity: .7; cursor: progress; transform: none; }
.btn-outline { background: var(--white); color: var(--ink); border-color: var(--line-strong); }
.btn-outline:hover { border-color: var(--royal); color: var(--ink); }
.btn-outline svg { color: var(--royal); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.pill {
    display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
    padding: 6px 14px; border-radius: 999px; font-size: 14px; font-weight: 500;
}
.pill-live { background: var(--tint); color: var(--tint-text); }
.pill-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ocean); }
.pill-soon { background: var(--violet-tint); color: var(--violet); }

.eyebrow {
    display: block; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--royal);
}
html[dir="rtl"] .eyebrow { letter-spacing: 0; font-size: 15px; }
.eyebrow:empty { display: none; }

.grad-text {
    background: var(--gradient-text);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
html[dir="rtl"] .grad-text { background-image: linear-gradient(270deg, var(--ocean), var(--violet)); }

.check-list { display: flex; flex-direction: column; gap: 12px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--slate); }
.check-list li::before {
    content: ""; flex: 0 0 20px; height: 20px; margin-top: 3px;
    background: var(--ocean);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / contain no-repeat;
}
.check-inline { flex-direction: row; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; }
.check-inline li { color: var(--muted); gap: 6px; }
.check-inline li::before { flex-basis: 16px; height: 16px; margin-top: 4px; }

/* ---------- header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s, box-shadow .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; gap: 32px; min-height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex: 0 0 auto; }
.brand-fallback { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { width: 36px; height: 36px; }
.brand-word { font-size: 18px; font-weight: 600; letter-spacing: .14em; color: var(--royal); direction: ltr; }
.brand-logo { height: 40px; width: auto; }
.brand-light .brand-word { color: var(--white); }

.main-nav { display: flex; align-items: center; gap: 28px; margin-inline-start: auto; }
.main-nav a { color: var(--slate); text-decoration: none; font-size: 15px; font-weight: 500; padding: 8px 0; }
.main-nav a:hover { color: var(--royal); }
.main-nav a:empty { display: none; }

.header-actions { display: flex; align-items: center; gap: 12px; }
.lang-switch {
    min-width: 44px; min-height: 44px; padding: 0 12px; border-radius: var(--radius);
    border: 1px solid var(--line); background: var(--white); color: var(--slate); cursor: pointer; font-size: 15px;
}
.lang-switch:hover { border-color: var(--royal); color: var(--royal); }

.nav-toggle {
    display: none; width: 44px; height: 44px; border-radius: var(--radius); border: 1px solid var(--line);
    background: var(--white); cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span { width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 960px) {
    .header-inner { gap: 12px; }
    .nav-toggle { display: inline-flex; }
    .header-actions { margin-inline-start: auto; }
    .main-nav {
        position: absolute; inset-inline: 0; top: 100%;
        flex-direction: column; align-items: stretch; gap: 0;
        padding: 8px var(--gutter) 16px; background: var(--white);
        border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
        display: none;
    }
    .main-nav.open { display: flex; }
    .main-nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
    .main-nav a:last-child { border-bottom: 0; }
}
@media (max-width: 520px) {
    .header-cta { display: none; }
}

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; }
.network-bg { position: absolute; pointer-events: none; color: #DCE7F5; }
.network-bg .nodes { fill: #C9DCF1; }
.hero > .network-bg { width: 720px; height: 520px; top: -40px; inset-inline-end: -120px; }
html[dir="rtl"] .hero > .network-bg { transform: scaleX(-1); }

.hero-inner {
    position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 56px;
    padding-block: clamp(48px, 7vw, 96px) clamp(56px, 7vw, 104px);
}
.hero-copy { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.hero h1 { font-size: clamp(36px, 5.4vw, 64px); line-height: 1.08; letter-spacing: -0.025em; }
html[dir="rtl"] .hero h1 { line-height: 1.3; }
.lead { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.6; color: var(--muted); max-width: 560px; }
html[dir="rtl"] .lead { line-height: 1.85; }

.hero-visual { flex: 1 1 520px; min-width: 0; position: relative; padding-bottom: 44px; }
.browser-frame {
    border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--white);
    box-shadow: var(--shadow-lg); overflow: hidden;
}
.browser-bar { display: flex; gap: 6px; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid #EEF2F8; direction: ltr; }
.browser-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.browser-frame img { width: 100%; height: auto; }

.hero-art { flex: 1 1 420px; min-width: 0; max-width: 520px; margin-inline: auto; }
.hero-art svg { width: 100%; height: auto; overflow: visible; }
.art-lines { stroke: #C9DCF1; }
.art-pixels { fill: #4CB2D8; opacity: .55; }
.art-nodes { fill: #2C67AD; }
.hero-art .art-pixels rect { animation: drift 7s ease-in-out infinite; }
.hero-art .art-pixels rect:nth-child(even) { animation-delay: -3s; }
@keyframes drift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-6px, -4px); } }
html[dir="rtl"] .hero-art svg { transform: scaleX(-1); }
@media (max-width: 700px) {
    .hero-inner { gap: 32px; }
    .hero-art { max-width: 280px; flex-basis: auto; }
}

.float-card {
    position: absolute; inset-inline-start: 16px; bottom: 0;
    display: flex; align-items: center; gap: 12px; padding: 12px 16px; max-width: calc(100% - 32px);
    background: var(--white); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
    font-size: 13px; line-height: 18px;
    animation: float 6s ease-in-out infinite;
}
.float-card > span:last-child { display: flex; flex-direction: column; }
.float-card b { font-weight: 600; }
.float-card span span, #hero-card-text { color: var(--muted); }
.float-card-icon { flex: 0 0 36px; height: 36px; border-radius: 10px; background: var(--tint); display: grid; place-items: center; }
.float-card-icon svg { width: 18px; height: 18px; fill: none; stroke: var(--royal); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* ---------- logos strip ---------- */
.logos-strip { background: var(--surface); border-block: 1px solid #EEF2F8; }
.logos-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 40px; padding-block: 28px; }
.logos-inner p { font-size: 14px; color: var(--muted); }
.logos-inner ul { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 40px; }
.logos-inner img { height: 36px; width: auto; filter: grayscale(1); opacity: .7; transition: filter .2s, opacity .2s; }
.logos-inner img:hover { filter: none; opacity: 1; }

/* ---------- generic sections ---------- */
.section { padding-block: var(--section-y); }
.section-surface { background: var(--surface); }
.section-dark { background: var(--ink); color: var(--white); }
.section-head { display: flex; flex-direction: column; gap: 14px; max-width: 720px; margin-bottom: 40px; }
.section-head h2, #faq-title { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.15; }
.section-head p { font-size: 18px; color: var(--muted); }
.section-head p:empty, .section-head h2:empty { display: none; }
.section-dark .eyebrow { color: var(--sky); }
.section-dark .section-head p { color: var(--muted-on-dark); }

/* ---------- industries ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.tab {
    min-height: 48px; padding: 0 20px; border-radius: 999px; cursor: pointer;
    background: var(--white); color: var(--slate); border: 1px solid var(--line-strong);
    font-size: 15px; font-weight: 500; display: inline-flex; align-items: center; gap: 8px;
    transition: background-color .2s, color .2s, border-color .2s;
}
.tab:hover { border-color: var(--ink); }
.tab[aria-selected="true"] { background: var(--ink); color: var(--white); border-color: var(--ink); }
.tab .soon-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--violet); }
.tab[aria-selected="true"] .soon-dot { background: #C9A8E4; }

.industry-panel {
    display: flex; flex-wrap: wrap; gap: 32px;
    border: 1px solid var(--line); border-radius: var(--radius-xl); padding: clamp(24px, 4vw, 48px); background: var(--white);
    animation: fadeUp .35s ease;
}
.industry-copy { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.industry-copy h3 { font-size: clamp(22px, 2.6vw, 32px); line-height: 1.2; }
.industry-copy p { font-size: 17px; color: var(--muted); }
.industry-visual {
    flex: 1 1 380px; min-width: 0; border-radius: var(--radius-lg); background: var(--surface);
    padding: 24px; display: flex; flex-direction: column; gap: 12px; justify-content: center;
}
.industry-visual img { border-radius: var(--radius); width: 100%; height: auto; }
.mock-row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px;
}
.mock-row > span:first-child { display: flex; flex-direction: column; min-width: 0; }
.mock-row b { font-size: 15px; font-weight: 600; }
.mock-row small { font-size: 13px; color: var(--muted); }
.mock-row .tag { flex: 0 0 auto; padding: 4px 10px; border-radius: 999px; background: var(--tint); color: var(--tint-text); font-size: 12px; font-weight: 500; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- features bento ---------- */
.bento { display: flex; flex-wrap: wrap; gap: 16px; }
.bento-card {
    flex: 1 1 260px; min-width: 0; border-radius: 24px; background: var(--ink-2); border: 1px solid var(--ink-line);
    padding: 28px; display: flex; flex-direction: column; gap: 14px;
    transition: border-color .2s, transform .2s;
}
.bento-card:hover { border-color: #3B4580; transform: translateY(-2px); }
.bento-card.featured { flex: 2 1 520px; }
.bento-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--ink-3); display: grid; place-items: center; }
.bento-icon img { width: 26px; height: 26px; object-fit: contain; }
.bento-card h3 { font-size: 20px; }
.bento-card.featured h3 { font-size: 24px; }
.bento-card p { color: var(--muted-on-dark); }
.bento-points { gap: 10px; margin-top: 4px; font-size: 15px; }
.bento-points li { color: #D5DAEA; }
.bento-points li::before { background: var(--sky); }
.bento-card.featured .bento-points { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 10px 24px; }
.bento-pixels { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: auto; padding-top: 8px; }
.bento-pixels span { height: 28px; border-radius: 6px; background: var(--ink-3); }
.bento-pixels span:nth-child(1), .bento-pixels span:nth-child(9) { background: var(--royal); }
.bento-pixels span:nth-child(3), .bento-pixels span:nth-child(10) { background: var(--violet); }
.bento-pixels span:nth-child(4), .bento-pixels span:nth-child(7) { background: var(--ocean); }

/* ---------- module spotlights ---------- */
.spotlight { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(32px, 5vw, 72px); }
.spotlight + .spotlight { margin-top: var(--section-y); }
.spotlight:nth-child(even) { flex-direction: row-reverse; }
.spotlight-copy { flex: 1 1 380px; min-width: 0; margin-bottom: 0; }
.spotlight-points { margin-top: 8px; }
.spotlight-visual { flex: 1.3 1 520px; min-width: 0; }

/* ---------- steps + video ---------- */
.steps { display: flex; flex-wrap: wrap; gap: 24px; counter-reset: step; }
.step { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 12px; padding-top: 24px; border-top: 2px solid var(--royal); }
.step:nth-child(3n+2) { border-top-color: var(--indigo); }
.step:nth-child(3n) { border-top-color: var(--violet); }
.step-num { font-size: 14px; font-weight: 600; color: var(--royal); }
.step:nth-child(3n+2) .step-num { color: var(--indigo); }
.step:nth-child(3n) .step-num { color: var(--violet); }
.step h3 { font-size: 22px; }
.step p { color: var(--muted); }

.video-card { margin-top: 48px; border-radius: var(--radius-xl); overflow: hidden; background: var(--ink); position: relative; height: clamp(300px, 44vw, 520px); }
.video-trigger { all: unset; position: absolute; inset: 0; cursor: pointer; display: block; }
.video-trigger:focus-visible { outline: 3px solid var(--sky); outline-offset: -3px; }
.video-trigger img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .45; }
.video-trigger .network-bg { inset: 0; width: 100%; height: 100%; color: var(--ink-line); }
.video-copy { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; text-align: center; color: var(--white); }
.play-btn {
    width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--sky), var(--royal) 55%, var(--violet));
    box-shadow: 0 12px 40px rgba(31, 143, 204, .4); transition: transform .2s;
}
.play-btn svg { width: 30px; height: 30px; fill: var(--white); margin-inline-start: 4px; }
html[dir="rtl"] .play-btn svg { margin-inline-start: 0; margin-inline-end: 4px; }
.video-trigger:hover .play-btn { transform: scale(1.06); }
.video-title { font-size: clamp(22px, 2.6vw, 30px); font-weight: 600; }
.video-subtitle { color: var(--muted-on-dark); }
.video-card video { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; }

/* ---------- reviews + stats ---------- */
.proof { display: flex; flex-wrap: wrap; gap: 24px; align-items: stretch; }
.reviews-track {
    flex: 3 1 480px; min-width: 0; display: flex; gap: 16px; overflow-x: auto;
    scroll-snap-type: x mandatory; padding-bottom: 4px; scrollbar-width: thin;
}
.review {
    flex: 0 0 100%; scroll-snap-align: start; margin: 0;
    border-radius: var(--radius-xl); background: var(--white); border: 1px solid var(--line);
    padding: clamp(28px, 4vw, 48px); display: flex; flex-direction: column; gap: 28px; justify-content: space-between;
}
.review svg { width: 40px; height: 32px; fill: var(--tint); }
html[dir="rtl"] .review svg { transform: scaleX(-1); }
.review blockquote { margin: 0; font-size: clamp(19px, 2.1vw, 25px); line-height: 1.5; font-weight: 500; }
.review figcaption { display: flex; align-items: center; gap: 14px; }
.review figcaption img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.review figcaption span { display: flex; flex-direction: column; }
.review figcaption small { font-size: 14px; color: var(--muted); }
.stats { flex: 2 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.stat { flex: 1; border-radius: var(--radius-lg); background: var(--white); border: 1px solid var(--line); padding: 24px; display: flex; flex-direction: column; gap: 4px; }
.stat b { font-size: 36px; font-weight: 600; line-height: 1.2; color: var(--royal); direction: ltr; text-align: start; }
html[dir="rtl"] .stat b { direction: rtl; }
.stat:nth-child(3n+2) b { color: var(--indigo); }
.stat:nth-child(3n) b { color: var(--violet); }
.stat span { color: var(--muted); }

/* ---------- faq ---------- */
#faq-title { margin-bottom: 32px; }
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
    list-style: none; cursor: pointer; min-height: 64px; padding: 18px 0;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    font-size: 18px; font-weight: 500;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: ""; flex: 0 0 20px; height: 20px; background: var(--royal); transition: transform .2s;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.faq-item[open] summary::after { transform: rotate(180deg); }
.faq-item p { padding-bottom: 20px; color: var(--muted); white-space: pre-line; }

/* ---------- demo ---------- */
.demo { padding: 0 var(--gutter) var(--section-y); }
.demo > .container { padding: 0; }
.demo-card {
    border-radius: 32px; background: var(--gradient); padding: clamp(28px, 5vw, 64px);
    display: flex; flex-wrap: wrap; gap: 40px; align-items: center;
}
html[dir="rtl"] .demo-card { background: linear-gradient(240deg, var(--ocean) 0%, var(--royal) 35%, var(--indigo) 70%, var(--violet) 100%); }
.demo-copy { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 16px; color: var(--white); }
.demo-copy h2 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.15; }
.demo-copy p { font-size: 18px; color: #E4ECFA; }
.demo-form {
    flex: 1 1 360px; min-width: 0; background: var(--white); border-radius: var(--radius-lg); padding: 24px;
    display: flex; flex-direction: column; gap: 14px; box-shadow: 0 20px 60px rgba(20, 24, 51, .25);
}
.demo-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 500; color: var(--slate); }
.demo-form input {
    min-height: 48px; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 0 14px;
    font: inherit; font-size: 16px; color: var(--ink); background: var(--white);
}
html[dir="rtl"] .demo-form input[dir="ltr"] { text-align: right; }
.demo-form input:focus { outline: none; border-color: var(--royal); box-shadow: 0 0 0 4px rgba(44, 103, 173, .15); }
.demo-form input[aria-invalid="true"] { border-color: #C2410C; }
.form-result { font-size: 14px; min-height: 0; }
.form-result:empty { display: none; }
.form-result.success { color: #15803D; }
.form-result.error { color: #B91C1C; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: var(--muted-on-dark); }
.site-footer .container { padding-block: 64px 32px; display: flex; flex-direction: column; gap: 48px; }
.footer-top { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; }
.footer-brand { flex: 1 1 260px; max-width: 340px; display: flex; flex-direction: column; gap: 16px; }
.footer-brand .brand-logo { filter: brightness(0) invert(1); }
.footer-cols { display: flex; flex-wrap: wrap; gap: 40px 64px; font-size: 15px; }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col b { color: var(--white); font-weight: 600; }
.footer-col a, .footer-col span { color: var(--muted-on-dark); text-decoration: none; }
.footer-col a:hover { color: var(--white); }
.footer-col a:empty, .footer-col b:empty { display: none; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding-top: 24px; border-top: 1px solid var(--ink-line); font-size: 14px; }
.socials { display: flex; gap: 8px; }
.socials a { width: 44px; height: 44px; border-radius: var(--radius); background: var(--ink-2); display: grid; place-items: center; color: var(--muted-on-dark); transition: background-color .2s, color .2s; }
.socials a:hover { background: var(--ink-3); color: var(--white); }
.socials svg { width: 18px; height: 18px; }

/* ---------- inner pages ---------- */
.page-hero { position: relative; background: var(--surface); border-bottom: 1px solid #EEF2F8; padding-block: clamp(48px, 7vw, 88px); overflow: hidden; }
.page-hero .container { display: flex; flex-direction: column; gap: 14px; }
.page-hero h1 { font-size: clamp(32px, 4.4vw, 52px); line-height: 1.12; max-width: 820px; }
.page-hero-compact { padding-block: clamp(40px, 5vw, 64px); }
.section-tight { padding-block: clamp(40px, 6vw, 72px) var(--section-y); }

.text-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; text-decoration: none; color: var(--royal); }
.text-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
html[dir="rtl"] .text-link svg { transform: scaleX(-1); }
.empty-state { color: var(--muted); font-size: 18px; text-align: center; padding-block: 48px; }
.empty-state-page { padding-block: var(--section-y); }

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.chip {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px;
    border: 1px solid var(--line-strong); color: var(--slate); text-decoration: none; font-size: 15px; font-weight: 500;
    transition: background-color .2s, color .2s, border-color .2s;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--white); }

.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 24px; }
.post-card {
    display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius-lg);
    background: var(--white); overflow: hidden; transition: box-shadow .2s, transform .2s;
}
.post-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.post-card-media { display: block; aspect-ratio: 16 / 10; background: var(--surface); overflow: hidden; }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.post-card:hover .post-card-media img { transform: scale(1.04); }
.post-card-placeholder { display: block; width: 100%; height: 100%; background: var(--gradient); opacity: .85; }
.post-card-body { display: flex; flex-direction: column; gap: 12px; padding: 22px; flex: 1; }
.post-card-body h2 { font-size: 20px; line-height: 1.35; letter-spacing: -0.01em; }
.post-card-body h2 a { color: var(--ink); text-decoration: none; }
.post-card-body h2 a:hover { color: var(--royal); }
.post-card-body p { color: var(--muted); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card-body .text-link { margin-top: auto; padding-top: 4px; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 14px; color: var(--muted); }
.post-meta .pill { font-size: 13px; padding: 4px 12px; }
.post-meta .pill-live::before { display: none; }

.pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 48px; }
.page-btn {
    min-width: 44px; height: 44px; padding: 0 10px; border-radius: var(--radius); display: inline-grid; place-items: center;
    border: 1px solid var(--line-strong); color: var(--slate); text-decoration: none; font-weight: 500;
}
.page-btn:hover { border-color: var(--royal); color: var(--royal); }
.page-btn[aria-current="page"] { background: var(--royal); border-color: var(--royal); color: var(--white); }
.page-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
html[dir="rtl"] .page-btn svg { transform: scaleX(-1); }
.page-gap { color: var(--muted); padding: 0 4px; }

/* single post */
.post-header { background: var(--surface); border-bottom: 1px solid #EEF2F8; padding-block: clamp(32px, 5vw, 56px) clamp(40px, 6vw, 72px); margin-bottom: clamp(32px, 5vw, 56px); }
.post-header .container { display: flex; flex-direction: column; gap: 16px; }
.post-header h1 { font-size: clamp(30px, 4.2vw, 48px); line-height: 1.15; }
.back-link { align-self: flex-start; margin-bottom: 8px; }
.post-categories { display: flex; flex-wrap: wrap; gap: 8px; }
.post-categories .pill { text-decoration: none; font-size: 13px; }
.post-categories .pill::before { display: none; }
.post-cover { margin: 0 0 40px; border-radius: var(--radius-xl); overflow: hidden; background: var(--surface); }
.post-cover img { width: 100%; height: auto; }
.post-video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-xl); overflow: hidden; background: var(--ink); margin-bottom: 40px; }
.post-video iframe, .post-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.related { margin-top: var(--section-y); }
#post-related-title { font-size: clamp(26px, 3vw, 34px); margin-bottom: 32px; }
#post-related-title:empty { display: none; }

/* rich text from the CMS editor */
.prose { font-size: 18px; line-height: 1.8; color: var(--slate); padding-bottom: var(--section-y); }
html[dir="rtl"] .prose { line-height: 2; }
.prose > * + * { margin-top: 1.1em; }
.prose h2, .prose h3, .prose h4 { color: var(--ink); line-height: 1.3; margin-top: 1.8em; }
.prose h2 { font-size: 28px; }
.prose h3 { font-size: 23px; }
.prose h4 { font-size: 19px; }
.prose ul, .prose ol { padding-inline-start: 1.4em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .5em; }
.prose li::marker { color: var(--ocean); }
.prose strong, .prose b { color: var(--ink); font-weight: 600; }
.prose a { text-underline-offset: 3px; }
.prose img { border-radius: var(--radius-lg); height: auto; }
.prose blockquote { margin-inline: 0; padding: 4px 0 4px 20px; padding-inline: 20px 0; border-inline-start: 3px solid var(--ocean); color: var(--ink); font-size: 20px; font-weight: 500; }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius-lg); }
.prose .ql-align-center { text-align: center; }
.prose .ql-align-right { text-align: right; }
.prose .ql-align-left { text-align: left; }
.prose .ql-direction-rtl { direction: rtl; }

/* 404 */
.not-found { padding-block: clamp(72px, 12vw, 160px); }
.not-found .container { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.not-found-mark { width: 72px; height: 72px; }
.not-found-code { font-size: clamp(72px, 14vw, 140px); font-weight: 700; line-height: 1; letter-spacing: -0.04em; background: var(--gradient-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.not-found h1 { font-size: clamp(26px, 3.4vw, 38px); }
.not-found .lead { margin-bottom: 8px; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .reveal { opacity: 1; transform: none; }
}
