/* ZEX landing — graphite, near-black, controlled lime. */
.landing { background: #0A0B0D; color: #F2F3F5; }
.wrap { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #9A9EA8; margin-bottom: 18px; }
.eyebrow .dot { background: var(--lime); box-shadow: 0 0 12px rgba(157, 255, 46, .6); }
.brand-lockup { display: inline-flex; align-items: center; gap: 11px; margin-bottom: 26px; color: var(--text); }
.brand-lockup-mark { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid color-mix(in srgb, var(--text) 28%, transparent); border-radius: 10px; background: linear-gradient(145deg, var(--bg-3), var(--bg-1)); color: var(--text); font-size: 17px; font-weight: 750; letter-spacing: -.08em; box-shadow: inset 0 1px rgba(255,255,255,.08), 0 8px 24px rgba(0,0,0,.16); }
.brand-lockup-copy { display: inline-flex; align-items: center; gap: 10px; }
.brand-lockup-copy strong { font-size: 13px; font-weight: 750; letter-spacing: .16em; }
.brand-lockup-copy small { color: var(--text-3); font-size: 10px; font-weight: 650; letter-spacing: .18em; }
.brand-lockup-rule { display: none; }

/* nav */
.nav { position: sticky; top: 0; z-index: 50; transition: background .2s, border-color .2s; border-bottom: 1px solid transparent; }
.nav.scrolled { background: rgba(10, 11, 13, .86); backdrop-filter: saturate(140%) blur(10px); border-bottom-color: rgba(255, 255, 255, .06); }
.nav-inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.nav .wordmark .mark { width: 26px; height: 26px; }
.nav-links { display: flex; gap: 4px; margin-left: 12px; }
.nav-links a { padding: 8px 12px; border-radius: 8px; color: #A6AAB3; text-decoration: none; font-size: 14.5px; }
.nav-links a:hover { color: #fff; background: rgba(255, 255, 255, .04); }
.nav-menu { display: flex; align-items: center; flex: 1; gap: 24px; }
.nav-toggle { display: none; }
.nav-cta { margin-left: auto; display: flex; gap: 8px; }

/* hero */
.hero { position: relative; padding: 48px 0 72px; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: -20% -10% auto -10%; height: 120%; background: radial-gradient(60% 55% at 70% 40%, rgba(35, 38, 47, .9) 0%, rgba(10, 11, 13, 0) 70%); pointer-events: none; }
.hero::after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px); background-size: 64px 64px; mask-image: radial-gradient(50% 60% at 70% 45%, #000 0%, transparent 75%); pointer-events: none; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 40px; min-height: min(640px, calc(100dvh - 120px)); }
.hero h1 { font-size: clamp(40px, 6.2vw, 76px); line-height: 1.02; letter-spacing: -0.045em; font-weight: 650; }
.lede { font-size: clamp(16.5px, 1.6vw, 19px); color: #A6AAB3; max-width: 540px; margin-top: 22px; line-height: 1.6; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 32px; }
.hero-note { margin-top: 16px; font-size: 13.5px; }
.hero-visual { position: relative; aspect-ratio: 1 / 1; width: 100%; max-width: 560px; justify-self: center; }
.hero-visual canvas { width: 100%; height: 100%; display: block; }

/* sections */
.section { padding: 96px 0; border-top: 1px solid rgba(255, 255, 255, .05); }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section h2 { font-size: clamp(30px, 4vw, 46px); letter-spacing: -0.035em; line-height: 1.08; font-weight: 650; margin-bottom: 14px; }
.section .muted { font-size: 17px; line-height: 1.6; color: #A6AAB3; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.feature { position: relative; padding: 26px; border-radius: 18px; background: linear-gradient(180deg, #121318, #0E0F12); border: 1px solid rgba(255, 255, 255, .06); transition: border-color .2s, transform .2s var(--ease); }
.feature:hover { border-color: rgba(255, 255, 255, .12); }
.feature h3 { font-size: 17px; margin: 16px 0 8px; letter-spacing: -0.01em; }
.feature p { color: #9A9EA8; font-size: 14.5px; line-height: 1.6; }
.feature-ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: #23262F; border: 1px solid rgba(255, 255, 255, .08); }
.feature-ic svg { width: 20px; height: 20px; fill: none; stroke: #F2F3F5; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.feature-lg { grid-row: span 2; display: flex; flex-direction: column; }
.feature-wide { grid-column: 1 / -1; display: grid; grid-template-columns: 40px 1fr; column-gap: 18px; align-items: start; }
.feature-wide h3 { margin-top: 0; }
.feature-wide .feature-ic { grid-row: span 2; }
.chat-demo { margin-top: auto; padding-top: 28px; display: grid; gap: 14px; }
.cd-user { justify-self: end; max-width: 85%; padding: 10px 14px; border-radius: 16px; background: #23262F; font-size: 13.5px; color: #E6E7EA; }
.cd-ai { display: grid; grid-template-columns: 22px 1fr; gap: 12px; }
.cd-mark { width: 22px; height: 22px; border-radius: 6px; background: #23262F; position: relative; }
.cd-mark::after { content: ''; position: absolute; top: 4px; right: 4px; width: 5px; height: 5px; border-radius: 50%; background: var(--lime); }
.cd-line { height: 9px; border-radius: 5px; background: #1E2027; margin: 6px 0 10px; }
.cd-line.short::after { content: ''; display: inline-block; width: 7px; height: 12px; background: var(--lime); margin-left: calc(100% + 6px); transform: translateY(-2px); animation: caret 1s steps(2) infinite; }
@keyframes caret { 50% { opacity: 0; } }

.models { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.model { padding: 20px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, .06); background: #0F1013; display: grid; gap: 8px; align-content: start; }
.model h3 { font-size: 16px; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.model p { color: #9A9EA8; font-size: 14px; line-height: 1.55; }
.model .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.model .badge { background: #16171B; }

.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.plan-card { padding: 24px; border-radius: 18px; border: 1px solid rgba(255, 255, 255, .07); background: #0F1013; display: grid; gap: 14px; align-content: start; }
.plan-card.featured { border-color: rgba(157, 255, 46, .3); background: linear-gradient(180deg, rgba(157, 255, 46, .05), #0F1013 50%); }
.plan-card h3 { font-size: 18px; letter-spacing: -0.01em; }
.plan-credits { font-size: 34px; font-weight: 650; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.plan-credits small { display: block; font-size: 14px; color: #9A9EA8; font-weight: 500; letter-spacing: 0; }
.plan-card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; color: #A6AAB3; font-size: 14px; }
.plan-card li { display: flex; gap: 10px; }
.plan-card li::before { content: ''; flex: none; width: 14px; height: 14px; margin-top: 3px; border-radius: 50%; background: radial-gradient(circle, var(--lime) 0 3px, transparent 3.5px), rgba(157, 255, 46, .1); }
.plans-note { margin-top: 18px; font-size: 13.5px; }

.dev { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 48px; align-items: center; }
.dev .btn { margin-top: 24px; }
.dev-code { margin: 0; padding: 24px; border-radius: 16px; background: #0D0E11; border: 1px solid rgba(255, 255, 255, .07); overflow-x: auto; font-size: 13.5px; line-height: 1.7; color: #D8DADF; }
.dev-code .c { color: #6B707A; }
.dev-code .s { color: #9DFF2E; }

.final { text-align: center; padding: 120px 0; background: radial-gradient(50% 80% at 50% 100%, rgba(35, 38, 47, .8), transparent 70%); }
.final-inner { display: grid; justify-items: center; gap: 8px; }
.final .hero-cta { justify-content: center; }

.footer { border-top: 1px solid rgba(255, 255, 255, .06); padding: 32px 0 calc(32px + env(safe-area-inset-bottom)); }
.footer-inner { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; font-size: 13.5px; }
.footer nav { display: flex; gap: 18px; flex: 1; justify-content: center; flex-wrap: wrap; }
.footer nav a { color: #9A9EA8; text-decoration: none; }
.footer nav a:hover { color: #fff; }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 1000px) {
  .features { grid-template-columns: 1fr 1fr; }
  .feature-lg { grid-column: span 2; grid-row: auto; }
  .feature-wide { grid-column: span 2; }
  .plans { grid-template-columns: 1fr 1fr; }
  .dev { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav-inner { flex-wrap: wrap; gap: 12px; padding-block: 12px; height: auto; min-height: 68px; }
  .nav { background: #0A0B0D; }
  .nav-toggle:not([hidden]) { display: inline-flex; margin-left: auto; min-height: 44px; }
  .nav-menu { flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 12px; }
  .nav-menu[hidden] { display: none; }
  .nav-links { display: flex; flex-wrap: wrap; }
  .nav-links a { min-height: 44px; display: inline-flex; align-items: center; }
  .nav-cta { margin-left: 0; }
  .nav-cta .btn { min-height: 44px; }
  .wordmark small { display: none; }
  .hero { padding: 8px 0 56px; }
  .hero-grid { grid-template-columns: 1fr; min-height: 0; gap: 8px; }
  .hero-visual { order: -1; max-width: 300px; }
  .section { padding: 72px 0; }
  .features, .plans { grid-template-columns: 1fr; }
  .feature-lg, .feature-wide { grid-column: auto; }
  .footer nav { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .cd-line.short::after { animation: none; }
}

/* ===================================================================
   ZEX UI 5 — landing refresh: glass nav, accent hero, interactive cards.
   =================================================================== */
.nav.scrolled { background: rgba(10, 11, 13, .72); backdrop-filter: saturate(160%) blur(16px); }
.nav-links a { transition: color .15s, background .15s; }
.eyebrow-pill { padding: 6px 12px 6px 10px; border-radius: 999px; border: 1px solid rgba(157, 255, 46, .22); background: rgba(157, 255, 46, .06); color: #CFEFAE; letter-spacing: .1em; font-size: 11.5px; }
.hero h1 { text-wrap: balance; }
.hero-accent { background: linear-gradient(100deg, #FFFFFF 0%, #E6F7D2 45%, var(--lime) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-cta .btn-lg { min-width: 148px; }
.hero-points { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; color: #8C909A; font-size: 13.5px; }
.hero-points li { display: inline-flex; align-items: center; gap: 8px; }
.hero-points li::before { content: ''; width: 14px; height: 14px; border-radius: 50%; flex: none; background: radial-gradient(circle, var(--lime) 0 3px, transparent 3.5px), rgba(157, 255, 46, .12); }
.hero-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 540px; margin-top: 34px; border-block: 1px solid var(--line); }
.hero-metrics div { display: grid; gap: 3px; padding: 13px 14px 13px 0; border-inline-end: 1px solid var(--line); }
.hero-metrics div + div { padding-inline-start: 14px; }
.hero-metrics div:last-child { border-inline-end: 0; }
.hero-metrics strong { color: var(--accent-text); font-size: 15px; letter-spacing: -.01em; }
.hero-metrics span { color: var(--text-3); font-size: 11.5px; line-height: 1.35; }
.hero-visual::before { content: ''; position: absolute; inset: 18% 14%; border-radius: 50%; background: radial-gradient(closest-side, rgba(157, 255, 46, .10), transparent 70%); filter: blur(10px); pointer-events: none; }

.section-head h2 { text-wrap: balance; }
.feature { overflow: hidden; isolation: isolate; }
.feature::before { content: ''; position: absolute; inset: -1px; z-index: -1; border-radius: inherit; opacity: 0; transition: opacity .25s var(--ease); background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(157, 255, 46, .07), transparent 45%); }
.feature:hover { transform: translateY(-2px); border-color: rgba(157, 255, 46, .18); }
.feature:hover::before { opacity: 1; }
.feature-ic { transition: background .2s, border-color .2s; }
.feature-ic svg { transition: stroke .2s; }
.feature:hover .feature-ic { background: rgba(157, 255, 46, .1); border-color: rgba(157, 255, 46, .3); }
.feature:hover .feature-ic svg { stroke: var(--lime); }

/* Mini composer inside the chat demo mirrors the real workspace composer. */
.cd-composer { margin-top: 8px; display: grid; gap: 10px; padding: 12px 10px 10px 14px; border-radius: 20px; border: 1px solid rgba(255, 255, 255, .12); background: #15171C; box-shadow: 0 12px 30px rgba(0, 0, 0, .3); }
.cd-placeholder { color: #6F737D; font-size: 13.5px; }
.cd-bar { display: flex; align-items: center; gap: 4px; }
.cd-btn { width: 26px; height: 26px; border-radius: 50%; background: rgba(255, 255, 255, .05); }
.cd-pill { margin-left: auto; height: 26px; padding: 0 10px; display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .08); color: #6F737D; font-size: 11px; }
.cd-pill b { color: #EDEEF0; font-weight: 600; }
.cd-send { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--lime); }
.cd-send svg { width: 15px; height: 15px; fill: none; stroke: #0A0B0D; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.model, .plan-card { transition: border-color .2s var(--ease), transform .2s var(--ease), background .2s; }
.model:hover, .plan-card:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, .14); }
.plan-card.featured { box-shadow: 0 20px 50px rgba(157, 255, 46, .06); }
.plan-card .btn { justify-self: start; margin-top: 4px; }
.dev-code { box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.final { background: radial-gradient(45% 70% at 50% 100%, rgba(157, 255, 46, .08), transparent 70%), radial-gradient(50% 80% at 50% 100%, rgba(35, 38, 47, .8), transparent 70%); }
.final h2 { font-size: clamp(32px, 4.4vw, 52px); }

/* Staggered reveal for grids; content is never hidden without JS. */
.reveal { transition-delay: var(--d, 0ms); }
.no-js .reveal { opacity: 1; transform: none; }

/* Plan contact dialog (opened from plan cards). */
#plan-contact-dialog { padding: 0; border: 0; border-radius: 18px; background: #101115; color: #F2F3F5; width: min(460px, calc(100vw - 24px)); box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .08); }
#plan-contact-dialog::backdrop { background: rgba(0, 0, 0, .6); backdrop-filter: blur(3px); }
#plan-contact-dialog .dialog-card { display: grid; gap: 10px; padding: 24px; }
#plan-contact-dialog .eyebrow { margin-bottom: 4px; }
#plan-contact-dialog h2 { font-size: 22px; letter-spacing: -0.02em; }
#plan-contact-dialog .muted { color: #A6AAB3; line-height: 1.7; direction: rtl; text-align: right; font-family: 'Noto Sans Arabic', Tahoma, var(--font); }
#plan-contact-dialog .hero-cta { margin-top: 12px; }

@media (max-width: 760px) {
  .hero-points { gap: 8px 14px; font-size: 13px; }
  .hero-metrics { margin-top: 26px; }
  .feature:hover, .model:hover, .plan-card:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .feature, .model, .plan-card { transition: none; }
  .feature:hover, .model:hover, .plan-card:hover { transform: none; }
}

/* Developer API card fills the second row next to the chat card. */
.feature-span2 { grid-column: span 2; }
@media (max-width: 760px) { .feature-span2 { grid-column: auto; } }

/* Final responsive polish: keep the first decision obvious on small screens. */
@media (max-width: 520px) {
  .wrap { width: min(100% - 28px, 1180px); }
  .hero { padding-top: 0; }
  .hero-grid { gap: 2px; }
  .hero-copy { display: flex; flex-direction: column; align-items: stretch; }
  .hero h1 { font-size: clamp(38px, 12vw, 56px); }
  .lede { font-size: 16px; margin-top: 18px; }
  .hero-cta { display: grid; grid-template-columns: 1fr; margin-top: 24px; }
  .hero-cta .btn-lg { width: 100%; }
  .hero-points { display: grid; gap: 8px; margin-top: 18px; }
  .hero-metrics { grid-template-columns: 1fr; border-block: 0; gap: 0; }
  .hero-metrics div, .hero-metrics div + div { padding: 10px 0; border-inline-end: 0; border-bottom: 1px solid var(--line); }
  .hero-metrics div:last-child { border-bottom: 0; }
  .hero-visual { max-width: 240px; margin-bottom: -8px; }
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 30px; }
  .section h2 { font-size: 31px; }
  .feature, .plan-card { padding: 22px; }
  .final { padding: 88px 0; }
}

/* UI/UX Max: resilient async states and light-theme parity. */
.landing { background: var(--bg); color: var(--text); }
.landing .nav.scrolled { background: color-mix(in srgb, var(--bg) 88%, transparent); border-bottom-color: var(--line); }
.landing .lede, .landing .section .muted, .landing .feature p, .landing .model p, .landing .plan-credits small { color: var(--text-2); }
.landing .section { border-top-color: var(--line); }
.landing .feature, .landing .model, .landing .plan-card { background: linear-gradient(180deg, color-mix(in srgb, var(--bg-1) 94%, var(--lime) 2%), var(--bg-1)); border-color: var(--line); }
.landing .feature-ic, .landing .cd-mark { background: var(--bg-3); border-color: var(--line-2); }
.landing .cd-user, .landing .cd-composer { background: var(--bg-3); color: var(--text); border-color: var(--line-2); }
.landing .cd-line { background: color-mix(in srgb, var(--text) 10%, transparent); }
.landing .dev-code { background: var(--bg-1); border-color: var(--line); color: var(--text); }
.landing .footer { border-top-color: var(--line); }
.landing .footer nav a { color: var(--text-2); }
.landing .hero::before { background: radial-gradient(60% 55% at 70% 40%, color-mix(in srgb, var(--bg-3) 90%, transparent), transparent 70%); }
.landing .hero-accent { background: linear-gradient(100deg, var(--text) 0%, color-mix(in srgb, var(--lime) 35%, var(--text)) 48%, var(--accent-text) 100%); -webkit-background-clip: text; background-clip: text; }
.skeleton-card { min-height: 164px; display: grid; align-content: start; gap: 12px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-1); }
.skeleton-card i { display: block; height: 11px; width: 74%; border-radius: 99px; background: linear-gradient(90deg, var(--bg-3), color-mix(in srgb, var(--text) 12%, var(--bg-3)), var(--bg-3)); background-size: 220% 100%; animation: skeleton-shimmer 1.6s ease-in-out infinite; }
.skeleton-card i:nth-child(2) { width: 96%; height: 34px; }
.skeleton-card i:nth-child(3) { width: 52%; }
.async-state { grid-column: 1 / -1; display: grid; justify-items: start; gap: 12px; min-height: 120px; padding: 24px; border: 1px dashed var(--line-2); border-radius: 16px; background: var(--bg-1); }
@keyframes skeleton-shimmer { 50% { background-position: -120% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton-card i { animation: none; } }
