﻿:root {
  --bg: #070b12;
  --card: #111827;
  --line: #263244;
  --text: #ffffff;
  --muted: #cbd5e1;
  --blue: #38bdf8;
  --green: #22c55e;
  --red: #f87171;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top right, rgba(56,189,248,0.18), transparent 34%),
    linear-gradient(180deg, #070b12 0%, #020617 100%);
  color: var(--text);
}

.wrap {
  max-width: 1080px;
  margin: auto;
  padding: 28px 20px 60px;
}

.demo-wrap {
  max-width: 720px;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 12px 0;
  background: rgba(7, 11, 18, 0.86);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  font-weight: 900;
  font-size: 22px;
}

.logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #0f172a;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--blue);
  font-weight: 900;
}

.top-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.lang-label {
  font-size: 13px;
  color: #93c5fd;
  font-weight: 800;
}

.language-select {
  width: auto;
  min-width: 132px;
  padding: 10px 12px;
  margin: 0;
  border-radius: 999px;
  border: 1px solid #334155;
  background: #0b1220;
  color: white;
  font-weight: 800;
}

.pill {
  display: inline-block;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #93c5fd;
  background: rgba(15,23,42,0.76);
  font-size: 14px;
  font-weight: 700;
}

.hero {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 28px;
  align-items: center;
}

h1 {
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.96;
  margin: 18px 0;
  letter-spacing: -2.5px;
}

h2 {
  font-size: 30px;
  margin: 0 0 16px;
  letter-spacing: -0.8px;
}

h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.lead {
  font-size: 22px;
  max-width: 780px;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 26px;
}

a.button, button {
  border: none;
  border-radius: 16px;
  padding: 15px 20px;
  margin: 8px 0;
  font-size: 16px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  display: inline-block;
  text-align: center;
}

.primary {
  background: var(--blue);
  color: #02131d;
}

.secondary {
  background: #1f2937;
  color: white;
  border: 1px solid #334155 !important;
}

.small-btn {
  padding: 10px 14px !important;
  margin: 0 !important;
}

.card {
  background: rgba(17,24,39,0.9);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 24px;
  margin-bottom: 18px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.28);
}

.phone {
  max-width: 360px;
  margin: auto;
  border-radius: 42px;
  border: 1px solid #334155;
  padding: 20px;
  background: #030712;
  box-shadow: inset 0 0 0 8px #0b1220, 0 22px 55px rgba(0,0,0,0.48);
}

.screen {
  padding: 18px;
  border-radius: 30px;
  background: #0b1220;
  min-height: 520px;
}

.metric {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid #263244;
  color: var(--muted);
  font-size: 16px;
}

.metric strong {
  color: white;
  text-align: right;
}

.fault {
  background: #020617;
  border: 1px solid #334155;
  border-radius: 16px;
  padding: 14px;
  margin: 16px 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #e2e8f0;
  line-height: 1.45;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 28px;
}

.section {
  margin-top: 34px;
}

input, select, textarea {
  width: 100%;
  border-radius: 14px;
  padding: 14px;
  margin: 8px 0 16px;
  border: 1px solid #334155;
  background: #0b1220;
  color: white;
  font-size: 16px;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.notice {
  border-left: 4px solid var(--blue);
  padding: 14px 16px;
  background: rgba(56,189,248,0.08);
  border-radius: 14px;
  color: var(--muted);
}

.small {
  font-size: 14px;
  color: #94a3b8;
}

.green {
  color: var(--green);
  font-weight: 800;
}

.red {
  color: var(--red) !important;
  font-weight: 900;
}

.hidden {
  display: none;
}

html[dir="rtl"] body {
  text-align: right;
}

html[dir="rtl"] .metric strong {
  text-align: left;
}

@media (max-width: 850px) {
  .hero, .grid {
    grid-template-columns: 1fr;
  }

  .nav {
    align-items: flex-start;
    margin-bottom: 28px;
  }

  .top-actions {
    max-width: 190px;
  }

  .language-select {
    min-width: 132px;
  }

  h1 {
    font-size: clamp(40px, 12vw, 62px);
  }
}

/* Top language selector upgrade */
@media (max-width: 850px) {
  .nav {
    flex-direction: column;
    align-items: stretch;
  }

  .brand {
    justify-content: flex-start;
  }

  .top-actions {
    width: 100%;
    max-width: none;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid #263244;
    border-radius: 18px;
    padding: 10px;
  }

  .language-select {
    flex: 1;
    min-width: 170px;
    max-width: 240px;
  }

  .lang-label {
    white-space: nowrap;
  }
}
