/* ==========================================================================
   JWLTD Apps: design matches the approved mockup layout.
   Logical properties (margin-inline, etc.) are used where practical so RTL
   locales (ar, he, fa) flip automatically via [dir="rtl"] on <html>.
   ========================================================================== */

:root {
  --navy-950: #060e1c;
  --navy-900: #0a1628;
  --navy-800: #0f1f38;
  --navy-700: #16304f;
  --blue-400: #4fc3f7;
  --blue-500: #2196f3;
  --blue-600: #1a73d6;
  --accent-color: #2e8cff;
  --text-on-dark: #eef3f9;
  --text-on-dark-muted: #a9b9cd;
  --text-on-light: #10213a;
  --text-on-light-muted: #5b6b82;
  --bg-light: #f5f7fb;
  --bg-white: #ffffff;
  --border-soft: #e3e8f0;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-card: 0 18px 40px -16px rgba(10, 22, 40, 0.35);
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text-on-light);
  background: var(--bg-white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; font-weight: 800; }
p { line-height: 1.6; margin: 0 0 1em; }

.container { max-width: 1200px; margin-inline: auto; padding-inline: 24px; }

.skip-link {
  position: absolute; inset-inline-start: -9999px; top: auto;
  background: var(--blue-500); color: #fff; padding: 10px 16px; z-index: 1000;
}
.skip-link:focus { inset-inline-start: 16px; top: 16px; }

/* Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 0.95rem; padding: 12px 22px;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.btn-pill { border-radius: 999px; }
.btn-lg { padding: 15px 28px; font-size: 1.02rem; }
.btn-sm { padding: 9px 16px; font-size: 0.85rem; }
.btn-primary { background: var(--accent-color); color: #fff; box-shadow: 0 10px 24px -8px rgba(46, 140, 255, 0.55); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -8px rgba(46, 140, 255, 0.65); }
.btn-outline { background: transparent; color: var(--text-on-light); border-color: var(--border-soft); }
.btn-outline:hover { border-color: var(--blue-500); color: var(--blue-600); }
[dir="rtl"] .btn i.fa-arrow-right { transform: scaleX(-1); }

/* Header ----------------------------------------------------------------- */
.site-header { background: #fff; border-bottom: 1px solid var(--border-soft); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 16px; }

.logo { display: flex; flex-direction: column; line-height: 1; }
.logo-jw { font-size: 1.5rem; font-weight: 800; color: var(--text-on-light); letter-spacing: -0.02em; }
.logo-ltd { color: var(--blue-500); }
.logo-apps { font-size: 0.6rem; font-weight: 700; letter-spacing: 0.3em; color: var(--text-on-light-muted); margin-top: 2px; }

.main-nav { display: flex; gap: 28px; }
.main-nav a { font-weight: 500; color: var(--text-on-light-muted); padding-bottom: 4px; border-bottom: 2px solid transparent; }
.main-nav a:hover { color: var(--text-on-light); }
.main-nav a.active { color: var(--blue-500); border-color: var(--blue-500); }

.header-actions { display: flex; align-items: center; gap: 12px; position: relative; }
.icon-btn {
  background: none; border: none; cursor: pointer; color: var(--text-on-light-muted);
  width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; font-size: 1rem;
}
.icon-btn:hover { background: var(--bg-light); color: var(--text-on-light); }
.lang-btn { width: auto; padding-inline: 10px; gap: 6px; }
.lang-code { font-size: 0.8rem; font-weight: 700; }

.lang-switcher { position: relative; }
.lang-menu {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0; background: #fff;
  border: 1px solid var(--border-soft); border-radius: var(--radius-md); box-shadow: var(--shadow-card);
  min-width: 200px; max-height: 320px; overflow-y: auto; padding: 8px; display: none; z-index: 200;
}
.lang-switcher.open .lang-menu { display: block; }
.lang-menu a { display: block; padding: 8px 12px; border-radius: var(--radius-sm); color: var(--text-on-light); font-size: 0.9rem; }
.lang-menu a:hover { background: var(--bg-light); }
.lang-menu a.active { color: var(--blue-500); font-weight: 700; }

.menu-toggle { display: none; }
.mobile-nav { display: none; flex-direction: column; padding: 8px 24px 16px; border-top: 1px solid var(--border-soft); }
.mobile-nav a { padding: 10px 0; font-weight: 500; color: var(--text-on-light); }

/* Hero -------------------------------------------------------------------- */
.hero { position: relative; background: var(--navy-950); overflow: hidden; padding-top: 72px; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-bg picture, .hero-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 60%; }
.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(6,14,28,0.94) 0%, rgba(6,14,28,0.82) 28%, rgba(8,18,34,0.5) 55%, rgba(10,22,40,0.28) 100%),
    linear-gradient(0deg, rgba(6,14,28,0.5) 0%, rgba(6,14,28,0) 30%);
}

.hero-inner { position: relative; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 32px; padding-block: 56px 55px; z-index: 2; }
.hero-copy h1 { font-size: clamp(2.4rem, 5vw, 3.4rem); margin-bottom: 0.4em; }
.hero-copy .line-1 { display: block; color: var(--text-on-dark); }
.hero-copy .line-2 { display: block; color: var(--accent-color); }
.hero-subtitle { color: var(--text-on-dark-muted); font-size: 1.08rem; max-width: 480px; margin-bottom: 1.6em; }

.hero-devices { position: relative; min-height: 420px; }
.device {
  position: absolute; border-radius: 10px; background: #0d1b2e; border: 3px solid #1c2e48; box-shadow: 0 24px 50px -16px rgba(0,0,0,0.6);
}
.device-screen {
  position: absolute; inset: 6px; border-radius: 6px; display: flex; align-items: flex-end; padding: 10px; overflow: hidden;
  background-color: #0d1b2e;
}
.device-screen-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
  transform: scale(var(--zoom, 1.45)); transform-origin: top center;
}
.device-screen::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,0.72) 100%);
}
.device-label { position: relative; z-index: 1; color: #fff; font-size: 0.72rem; font-weight: 700; text-shadow: 0 1px 4px rgba(0,0,0,0.6); }

.device-monitor { width: 52%; aspect-ratio: 16/10; top: 6%; inset-inline-start: 2%; }
.device-monitor .device-screen { background: linear-gradient(135deg, #ff7a59, #6a3bd6 55%, #1a1446); }
.device-monitor .device-screen-img { --zoom: 1.6; }

.device-monitor-sm { width: 38%; aspect-ratio: 16/11; top: 0%; inset-inline-end: 0%; }
.device-monitor-sm .device-screen { background: linear-gradient(135deg, #0f2747, #1f6fd1); }
.device-monitor-sm .device-screen-img { --zoom: 1.6; }

.device-laptop { width: 44%; aspect-ratio: 16/10; bottom: 10%; inset-inline-start: 0%; }
.device-laptop .device-screen { background: linear-gradient(135deg, #2a1a52, #6b3fc9); bottom: 10px; }
.device-laptop .device-screen-img { --zoom: 1.6; }
.device-laptop .device-base { position: absolute; bottom: -10px; left: -6%; right: -6%; height: 10px; background: #1c2e48; border-radius: 0 0 8px 8px; }

.device-tablet { width: 27%; aspect-ratio: 3/4; bottom: 4%; inset-inline-start: 37%; }
.device-tablet .device-screen { background: linear-gradient(160deg, #2a1150, #8b3fe0); }
.device-tablet .device-screen-img { --zoom: 2.2; }

.device-phone { width: 18%; aspect-ratio: 9/18; bottom: -2%; inset-inline-end: 6%; border-radius: 18px; }
.device-phone .device-screen { background: linear-gradient(160deg, #0b2e1a, #1fae63); border-radius: 12px; }
.device-phone .device-screen-img { --zoom: 2.6; }

.hero-curve {
  position: absolute; bottom: -2px; inset-inline-start: 0; width: 100%; height: 45px; z-index: 1;
  background: var(--bg-light);
  clip-path: ellipse(70% 100% at 50% 100%);
}

/* Section heading pattern ------------------------------------------------- */
.section-heading { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.2em; font-size: 1.17rem; font-weight: 700; color: var(--blue-500); display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 14px; }
.eyebrow::before, .eyebrow::after { content: ""; width: 28px; height: 2px; background: var(--blue-500); opacity: .5; }
.section-heading h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); color: var(--text-on-light); }
.section-sub { color: var(--text-on-light-muted); font-size: 1.02rem; }

/* Apps grid ---------------------------------------------------------------- */
.apps-section { padding-top: 16px; padding-bottom: 76px; background: var(--bg-light); }
.page-header + .apps-section { padding-top: 40px; }
.apps-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; }
.app-card-large { grid-column: span 6; }
.app-card-small { grid-column: span 6; }
.apps-grid-uniform .app-card-large,
.apps-grid-uniform .app-card-small { grid-column: span 4; }

.app-card {
  position: relative; border-radius: var(--radius-lg); overflow: hidden; color: var(--text-on-dark);
  box-shadow: var(--shadow-card); display: flex; flex-direction: column; min-height: 360px;
}
.app-card-visual { position: relative; height: 150px; overflow: hidden; }
.app-card.has-preview .app-card-visual { height: auto; aspect-ratio: 4 / 3; }
.app-card-preview-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.app-card-mockup { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.35) 100%); }
.app-card-body { position: relative; padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 14px; flex: 1; background: linear-gradient(180deg, rgba(5,10,20,0.15), rgba(5,10,20,0.55)); }
.app-card-head { display: flex; align-items: center; gap: 14px; }
.app-icon { width: 56px; height: 56px; border-radius: 14px; box-shadow: 0 6px 16px rgba(0,0,0,0.3); }
.app-icon-lg { width: 88px; height: 88px; border-radius: 20px; }
.app-card-head h3 { font-size: 1.25rem; margin-bottom: 2px; }
.app-tagline { color: var(--text-on-dark-muted); font-size: 0.88rem; margin: 0; }
.app-desc { color: var(--text-on-dark-muted); font-size: 0.92rem; flex: 1; }
.app-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.platform-list { display: flex; flex-wrap: wrap; gap: 12px; }
.platform-list li { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--text-on-dark-muted); }
.platform-list i { font-size: 0.95rem; }

.gradient-nexusm { background: #145c34; }
.gradient-adonuris { background: #1a4a7a; }
.gradient-btc { background: #7a1f1f; }
.gradient-michkamusic { background: #40296e; }
.gradient-michkamc { background: #4a1f85; }
.gradient-nexusm-roku { background: #3d1a5c; }
.gradient-nexusm-android { background: #0f5c43; }
.gradient-dochkadock { background: #123a5e; }

/* Filter bar (apps listing) ------------------------------------------------ */
.filter-bar { display: flex; gap: 10px; justify-content: center; margin-bottom: 36px; flex-wrap: wrap; }
.filter-btn {
  background: #fff; border: 1px solid var(--border-soft); border-radius: 999px; padding: 9px 18px;
  font-weight: 600; font-size: 0.88rem; cursor: pointer; color: var(--text-on-light-muted);
}
.filter-btn.active, .filter-btn:hover { border-color: var(--blue-500); color: var(--blue-600); }

/* Features band ------------------------------------------------------------ */
.features-band { background: var(--navy-900); padding-block: 64px; }
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; text-align: center; }
.feature-icon {
  width: 56px; height: 56px; border-radius: 14px; margin: 0 auto 16px; display: flex; align-items: center; justify-content: center;
  background: rgba(46, 140, 255, 0.12); color: var(--blue-400); font-size: 1.3rem;
}
.features-band h3 { color: var(--text-on-dark); font-size: 1.05rem; }
.features-band p { color: var(--text-on-dark-muted); font-size: 0.92rem; }

/* Page header (interior pages) --------------------------------------------- */
.page-header { position: relative; overflow: hidden; background: var(--navy-950); padding-block: 64px 48px; text-align: center; }
.page-header-bg { position: absolute; inset: 0; pointer-events: none; }
.page-header-bg picture, .page-header-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 55%; }
.page-header-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(6,14,28,0.88) 0%, rgba(6,14,28,0.7) 45%, rgba(6,14,28,0.88) 100%);
}
.page-header-inner { position: relative; z-index: 1; }
.page-header h1 { color: #fff; font-size: clamp(2rem, 4vw, 2.6rem); }
.page-header .section-sub { color: var(--text-on-dark-muted); max-width: 560px; margin-inline: auto; }

/* App detail ---------------------------------------------------------------- */
.breadcrumb { padding-block: 20px; }
.breadcrumb a { color: var(--blue-600); font-weight: 600; font-size: 0.9rem; display: inline-flex; align-items: center; gap: 8px; }
[dir="rtl"] .breadcrumb i { transform: scaleX(-1); }
.app-detail-hero { color: #fff; padding-block: 48px; }
.app-detail-hero-inner { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.app-detail-hero h1 { font-size: 2.2rem; margin-bottom: 6px; }
.app-detail-hero .app-tagline { color: rgba(255,255,255,0.85); font-size: 1rem; margin-bottom: 14px; }
.app-detail-hero .platform-list { margin-bottom: 18px; color: #fff; }
.app-detail-hero .platform-list li { color: rgba(255,255,255,0.85); }
.app-detail-preview { padding-top: 40px; }
.app-detail-preview picture, .app-detail-preview img { display: block; width: 100%; height: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.app-detail-body { padding-block: 48px; max-width: 760px; }
.app-long-desc { font-size: 1.08rem; color: var(--text-on-light-muted); }

/* Support page --------------------------------------------------------------- */
.support-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding-block: 56px 16px; }
.support-card { background: var(--bg-light); border-radius: var(--radius-lg); padding: 28px; text-align: center; }
.support-card h3 { color: var(--text-on-light); }
.support-card p { color: var(--text-on-light-muted); margin: 0; }
.faq-section { padding-block: 40px; }
.faq-section h2 { margin-bottom: 20px; }
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item { background: var(--bg-light); border-radius: var(--radius-md); padding: 16px 20px; }
.faq-item summary { font-weight: 600; cursor: pointer; }
.faq-item p { margin-top: 10px; color: var(--text-on-light-muted); }
.contact-section { padding-block: 40px 72px; }
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
.contact-form label { display: flex; flex-direction: column; gap: 6px; font-size: 0.88rem; font-weight: 600; color: var(--text-on-light); }
.contact-form label.full { grid-column: 1 / -1; }
.contact-form input, .contact-form textarea {
  font-family: inherit; padding: 11px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border-soft); font-size: 0.95rem;
}
.contact-form button { grid-column: 1 / -1; justify-self: start; }
.contact-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-notice { padding: 14px 18px; border-radius: var(--radius-sm); margin-top: 20px; font-size: 0.95rem; }
.form-notice-success { background: #e6f7ed; color: #1a7a42; border: 1px solid #b7e4c7; }
.form-notice-error { background: #fdeceb; color: #a4291d; border: 1px solid #f3c2bd; }

/* Downloads page -------------------------------------------------------------- */
.downloads-list { display: flex; flex-direction: column; gap: 18px; padding-block: 48px 72px; }
.download-row { display: flex; align-items: center; gap: 20px; padding: 22px; border-radius: var(--radius-lg); color: #fff; flex-wrap: wrap; }
.download-info { flex: 1; min-width: 200px; }
.download-info h3 { margin-bottom: 2px; }
.download-meta { color: rgba(255,255,255,0.75); font-size: 0.82rem; margin: 0; }
.download-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.download-row .btn-outline { color: #fff; border-color: rgba(255,255,255,0.4); }
.download-row .btn-outline:hover { border-color: #fff; }

/* About page -------------------------------------------------------------------- */
.about-body { padding-block: 48px; max-width: 820px; color: var(--text-on-light-muted); font-size: 1.05rem; }
.about-mission { background: var(--bg-light); border-radius: var(--radius-lg); padding: 28px; margin-block: 32px; }
.about-mission h2 { color: var(--text-on-light); }

/* Privacy page -------------------------------------------------------------------- */
.privacy-body h2 { color: var(--text-on-light); margin-top: 32px; }
.privacy-updated { font-size: 0.9rem; font-style: italic; }
.about-values { margin-top: 48px; }
.about-values .feature-icon { background: rgba(33, 150, 243, 0.1); color: var(--blue-600); }
.about-values h3, .about-values p { color: var(--text-on-light); }
.about-values p { color: var(--text-on-light-muted); }

/* Credits page ------------------------------------------------------------------ */
.credits-section { padding-block: 16px 72px; }
.credits-note { color: var(--text-on-light-muted); text-align: center; margin-bottom: 36px; }
.credits-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.credit-card { margin: 0; background: var(--bg-light); border-radius: var(--radius-lg); overflow: hidden; }
.credit-card img { width: 100%; height: 160px; object-fit: cover; }
.credit-card figcaption { padding: 16px 18px 20px; }
.credit-card p { margin: 0 0 8px; font-size: 0.92rem; color: var(--text-on-light-muted); }
.credit-card p a { color: var(--blue-600); font-weight: 600; }
.credit-card p a:hover { text-decoration: underline; }
.credit-link { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; font-weight: 600; color: var(--blue-600); }
.credit-link:hover { text-decoration: underline; }

/* 404 ------------------------------------------------------------------------- */
.error-page { padding-block: 100px; text-align: center; }
.error-page p { color: var(--text-on-light-muted); margin-bottom: 24px; }

/* Footer ------------------------------------------------------------------------ */
.site-footer { background: var(--navy-950); color: var(--text-on-dark-muted); padding-block: 48px 32px; }
.footer-inner { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer-brand .logo-jw { color: #fff; }
.footer-tagline { margin-top: 12px; margin-bottom: 6px; font-size: 0.92rem; }
.footer-copyright { font-size: 0.82rem; color: #64748b; margin: 0; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; align-items: flex-start; }
.footer-links a { font-size: 0.9rem; color: var(--text-on-dark-muted); }
.footer-links a:hover { color: #fff; }

/* Responsive --------------------------------------------------------------------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; padding-bottom: 60px; }
  .hero-devices { min-height: 280px; order: -1; }
  .apps-grid, .apps-grid-uniform { grid-template-columns: 1fr 1fr; }
  .app-card-large, .app-card-small,
  .apps-grid-uniform .app-card-large, .apps-grid-uniform .app-card-small { grid-column: span 1; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .support-cards { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .main-nav, .header-actions .btn-primary { display: none; }
  .menu-toggle { display: inline-flex; }
  .mobile-nav.open { display: flex; }
  .apps-grid, .apps-grid-uniform { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .contact-form { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; }
}
