/* ===================== Design Tokens ===================== */
:root {
  --bg: #0a0a0f;
  --bg-alt: #0e0e16;
  --surface: #14141e;
  --surface-2: #1a1a26;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  --text: #f5f5f7;
  --text-dim: #a6a6b3;
  --text-faint: #6f6f80;

  --accent: #d4ff3f;
  --accent-2: #7c5cff;
  --accent-3: #38e0d8;

  --gradient: linear-gradient(120deg, var(--accent-2), var(--accent-3) 60%, var(--accent));

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.45);

  --ff-head: "Space Grotesk", "Inter", sans-serif;
  --ff-body: "Inter", sans-serif;

  --container: 1180px;
  --header-h: 76px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #0a0a0f;
    --bg-alt: #0e0e16;
  }
}

/* ===================== Reset ===================== */
* , *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font: inherit; }
h1, h2, h3, h4 {
  font-family: var(--ff-head);
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.01em;
}
p { margin: 0; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #0a0a0f;
  padding: 10px 16px;
  z-index: 200;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

::selection { background: var(--accent); color: #0a0a0f; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.text-gradient {
  background: var(--gradient);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradient-shift 8s ease infinite;
}
@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ===================== Buttons ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease, color .25s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #0a0a0f;
  box-shadow: 0 0 0 0 rgba(212, 255, 63, 0.4);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(212, 255, 63, 0.25);
}
.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}
.btn-lg { padding: 16px 32px; font-size: 1rem; }
.btn-sm { padding: 9px 18px; font-size: 0.85rem; }

/* ===================== Header ===================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(10, 10, 15, 0.6);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.site-header.scrolled {
  border-bottom-color: var(--border);
  background: rgba(10, 10, 15, 0.85);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--ff-head);
  font-weight: 700;
  font-size: 1.05rem;
}
.logo-mark {
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--gradient);
  color: #0a0a0f;
  font-weight: 700;
}
.nav-desktop {
  display: flex;
  gap: 36px;
}
.nav-desktop a {
  font-size: 0.92rem;
  color: var(--text-dim);
  position: relative;
  padding: 4px 0;
  transition: color 0.2s ease;
}
.nav-desktop a:hover { color: var(--text); }
.nav-desktop a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.25s ease;
}
.nav-desktop a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 14px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 18px; height: 2px;
  margin: 0 auto;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  background: rgba(10, 10, 15, 0.97);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 20px 24px 28px;
  flex-direction: column;
  gap: 18px;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.nav-mobile.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.nav-mobile a { font-size: 1rem; color: var(--text-dim); }
.nav-mobile a:hover { color: var(--text); }
.nav-mobile .btn { align-self: flex-start; margin-top: 6px; }

/* ===================== Hero ===================== */
.hero {
  position: relative;
  padding: calc(var(--header-h) + 90px) 0 0;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 900px;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.28), rgba(56, 224, 216, 0.12) 45%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  text-align: center;
  max-width: 880px;
}
.eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.hero-title {
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  margin-bottom: 22px;
}
.hero-sub {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-dim);
  max-width: 640px;
  margin: 0 auto 36px;
}
.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.hero-tags span {
  font-size: 0.82rem;
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
}

.hero-stats {
  margin-top: 80px;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding: 40px 24px;
}
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat-num {
  font-family: var(--ff-head);
  font-weight: 700;
  font-size: 1.15rem;
}
.stat-label { color: var(--text-faint); font-size: 0.85rem; }

/* ===================== Sections ===================== */
.section { padding: 120px 0; }
.section-alt { background: var(--bg-alt); }
.section-title {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  max-width: 640px;
  margin-bottom: 14px;
}
.section-sub {
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 560px;
  margin-bottom: 48px;
}

/* ===================== About ===================== */
.about-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 64px;
}
.about-body p {
  color: var(--text-dim);
  font-size: 1.05rem;
  margin-bottom: 20px;
}
.about-highlights {
  display: grid;
  gap: 22px;
  margin-top: 36px;
}
.about-highlights li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.about-highlights .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--gradient);
  margin-top: 7px;
  flex-shrink: 0;
}
.about-highlights strong { font-family: var(--ff-head); font-size: 1.02rem; }
.about-highlights p { color: var(--text-dim); font-size: 0.95rem; margin-top: 4px; }

/* ===================== Services ===================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 30px 24px;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.service-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}
.service-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(212, 255, 63, 0.08);
  color: var(--accent);
  margin-bottom: 20px;
}
.service-icon svg { width: 22px; height: 22px; }
.service-card h3 { font-size: 1.08rem; margin-bottom: 10px; }
.service-card > p { color: var(--text-dim); font-size: 0.92rem; margin-bottom: 18px; }

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list li {
  font-size: 0.76rem;
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: 999px;
}

/* ===================== Work (scrolling screenshot gallery) ===================== */
.work-section { overflow: hidden; }
.work-section .section-sub { margin-bottom: 0; }

.work-marquee {
  position: relative;
  margin-top: 48px;
  overflow-x: auto;
  overflow-y: hidden;
  -ms-overflow-style: none;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.work-marquee::-webkit-scrollbar { display: none; }
.work-track {
  display: flex;
  gap: 22px;
  width: max-content;
}

.work-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: rgba(10, 10, 15, 0.55);
  backdrop-filter: blur(6px);
  color: var(--text);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.work-nav svg { width: 20px; height: 20px; }
.work-nav-prev { left: 10px; }
.work-nav-next { right: 10px; }
.work-marquee:hover .work-nav,
.work-nav:focus-visible {
  opacity: 0.85;
}
.work-nav:hover {
  opacity: 1;
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

@media (hover: none) {
  .work-nav { opacity: 0.55; }
}

.work-item {
  position: relative;
  flex: none;
  height: 320px;
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
.work-item img {
  height: 100%;
  width: auto;
  max-width: none;
  display: block;
  object-fit: contain;
}
.work-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 1;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--bg);
  background: var(--accent);
  padding: 5px 12px;
  border-radius: 999px;
}

@media (max-width: 760px) {
  .work-item { height: 220px; }
  .work-track { gap: 14px; }
  .work-nav { width: 38px; height: 38px; }
}

/* ===================== Process ===================== */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.process-step {
  border-top: 2px solid var(--border-strong);
  padding-top: 20px;
}
.process-num {
  font-family: var(--ff-head);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.95rem;
}
.process-step h3 { margin: 12px 0 10px; font-size: 1.1rem; }
.process-step p { color: var(--text-dim); font-size: 0.92rem; }

/* ===================== Testimonials ===================== */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.testimonial-card {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.testimonial-card p {
  font-size: 1rem;
  color: var(--text);
  font-style: italic;
}
.testimonial-card footer {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
}
.testimonial-card footer span { font-weight: 400; color: var(--text-faint); }

/* ===================== CTA Banner ===================== */
.cta-banner {
  position: relative;
  margin: 0 24px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.16), rgba(56, 224, 216, 0.10));
  border: 1px solid var(--border-strong);
}
.cta-banner-inner {
  padding: 80px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.cta-banner-inner h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.cta-banner-inner p { color: var(--text-dim); font-size: 1.05rem; margin-bottom: 10px; }

/* ===================== Contact ===================== */
.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 64px;
  align-items: start;
}
.contact-email {
  display: inline-block;
  font-family: var(--ff-head);
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  font-weight: 600;
  margin: 22px 0 20px;
  color: var(--accent);
  word-break: break-word;
}
.contact-email:hover { text-decoration: underline; }
.contact-note { margin-top: 36px; color: var(--text-faint); font-size: 0.92rem; }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-field label { font-size: 0.85rem; color: var(--text-dim); }
.form-field input,
.form-field select,
.form-field textarea {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--ff-body);
  font-size: 0.95rem;
  transition: border-color 0.2s ease;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-field textarea { resize: vertical; min-height: 120px; }
.form-field select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8'><path d='M1 1l5 5 5-5' stroke='%23a6a6b3' stroke-width='1.5' fill='none' fill-rule='evenodd'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.form-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 6px; }
.form-status { font-size: 0.88rem; color: var(--accent-3); min-height: 1.2em; }

/* ===================== Footer ===================== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 64px 0 0;
  background: var(--bg-alt);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
}
.footer-brand p { color: var(--text-faint); font-size: 0.9rem; margin-top: 10px; }
.footer-nav { display: flex; flex-direction: column; gap: 12px; }
.footer-nav a { color: var(--text-dim); font-size: 0.92rem; }
.footer-nav a:hover { color: var(--text); }
.footer-contact p { color: var(--text-faint); font-size: 0.8rem; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.05em; }
.footer-contact a { color: var(--accent); font-weight: 600; }
.footer-contact a:hover { text-decoration: underline; }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 22px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-faint);
  font-size: 0.82rem;
}
.back-to-top { color: var(--text-dim); }
.back-to-top:hover { color: var(--accent); }

/* ===================== Scroll Reveal ===================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .text-gradient { animation: none; }
}

/* ===================== Message Page ===================== */
.message-hero {
  position: relative;
  overflow: hidden;
  padding: calc(var(--header-h) + 90px) 0 90px;
}
.message-hero .hero-glow {
  top: -30%;
  width: 700px;
  height: 700px;
}
.message-title {
  position: relative;
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin-bottom: 36px;
  max-width: 700px;
}
.message-quote {
  position: relative;
  margin: 0;
  max-width: 780px;
  border-left: 2px solid var(--accent);
  padding-left: 28px;
}
.message-quote p {
  font-family: var(--ff-head);
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  line-height: 1.4;
  font-weight: 500;
  color: var(--text);
  margin: 0;
}

.message-body-section { padding-top: 0; }
.message-body { max-width: 680px; }
.message-body p {
  color: var(--text-dim);
  font-size: 1.08rem;
  margin-bottom: 24px;
}
.message-signoff {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.message-signature {
  font-family: var(--ff-head);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 !important;
}

.nav-desktop a[aria-current="page"],
.nav-mobile a[aria-current="page"] {
  color: var(--accent);
}

/* ===================== Responsive ===================== */
@media (max-width: 980px) {
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .process-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .testimonial-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .nav-desktop { display: none; }
  .nav-toggle { display: flex; }
  .nav-mobile { display: flex; }
  .header-actions .btn-sm { display: none; }
  .services-grid, .work-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .section { padding: 84px 0; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
}
