:root {
  --primary: #0F2D5C;
  --primary-light: #1a4a8a;
  --accent: #0088FF;
  --accent-2: #00C2A8;
  --bg-deep: #060d18;
  --bg: #0a1628;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.07);
  --glass: rgba(10, 22, 40, 0.72);
  --glass-border: rgba(255, 255, 255, 0.08);
  --text: #f0f4fa;
  --text-muted: #94a8be;
  --text-dim: #6b8299;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --nav-h: 72px;
  --max: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Animated background ── */
.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, #0f2d5c 0%, transparent 55%),
              radial-gradient(ellipse 60% 50% at 100% 50%, rgba(0, 136, 255, 0.12) 0%, transparent 50%),
              var(--bg-deep);
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 20%, transparent 75%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  animation: float 18s var(--ease) infinite;
}

.orb-1 {
  width: 520px; height: 520px;
  background: radial-gradient(circle, #0088ff 0%, transparent 70%);
  top: -120px; left: -80px;
}

.orb-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #00c2a8 0%, transparent 70%);
  top: 30%; right: -100px;
  animation-delay: -6s;
}

.orb-3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, #6366f1 0%, transparent 70%);
  bottom: 10%; left: 30%;
  animation-delay: -12s;
  opacity: 0.35;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 15px) scale(0.95); }
}

/* ── Navigation ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: calc(var(--max) + 48px);
  margin: 0 auto;
  padding: 14px 24px;
  height: var(--nav-h);
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--glass-border);
}

.brand img {
  display: block;
  height: 36px;
  width: auto;
}

.nav-end {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.lang-switch {
  appearance: none;
  border: 1px solid var(--glass-border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 8px 28px 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  max-width: 11rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-dim) 50%),
    linear-gradient(135deg, var(--text-dim) 50%, transparent 50%);
  background-position: calc(100% - 14px) calc(50% - 2px), calc(100% - 9px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.lang-switch:hover,
.lang-switch:focus {
  border-color: rgba(0, 136, 255, 0.45);
  outline: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  font-family: var(--font);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease), box-shadow 0.2s, background 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #0066cc 100%);
  color: #fff;
  box-shadow: 0 8px 32px rgba(0, 136, 255, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 12px 40px rgba(0, 136, 255, 0.5);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--glass-border);
}

.btn-ghost:hover {
  background: var(--surface-hover);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-text {
  background: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 12px 16px;
}

.btn-text:hover { color: var(--accent); }

.btn-lg { padding: 14px 28px; font-size: 0.95rem; }
.btn-sm { padding: 9px 18px; font-size: 0.85rem; }

/* ── Layout ── */
main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px 80px;
}

.section { margin-top: 100px; }

.section-head { margin-bottom: 40px; }

.section-sub {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 12px 0 0;
}

.eyebrow {
  display: inline-block;
  color: var(--accent-2);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  margin-bottom: 16px;
  background: rgba(0, 194, 168, 0.1);
  border: 1px solid rgba(0, 194, 168, 0.25);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-2);
}

.badge::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 8px var(--accent-2);
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 20px;
  background: linear-gradient(135deg, #fff 30%, #94a8be 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.15;
}

h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 8px;
}

.lead {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 540px;
  margin: 0;
}

/* ── Hero ── */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  min-height: calc(100vh - var(--nav-h) - 40px);
  padding: 48px 0 60px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--glass-border);
}

.stat-value {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.stat-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-dim);
  font-weight: 600;
  margin-top: 2px;
}

/* ── Real app screenshots ── */
.hero-visual { position: relative; }

.shot-frame {
  margin: 0;
  background: rgba(15, 30, 55, 0.9);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.shot-frame-hero {
  transform: perspective(1200px) rotateY(-3deg) rotateX(1deg);
  transition: transform 0.6s var(--ease);
}

.shot-frame-hero:hover {
  transform: perspective(1200px) rotateY(0deg) rotateX(0deg);
}

.shot-chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.45);
  border-bottom: 1px solid var(--glass-border);
}

.shot-chrome .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}

.shot-chrome .dot:first-child { background: #ff5f57; }
.shot-chrome .dot:nth-child(2) { background: #febc2e; }
.shot-chrome .dot:nth-child(3) { background: #28c840; }

.shot-url {
  margin-left: auto;
  font-size: 0.68rem;
  color: var(--text-dim);
  font-weight: 500;
  font-family: ui-monospace, monospace;
}

.shot-frame img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

#showcase-img {
  transition: opacity 0.2s var(--ease);
}

/* ── Showcase gallery ── */
.showcase { margin-top: 60px; }

.showcase-viewer {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 20px;
  align-items: start;
}

.showcase-thumbs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.showcase-thumbs .thumb {
  text-align: left;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  background: var(--surface);
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.showcase-thumbs .thumb:hover,
.showcase-thumbs .thumb.active {
  color: var(--text);
  border-color: rgba(0, 136, 255, 0.45);
  background: rgba(0, 136, 255, 0.12);
}

.showcase-thumbs .thumb.active {
  box-shadow: inset 3px 0 0 var(--accent);
}

.status-pill {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 20px;
  padding: 16px 20px;
  background: var(--glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
}

.status-dot {
  flex-shrink: 0;
  width: 10px; height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 12px var(--accent-2);
  animation: pulse 2.5s ease infinite;
}

.status-pill strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.status-pill span {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Trust cards ── */
.trust {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.trust-card {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  transition: border-color 0.3s, transform 0.3s var(--ease), background 0.3s;
}

.trust-card:hover {
  background: var(--surface-hover);
  border-color: rgba(0, 136, 255, 0.25);
  transform: translateY(-4px);
}

.trust-icon {
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0,136,255,0.2), rgba(0,194,168,0.1));
  color: var(--accent);
}

.trust-icon svg { width: 22px; height: 22px; }

.trust-card p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ── Bento grid ── */
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.bento-card {
  position: relative;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s, box-shadow 0.35s;
}

.bento-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,136,255,0.08) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.35s;
}

.bento-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 136, 255, 0.3);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.bento-card:hover::before { opacity: 1; }

.bento-card p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
  position: relative;
}

.bento-featured {
  grid-row: span 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 280px;
  background: linear-gradient(160deg, rgba(0,136,255,0.12) 0%, var(--surface) 60%);
}

.bento-wide { grid-column: span 2; }
.bento-full { grid-column: 1 / -1; }

.bento-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  margin-bottom: 16px;
  position: relative;
}

.bento-icon.files { background: linear-gradient(135deg, #0088ff, #0066cc); }
.bento-icon.office { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.bento-icon.talk { background: linear-gradient(135deg, #00c2a8, #0891b2); }
.bento-icon.groupware { background: linear-gradient(135deg, #f59e0b, #d97706); }
.bento-icon.mail { background: linear-gradient(135deg, #ec4899, #be185d); }
.bento-icon.identity { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.bento-icon.operations { background: linear-gradient(135deg, #64748b, #475569); }

/* ── Security ── */
.security-panel {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  align-items: start;
  padding: 48px;
  background: linear-gradient(160deg, rgba(15,45,92,0.5) 0%, var(--surface) 100%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
}

.security-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.security-grid li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  transition: border-color 0.2s, background 0.2s;
}

.security-grid li:hover {
  border-color: rgba(0, 194, 168, 0.3);
  background: rgba(0, 194, 168, 0.06);
}

.security-grid li::before {
  content: "";
  flex-shrink: 0;
  width: 20px; height: 20px;
  border-radius: 6px;
  background: rgba(0, 194, 168, 0.15) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2300C2A8'%3E%3Cpath d='M6.5 11.5L3.5 8.5l1-1 2 2 5-5 1 1z'/%3E%3C/svg%3E") center/14px no-repeat;
}

/* ── CTA ── */
.cta-card {
  text-align: center;
  padding: 64px 48px;
  background: linear-gradient(135deg, rgba(0,136,255,0.1) 0%, rgba(0,194,168,0.06) 50%, var(--surface) 100%);
  border: 1px solid rgba(0, 136, 255, 0.2);
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
}

.cta-card::before {
  content: "";
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: conic-gradient(from 0deg, transparent, rgba(0,136,255,0.08), transparent 30%);
  animation: spin 12s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.cta-card > * { position: relative; }

.cta-card p:not(.eyebrow) {
  color: var(--text-muted);
  max-width: 560px;
  margin: 16px auto 0;
  font-size: 1.05rem;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

/* ── Footer ── */
.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px 24px 60px;
  text-align: center;
  border-top: 1px solid var(--glass-border);
}

.site-footer p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-dim);
}

.footer-links {
  margin-top: 10px !important;
}

.footer-links a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.footer-links a:hover { text-decoration: underline; }

.footer-links span { margin: 0 8px; color: var(--text-dim); }

/* ── Scroll reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay { transition-delay: 0.15s; }

/* ── RTL ── */
[dir="rtl"] .nav-links,
[dir="rtl"] .nav-end,
[dir="rtl"] .hero-actions,
[dir="rtl"] .cta-actions {
  flex-direction: row-reverse;
}

[dir="rtl"] .shot-url { margin-left: 0; margin-right: auto; }
[dir="rtl"] .showcase-thumbs .thumb.active { box-shadow: inset -3px 0 0 var(--accent); }
[dir="rtl"] .security-grid li::before { order: 1; }
[dir="rtl"] .hero-stats { direction: rtl; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; gap: 40px; min-height: auto; padding-top: 32px; }
  .hero-visual { order: -1; }
  .shot-frame-hero { transform: none; }
  .showcase-viewer { grid-template-columns: 1fr; }
  .showcase-thumbs {
    flex-direction: row;
    flex-wrap: wrap;
    order: 1;
  }
  .showcase-thumbs .thumb { flex: 1 1 calc(50% - 4px); min-width: 140px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .trust { grid-template-columns: 1fr; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento-featured { grid-row: auto; min-height: auto; }
  .bento-wide { grid-column: span 2; }
  .bento-full { grid-column: 1 / -1; }
  .security-panel { grid-template-columns: 1fr; padding: 32px; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-end {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 24px;
    background: var(--glass);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s var(--ease), opacity 0.35s;
  }

  .nav-end.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links { flex-direction: column; align-items: stretch; }
  .nav-links a { text-align: center; }
  .lang-switch { justify-content: center; }
  .nav-end .btn { width: 100%; }

  .bento { grid-template-columns: 1fr; }
  .bento-wide { grid-column: auto; }
  .cta-card { padding: 40px 24px; }
  h1 { font-size: 2rem; }
}

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