/* ========================================================================
   Faryon Group — Landing page styles
   Glassmorphism · Light/Dark themes · Bilingual (AR/EN) · Animations
   ======================================================================== */

:root {
  /* Brand */
  --brand: #22c58d;
  --brand-2: #4fd6a8;
  --brand-deep: #14a06f;
  --navy: #0c2a3a;

  /* Gold accent (luxury touch) */
  --gold: #b8860b;
  --gold-2: #d9af52;
  --gold-grad: linear-gradient(120deg, #b8860b, #e6c878);

  /* Light theme (default) */
  --bg: #eef3f5;
  --bg-2: #e3edf0;
  --text: #0c2a3a;
  --text-soft: #4a5d68;
  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-brd: rgba(255, 255, 255, 0.7);
  --glass-shadow: rgba(12, 42, 58, 0.12);
  --card-hover: rgba(255, 255, 255, 0.75);
  --nav-bg: rgba(255, 255, 255, 0.6);
  --blob-1: rgba(34, 197, 141, 0.45);
  --blob-2: rgba(79, 214, 168, 0.4);
  --blob-3: rgba(12, 42, 58, 0.18);
  --grid: rgba(12, 42, 58, 0.05);

  --radius: 22px;
  --radius-sm: 14px;
  --max: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-ar: "Cairo", system-ui, sans-serif;
  --font-en: "Poppins", system-ui, sans-serif;
}

html[data-theme="dark"] {
  --bg: #061720;
  --bg-2: #0a2230;
  --text: #eaf3f1;
  --text-soft: #9fb4bd;
  --glass-bg: rgba(18, 42, 56, 0.45);
  --glass-brd: rgba(120, 200, 175, 0.18);
  --glass-shadow: rgba(0, 0, 0, 0.45);
  --card-hover: rgba(22, 52, 68, 0.6);
  --nav-bg: rgba(8, 28, 38, 0.55);
  --blob-1: rgba(34, 197, 141, 0.4);
  --blob-2: rgba(20, 160, 111, 0.32);
  --blob-3: rgba(40, 120, 160, 0.3);
  --grid: rgba(255, 255, 255, 0.04);

  /* Brighter gold glows on dark navy */
  --gold: #e8c46a;
  --gold-2: #f3d98c;
  --gold-grad: linear-gradient(120deg, #e8c46a, #fce4ad);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-ar);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background 0.5s var(--ease), color 0.5s var(--ease);
  min-height: 100vh;
}

html[lang="en"] body { font-family: var(--font-en); }

.container { width: min(var(--max), 92%); margin-inline: auto; }

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

/* Logo theme swap */
.logo-night { display: none; }
html[data-theme="dark"] .logo-day { display: none; }
html[data-theme="dark"] .logo-night { display: block; }

/* ---------- Animated background ---------- */
.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background:
    radial-gradient(1200px 800px at 80% -10%, var(--bg-2), transparent 60%),
    var(--bg);
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.9;
  will-change: transform;
}
.blob-1 { width: 46vw; height: 46vw; background: var(--blob-1); top: -8%; inset-inline-start: -6%; animation: drift1 18s var(--ease) infinite alternate; }
.blob-2 { width: 40vw; height: 40vw; background: var(--blob-2); bottom: -10%; inset-inline-end: -5%; animation: drift2 22s var(--ease) infinite alternate; }
.blob-3 { width: 34vw; height: 34vw; background: var(--blob-3); top: 35%; inset-inline-start: 45%; animation: drift3 26s var(--ease) infinite alternate; }
.grid-overlay {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%);
}

@keyframes drift1 { to { transform: translate(8vw, 6vh) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-7vw, -5vh) scale(1.1); } }
@keyframes drift3 { to { transform: translate(-6vw, 7vh) scale(1.2); } }

/* ---------- Glass primitive ---------- */
.glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid var(--glass-brd);
  box-shadow: 0 8px 32px var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* ---------- Navbar ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  border-inline: none;
  border-top: none;
  border-radius: 0;
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
}
.brand-logo { height: 46px; width: auto; }
.nav-links { display: flex; gap: 0.4rem; }
.nav-links a {
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-soft);
  transition: color 0.25s, background 0.25s;
}
.nav-links a:hover { color: var(--brand-deep); background: rgba(34, 197, 141, 0.12); }

.nav-actions { display: flex; align-items: center; gap: 0.5rem; }
.pill-btn {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--glass-brd);
  background: var(--glass-bg);
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
  font-family: inherit;
  transition: transform 0.25s var(--ease), border-color 0.25s, color 0.25s;
}
.pill-btn:hover { transform: translateY(-2px); border-color: var(--brand); color: var(--brand-deep); }
.lang-btn { font-size: 0.85rem; letter-spacing: 0.5px; }
.pill-btn svg { width: 20px; height: 20px; }
.icon-moon { display: none; }
html[data-theme="dark"] .icon-sun { display: none; }
html[data-theme="dark"] .icon-moon { display: block; }

.menu-toggle { display: none; flex-direction: column; gap: 5px; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; }
.menu-toggle span { height: 2px; width: 22px; margin-inline: auto; background: var(--text); border-radius: 2px; transition: 0.3s; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s, background 0.25s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #fff;
  box-shadow: 0 10px 24px rgba(34, 197, 141, 0.35);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(34, 197, 141, 0.45); }
.btn-ghost { color: var(--text); border-color: var(--glass-brd); }
.btn-ghost:hover { transform: translateY(-3px); color: var(--brand-deep); border-color: var(--brand); }

/* ---------- Hero ---------- */
.hero { padding: clamp(3rem, 8vw, 7rem) 0 clamp(2rem, 5vw, 4rem); }
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 3rem;
}
.badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.45rem 1rem; border-radius: 999px;
  font-weight: 800; font-size: 0.85rem;
  margin-bottom: 1.4rem;
  border-color: rgba(216, 175, 82, 0.45);
}
.badge > span:last-child {
  background: var(--gold-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.badge .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 0 rgba(216, 175, 82, 0.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(216, 175, 82, 0); } 100% { box-shadow: 0 0 0 0 rgba(216, 175, 82, 0); } }

.hero-title {
  font-size: clamp(2.3rem, 5.2vw, 4rem);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 1.2rem;
}
.hero-title .line { display: block; }
.hero-title .accent {
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub { font-size: 1.08rem; color: var(--text-soft); max-width: 46ch; margin-bottom: 2rem; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Hero visual */
.hero-visual { position: relative; min-height: 420px; display: grid; place-items: center; }
.orb-card {
  width: min(360px, 80%);
  aspect-ratio: 1;
  border-radius: 32px;
  display: grid;
  place-items: center;
  padding: 2.5rem;
  animation: floaty 6s ease-in-out infinite;
}
.orb-card::after {
  content: "";
  position: absolute; inset: -2px;
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(34, 197, 141, 0.5), transparent 60%);
  z-index: -1; filter: blur(8px);
}
.orb-logo { width: 78%; }
.float-card {
  position: absolute;
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1.1rem;
  border-radius: 16px;
  font-weight: 700; font-size: 0.9rem;
}
.float-card .fc-icon { font-size: 1.2rem; }
.fc-1 { top: 6%; inset-inline-start: -2%; animation: floaty 5s ease-in-out infinite; }
.fc-2 { bottom: 12%; inset-inline-end: -4%; animation: floaty 7s ease-in-out infinite 0.4s; }
.fc-3 { bottom: -2%; inset-inline-start: 12%; animation: floaty 6.5s ease-in-out infinite 0.8s; }
@keyframes floaty { 50% { transform: translateY(-16px); } }

/* ---------- Stats ---------- */
.stats { margin: 1rem auto clamp(2rem, 6vw, 4rem); }
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-radius: var(--radius); padding: 2rem 1.5rem;
}
.stat { text-align: center; padding: 0.5rem; }
.stat + .stat { border-inline-start: 1px solid var(--glass-brd); }
.stat-num {
  font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800;
  background: linear-gradient(120deg, var(--brand), var(--gold-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-label { color: var(--text-soft); font-weight: 600; font-size: 0.92rem; margin-top: 0.3rem; }

/* ---------- Sections ---------- */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto clamp(2rem, 5vw, 3.4rem); }
.eyebrow {
  display: inline-block; font-weight: 800; font-size: 0.8rem; letter-spacing: 2px;
  text-transform: uppercase; margin-bottom: 0.7rem;
  background: var(--gold-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-head h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -0.5px;
  position: relative; display: inline-block;
}
/* Gold divider under centered section headings */
.section-head h2::after {
  content: ""; display: block; width: 64px; height: 3px; margin: 0.9rem auto 0;
  border-radius: 3px; background: var(--gold-grad);
  box-shadow: 0 0 14px rgba(216, 175, 82, 0.5);
}
.section-head p { color: var(--text-soft); margin-top: 0.8rem; }

/* ---------- Product cards ---------- */
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.card {
  border-radius: var(--radius); padding: 2rem 1.7rem;
  transition: transform 0.4s var(--ease), background 0.4s, box-shadow 0.4s;
  position: relative; overflow: hidden;
}
/* Gold top-edge highlight on hover */
.card::after {
  content: ""; position: absolute; top: 0; inset-inline: 0; height: 2px;
  background: var(--gold-grad); transform: scaleX(0); transform-origin: center;
  transition: transform 0.45s var(--ease);
}
.card:hover::after { transform: scaleX(1); }
.card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(34, 197, 141, 0.18), transparent 60%);
  opacity: 0; transition: opacity 0.4s;
}
.card:hover { transform: translateY(-8px); background: var(--card-hover); box-shadow: 0 22px 48px var(--glass-shadow); }
.card:hover::before { opacity: 1; }
.card-icon {
  width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center;
  font-size: 1.9rem; margin-bottom: 1.1rem;
  background: linear-gradient(135deg, rgba(34, 197, 141, 0.18), rgba(79, 214, 168, 0.08));
  border: 1px solid var(--glass-brd);
}
.card h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; }
.card p { color: var(--text-soft); font-size: 0.95rem; }

/* ---------- Features ---------- */
.features-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
.feature {
  display: flex; gap: 1.1rem; align-items: flex-start;
  border-radius: var(--radius); padding: 1.6rem;
  transition: transform 0.35s var(--ease);
}
.feature:hover { transform: translateY(-5px); }
.feature-ic {
  flex: 0 0 auto; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  font-size: 1.4rem; color: #fff; font-weight: 800;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  box-shadow: 0 8px 18px rgba(34, 197, 141, 0.35);
}
.feature h4 { font-size: 1.12rem; margin-bottom: 0.3rem; }
.feature p { color: var(--text-soft); font-size: 0.95rem; }

/* ---------- About ---------- */
.about-inner { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 3rem; align-items: center; }
.about-visual { border-radius: var(--radius); padding: 3rem; display: grid; place-items: center; aspect-ratio: 4 / 3; }
.about-logo { width: 70%; }
.about-copy .eyebrow { margin-bottom: 0.6rem; }
.about-copy h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); font-weight: 800; margin-bottom: 1rem; }
.about-copy p { color: var(--text-soft); margin-bottom: 1.3rem; }
.about-list { list-style: none; display: grid; gap: 0.7rem; }
.about-list li { position: relative; padding-inline-start: 1.9rem; font-weight: 600; }
.about-list li::before {
  content: "✓"; position: absolute; inset-inline-start: 0; top: 0;
  width: 1.4rem; height: 1.4rem; border-radius: 50%; display: grid; place-items: center;
  font-size: 0.8rem; color: #fff; background: var(--brand);
}

/* ---------- Contact ---------- */
.contact-card {
  border-radius: var(--radius);
  display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem;
  padding: clamp(1.8rem, 4vw, 3rem);
}
.contact-copy h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); font-weight: 800; margin-bottom: 0.8rem; }
.contact-copy p { color: var(--text-soft); margin-bottom: 1.4rem; }
.contact-list { list-style: none; display: grid; gap: 0.9rem; }
.contact-list li { display: flex; align-items: center; gap: 0.8rem; font-weight: 600; }
.contact-list .ci {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: rgba(34, 197, 141, 0.15); color: var(--brand-deep); font-size: 1.05rem;
}
.contact-form { display: grid; gap: 0.9rem; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 0.9rem 1.1rem; border-radius: var(--radius-sm);
  border: 1px solid var(--glass-brd); background: var(--glass-bg); color: var(--text);
  font-family: inherit; font-size: 0.95rem; resize: vertical;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(34, 197, 141, 0.18);
}
.contact-form .btn { justify-content: center; margin-top: 0.3rem; }

/* ---------- Footer ---------- */
.footer { margin-top: clamp(2rem, 6vw, 4rem); padding-top: 2.5rem; border-top: 1px solid var(--glass-brd); }
.footer-inner { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; padding-bottom: 1.8rem; }
.footer-logo { height: 52px; margin-bottom: 0.8rem; }
.footer-brand p { color: var(--text-soft); max-width: 30ch; }
.footer-links { display: flex; gap: 1.4rem; flex-wrap: wrap; align-items: center; }
.footer-links a { color: var(--text-soft); font-weight: 600; transition: color 0.25s; }
.footer-links a:hover { color: var(--brand-deep); }
.footer-bottom { text-align: center; padding: 1.2rem 0; color: var(--text-soft); font-size: 0.88rem; border-top: 1px solid var(--glass-brd); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { min-height: 340px; margin-top: 1rem; }
  .about-inner { grid-template-columns: 1fr; }
  .contact-card { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem 0; }
  .stat:nth-child(3) { border-inline-start: 0; }
  .stat:nth-child(odd) { border-inline-start: 0; }

  .nav-links {
    position: fixed; inset: 0 0 auto 0; top: 68px;
    flex-direction: column; gap: 0.2rem; padding: 1rem;
    background: var(--nav-bg); backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--glass-brd);
    transform: translateY(-130%); transition: transform 0.4s var(--ease);
  }
  .nav-links.open { transform: none; }
  .menu-toggle { display: flex; }
}

@media (max-width: 560px) {
  .cards-grid, .features-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat + .stat { border-inline-start: 0; border-top: 1px solid var(--glass-brd); padding-top: 1rem; }
  .footer-inner { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
