/* ==========================================================================
   Fouita Projects — styles
   Flow: dark hero → light projects → tinted about → light contact (dark CTA) → dark footer
   ========================================================================== */

:root {
  --ink: #0a0b14;          /* dark sections */
  --ink-2: #12142a;
  --ink-border: #24284a;
  --ink-text: #eceefb;
  --ink-muted: #9aa0c3;

  --paper: #f6f7fb;        /* light sections */
  --paper-2: #eef0f7;
  --line: #e2e5f0;
  --text: #121428;
  --muted: #5b6080;

  --primary: #7c5cff;
  --primary-2: #22d3ee;
  --grad: linear-gradient(90deg, var(--primary), #5b8cff, var(--primary-2));
  --grad-text: linear-gradient(90deg, #7c5cff, #5b8cff);
  --grad-text-rtl: linear-gradient(270deg, #7c5cff, #5b8cff);
  --radius: 14px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--ink);
  color: var(--ink-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

.grad {
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 24px; border-radius: 10px;
  font-weight: 600; letter-spacing: -0.005em; color: #fff !important;
  background: var(--primary); border: 1px solid var(--primary);
  transition: background .2s, border-color .2s, transform .2s var(--ease);
}
.btn:hover { background: #8d72ff; border-color: #8d72ff; transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: rgba(255, 255, 255, .22); }
.btn-ghost:hover { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .45); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; text-align: center; padding: 120px 0 0;
  background: radial-gradient(800px 420px at 50% -10%, rgba(124, 92, 255, .22), transparent 70%), var(--ink);
}

/* Display font for headings (body stays Inter) */
h1, h2, h3 { font-family: "Plus Jakarta Sans", "Inter", system-ui, sans-serif; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 { font-family: "IBM Plex Sans Arabic", "Plus Jakarta Sans", system-ui, sans-serif; }

.hero h1 {
  font-size: clamp(2.5rem, 6.4vw, 6.25rem); line-height: 1.02; font-weight: 600;
  max-width: 1080px; margin: 0 auto; letter-spacing: -0.035em;
  color: #fff;
}
/* "Meet Fouita" pill above the title, scrolls to About */
.meet {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 28px;
  padding: 8px 14px 8px 16px; border-radius: 999px; font-size: .95rem; font-weight: 600; color: var(--ink-text);
  border: 1px solid var(--ink-border); background: rgba(255, 255, 255, .04);
  transition: border-color .2s, background .2s, transform .2s var(--ease);
}
.meet img { height: 22px; width: auto; }
.meet svg { width: 16px; height: 16px; fill: none; stroke: var(--ink-muted); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s var(--ease), stroke .2s; }
.meet:hover { border-color: rgba(124, 92, 255, .6); background: rgba(124, 92, 255, .12); transform: translateY(-1px); }
.meet:hover svg { stroke: var(--ink-text); transform: translateY(2px); }
html[dir="rtl"] .meet { padding: 8px 16px 8px 14px; }

.lead { color: var(--ink-muted); font-size: 1.18rem; max-width: 600px; margin: 24px auto 36px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* Featured on (inside hero) */
.featured { margin-top: 90px; padding: 34px 0 44px; position: relative; }
.featured::before {
  content: ""; position: absolute; top: 0; left: 10%; right: 10%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .18), transparent);
}
.featured-title {
  font-size: .75rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(255, 255, 255, .4); margin-bottom: 22px;
}
.featured-logos { position: relative; }
.marquee-track { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 18px 0; }
.featured-logos a {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 23px; flex: none; white-space: nowrap;
  color: rgba(255, 255, 255, .45); font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em;
  transition: color .25s, transform .25s var(--ease), filter .25s;
}
.featured-logos a:hover { color: #fff; transform: translateY(-2px); filter: drop-shadow(0 0 14px rgba(124, 92, 255, .7)); }
.featured-logos svg { width: 24px; height: 24px; fill: currentColor; }
.featured-logos .wordmark span { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.02em; }

/* Marquee mode (enabled by JS when motion is allowed): logos scroll endlessly, edges fade out */
.featured-logos.is-marquee {
  overflow: hidden; direction: ltr; padding: 6px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}
.is-marquee .marquee-track { flex-wrap: nowrap; justify-content: flex-start; width: max-content; animation: marquee 32s linear infinite; }
.is-marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Light sections ---------- */
.projects, .about, .contact { color: var(--text); }

/* ---------- Projects: bento cards ---------- */
.projects { padding: 110px 0; background: #fff; }
.section-head { text-align: center; margin-bottom: 48px; }
.projects .section-head { text-align: center; max-width: 640px; margin: 0 auto 80px; }
.projects h2, .contact h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.section-sub { color: var(--muted); margin-top: 10px; font-size: 1.05rem; }

/* One product per row: image on one side, details on the other (alternating) */
.grid { display: flex; flex-direction: column; max-width: 1160px; margin: 0 auto; }
.grid .card { padding: 80px 0; }
.grid .card:first-child { padding-top: 0; }
.grid .card:last-child { padding-bottom: 0; }
.grid .card + .card { border-top: 1px solid var(--line); }

.card {
  --accent: var(--text);
  position: relative; display: grid; grid-template-columns: 1.08fr 1fr; column-gap: 56px; align-items: center; isolation: isolate;
}
.grid .card:nth-child(even) .card-media { order: 2; }
.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 8px; }

/* image side */
.card-media {
  position: relative; min-height: 420px; height: 100%; border-radius: 20px; overflow: hidden;
  background: transparent; display: grid; place-items: center;
}
.media-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media-tunvox img { object-position: 60% 40%; }
/* Smart Widgets: the gallery slides from left to right in an endless loop */
.card-media.media-pan { border-radius: 0; }
.pan-track {
  position: absolute; top: 0; bottom: 0; left: 0; display: flex; width: max-content; direction: ltr;
  animation: pan 30s linear infinite;
}
.pan-track img { flex: none; height: 100%; width: auto; margin-right: 24px; }
@keyframes pan { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.media-contain img {
  position: relative; z-index: 1; width: 86%; height: auto; max-height: 86%; object-fit: contain;
  border-radius: 10px; box-shadow: none;
}

/* arrow chip in the image corner */
.card-arrow {
  position: absolute; top: 16px; inset-inline-end: 16px; z-index: 2; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(255, 255, 255, .92); color: var(--text);
  box-shadow: 0 4px 14px rgba(18, 20, 40, .12); transition: background .3s, color .3s;
}
.card-arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[dir="rtl"] .card-arrow svg { transform: scaleX(-1); }
.card:hover .card-arrow { background: var(--accent); color: #fff; }

.badge-new {
  display: inline-flex; align-items: center; vertical-align: middle; position: relative; top: -3px; margin-inline-start: 10px;
  padding: 4px 10px; border-radius: 999px; font-family: "Inter", system-ui, sans-serif;
  font-size: .66rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; line-height: 1.2;
  color: #15803d; background: #dcfce7; border: 1px solid #bbf7d0;
}
html[lang="ar"] .badge-new { letter-spacing: 0; font-family: "IBM Plex Sans Arabic", sans-serif; top: -2px; }

/* details side */
.card-body { display: flex; flex-direction: column; padding: 8px 0; }
.card-logo { height: 30px; display: flex; align-items: center; margin-bottom: 22px; }
.card-logo img { max-height: 100%; width: auto; }
.card-logo .logo-tunvox { height: 22px; filter: invert(1); }
.card-logo .logo-fit { height: 30px; }
.card-logo .logo-fouita { height: 26px; }
.leadita-logo { font-family: "Plus Jakarta Sans", "Inter", sans-serif; font-size: 1.45rem; font-weight: 800; letter-spacing: -0.03em; color: #1c1917; line-height: 1; }

.card h3 { font-size: clamp(1.5rem, 2.4vw, 1.9rem); font-weight: 800; letter-spacing: -0.025em; line-height: 1.15; }
.card .tagline { color: var(--text); font-weight: 600; font-size: 1.08rem; margin-top: 8px; }
.card .desc { color: var(--muted); margin-top: 8px; }

.feats { list-style: none; display: grid; gap: 11px; margin-top: 22px; }
.feats li { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; line-height: 1.5; color: var(--text); }
.feats svg {
  flex: none; width: 20px; height: 20px; margin-top: 1px; padding: 3px; border-radius: 50%;
  fill: none; stroke: var(--accent); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
  background: var(--paper-2);
}


.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px 20px; flex-wrap: wrap; margin-top: 28px; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tags span {
  font-size: .74rem; font-weight: 500; padding: 5px 10px; border-radius: 999px;
  color: var(--muted); background: var(--paper); border: 1px solid var(--line);
}
.card-btn {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; padding: 11px 18px; border-radius: 12px;
  font-size: .92rem; font-weight: 700; color: #fff; background: var(--text); transition: background .25s;
}
.card-btn::after { content: "→"; }
[dir="rtl"] .card-btn::after { content: "←"; }
.card:hover .card-btn { background: #000; }

/* "more to come" line */
.more-soon { margin: 96px auto 0; color: var(--muted); font-size: 1rem; text-align: center; }

@media (max-width: 900px) {
  .grid .card { padding: 64px 0; }
  .card { grid-template-columns: 1fr; row-gap: 24px; }
  .grid .card:nth-child(even) .card-media { order: 0; }
  .card-media { min-height: 0; height: auto; aspect-ratio: 16 / 10; }
}
@media (max-width: 640px) {
  .grid .card { padding: 48px 0; }
  .more-soon { margin-top: 64px; }
  .card-body { padding: 0; }
  .card-foot { flex-direction: column; align-items: stretch; }
  .card-btn { justify-content: center; }
}

/* ---------- About: simple light band ---------- */
.about {
  padding: 110px 0; background: #18181b;
  --text: #f4f4f5; --muted: #a1a1aa; --line: #2e2e33;   /* dark band: light text */
}
.about-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 72px; align-items: start; }
.about .kicker {
  margin-bottom: 16px; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
html[lang="ar"] .about .kicker { letter-spacing: 0; font-size: .95rem; }
.about h2 { font-size: clamp(2rem, 4.2vw, 3rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; color: var(--text); }
.about h2 .grad { background: none; color: inherit; -webkit-background-clip: border-box; background-clip: border-box; }
.about p { color: var(--muted); font-size: 1.08rem; line-height: 1.8; }
.about p strong { color: var(--text); font-weight: 600; }
.about-text p + p { margin-top: 14px; }

.socials { display: flex; gap: 8px; margin-top: 32px; }
.socials a {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  color: var(--muted); border: 1px solid var(--line); background: #fff; transition: border-color .2s, transform .2s var(--ease);
  border-color: transparent;
}
.socials svg { width: 20px; height: 20px; }
.socials a:hover { border-color: #b9bdcf; transform: translateY(-2px); }

.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; margin-top: 72px; padding-top: 40px; border-top: 1px solid var(--line); }
.stats strong {
  display: block; font-family: "Plus Jakarta Sans", "Inter", sans-serif; font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 800;
  line-height: 1.1; letter-spacing: -0.03em; color: var(--text); font-variant-numeric: tabular-nums;
  direction: ltr; unicode-bidi: isolate;
}
.stats span { display: block; margin-top: 6px; color: var(--muted); font-size: .9rem; }
[dir="rtl"] .stats strong { text-align: right; }

/* ---------- Contact ---------- */
.contact { padding: 110px 0 96px; background: var(--ink); }
.contact-box { text-align: center; color: var(--ink-text); }
.contact-box p { color: var(--ink-muted); margin: 12px 0 30px; font-size: 1.08rem; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: var(--ink-muted); font-size: .92rem; padding: 0 0 28px; }
.footer-bottom { text-align: center; padding-top: 28px; border-top: 1px solid var(--ink-border); }

/* Language switcher */
.lang-switch { display: inline-flex; padding: 3px; border-radius: 10px; border: 1px solid var(--ink-border); background: rgba(255, 255, 255, .03); }
.lang-switch button {
  font: inherit; font-family: "Inter", system-ui, sans-serif; font-size: .8rem; font-weight: 600; cursor: pointer;
  padding: 5px 11px; border: 0; border-radius: 7px; background: transparent; color: var(--ink-muted);
  transition: background .2s, color .2s;
}
.lang-switch button:hover { color: var(--ink-text); }
.lang-switch button[aria-pressed="true"] { background: var(--primary); color: #fff; }

/* Floating: fixed bottom-right, stays put when switching to RTL */
.lang-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 100;
  background: rgba(18, 20, 42, .82); border-color: rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(10, 11, 20, .35);
}
@media (max-width: 640px) { .lang-float { right: 16px; bottom: 16px; } }

/* ---------- Arabic / RTL ---------- */
html[lang="ar"] body { font-family: "IBM Plex Sans Arabic", "Inter", system-ui, sans-serif; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 { letter-spacing: 0; line-height: 1.35; }
html[lang="ar"] .featured-title { letter-spacing: 0; }

/* ---------- Scroll reveal (enabled by JS) ---------- */
.js-anim .reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: var(--delay, 0s);
}
.js-anim .reveal.in { opacity: 1; transform: none; }
.js-anim .card.reveal.in {
  transition: opacity .8s var(--ease) var(--delay, 0s), transform .8s var(--ease) var(--delay, 0s),
    translate .4s var(--ease), box-shadow .4s var(--ease), border-color .4s;
}


/* Animated backdrop: drifting colour orbs + faint grid + cursor spotlight */
.hero-inner { position: relative; z-index: 1; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hero-bg::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);
  background-size: 56px 56px; background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000, transparent 75%);
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0; opacity: var(--spot, 0); transition: opacity .4s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 30%), rgba(124, 92, 255, .07), transparent 70%);
}
.orb { position: absolute; border-radius: 50%; filter: blur(100px); opacity: .22; will-change: transform; }
.o1 { width: 520px; height: 520px; top: -220px; left: 12%; background: #7c5cff; animation: drift1 18s ease-in-out infinite alternate; }
.o2 { width: 420px; height: 420px; top: -120px; right: 8%; background: #22d3ee; opacity: .1; animation: drift2 22s ease-in-out infinite alternate; }
.o3 { width: 360px; height: 360px; top: 260px; left: 40%; background: #5b8cff; opacity: .08; animation: drift3 26s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(140px, 80px) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-160px, 110px) scale(.9); } }
@keyframes drift3 { to { transform: translate(-120px, -90px) scale(1.2); } }

/* Headline: plain white (no gradient) */
.hero h1 { color: #fff; }
.hero h1 .grad { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: inherit; }

/* Meet pill: rotating gradient border */
@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.meet {
  border-color: transparent;
  background:
    linear-gradient(rgba(16, 17, 36, .92), rgba(16, 17, 36, .92)) padding-box,
    conic-gradient(from var(--angle), rgba(124, 92, 255, .15), #7c5cff, #22d3ee, rgba(124, 92, 255, .15) 60%) border-box;
  box-shadow: 0 0 0 0 rgba(124, 92, 255, 0), 0 8px 30px rgba(124, 92, 255, .18);
  animation: spin 5s linear infinite;
}
.meet:hover {
  border-color: transparent;
  background:
    linear-gradient(rgba(30, 26, 64, .95), rgba(30, 26, 64, .95)) padding-box,
    conic-gradient(from var(--angle), rgba(124, 92, 255, .15), #7c5cff, #22d3ee, rgba(124, 92, 255, .15) 60%) border-box;
}
@keyframes spin { to { --angle: 360deg; } }

/* Primary CTA: soft glow + light sweep on hover */
.hero .btn:not(.btn-ghost) { position: relative; overflow: hidden; box-shadow: 0 8px 24px rgba(124, 92, 255, .25); }
.hero .btn:not(.btn-ghost)::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 50%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent);
  transform: skewX(-20deg); transition: left .7s var(--ease);
}
.hero .btn:not(.btn-ghost):hover::after { left: 120%; }

/* Hero entrance: staggered fade + rise + unblur */
.js-anim .hero .meet { animation: heroIn 1s var(--ease) both, spin 5s linear infinite; }
.js-anim .hero h1, .js-anim .hero .lead, .js-anim .hero .hero-cta, .js-anim .hero .featured { animation: heroIn 1s var(--ease) both; }
.js-anim .hero h1 { animation-delay: .1s; }
.js-anim .hero .lead { animation-delay: .25s; }
.js-anim .hero .hero-cta { animation-delay: .4s; }
.js-anim .hero .featured { animation-delay: .6s; }

@keyframes heroIn { from { opacity: 0; transform: translateY(26px); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .about-grid { grid-template-columns: 1fr; gap: 24px; }
  .stats { grid-template-columns: repeat(3, 1fr); row-gap: 32px; margin-top: 56px; }
}
@media (max-width: 640px) {
  .hero { padding-top: 84px; }
  .featured { margin-top: 64px; }
  .featured-logos a { margin: 0 14px; }
  .orb { filter: blur(60px); }
  .o1 { width: 340px; height: 340px; left: -10%; }
  .o2 { width: 280px; height: 280px; right: -15%; }
  .o3 { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; padding-top: 32px; }
  .about, .projects { padding: 76px 0; }
  .projects .section-head { margin-bottom: 48px; }
}

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


/* ---------- Testimonials ---------- */
.testimonials { padding: 110px 0; background: #fff; color: var(--text); }
.testimonials .section-head { margin-bottom: 56px; }
.testimonials h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
/* Reviews as editorial quotes: no cards, columns split by hairlines */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); }
.quote-card { display: flex; flex-direction: column; gap: 18px; padding: 8px 40px; color: var(--text); }
.quote-card:first-child { padding-inline-start: 0; }
.quote-card:last-child { padding-inline-end: 0; }
.quote-card + .quote-card { border-inline-start: 1px solid var(--line); }
.stars { display: flex; gap: 3px; }
.stars svg { width: 16px; height: 16px; fill: #facc15; }
.quote-card blockquote {
  flex: 1; font-size: 1.22rem; line-height: 1.6; font-weight: 500; letter-spacing: -0.01em; color: var(--text);
}
.quote-card figcaption { display: block; }
.quote-card figcaption strong { display: block; font-size: .95rem; }
.quote-card figcaption a { font-size: .85rem; color: var(--muted); transition: color .2s; }
.quote-card figcaption a:hover { color: var(--text); text-decoration: underline; }
@media (max-width: 900px) {
  .quotes { grid-template-columns: 1fr; }
  .quote-card, .quote-card:first-child, .quote-card:last-child { padding: 32px 0; }
  .quote-card:first-child { padding-top: 0; }
  .quote-card + .quote-card { border-inline-start: 0; border-top: 1px solid var(--line); }
}

/* RTL: gradients start from the reading side so Arabic matches the other languages */
[dir="rtl"] .grad { background-image: var(--grad-text-rtl); }



