/* =========================================================================
   IT Hub Space — landing styles
   ========================================================================= */

:root {
  color-scheme: dark;
  --bg: #000;
  --blue: #1f5cff;
  --glow: #2f7bff;
  --steel: #6f9ac2;
  --silver: #e8eef6;
  --muted: #8fa3bb;
  --card: #000;
  --line: #14295a;
  --ok: #7ee0a1;
  --bad: #ff8b9a;
  --radius: 14px;
}

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

html {
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--silver);
  font-family: 'Cairo', 'Segoe UI', system-ui, sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

html[lang="ar"] body { font-family: 'Cairo', sans-serif; }

/* Orbitron has no Arabic glyphs and letter-spacing breaks Arabic rhythm. */
html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] .tag,
html[lang="ar"] .section-title,
html[lang="ar"] .faq h2,
html[lang="ar"] .legal h1,
html[lang="ar"] .legal h2,
html[lang="ar"] .e404 {
  font-family: 'Cairo', sans-serif !important;
  letter-spacing: 0 !important;
  text-indent: 0 !important;
}

img { max-width: 100%; height: auto; }

a { color: #6fb0ff; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #a9d0ff; }

:focus-visible {
  outline: 2px solid var(--glow);
  outline-offset: 3px;
  border-radius: 6px;
}

/* --- utilities ---------------------------------------------------------- */

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: fixed;
  top: -60px;
  inset-inline-start: 12px;
  z-index: 60;
  padding: 10px 16px;
  background: #1f5cff;
  color: #fff;
  border-radius: 0 0 10px 10px;
  font-weight: 700;
  text-decoration: none;
  transition: top .2s;
}
.skip:focus { top: 0; }

/* --- background --------------------------------------------------------- */

canvas#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.glow {
  position: fixed;
  left: 50%;
  top: 34%;
  width: min(950px, 130vw);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(31, 92, 255, .16) 0%, rgba(0, 0, 0, 0) 62%);
  z-index: 0;
  pointer-events: none;
}

/* --- language switcher -------------------------------------------------- */

.lang {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 14px);
  inset-inline-end: 16px;
  z-index: 5;
  display: flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 0, 0, .78);
  backdrop-filter: blur(8px);
  overflow: hidden;
}

.lang a {
  padding: 8px 16px;
  font: 600 .85rem 'Cairo', sans-serif;
  color: var(--muted);
  text-decoration: none;
  transition: .25s;
}

.lang a:hover { color: var(--silver); background: rgba(31, 92, 255, .18); }
.lang a.on {
  background: linear-gradient(135deg, #1f5cff, #3d8bff);
  color: #fff;
}

/* --- layout ------------------------------------------------------------- */

main {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 70px 20px 30px;
  gap: 16px;
}

.hero {
  width: min(760px, 100%);
  min-height: calc(100svh - 110px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.tilt { perspective: 900px; }

.logo-wrap {
  position: relative;
  width: min(400px, 74vw);
  aspect-ratio: 900 / 867;
  animation: float 6s ease-in-out infinite;
  transition: transform .15s ease-out;
  transform-style: preserve-3d;
}

.logo-wrap img {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tag {
  font-family: 'Orbitron', sans-serif;
  font-size: .8rem;
  letter-spacing: .35em;
  color: var(--steel);
  margin: 0;
  animation: fade 1s 2s both;
}

h1 {
  margin: 0;
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: clamp(1.6rem, 5.4vw, 2.9rem);
  letter-spacing: .26em;
  text-indent: .26em;
  background: linear-gradient(90deg, #1f5cff, #e8eef6, #6f9ac2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: fade 1s 2.1s both;
}

.sub {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
  font-size: 1.05rem;
  animation: fade 1s 2.3s both;
}

.bar {
  width: min(320px, 70vw);
  height: 4px;
  border-radius: 4px;
  background: #111;
  overflow: hidden;
  animation: fade 1s 2.4s both;
}

.bar i {
  display: block;
  height: 100%;
  width: 40%;
  border-radius: 4px;
  background: linear-gradient(90deg, transparent, #2f7bff, #e8eef6, #2f7bff, transparent);
  animation: slide 2.2s ease-in-out infinite;
}

/* --- countdown ---------------------------------------------------------- */

#count {
  display: none;
  gap: 12px;
  animation: fade 1s 2.5s both;
}

#count div {
  min-width: 70px;
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}

#count b {
  display: block;
  font: 700 1.5rem 'Orbitron', sans-serif;
  color: #cfe1ff;
  font-variant-numeric: tabular-nums;
}

#count span { font-size: .72rem; color: var(--muted); }

/* --- form --------------------------------------------------------------- */

form.signup {
  position: relative;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  width: min(480px, 100%);
  animation: fade 1s 2.6s both;
}

.field { position: relative; flex: 1 1 220px; min-width: 0; }

form.signup input[type="email"] {
  width: 100%;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid #1d3566;
  background: #000;
  color: var(--silver);
  font: inherit;
  outline: none;
  transition: .2s;
}

form.signup input[type="email"]:focus {
  border-color: var(--glow);
  box-shadow: 0 0 0 3px rgba(47, 123, 255, .25);
}

.honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}

form.signup button {
  padding: 13px 26px;
  border: 0;
  border-radius: 12px;
  font: 700 1rem 'Cairo', sans-serif;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #1f5cff, #3d8bff);
  box-shadow: 0 0 22px rgba(47, 123, 255, .45);
  transition: .2s;
}

form.signup button:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 32px rgba(47, 123, 255, .7);
}

form.signup button[disabled] { opacity: .6; cursor: progress; transform: none; }

.msg {
  min-height: 1.5em;
  margin: 0;
  color: #8fd0ff;
  font-size: .95rem;
}
.msg.ok { color: var(--ok); }
.msg.bad { color: var(--bad); }

/* Server-injected confirmation (works without JavaScript). */
.msg .m-ok { color: var(--ok); }
.msg .m-bad { color: var(--bad); }

.note {
  font-size: .8rem;
  color: #52647d;
  max-width: 460px;
  margin: 0;
  animation: fade 1s 2.7s both;
}

/* --- cards -------------------------------------------------------------- */

.section-title {
  font: 700 clamp(1.1rem, 3vw, 1.5rem) 'Orbitron', sans-serif;
  letter-spacing: .18em;
  margin: 44px 0 4px;
  color: #cfe1ff;
}

/* Explicit width: `main` centres its children, so auto-width sections would
   make every nested `width: …%` resolve against an indeterminate box. */
.coverage { width: min(980px, 100%); }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  width: 100%;
  margin-top: 20px;
}

.card {
  padding: 24px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  backdrop-filter: blur(8px);
  text-align: start;
  transition: .3s;
  opacity: 0;
  transform: translateY(24px);
}

.card.in { opacity: 1; transform: none; }

.card:hover {
  border-color: var(--glow);
  box-shadow: 0 0 30px rgba(47, 123, 255, .25);
  transform: translateY(-4px);
}

.card svg {
  width: 34px;
  height: 34px;
  overflow: visible;
  stroke: #5aa2ff;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card h3 {
  margin: 14px 0 6px;
  font: 700 1.05rem 'Orbitron', sans-serif;
  color: #dbe8ff;
}

.card p { margin: 0; color: var(--muted); line-height: 1.8; font-size: .95rem; }

/* --- FAQ ---------------------------------------------------------------- */

.faq {
  width: min(820px, 100%);
  margin-top: 46px;
  text-align: start;
}

.faq h2 {
  font: 700 clamp(1.1rem, 3vw, 1.4rem) 'Orbitron', sans-serif;
  letter-spacing: .14em;
  color: #cfe1ff;
  text-align: center;
  margin: 0 0 18px;
}

.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #000;
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color .2s;
}

.faq details[open] { border-color: var(--glow); }

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 15px 18px;
  font-weight: 700;
  color: #dbe8ff;
  position: relative;
  padding-inline-end: 44px;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: '+';
  position: absolute;
  inset-inline-end: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #5aa2ff;
  font-size: 1.3rem;
  line-height: 1;
}

.faq details[open] summary::after { content: '–'; }

.faq p {
  margin: 0;
  padding: 0 18px 16px;
  color: var(--muted);
  line-height: 1.9;
  font-size: .97rem;
}

/* --- footer ------------------------------------------------------------- */

footer.site {
  width: min(980px, 100%);
  margin-top: 46px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  align-items: center;
  justify-content: space-between;
  color: #52647d;
  font-size: .82rem;
  letter-spacing: .06em;
}

footer.site nav { display: flex; flex-wrap: wrap; gap: 16px; }
footer.site a { color: #7f97b8; text-decoration: none; }
footer.site a:hover { color: #a9d0ff; text-decoration: underline; }

/* --- animations --------------------------------------------------------- */

@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes float { 50% { translate: 0 -10px; } }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

html[dir="rtl"] .bar i { animation-direction: reverse; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01s !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01s !important;
  }
  html { scroll-behavior: auto; }
}

/* --- 404 ----------------------------------------------------------------- */

.center-page {
  min-height: 100svh;
  justify-content: center;
  padding-top: 40px;
}

.e404 {
  font: 900 clamp(4rem, 18vw, 9rem) 'Orbitron', sans-serif;
  color: transparent;
  background: linear-gradient(90deg, #1f5cff, #e8eef6, #6f9ac2);
  -webkit-background-clip: text;
  background-clip: text;
  margin: 0;
  letter-spacing: .1em;
}

/* --- legal / privacy ----------------------------------------------------- */

.legal {
  width: min(760px, 100%);
  text-align: start;
  margin-top: 34px;
}

.legal h1 {
  font-size: clamp(1.4rem, 4vw, 2rem);
  letter-spacing: .12em;
}

.legal h2 {
  font: 700 1.05rem 'Orbitron', sans-serif;
  color: #cfe1ff;
  margin: 30px 0 8px;
  letter-spacing: .08em;
}

html[lang="ar"] .legal h2 { font-family: 'Cairo', sans-serif; letter-spacing: 0; }

.legal p,
.legal li { color: var(--muted); line-height: 1.95; font-size: .98rem; }

.legal ul { padding-inline-start: 20px; }

.legal .meta { color: #52647d; font-size: .82rem; }

.legal .tag { text-align: start; }
.legal h1 { text-align: start; text-indent: 0; }

@media (max-width: 520px) {
  main { padding-top: 78px; }
  .hero { min-height: auto; padding-block: 12px 6px; }
  form.signup button { width: 100%; }
  footer.site { justify-content: center; text-align: center; }
}
