/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
  --bg: #0A0A0A;
  --bg-alt: #111111;
  --bg-card: #1A1A1A;
  --text: #F5F5F5;
  --text-muted: #888888;
  --accent-1: #EE3EC9;
  --accent-2: #FF6F3C;
  --accent-gradient: linear-gradient(135deg, #EE3EC9, #FF6F3C);
  --glow: 0 0 40px rgba(238, 62, 201, 0.3);
  --border: #2A2A2A;
  --font-display: 'Bebas Neue', 'Oswald', sans-serif;
  --font-body: 'Archivo', 'Inter', sans-serif;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
}

/* Dot grid background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(circle, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
  z-index: 0;
}

body > * {
  position: relative;
  z-index: 1;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

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

ul, ol {
  list-style: none;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ============================================
   REVEAL ANIMATIONS
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(40px) scale(0.97);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 36px;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-gradient {
  background: var(--accent-gradient);
  color: #fff;
  border-radius: 0;
  position: relative;
  overflow: hidden;
}

.btn-gradient::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #FF6F3C, #EE3EC9);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-gradient:hover {
  transform: scale(1.05);
  box-shadow: var(--glow);
}

.btn-gradient:hover::before {
  opacity: 1;
}

.btn-gradient span {
  position: relative;
  z-index: 1;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 0;
}

.btn-outline:hover {
  border-color: var(--accent-1);
  color: var(--accent-1);
  box-shadow: 0 0 20px rgba(238, 62, 201, 0.15);
  transform: scale(1.05);
}

.btn-rounded {
  border-radius: 50px;
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 18px 0;
  transition: all 0.4s ease;
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  padding: 12px 0;
  background: rgba(10, 10, 10, 0.95);
  border-bottom: 1px solid var(--border);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-logo img {
  height: 40px;
  width: auto;
  filter: brightness(0);
  opacity: 0;
}

.navbar-logo {
  display: inline-block;
  position: relative;
}

.navbar-logo::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #ee3ec9, #ff6f3c);
  -webkit-mask-image: url(/static/img/logo.png);
  mask-image: url(/static/img/logo.png);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.navbar-links a {
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  transition: color 0.3s ease;
  position: relative;
}

.navbar-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-gradient);
  transition: width 0.3s ease;
}

.navbar-links a:hover {
  color: var(--text);
}

.navbar-links a:hover::after {
  width: 100%;
}

.navbar-cta .btn {
  padding: 10px 28px;
  font-size: 0.85rem;
}

.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.navbar-toggle span {
  display: block;
  width: 28px;
  height: 2px;
  background: var(--text);
  transition: all 0.3s ease;
}

.navbar-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.navbar-toggle.active span:nth-child(2) {
  opacity: 0;
}
.navbar-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   MOBILE MENU + LANGUAGE SWITCHER
   ============================================ */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;  /* fallback */
  height: 100dvh; /* real visible viewport on mobile (excludes browser toolbar) */
  background: rgba(10, 10, 10, 0.98);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  /* `safe center` centers when content fits but falls back to start when it
     overflows — plain `center` pushes overflow above the top edge where it
     can't be scrolled to. Old browsers ignore the `safe` line and keep center. */
  justify-content: center;
  justify-content: safe center;
  overflow-y: auto;
  gap: 30px;
  padding: 90px 0 40px; /* top clears the fixed navbar, bottom clears gesture bar */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.mobile-menu.open {
  display: flex;
  opacity: 1;
  pointer-events: all;
}

/* Nav links only — exclude .btn (the CTA keeps its own .btn typography;
   the blanket `a` selector used to blow it up to 2.5rem display font and
   the text clipped against .btn-gradient's overflow:hidden) */
.mobile-menu > a:not(.btn) {
  font-family: var(--font-display);
  font-size: 2.5rem;
  text-transform: uppercase;
  color: var(--text);
  transition: color 0.3s ease;
}

.mobile-menu > a:not(.btn):hover {
  color: var(--accent-1);
}

/* Language Switcher */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 16px;
}
.lang-link {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}
.lang-link:hover { color: var(--text); }
.lang-link.active {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.lang-sep { color: var(--border); }

/* Neutralize nav-link styles leaking onto switcher links */
.navbar-links .lang-link { font-size: 0.85rem; }
.navbar-links .lang-link::after { display: none; }

.lang-switch-mobile {
  margin-left: 0;
  margin-top: 8px;
}
.lang-switch-mobile .lang-link {
  font-family: var(--font-body);
  font-size: 1rem;
}

/* Always-visible switcher in the navbar bar on mobile
   (the copy inside .navbar-links is hidden <=1024px) */
.lang-switch-bar { display: none; }
@media (max-width: 1024px) {
  .lang-switch-bar {
    display: flex;
    margin-left: auto;
    margin-right: 20px;
  }
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  padding: 80px 0 40px;
  background: var(--bg);
  border-top: 2px solid transparent;
  border-image: var(--accent-gradient) 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 60px;
  margin-bottom: 60px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 20px;
  line-height: 1.7;
  max-width: 350px;
}

.footer-brand img {
  height: 36px;
}

.footer h4 {
  font-size: 1.1rem;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--accent-1);
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-contact-item i {
  color: var(--accent-1);
  width: 16px;
  text-align: center;
}

.footer-socials {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.footer-socials a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.footer-socials a:hover {
  border-color: var(--accent-1);
  color: var(--accent-1);
  box-shadow: 0 0 20px rgba(238, 62, 201, 0.15);
}

.footer-bottom {
  text-align: center;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ============================================
   CASE STUDY PAGE
   ============================================ */
.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cs-main { padding-top: 80px; }

.cs-hero {
  padding: 120px 0 80px;
  position: relative;
  overflow: hidden;
}
.cs-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 0%, rgba(238,62,201,0.08), transparent 55%);
  pointer-events: none;
}
.cs-eyebrow {
  font-size: 0.8rem; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--accent-1); font-weight: 600; margin-bottom: 18px;
}
.cs-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6rem); text-transform: uppercase; line-height: 0.95;
  margin-bottom: 20px;
}
.cs-meta { display: flex; flex-wrap: wrap; gap: 10px 28px; color: var(--text-muted); font-size: 0.9rem; margin-bottom: 28px; }
.cs-meta strong { color: var(--text); font-weight: 600; }
.cs-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.cs-tag {
  font-size: 0.72rem; padding: 5px 12px; border: 1px solid var(--border);
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; border-radius: 20px;
}
.cs-section { padding: 80px 0; }
.cs-section:nth-of-type(even) { background: var(--bg-alt); }
.cs-section h2 {
  font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3rem);
  text-transform: uppercase; margin-bottom: 24px;
}
.cs-prose { max-width: 760px; color: var(--text-muted); font-size: 1.05rem; line-height: 1.8; }
.cs-prose p { margin-bottom: 18px; }
.cs-highlights { list-style: none; padding: 0; margin: 32px 0 0; max-width: 760px; display: grid; gap: 12px; }
.cs-highlights li { display: flex; gap: 14px; align-items: flex-start; color: var(--text-muted); }
.cs-highlights li::before {
  content: ''; width: 8px; height: 8px; margin-top: 9px; border-radius: 50%;
  background: var(--accent-gradient); flex-shrink: 0;
}
/* Side-by-side showcase (current vs v1) */
.cs-showcase { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-top: 40px; }
.cs-current { border-color: var(--accent-1); box-shadow: 0 0 30px rgba(238,62,201,0.12); }
.cs-current .cs-showcase-label { color: var(--accent-2); }
.cs-showcase-card {
  background: var(--bg-card); border: 1px solid var(--border);
  overflow: hidden; display: flex; flex-direction: column;
}
.cs-showcase-card img { width: 100%; display: block; border-bottom: 1px solid var(--border); }
.cs-showcase-body { padding: 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.cs-showcase-label {
  font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-1); font-weight: 700;
}
.cs-showcase-body h3 { font-family: var(--font-display); font-size: 1.5rem; text-transform: uppercase; }
.cs-showcase-body p { color: var(--text-muted); font-size: 0.92rem; line-height: 1.6; }
.cs-showcase-card .btn { margin-top: auto; align-self: flex-start; }
.cs-back { display: inline-flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 0.9rem; margin-top: 50px; }
.cs-back:hover { color: var(--accent-1); }
@media (max-width: 768px) {
  .cs-showcase { grid-template-columns: 1fr; }
  .navbar-links { display: none; }
}
