/*
Theme Name: 888 Digitals
Theme URI: https://888digitals.com
Author: 888 Digitals
Description: Custom WordPress theme for 888 Digitals (jQuery + jQuery Migrate).
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: d888
*/

:root {
  --bg: #0b0f1a;
  --bg-2: #111728;
  --card: #161d31;
  --line: rgba(255,255,255,.08);
  --text: #e8ecf5;
  --muted: #9aa3b8;
  --accent: #7c5cff;
  --accent-2: #20d3b0;
  --grad: linear-gradient(135deg, #7c5cff 0%, #20d3b0 100%);
  --radius: 16px;
  --wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Manrope", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.02em; }
p { margin: 0 0 1em; color: var(--muted); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.section { padding: 110px 0; }
.section--alt { background: var(--bg-2); }
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent-2); margin-bottom: 14px;
}
.section-head { max-width: 680px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(32px, 4vw, 48px); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 28px; border-radius: 999px; font-weight: 700; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s;
}
.btn--primary { background: var(--grad); color: #fff; box-shadow: 0 10px 30px rgba(124,92,255,.35); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(124,92,255,.5); }
.btn--ghost { border-color: var(--line); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); }

/* Header */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  padding: 22px 0; transition: background .3s, padding .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.site-header.is-sticky {
  background: rgba(11,15,26,.85); backdrop-filter: blur(12px);
  padding: 14px 0; border-color: var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo img { height: 40px; width: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 34px; }
.main-nav a { font-weight: 600; font-size: 15px; color: var(--muted); transition: color .2s; }
.main-nav a:hover, .main-nav a.is-active { color: var(--text); }
.header-cta { display: flex; align-items: center; gap: 16px; }
.burger { display: none; background: none; border: 0; width: 40px; height: 40px; cursor: pointer; position: relative; }
.burger span, .burger::before, .burger::after {
  content: ""; position: absolute; left: 8px; right: 8px; height: 2px; background: var(--text); transition: .3s;
}
.burger::before { top: 12px; } .burger span { top: 19px; } .burger::after { top: 26px; }
.nav-open .burger::before { top: 19px; transform: rotate(45deg); }
.nav-open .burger span { opacity: 0; }
.nav-open .burger::after { top: 19px; transform: rotate(-45deg); }

/* Hero */
.hero { position: relative; padding: 190px 0 120px; overflow: hidden; }
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(110px); opacity: .45; z-index: 0;
}
.hero::before { width: 520px; height: 520px; background: var(--accent); top: -120px; right: -120px; }
.hero::after { width: 420px; height: 420px; background: var(--accent-2); bottom: -180px; left: -140px; opacity: .25; }
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: 60px; align-items: center; }
.hero h1 { font-size: clamp(42px, 6vw, 76px); }
.hero p.lead { font-size: 19px; max-width: 560px; margin-bottom: 34px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-card {
  background: rgba(22,29,49,.7); border: 1px solid var(--line); border-radius: 24px; padding: 30px;
  backdrop-filter: blur(8px);
}
.hero-card .row { display: flex; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid var(--line); }
.hero-card .row:last-child { border-bottom: 0; }
.hero-card .row strong { font-size: 26px; }
.hero-card .row small { color: var(--muted); display: block; }
.typed { border-right: 3px solid var(--accent-2); padding-right: 4px; }

/* Logos marquee */
.clients { padding: 40px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; }
.marquee { display: flex; gap: 70px; width: max-content; }
.marquee span { font-size: 22px; font-weight: 800; color: #3a4360; white-space: nowrap; letter-spacing: .02em; }

/* Services */
.grid { display: grid; gap: 24px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px; transition: transform .3s, border-color .3s;
}
.card:hover { transform: translateY(-6px); border-color: rgba(124,92,255,.5); }
.card .icon {
  width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center;
  background: rgba(124,92,255,.15); margin-bottom: 22px; font-size: 24px;
}
.card h3 { font-size: 21px; }
.card ul { list-style: none; padding: 0; margin: 18px 0 0; }
.card li { font-size: 14px; color: var(--muted); padding: 6px 0; border-top: 1px dashed var(--line); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat strong { display: block; font-size: clamp(40px, 5vw, 60px); font-weight: 800; }
.stat span { color: var(--muted); font-size: 15px; }

/* Work */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.filters button {
  background: transparent; color: var(--muted); border: 1px solid var(--line);
  padding: 9px 20px; border-radius: 999px; cursor: pointer; font: inherit; font-weight: 600; font-size: 14px;
}
.filters button.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }
.work-item { border-radius: var(--radius); overflow: hidden; background: var(--card); border: 1px solid var(--line); }
.work-thumb { aspect-ratio: 4/3; display: grid; place-items: end start; padding: 24px; font-weight: 800; font-size: 28px; color: #fff; }
.work-item .meta { padding: 20px 24px; }
.work-item .meta small { color: var(--accent-2); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: 12px; }
.work-item .meta h4 { margin: 6px 0 0; font-size: 18px; }

/* Process */
.steps { counter-reset: step; }
.step { position: relative; padding-left: 0; }
.step::before {
  counter-increment: step; content: "0" counter(step);
  display: block; font-size: 46px; font-weight: 800; margin-bottom: 10px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Testimonials */
.slider { position: relative; max-width: 820px; margin: 0 auto; text-align: center; }
.slide { display: none; }
.slide.is-active { display: block; }
.slide blockquote { font-size: clamp(20px, 2.4vw, 27px); line-height: 1.5; margin: 0 0 26px; color: var(--text); font-weight: 600; }
.slide cite { font-style: normal; color: var(--muted); }
.slide cite strong { color: var(--text); display: block; }
.dots { display: flex; justify-content: center; gap: 10px; margin-top: 34px; }
.dots button { width: 10px; height: 10px; border-radius: 50%; border: 0; background: #2c3550; cursor: pointer; padding: 0; }
.dots button.is-active { background: var(--accent); width: 30px; border-radius: 6px; }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; text-align: left; background: none; border: 0; color: var(--text); font: inherit;
  font-size: 18px; font-weight: 700; padding: 24px 40px 24px 0; cursor: pointer; position: relative;
}
.faq-q::after { content: "+"; position: absolute; right: 4px; top: 20px; font-size: 26px; color: var(--accent-2); transition: transform .3s; }
.faq-item.is-open .faq-q::after { transform: rotate(45deg); }
.faq-a { display: none; padding-bottom: 24px; }

/* CTA + Contact */
.cta-box {
  background: var(--grad); border-radius: 28px; padding: 70px 60px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: start;
}
.cta-box h2 { color: #fff; font-size: clamp(32px, 4vw, 46px); }
.cta-box p { color: rgba(255,255,255,.85); }
.contact-form { display: grid; gap: 14px; }
.contact-form input, .contact-form textarea, .contact-form select {
  width: 100%; padding: 15px 18px; border-radius: 12px; border: 1px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.12); color: #fff; font: inherit;
}
.contact-form ::placeholder { color: rgba(255,255,255,.7); }
.contact-form option { color: #000; }
.contact-form .btn { background: #0b0f1a; color: #fff; justify-content: center; }
.form-msg { font-weight: 700; color: #fff; }
.field-error { border-color: #ffd1d1 !important; background: rgba(255,80,80,.25) !important; }

/* Footer */
.site-footer { padding: 80px 0 30px; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 50px; }
.site-footer h5 { font-size: 15px; margin: 0 0 18px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer li a { color: var(--muted); font-size: 15px; }
.site-footer li a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 26px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.to-top {
  position: fixed; right: 24px; bottom: 24px; width: 48px; height: 48px; border-radius: 50%;
  background: var(--grad); color: #fff; border: 0; font-size: 20px; cursor: pointer; display: none; z-index: 90;
}

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s ease, transform .8s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 1024px) {
  .grid--4, .stats { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .main-nav {
    position: fixed; inset: 0; background: var(--bg); display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: .3s; z-index: -1;
  }
  .nav-open .main-nav { opacity: 1; visibility: visible; }
  .main-nav ul { flex-direction: column; text-align: center; gap: 26px; }
  .main-nav a { font-size: 26px; }
  .burger { display: block; }
  .header-cta .btn { display: none; }
  .hero .wrap, .cta-box { grid-template-columns: 1fr; }
  .cta-box { padding: 44px 28px; }
  .section { padding: 80px 0; }
}
@media (max-width: 560px) {
  .grid--3, .grid--4, .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 150px 0 80px; }
}

/* Single-screen front page */
.solo {
  position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden;
  display: flex;
}
.solo::before, .solo::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(120px); z-index: 0; pointer-events: none;
}
.solo::before { width: 560px; height: 560px; background: var(--accent); top: -160px; right: -140px; opacity: .45; animation: float 14s ease-in-out infinite; }
.solo::after { width: 460px; height: 460px; background: var(--accent-2); bottom: -200px; left: -160px; opacity: .25; animation: float 18s ease-in-out infinite reverse; }
@keyframes float { 50% { transform: translate(-40px, 40px); } }
.solo__inner {
  position: relative; z-index: 1; width: 100%; max-width: var(--wrap); margin: 0 auto;
  padding: 36px 20px; display: flex; flex-direction: column; justify-content: space-between; gap: 48px;
}
.solo__logo img { height: 40px; width: auto; }
.solo__content { max-width: 820px; }
.solo__content h1 { font-size: clamp(42px, 7vw, 88px); }
.solo__content .lead { font-size: 19px; max-width: 600px; margin-bottom: 28px; }
.solo__tags { list-style: none; padding: 0; margin: 0 0 34px; display: flex; flex-wrap: wrap; gap: 10px; }
.solo__tags li { padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; color: var(--muted); }
.solo__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 14px; color: var(--muted); }
.solo__social { display: flex; gap: 22px; }
.solo__social a:hover { color: var(--text); }
@media (max-width: 560px) {
  .solo__inner { padding: 24px 16px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
}
.solo__content { margin: 0 auto; text-align: center; }
.solo__content .hero-actions { justify-content: center; margin-top: 12px; }
button.btn { font: inherit; font-weight: 700; font-size: 15px; background-color: transparent; }
button.btn--primary { background: var(--grad); }
.solo__sub { font-size: clamp(18px, 2.2vw, 24px); font-weight: 700; color: var(--text); margin: 6px 0 10px; }
.solo__join { font-size: 17px; margin-bottom: 26px; }
.solo {
  background: #080b14 url("assets/img/bg.svg") center bottom / cover no-repeat;
}
.solo::before { opacity: .3; }
.solo::after { opacity: .18; }
.solo__content h1 { margin-bottom: 34px; }
.typewriter { min-height: 2.3em; }
.tw-caret {
  display: inline-block; width: .08em; height: .9em; margin-left: .06em; vertical-align: -.08em;
  background: var(--accent-2); animation: caret 1s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }
