/* Cyb3rQ Cloud — cyber theme, plain CSS. Mirrors the Cyb3rQ design tokens. */

:root {
  --ink-900: #070d1a;
  --ink-800: #0a1628;
  --ink-700: #0d1b2a;
  --ink-600: #122236;
  --brand-50: #eaf1ff;
  --brand-400: #4d7fff;
  --brand-500: #1e5eff;
  --brand-600: #1148e0;
  --cyan: #22d3ee;
  --text: #e2e8f0;
  --mute: #94a3b8;
  --mute-soft: #64748b;
  --border: rgba(255, 255, 255, 0.1);
  --glow: 0 0 40px -8px rgba(30, 94, 255, 0.55);
  --glow-cyan: 0 0 50px -10px rgba(34, 211, 238, 0.45);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink-900);
  color: var(--text);
  font-family: var(--font-inter, Inter, system-ui, sans-serif);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

::selection { background: rgba(30, 94, 255, 0.35); }

a { color: inherit; text-decoration: none; }
h1, h2, h3, .display { font-family: var(--font-display, "Space Grotesk", Inter, sans-serif); }
.mono { font-family: var(--font-mono, "JetBrains Mono", ui-monospace, monospace); }

.container {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}
@media (min-width: 640px) { .container { padding: 0 2rem; } }

/* ---------- Buttons ---------- */
.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.75rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--brand-500);
  color: #fff;
  box-shadow: var(--glow);
}
.btn-primary:hover { background: var(--brand-400); box-shadow: var(--glow-cyan); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; box-shadow: none; }
.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border);
  color: #f1f5f9;
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { border-color: rgba(77, 127, 255, 0.5); background: rgba(255, 255, 255, 0.1); }
.btn-whatsapp { background: #25d366; box-shadow: 0 0 30px -10px rgba(37, 211, 102, 0.6); color: #06140b; }
.btn-whatsapp:hover { background: #1fc15c; }

/* ---------- Cards / chrome ---------- */
.card {
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  padding: 1.5rem;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}
.card:hover { border-color: rgba(77, 127, 255, 0.4); background: rgba(255, 255, 255, 0.06); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 9999px;
  border: 1px solid rgba(77, 127, 255, 0.3);
  background: rgba(30, 94, 255, 0.1);
  padding: 0.375rem 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-400);
}

.section-title {
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0;
}
@media (min-width: 640px) { .section-title { font-size: 2.25rem; } }

.muted { color: var(--mute); }

/* ---------- Navbar ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: 4rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(7, 13, 26, 0.7);
  backdrop-filter: blur(20px);
}
.nav .container { display: flex; align-items: center; justify-content: space-between; }
/* Right side of the nav: in-page anchors (desktop-only) + language toggle +
   register CTA. The toggle and CTA stay visible on ALL screen sizes. */
.nav-right { display: flex; align-items: center; gap: 1rem; }
.nav-links { display: none; gap: 1.5rem; align-items: center; }
.nav-links a { font-size: 0.875rem; color: var(--mute); transition: color 0.2s; }
.nav-links a:hover { color: #fff; }
@media (min-width: 768px) { .nav-links { display: flex; } }
.btn-nav-cta { padding: 0.5rem 1.1rem; }
/* Keep the toggle + CTA from crowding on small phones. */
@media (max-width: 767px) {
  .nav-right { gap: 0.6rem; }
  .btn-nav-cta { padding: 0.45rem 0.85rem; font-size: 0.8rem; }
}

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 0.625rem; font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; }
.logo .b3 { color: var(--brand-400); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 9rem 0 5rem;
  overflow: hidden;
  background-image: radial-gradient(60% 60% at 50% 0%, rgba(30, 94, 255, 0.28) 0%, rgba(7, 13, 26, 0) 70%);
}
.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(148, 163, 184, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(70% 60% at 50% 0%, #000 0%, transparent 80%);
  pointer-events: none;
}
.hero-inner { position: relative; text-align: center; max-width: 52rem; margin: 0 auto; }
.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 1.5rem 0 1rem;
}
@media (min-width: 640px) { .hero h1 { font-size: 3.75rem; } }
.hero p.lead { font-size: 1.125rem; color: var(--mute); max-width: 40rem; margin: 0 auto 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }

.subdomain-chip {
  display: inline-flex;
  align-items: center;
  gap: 0;
  margin-top: 2.5rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  padding: 0.75rem 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
}
.subdomain-chip .you { color: var(--cyan); }
.subdomain-chip .root { color: var(--mute); }
.blink { width: 0.55rem; height: 1.1rem; background: var(--cyan); margin-left: 2px; animation: blink 1.1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Sections ---------- */
section { padding: 5rem 0; }
.section-head { max-width: 40rem; margin: 0 auto 3rem; text-align: center; }
.section-head p { color: var(--mute); margin-top: 0.75rem; }

.grid { display: grid; gap: 1.25rem; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.step-num { font-family: var(--font-display); font-size: 2.25rem; font-weight: 700; color: rgba(255, 255, 255, 0.1); line-height: 1; }
.feat-title { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; color: #fff; margin: 0.75rem 0 0.4rem; }
.feat-icon {
  display: inline-flex;
  border-radius: 0.75rem;
  border: 1px solid rgba(77, 127, 255, 0.3);
  background: rgba(30, 94, 255, 0.1);
  padding: 0.6rem;
  color: var(--brand-400);
}

/* divider band */
.band { border-top: 1px solid rgba(255,255,255,0.05); border-bottom: 1px solid rgba(255,255,255,0.05); background: rgba(10,22,40,0.4); }

/* ---------- Forms ---------- */
.form-wrap { max-width: 34rem; margin: 0 auto; }
.field-label { display: block; margin-bottom: 0.375rem; font-size: 0.875rem; font-weight: 500; color: #cbd5e1; }
.field {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: #fff;
  font-family: inherit;
}
.field::placeholder { color: rgba(148, 163, 184, 0.7); }
.field:focus { outline: none; border-color: rgba(77, 127, 255, 0.6); box-shadow: 0 0 0 3px rgba(77, 127, 255, 0.15); }
textarea.field { resize: vertical; min-height: 5rem; }
.field-row { display: flex; gap: 0.5rem; }
.field-group { margin-bottom: 1rem; }
.field-prefix {
  display: inline-flex; align-items: center; padding: 0 0.85rem;
  border-radius: 0.75rem; border: 1px solid var(--border);
  background: rgba(255,255,255,0.03); color: var(--mute); font-family: var(--font-mono); font-size: 0.85rem;
}
.field-suffix { color: var(--mute); font-family: var(--font-mono); font-size: 0.85rem; white-space: nowrap; align-self: center; }
.hint { font-size: 0.75rem; color: var(--mute); margin-top: 0.35rem; }
.error { font-size: 0.8rem; color: #fca5a5; margin-top: 0.5rem; }
.code-input { letter-spacing: 0.5em; text-align: center; font-family: var(--font-mono); font-size: 1.5rem; }

.dev-banner {
  border: 1px dashed rgba(34, 211, 238, 0.4);
  background: rgba(34, 211, 238, 0.06);
  color: var(--cyan);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  font-family: var(--font-mono);
}

.success-icon {
  width: 4rem; height: 4rem; border-radius: 9999px;
  background: linear-gradient(to bottom right, var(--cyan), var(--brand-500));
  box-shadow: var(--glow);
  display: grid; place-items: center; margin: 0 auto 1.5rem;
  color: #fff; font-size: 1.75rem;
}

/* htmx loading state */
.htmx-request .btn-primary { opacity: 0.6; pointer-events: none; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid rgba(255, 255, 255, 0.05); background: var(--ink-900); padding: 3rem 0; }
.footer .container { display: flex; flex-direction: column; align-items: center; gap: 1rem; text-align: center; }
.footer a { font-size: 0.875rem; color: var(--mute); }
.footer a:hover { color: #fff; }
.copyright { font-size: 0.75rem; color: rgba(148, 163, 184, 0.7); }
@media (min-width: 640px) { .footer .container { flex-direction: row; justify-content: space-between; text-align: left; } }

.fade-in { animation: fadeUp 0.5s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- Language toggle ---------- */
.lang-toggle {
  font-size: 0.8rem;
  color: var(--mute);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.3rem 0.6rem;
  transition: all 0.2s ease;
  line-height: 1;
}
.lang-toggle:hover { color: #fff; border-color: rgba(77, 127, 255, 0.5); }

/* Keep Latin/technical bits (domains, codes, brand) left-to-right inside RTL. */
.ltr { direction: ltr; unicode-bidi: isolate; }

/* ---------- Arabic / RTL ---------- */
[dir="rtl"] body {
  font-family: var(--font-arabic), "Inter", system-ui, sans-serif;
}
[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] .section-title,
[dir="rtl"] .feat-title {
  font-family: var(--font-arabic), "Space Grotesk", sans-serif;
  letter-spacing: 0;
}
/* Brand wordmark stays Latin display font. */
[dir="rtl"] .logo { font-family: var(--font-display), sans-serif; }
[dir="rtl"] .hint,
[dir="rtl"] .field-label { text-align: right; }
[dir="rtl"] .hero h1 { line-height: 1.25; }
/* The mono prefix/suffix sit naturally; field rows forced LTR via .ltr keep
   the + / .cyb3rq.cloud on the correct side regardless of language. */
