:root {
  color-scheme: dark;
  font-size: 16px;
  --bg: #05060a;
  --panel: rgba(13, 16, 24, 0.85);
  --panel-glass: rgba(19, 22, 31, 0.65);
  --text: #eff3ff;
  --muted: #9da7c2;
  --accent: linear-gradient(120deg, #66f0ff, #c471ff 40%, #ffb8d2);
  --border: rgba(255, 255, 255, 0.1);
  --glow: 0 20px 60px rgba(102, 240, 255, 0.15);
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", "Sora", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background: radial-gradient(circle at 20% -20%, #18142a, transparent 55%),
    radial-gradient(circle at 80% 0, #1e1f3d, transparent 40%),
    linear-gradient(135deg, #070610, #05060a 60%, #070b16);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 20%, rgba(36, 119, 204, 0.25), transparent),
    radial-gradient(circle at 10% 80%, rgba(255, 149, 213, 0.2), transparent 40%),
    radial-gradient(circle at 90% 70%, rgba(106, 231, 255, 0.25), transparent 45%);
  filter: blur(120px);
  z-index: -2;
}

.cosmic-gradient {
  position: fixed;
  inset: 0;
  background: var(--accent);
  opacity: 0.12;
  filter: blur(200px);
  z-index: -3;
}

.orb {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  mix-blend-mode: screen;
  animation: float 18s ease-in-out infinite;
  z-index: -1;
}

.orb-one {
  top: -80px;
  left: -40px;
  background: #66f0ff;
}

.orb-two {
  bottom: 10%;
  right: 10%;
  background: #c471ff;
  animation-delay: 4s;
}

.orb-three {
  top: 40%;
  right: -10%;
  background: #ffb8d2;
  animation-delay: 8s;
}

@keyframes float {
  0% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-25px) scale(1.05);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

.hero {
  padding: 2.25rem clamp(1.25rem, 3vw, 4rem) 1.5rem;
}

.top-nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-bottom: 3rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(7, 8, 14, 0.75);
  backdrop-filter: blur(14px);
}

.logo {
  text-decoration: none;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.04em;
  text-transform: lowercase;
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
}

.logo span,
.logo strong {
  display: inline-block;
  line-height: 1;
}

.logo strong {
  background: var(--accent);
  -webkit-background-clip: text;
  color: transparent;
  margin-left: 0.25rem;
  font-weight: 700;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.95rem;
  justify-content: center;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  position: relative;
  padding-bottom: 0.2rem;
  transition: color 0.2s ease;
}

.language-switch {
  position: relative;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: flex-end;
}

.nav-language {
  margin-left: 0;
}

.language-switch select {
  appearance: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font: inherit;
  padding: 0.6rem 2.5rem 0.6rem 1rem;
  cursor: pointer;
  min-width: 150px;
}

.language-switch::after {
  content: "⌄";
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--muted);
}

.language-switch select:focus-visible {
  outline: none;
  border-color: rgba(102, 240, 255, 0.6);
  box-shadow: 0 0 0 2px rgba(102, 240, 255, 0.2);
}


.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--text);
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 3rem;
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  line-height: 1.15;
  margin: 0.5rem 0 1rem;
}

.hero-copy h1 span {
  display: block;
}

.hero-copy p {
  color: var(--muted);
  max-width: 520px;
}

.highlight {
  position: relative;
  display: inline-block;
  color: #fff3ff;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.highlight::before {
  content: "";
  position: absolute;
  inset: -0.2em -0.35em;
  background: var(--accent);
  opacity: 0.45;
  border-radius: 999px;
  filter: blur(18px);
  z-index: -1;
  pointer-events: none;
}

.highlight::after {
  content: "";
  position: absolute;
  inset: -0.1em -0.2em;
  border-radius: 999px;
  background: linear-gradient(120deg, rgba(102, 240, 255, 0.25), rgba(196, 113, 255, 0.15), rgba(255, 184, 210, 0.28));
  opacity: 0.35;
  z-index: -1;
  pointer-events: none;
}

.eyebrow {
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--muted);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  white-space: nowrap;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1.75rem 0 1.25rem;
}

.cta {
  text-decoration: none;
  color: var(--text);
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.85rem 1.6rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s;
}

.cta.primary {
  background: var(--accent);
  color: #05060a;
  box-shadow: var(--glow);
}

.cta.secondary {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.cta.ghost {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.05);
}

.cta:hover,
.cta:focus-visible {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 15px 40px rgba(102, 240, 255, 0.2);
}

.hero-stats {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.stat {
  font-size: 2rem;
  font-weight: 700;
  display: block;
}

.label {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.hero-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 2rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: 20px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 24px;
  pointer-events: none;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-weight: 600;
}

.status-pill {
  background: rgba(102, 240, 255, 0.2);
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-size: 0.75rem;
}

.stack-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stack-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  font-size: 0.95rem;
}

.graph {
  display: flex;
  gap: 0.6rem;
  margin: 1.5rem 0 0.75rem;
  height: 140px;
  align-items: flex-end;
}

.graph .bar {
  flex: 1;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.graph .bar::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 999px;
  background: var(--accent);
  opacity: 0.8;
}

.bar-one {
  height: 50%;
}
.bar-two {
  height: 75%;
}
.bar-three {
  height: 95%;
}

.card-foot {
  color: var(--muted);
  font-size: 0.9rem;
}

.section {
  padding: 4rem clamp(1.5rem, 4vw, 5rem);
  position: relative;
  z-index: 1;
}

.glass {
  background: var(--panel-glass);
  border-radius: 36px;
  margin: 3rem clamp(1rem, 3vw, 3rem);
  border: 1px solid var(--border);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
}

.contrast {
  background: linear-gradient(120deg, rgba(102, 240, 255, 0.08), rgba(196, 113, 255, 0.08));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.highlight {
  background: radial-gradient(circle at 20% 20%, rgba(255, 184, 210, 0.18), transparent 55%),
    rgba(102, 240, 255, 0.05);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.section-tag {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.section h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin: 0.5rem 0 1rem;
}

.section-intro {
  max-width: 620px;
  margin-bottom: 2.25rem;
  color: var(--muted);
}

.grid-three {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1.75rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.dual-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  align-items: center;
}

.feature-list {
  list-style: none;
  padding: 0;
  color: var(--muted);
  margin: 1.5rem 0;
}

.feature-list li + li {
  margin-top: 0.75rem;
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  align-items: stretch;
}

.research-list li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.report-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

.report-card {
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 2rem;
  background: rgba(5, 6, 10, 0.6);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.report-card p {
  color: var(--muted);
}

.report-stats {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.asset-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.asset-card .report-actions {
  margin-top: 1rem;
}

.viewer-shell {
  margin-top: 0;
  padding-top: 0;
}

.viewer-head {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.viewer-label {
  flex: 1 1 280px;
}

.viewer-head h1 {
  margin: 0;
}

.viewer-head .section-tag {
  margin-bottom: 0.35rem;
}

.viewer-head .viewer-actions {
  margin: 0;
  justify-content: flex-end;
}

.viewer-shell .section-intro {
  max-width: 100%;
  margin-bottom: 1.5rem;
}

.viewer-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.pdf-wrapper {
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  background: rgba(5, 6, 10, 0.7);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.pdf-wrapper iframe,
.pdf-wrapper embed {
  width: 100%;
  min-height: 80vh;
  border: none;
}

.lazy-meter {
  background: rgba(5, 6, 10, 0.6);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 2rem;
}

.meter-label {
  text-transform: uppercase;
  letter-spacing: 0.4em;
  font-size: 0.65rem;
  color: var(--muted);
}

.meter-bar {
  margin: 1rem 0 1.25rem;
  height: 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.meter-fill {
  display: block;
  width: 82%;
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scaleX(0.98);
  }
  50% {
    transform: scaleX(1);
  }
}

.idea-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.35rem;
}

.idea-card {
  padding: 1.5rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.idea-card::after {
  content: "";
  position: absolute;
  inset: 30%;
  background: var(--accent);
  opacity: 0.08;
  filter: blur(60px);
}

.idea-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.2);
}

.idea-card h3 {
  margin-top: 0;
}

.idea-card p {
  color: var(--muted);
}

.idea-tag {
  display: inline-flex;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.playground {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  align-items: center;
}

.playground .cta {
  margin-top: 1rem;
}

.idea-output {
  margin-top: 1rem;
  padding: 1.5rem;
  border-radius: 20px;
  border: 1px dashed rgba(255, 255, 255, 0.3);
  background: rgba(5, 6, 10, 0.4);
  min-height: 120px;
}

.play-stats {
  border-radius: 24px;
  background: rgba(5, 6, 10, 0.5);
  padding: 1.5rem;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cta-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2rem;
}

.cta-form {
  margin-top: 1.5rem;
}

.cta-form label {
  font-size: 0.9rem;
  color: var(--muted);
}

.form-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

input[type="email"] {
  flex: 1;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(5, 6, 10, 0.6);
  padding: 0.85rem 1.1rem;
  color: var(--text);
  font-size: 1rem;
}

input[type="email"]:focus {
  outline: none;
  border-color: rgba(102, 240, 255, 0.7);
}

.cta-form button {
  border-radius: 999px;
  border: none;
  padding: 0.85rem 1.5rem;
  font-weight: 600;
  background: var(--accent);
  color: #05060a;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.cta-form button:hover {
  transform: translateY(-2px);
}

.cta-panel {
  background: rgba(5, 6, 10, 0.6);
  border-radius: 28px;
  border: 1px solid var(--border);
  padding: 1.75rem;
}

.cta-panel ul {
  margin: 1rem 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.footer {
  padding: 2.5rem clamp(1.5rem, 4vw, 5rem);
  text-align: center;
  color: var(--muted);
}

.footer-links {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px dotted transparent;
  transition: border-color 0.2s;
}

.footer a:hover {
  border-color: rgba(255, 255, 255, 0.4);
}

.fade {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.idea-output.typing {
  border-style: solid;
  border-color: rgba(102, 240, 255, 0.6);
}

.hero-card {
  transition: transform 0.8s ease;
}

html[dir="rtl"] body {
  direction: rtl;
}

html[dir="rtl"] .nav-links {
  justify-content: flex-end;
  text-align: right;
}

html[dir="rtl"] .hero-copy,
html[dir="rtl"] .section,
html[dir="rtl"] .card,
html[dir="rtl"] .idea-card,
html[dir="rtl"] .cta-panel,
html[dir="rtl"] .footer,
html[dir="rtl"] .play-stats {
  text-align: right;
}

html[dir="rtl"] .language-switch::after {
  left: 1rem;
  right: auto;
}

html[dir="rtl"] .language-switch select {
  padding: 0.6rem 1rem 0.6rem 2.5rem;
  text-align: right;
}

@media (max-width: 900px) {
  .top-nav {
    grid-template-columns: 1fr;
    border-radius: 36px;
  }

  .nav-links {
    justify-content: center;
  }

  .research-grid {
    grid-template-columns: 1fr;
  }

  .nav-actions {
    flex-direction: column;
    width: 100%;
  }

  .nav-actions .cta {
    width: 100%;
    justify-content: center;
  }

  .language-switch {
    width: 100%;
  }

  .language-switch select {
    width: 100%;
    text-align: center;
  }

  .playground,
  .cta-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .hero-actions {
    flex-direction: column;
  }

  .form-row {
    flex-direction: column;
  }

  .hero {
    padding-top: 2.5rem;
  }
}
