/* =========================================================================
   Tech-Games — public site styles
   Dark arcade theme by default; light mode via [data-theme="light"].
   Bilingual: .lang-en / .lang-ar toggled by <html lang>.
   ========================================================================= */

:root {
  --bg: #0b0f1a;
  --bg-2: #11172a;
  --panel: #141c33;
  --panel-2: #1a2440;
  --text: #e8ecf6;
  --muted: #93a0bf;
  --border: #243150;
  --primary: #38e1b0;        /* neon mint */
  --primary-ink: #042018;
  --accent: #6c8cff;         /* arcade blue */
  --accent-2: #ff5d9e;       /* arcade pink */
  --warning: #ffcc66;
  --danger: #ff6b6b;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  --radius: 14px;
  --radius-sm: 9px;
  --maxw: 1140px;
  --font: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-ar: 'Cairo', 'Amiri', system-ui, sans-serif;
}

[data-theme="light"] {
  --bg: #f6f8fc;
  --bg-2: #eef2fa;
  --panel: #ffffff;
  --panel-2: #f1f4fb;
  --text: #131a2b;
  --muted: #586079;
  --border: #dde4f1;
  --primary: #0bbd86;
  --primary-ink: #ffffff;
  --accent: #3a5cf0;
  --accent-2: #e23e85;
  --shadow: 0 14px 40px rgba(28, 45, 90, .12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
html[lang="en"] .lang-ar { display: none !important; }
html[lang="ar"] .lang-en { display: none !important; }
html[lang="ar"] body { font-family: var(--font-ar); }

body {
  margin: 0;
  font-family: var(--font);
  background: radial-gradient(1200px 600px at 80% -10%, rgba(108,140,255,.14), transparent 60%),
              radial-gradient(900px 500px at -10% 10%, rgba(56,225,176,.10), transparent 55%),
              var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .4em; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.container.narrow { max-width: 780px; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: inherit; font-weight: 600; font-size: .95rem;
  padding: .7em 1.2em; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: var(--primary-ink); box-shadow: 0 8px 24px rgba(56,225,176,.28); }
.btn-primary:hover { box-shadow: 0 10px 30px rgba(56,225,176,.42); }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-lg { padding: .85em 1.5em; font-size: 1.02rem; }
.btn-sm { padding: .5em .9em; font-size: .85rem; }
.icon-btn {
  background: var(--panel); border: 1px solid var(--border); color: var(--text);
  width: 40px; height: 40px; border-radius: 10px; cursor: pointer; font-size: 1rem;
  display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary); }

/* ---------------- Nav ---------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 18px; height: 66px; }
.logo { display: inline-flex; align-items: center; gap: .55em; font-weight: 800; font-size: 1.15rem; }
.brand-mark { color: var(--primary); letter-spacing: -3px; }
.nav-links { display: flex; gap: 22px; margin-inline-start: auto; font-weight: 500; }
.nav-links a:hover { color: var(--primary); }
.nav-actions { display: flex; align-items: center; gap: 10px; }

/* ---------------- Hero ---------------- */
.hero { padding: 70px 0 60px; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.eyebrow {
  display: inline-block; font-weight: 600; font-size: .82rem; letter-spacing: .04em;
  color: var(--primary); background: color-mix(in srgb, var(--primary) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent);
  padding: .35em .8em; border-radius: 999px; margin-bottom: 16px;
}
.hero-title { font-size: clamp(2.1rem, 5vw, 3.5rem); font-weight: 800; letter-spacing: -.02em; }
.hero-sub { font-size: 1.12rem; color: var(--muted); max-width: 34ch; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 30px; }
.hero-stats { display: flex; gap: 28px; flex-wrap: wrap; }
.hstat b { display: block; font-size: 1.5rem; color: var(--text); }
.hstat span { color: var(--muted); font-size: .85rem; }

/* arcade art */
.hero-art { position: relative; aspect-ratio: 1/1; max-width: 420px; justify-self: end; width: 100%; }
.arcade-grid {
  position: absolute; inset: 0; display: grid;
  grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(4, 1fr); gap: 10px;
  padding: 20px; border: 1px solid var(--border); border-radius: 24px;
  background: linear-gradient(160deg, var(--panel), var(--bg-2));
  box-shadow: var(--shadow);
}
.arcade-grid span { border-radius: 10px; background: color-mix(in srgb, var(--accent) 16%, transparent); animation: pulse 3.6s ease-in-out infinite; }
.arcade-grid span:nth-child(3n) { background: color-mix(in srgb, var(--primary) 22%, transparent); animation-delay: .4s; }
.arcade-grid span:nth-child(4n) { background: color-mix(in srgb, var(--accent-2) 20%, transparent); animation-delay: .8s; }
.arcade-grid span:nth-child(5n) { animation-delay: 1.2s; }
@keyframes pulse { 0%,100% { opacity: .35; transform: scale(.96); } 50% { opacity: 1; transform: scale(1); } }
.blip { position: absolute; width: 22px; height: 22px; border-radius: 50%; filter: blur(.3px); }
.blip-1 { background: var(--primary); top: -8px; left: 30%; animation: float 5s ease-in-out infinite; }
.blip-2 { background: var(--accent-2); bottom: 6%; right: -6px; animation: float 6.5s ease-in-out infinite reverse; }
.blip-3 { background: var(--accent); top: 45%; left: -10px; animation: float 7.5s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }

/* ---------------- Sections ---------------- */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-2); border-block: 1px solid var(--border); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 38px; }
.section-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 800; }
.section-head p { color: var(--muted); font-size: 1.05rem; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; transition: transform .15s ease, border-color .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); box-shadow: var(--shadow); }

.service-icon { font-size: 1.6rem; color: var(--primary); margin-bottom: 10px; }
.service-card h3 { font-size: 1.18rem; }
.service-desc { color: var(--muted); min-height: 3em; }
.service-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.price { font-weight: 700; }
.price-from { color: var(--muted); font-weight: 500; font-size: .8rem; }
.cur { color: var(--muted); font-size: .8rem; font-weight: 600; }

.work-thumb {
  aspect-ratio: 16/9; border-radius: 10px; margin-bottom: 14px;
  display: flex; align-items: center; justify-content: center; font-size: 2rem; color: #fff;
}
.work-thumb span { opacity: .85; }
.thumb-1 { background: linear-gradient(135deg, #38e1b0, #6c8cff); }
.thumb-2 { background: linear-gradient(135deg, #ff5d9e, #ffcc66); }
.thumb-3 { background: linear-gradient(135deg, #6c8cff, #b06cff); }
.work-card h3 { font-size: 1.1rem; }
.work-card p { color: var(--muted); margin: 0; }

.quote-card p { font-size: 1.04rem; }
.quote-card footer { color: var(--muted); font-weight: 600; }

/* ---------------- FAQ ---------------- */
.faq { display: grid; gap: 12px; }
.faq-item { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 4px 18px; }
.faq-item summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "＋"; color: var(--primary); font-size: 1.2rem; }
.faq-item[open] summary::after { content: "−"; }
.faq-a { color: var(--muted); padding-bottom: 16px; }

/* ---------------- Forms / contact ---------------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field-label { font-weight: 600; font-size: .88rem; color: var(--muted); }
.field input, .field textarea, .field select {
  font-family: inherit; font-size: .98rem; color: var(--text);
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px;
  padding: .7em .85em; width: 100%; transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent);
}
.contact-form { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cf-actions { display: flex; align-items: center; gap: 16px; margin-top: 8px; }
.cf-status { font-weight: 600; font-size: .92rem; }
.cf-status.ok { color: var(--primary); }
.cf-status.err { color: var(--danger); }

/* ---------------- Footer ---------------- */
.footer { background: var(--bg-2); border-top: 1px solid var(--border); padding: 50px 0 26px; margin-top: 20px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 28px; }
.footer-brand p { color: var(--muted); max-width: 28ch; }
.footer-col h4 { font-size: .95rem; }
.footer-col a, .footer-col span { display: block; color: var(--muted); margin-bottom: 8px; }
.footer-col a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid var(--border); margin-top: 30px; padding-top: 20px; color: var(--muted); font-size: .9rem; }

/* ---------------- Legal pages ---------------- */
.legal-body { background: var(--bg); }
.legal-top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 880px; margin: 0 auto; padding: 20px 22px; flex-wrap: wrap;
}
.legal-logo { font-weight: 800; display: inline-flex; align-items: center; gap: .5em; }
.legal-nav { display: flex; gap: 18px; color: var(--muted); flex-wrap: wrap; }
.legal-nav a:hover, .legal-nav a.on { color: var(--primary); }
.legal-home { color: var(--text); }
.legal-wrap { max-width: 880px; margin: 0 auto; padding: 10px 22px 60px; }
.legal-h1 { font-size: 2rem; font-weight: 800; margin-bottom: 18px; }
.legal-wrap h2 { font-size: .95rem; text-transform: uppercase; letter-spacing: .08em; color: var(--primary); margin-top: 6px; }
.legal-wrap h3 { font-size: 1.1rem; margin-top: 22px; }
.legal-lead { font-size: 1.08rem; color: var(--muted); }
.legal-rule { border: none; border-top: 1px dashed var(--border); margin: 34px 0; }
.legal-ar { font-family: var(--font-ar); }
.legal-foot { max-width: 880px; margin: 0 auto; padding: 22px; border-top: 1px solid var(--border); color: var(--muted); font-size: .9rem; }

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { justify-self: center; margin-top: 10px; }
  .cards { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .cards { grid-template-columns: 1fr; }
  .cf-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero-stats { gap: 18px; }
}

/* Honour reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
