/* ===================================================
   CODEQUANTUM — EDITORIAL DARK DESIGN
   Fonts: Bricolage Grotesque + Figtree + JetBrains Mono
   =================================================== */

:root {
  /* Palette */
  --bg:         #060a10;
  --bg-raised:  #0c1018;
  --bg-surface: #121820;
  --bg-hover:   #181e28;

  --text:       #f0f2f5;
  --text-dim:   #8a92a0;
  --text-muted: #4a5260;
  --border:     #1c2230;

  /* Brand Colors */
  --primary:    #008DD2;   /* Blue */
  --secondary:  #393185;   /* Indigo */
  --tertiary:   #F08143;   /* Orange */

  /* Derived Accents */
  --accent-mint:   #008DD2;
  --accent-gold:   #F0A043;
  --accent-orange: #F08143;
  --accent-violet: #393185;
  --accent-cyan:   #33a8e0;

  /* Typography */
  --font-display: 'Bricolage Grotesque', Georgia, serif;
  --font-body:    'Figtree', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;

  /* Spacing — Gestalt: Proximity (clear rhythm between groups) */
  --section-py: clamp(80px, 10vw, 140px);
  --container:  clamp(20px, 5vw, 80px);
  --group-gap:  clamp(16px, 2vw, 28px);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }
img { max-width: 100%; display: block; }

::selection { background: var(--primary); color: #fff; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ==================== UTILITIES ==================== */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--container);
}

.section {
  padding: var(--section-py) 0;
  position: relative;
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 24px;
  margin-bottom: clamp(40px, 6vw, 80px);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.section-label {
  flex-shrink: 0;
}

.nav-logo-img {
  height: 56px;
  width: auto;
}
/* Tablet & mobile section spacing */
@media (max-width: 768px) {
  :root {
    --section-py: clamp(56px, 8vw, 100px);
    --container: clamp(16px, 4vw, 40px);
  }
  .section-header { gap: 16px; margin-bottom: clamp(28px, 5vw, 56px); }
  .section-title { font-size: clamp(2rem, 6vw, 3rem); }
}

/* ==================== CURSOR GLOW ==================== */
.cursor-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 141, 210, 0.07) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
  opacity: 0;
}

.cursor-glow.visible { opacity: 1; }

@media (max-width: 768px) {
  .cursor-glow { display: none; }
}

/* ==================== LOADER ==================== */
.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-inner { text-align: center; }

.loader-logo {
  height: 80px;
  width: auto;
  animation: loaderPulse 1s ease-in-out infinite;
}

.loader-text {
  font-family: var(--font-mono);
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent-mint);
  animation: loaderPulse 1s ease-in-out infinite;
}

@keyframes loaderPulse {
  0%, 100% { opacity: 0.3; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1); }
}

/* ==================== NAVIGATION ==================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 0 var(--container);
  transition: background 0.3s, backdrop-filter 0.3s;
}

.nav.scrolled {
  background: rgba(6, 10, 16, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  border-bottom: 1px solid var(--border);
}

.nav.scrolled .nav-inner { border-color: transparent; }

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.1rem;
}

.nav-logo-mark {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent-mint);
  border: 1.5px solid var(--accent-mint);
  border-radius: 6px;
  padding: 2px 7px;
  line-height: 1.4;
}

.nav-links {
  display: flex;
  gap: 36px;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-dim);
  transition: color 0.3s;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-mint);
  transition: width 0.3s;
}

.nav-link:hover, .nav-link.active {
  color: var(--text);
}

.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.nav-cta {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--bg);
  background: var(--text);
  padding: 8px 24px;
  border-radius: 100px;
  transition: background 0.3s, transform 0.2s;
}

.nav-cta:hover {
  background: var(--accent-mint);
  transform: scale(1.03);
}

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 6px;
  width: 28px;
  padding: 4px 0;
}

.nav-burger span {
  display: block;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-burger.open span:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav-burger.open span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

@media (max-width: 1024px) {
  .nav-links { gap: 24px; }
}

@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .nav-burger { display: flex; }
  .nav-inner { height: 64px; }
  .nav-logo-img { height: 44px; }
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s, visibility 0.4s;
}

.mobile-menu.open { opacity: 1; visibility: visible; }

.mobile-menu-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.mobile-link {
  font-family: var(--font-display);
  font-size: clamp(2rem, 7vw, 2.5rem);
  color: var(--text-dim);
  transition: color 0.3s, transform 0.3s, opacity 0.4s;
  padding: 8px 0;
  opacity: 0;
  transform: translateY(20px);
}

.mobile-menu.open .mobile-link {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
.mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
.mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
.mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
.mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.25s; }
.mobile-menu.open .mobile-link:nth-child(6) { transition-delay: 0.3s; }

.mobile-link:hover { color: var(--text); }

.mobile-link-cta {
  margin-top: 20px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--bg);
  background: var(--accent-mint);
  padding: 12px 36px;
  border-radius: 100px;
}

/* ==================== HERO ==================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 15% 65%, rgba(0, 141, 210, 0.1) 0%, transparent 55%),
    radial-gradient(ellipse 50% 60% at 85% 25%, rgba(57, 49, 133, 0.1) 0%, transparent 55%),
    radial-gradient(ellipse 30% 30% at 50% 80%, rgba(240, 129, 67, 0.05) 0%, transparent 50%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 120px var(--container) 80px;
  max-width: 1000px;
}

.hero-eyebrow {
  margin-bottom: 32px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 9vw, 8rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
}

.hero-line {
  display: block;
}

.hero-title em {
  font-style: italic;
  color: var(--accent-mint);
}

.hero-dot {
  color: var(--accent-mint);
}

.hero-sub {
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  color: var(--text-dim);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--text);
  color: var(--bg);
  padding: 14px 32px;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.3s, transform 0.2s;
}

.btn-primary:hover {
  background: var(--accent-mint);
  transform: scale(1.03);
}

.btn-large { padding: 18px 42px; font-size: 1rem; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 14px 32px;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: border-color 0.3s, background 0.3s;
}

.btn-ghost:hover {
  border-color: var(--text-dim);
  background: var(--bg-raised);
}

/* Scroll Indicator */
.hero-scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 48px;
}

.scroll-line {
  width: 1px;
  height: 48px;
  background: var(--border);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 50%;
  background: var(--accent-mint);
  animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
  0% { top: -50%; }
  100% { top: 100%; }
}

/* Rotating Words */
.hero-rotating {
  position: absolute;
  bottom: 30px;
  right: var(--container);
  z-index: 2;
}

.rotating-ring {
  display: flex;
  gap: 20px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.rotating-ring span {
  animation: fadeRotateWord 6s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * 1s);
}

.rotating-ring span:nth-child(1) { --i: 0; }
.rotating-ring span:nth-child(2) { --i: 1; }
.rotating-ring span:nth-child(3) { --i: 2; }
.rotating-ring span:nth-child(4) { --i: 3; }
.rotating-ring span:nth-child(5) { --i: 4; }
.rotating-ring span:nth-child(6) { --i: 5; }

@keyframes fadeRotateWord {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

@media (max-width: 768px) {
  .hero-rotating { display: none; }
  .hero-content { padding: 100px var(--container) 60px; }
  .hero-content::before,
  .hero-content::after { display: none; }
  .hero-scroll { margin-top: 32px; }
}

@media (max-width: 480px) {
  .hero-title { font-size: clamp(2.4rem, 12vw, 3.5rem); }
  .hero-sub { font-size: 0.95rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .btn-primary, .btn-ghost { width: 100%; justify-content: center; }
}

/* ==================== MARQUEE ==================== */
.marquee-section {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  padding: 18px 0;
  background: var(--bg-raised);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 30s linear infinite;
}

.marquee-content {
  display: flex;
  align-items: center;
  gap: 40px;
  padding-right: 40px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}

.marquee-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-mint);
  flex-shrink: 0;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ==================== ABOUT ==================== */
.section-about {
  border-bottom: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: start;
}

.about-heading {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.015em;
  position: sticky;
  top: 120px;
}

.about-heading em {
  font-style: italic;
  color: var(--accent-mint);
}

.about-text {
  font-size: 1.05rem;
  color: var(--text-dim);
  line-height: 1.8;
  margin-bottom: 48px;
}

.about-text strong { color: var(--text); font-weight: 600; }
.about-text em { color: var(--accent-mint); font-style: normal; }

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.stat {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  text-align: center;
  transition: border-color 0.3s;
}

.stat:hover { border-color: var(--accent-mint); }

.stat-number {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 400;
  line-height: 1;
  display: inline;
}

.stat-suffix {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--accent-mint);
}

.stat-label {
  display: block;
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--text-dim);
}

@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-heading { position: static; }
  .about-stats { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 540px) {
  .about-stats { grid-template-columns: 1fr 1fr 1fr; gap: 10px; padding: 14px; }
  .stat { padding: 16px 10px !important; }
  .stat-number { font-size: 2rem; }
  .stat-suffix { font-size: 1.4rem; }
  .stat-label { font-size: 0.7rem; }
}

@media (max-width: 380px) {
  .about-stats { grid-template-columns: 1fr; }
}

/* ==================== SERVICES ==================== */
.section-services {
  background: var(--bg-raised);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.services-list {
  display: flex;
  flex-direction: column;
}

.service-item {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  cursor: default;
  transition: padding 0.3s;
}

.service-item:first-child { border-top: 1px solid var(--border); }

.service-item:hover {
  padding-left: 16px;
}

.service-item:hover .service-num { color: var(--case-accent, var(--accent-mint)); }
.service-item:hover .service-name { color: var(--text); }
.service-item:hover .service-icon { opacity: 1; color: var(--case-accent, var(--accent-mint)); transform: scale(1.1); }

.service-num {
  font-size: 0.85rem;
  color: var(--text-muted);
  width: 40px;
  flex-shrink: 0;
  transition: color 0.3s;
}

.service-body { flex: 1; }

.service-name {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 400;
  color: var(--text-dim);
  transition: color 0.3s;
  margin-bottom: 4px;
}

.service-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 500px;
  line-height: 1.5;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
}

.service-item:hover .service-desc {
  max-height: 100px;
  opacity: 1;
  margin-top: 8px;
}

.service-icon {
  font-size: 1.5rem;
  color: var(--text-muted);
  opacity: 0.3;
  transition: all 0.3s;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .service-desc {
    max-height: none;
    overflow: visible;
    opacity: 1;
    margin-top: 6px;
  }
  .service-item { padding: 20px 0; }
  .service-item:hover { padding-left: 0; }
}

@media (max-width: 480px) {
  .service-icon { display: none; }
  .service-name { font-size: clamp(1.1rem, 4vw, 1.4rem); }
}

/* ==================== WORK / PROJECTS ==================== */
.section-work {
  padding-bottom: 0;
}

.work-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 60px;
  flex-wrap: wrap;
}

.filter-btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 20px;
  border-radius: 100px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  transition: all 0.3s;
}

.filter-btn:hover { border-color: var(--text-dim); color: var(--text); }

.filter-btn.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.work-cases { display: flex; flex-direction: column; }

.case {
  padding: clamp(40px, 6vw, 80px) 0;
  background: var(--case-bg, var(--bg));
  transition: opacity 0.5s, transform 0.5s;
}

.case.hidden-case {
  display: none;
}

.case-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(30px, 5vw, 80px);
  align-items: center;
}

.case-inner.reverse { direction: rtl; }
.case-inner.reverse > * { direction: ltr; }

.case-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.case-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.case-desc {
  font-size: 1rem;
  color: var(--text-dim);
  line-height: 1.7;
  max-width: 480px;
}

.case-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.case-tags span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 100px;
  color: var(--text-dim);
}

.case-visual {
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform 0.5s;
}

.case-visual i {
  font-size: clamp(3rem, 6vw, 5rem);
  color: rgba(255,255,255,0.15);
  transition: transform 0.5s, color 0.5s;
}

.case:hover .case-visual { transform: scale(1.02); }
.case:hover .case-visual i { transform: scale(1.1); color: rgba(255,255,255,0.25); }

@media (max-width: 900px) {
  .case-inner { grid-template-columns: 1fr; gap: 32px; }
  .case-inner.reverse { direction: ltr; }
  .case-visual { order: -1; aspect-ratio: 16 / 9; }
}

@media (max-width: 480px) {
  .case { padding: clamp(28px, 5vw, 48px) 0; }
  .case-title { font-size: clamp(1.6rem, 6vw, 2.2rem); }
}

/* ==================== WHY US ==================== */
.section-why {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.why-strip {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.why-strip::-webkit-scrollbar { display: none; }

.why-item {
  flex: 1 1 0;
  padding: 40px 32px;
  border-right: 1px solid var(--border);
  transition: background 0.3s;
}

.why-item:first-child { border-left: 1px solid var(--border); }

.why-item:hover { background: var(--bg-raised); }

.why-item i {
  font-size: 1.5rem;
  color: var(--item-accent);
  margin-bottom: 20px;
}

.why-item h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  margin-bottom: 8px;
}

.why-item p {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .why-strip {
    flex-wrap: wrap;
    overflow-x: visible;
  }
  .why-item {
    flex: 1 1 calc(50% - 1px);
    min-width: 0;
    border-bottom: 1px solid var(--border);
  }
  .why-item:first-child { border-left: none; }
  .why-item:last-child { border-right: none; }
}

@media (max-width: 480px) {
  .why-item {
    flex: 1 1 100%;
    border-right: none;
    border-left: none;
    padding: 28px var(--container);
  }
}

/* ==================== TESTIMONIALS ==================== */
.section-testimonials {
  background: var(--bg-raised);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.testimonial-stage {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}

.testimonial-quote-mark {
  font-family: var(--font-display);
  font-size: 8rem;
  line-height: 0.6;
  color: var(--text-muted);
  opacity: 0.3;
  margin-bottom: 16px;
}

.testimonial-content {
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.testimonial-card {
  animation: testimonialIn 0.5s ease-out;
}

@keyframes testimonialIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.testimonial-text {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.5vw, 1.7rem);
  font-weight: 400;
  line-height: 1.5;
  color: var(--text);
  font-style: italic;
  margin-bottom: 32px;
}

.testimonial-author {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}

.testimonial-role {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 4px;
}

.testimonial-stars {
  color: var(--accent-gold);
  font-size: 0.85rem;
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 4px;
}

.testimonial-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 40px;
}

.testimonial-nav button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: all 0.3s;
}

.testimonial-nav button:hover {
  border-color: var(--accent-mint);
  color: var(--accent-mint);
}

@media (max-width: 600px) {
  .testimonial-content { min-height: 200px; }
  .testimonial-text { font-size: clamp(1rem, 3.5vw, 1.3rem); }
  .testimonial-quote-mark { font-size: 5rem; }
}

/* ==================== CTA ==================== */
.section-cta {
  padding: clamp(140px, 18vw, 260px) 0;
  text-align: center;
  position: relative;
  background: var(--bg);
}

.cta-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.cta-circle {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--border);
}

.cta-circle-1 {
  width: 600px;
  height: 600px;
  top: -200px;
  right: -100px;
  animation: ctaFloat 12s ease-in-out infinite;
}

.cta-circle-2 {
  width: 400px;
  height: 400px;
  bottom: -100px;
  left: -50px;
  animation: ctaFloat 10s ease-in-out infinite reverse;
}

@keyframes ctaFloat {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(20px, -20px); }
}

.cta-inner { position: relative; z-index: 1; }

.cta-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.03em;
  margin-bottom: 40px;
  overflow: visible;
}

.cta-title em {
  font-style: italic;
  color: var(--accent-mint);
}

@media (max-width: 480px) {
  .section-cta { padding: clamp(60px, 12vw, 120px) 0; }
  .cta-title { font-size: clamp(2.2rem, 10vw, 3.5rem); margin-bottom: 28px; }
}

/* ==================== CONTACT (Basic Agency Inspired) ==================== */
.section-contact {
  padding: 0;
  border-top: 1px solid var(--border);
}

/* --- Hero split --- */
.contact-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 80vh;
}

.contact-hero-left {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #040810 0%, #0a1428 40%, #081020 100%);
}

.contact-hero-visual {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-deco-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 141, 210, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 141, 210, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}

.contact-deco-ring {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  border: 1px solid rgba(0, 141, 210, 0.12);
  animation: contactRingSpin 30s linear infinite;
}

.contact-deco-ring-2 {
  width: 450px;
  height: 450px;
  border-color: rgba(57, 49, 133, 0.08);
  animation-direction: reverse;
  animation-duration: 40s;
}

@keyframes contactRingSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.contact-hero-cq {
  font-family: var(--font-mono);
  font-size: clamp(6rem, 14vw, 12rem);
  font-weight: 700;
  color: rgba(0, 141, 210, 0.06);
  z-index: 1;
  user-select: none;
}

.contact-hero-right {
  padding: clamp(60px, 8vw, 120px) clamp(30px, 5vw, 80px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-heading {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 16px 0 12px;
}

.contact-heading em {
  font-style: italic;
  color: var(--primary);
}

.contact-subtitle {
  font-size: 1rem;
  color: var(--text-dim);
  margin-bottom: 48px;
  font-style: italic;
}

/* Contact channels */
.contact-channels {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.contact-channel {
  padding: 24px 0;
  border-top: 1px solid var(--border);
}

.contact-channel:last-child {
  border-bottom: 1px solid var(--border);
}

.contact-email {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-weight: 600;
  color: var(--text);
  display: inline-block;
  margin: 8px 0 4px;
  position: relative;
  transition: color 0.3s;
}

.contact-email::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.contact-email:hover { color: var(--primary); }
.contact-email:hover::after { width: 100%; }

.contact-channel-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --- Lower section: Form + Office --- */
.contact-lower {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: clamp(40px, 5vw, 80px);
  padding: var(--section-py) 0;
  border-top: 1px solid var(--border);
}

.contact-form-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 32px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-group label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.form-group input,
.form-group textarea,
.form-select {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.4s;
  resize: none;
  border-radius: 0;
  -webkit-appearance: none;
}

.form-select {
  cursor: pointer;
  color: var(--text-muted);
}

.form-select option {
  background: var(--bg-surface);
  color: var(--text);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus,
.form-select:focus {
  border-color: var(--primary);
}

.btn-submit {
  align-self: flex-start;
  margin-top: 12px;
}

/* Office card */
.contact-office {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.office-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
}

.office-card h4 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  margin: 12px 0 4px;
}

.office-tz {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.office-card address {
  font-style: normal;
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.7;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.office-card address strong {
  color: var(--text);
}

.office-contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.office-contact a {
  font-size: 0.85rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.3s;
}

.office-contact a i { color: var(--primary); width: 16px; text-align: center; }
.office-contact a:hover { color: var(--text); }

.office-hours {
  padding-top: 16px;
}

.office-hours p {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 6px;
}

.office-legal {
  padding-top: 8px;
}

.office-legal p {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
  letter-spacing: 0.02em;
}

.office-social {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.office-social a {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--text-dim);
  transition: all 0.3s;
}

.office-social a:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(0, 141, 210, 0.08);
}

.office-map { border-radius: 20px; overflow: hidden; }

/* Form success */
.form-success {
  padding: 40px;
  text-align: center;
}

.form-success i {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 16px;
}

.form-success h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.form-success p {
  color: var(--text-dim);
}

@media (max-width: 900px) {
  .contact-hero { grid-template-columns: 1fr; }
  .contact-hero-left { min-height: 240px; }
  .contact-lower { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .contact-hero-left { min-height: 180px; }
  .contact-hero-right { padding: 40px var(--container); }
  .contact-heading { font-size: clamp(2rem, 8vw, 3rem); }
  .contact-subtitle { margin-bottom: 32px; }
}

@media (max-width: 480px) {
  .contact-hero-left { display: none; }
}

/* ==================== FOOTER ==================== */
.footer {
  padding: 80px 0 32px;
  border-top: 1px solid var(--border);
}

.footer-top {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 60px;
  padding-bottom: 60px;
  border-bottom: 1px solid var(--border);
}

.footer-tagline {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-top: 12px;
  line-height: 1.6;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col h4 { margin-bottom: 6px; }

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

.footer-col a:hover { color: var(--text); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-corporate {
  text-align: center;
  padding: 32px 0;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  line-height: 1.8;
}

.footer-corporate .corporate-name {
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.footer-corporate a {
  color: var(--text-dim);
  transition: color 0.3s;
}

.footer-corporate a:hover {
  color: var(--primary);
}

.footer-legal {
  display: flex;
  gap: 20px;
}

.footer-legal a {
  color: var(--text-muted);
  transition: color 0.3s;
}

.footer-legal a:hover { color: var(--text-dim); }

@media (max-width: 768px) {
  .footer { padding: 60px 0 28px; }
  .footer-top { grid-template-columns: 1fr; gap: 40px; padding-bottom: 40px; }
  .footer-columns { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}

@media (max-width: 540px) {
  .footer-columns { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 380px) {
  .footer-columns { grid-template-columns: 1fr; }
}

/* ==================== WHATSAPP FAB ==================== */
.whatsapp-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #fff;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
  transition: transform 0.3s, box-shadow 0.3s;
}

.whatsapp-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 30px rgba(37, 211, 102, 0.4);
}

@media (max-width: 480px) {
  .whatsapp-fab {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    font-size: 1.4rem;
    border-radius: 14px;
  }
}

/* ==================== SCROLL REVEAL ==================== */
.reveal, .scroll-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.reveal.visible, .scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays for hero */
.reveal[data-delay="0"] { transition-delay: 0.1s; }
.reveal[data-delay="1"] { transition-delay: 0.25s; }
.reveal[data-delay="2"] { transition-delay: 0.4s; }
.reveal[data-delay="3"] { transition-delay: 0.55s; }
.reveal[data-delay="4"] { transition-delay: 0.7s; }
.reveal[data-delay="5"] { transition-delay: 0.85s; }
.reveal[data-delay="6"] { transition-delay: 1.0s; }

/* =====================================================
   GESTALT PRINCIPLE ENHANCEMENTS
   ===================================================== */

/* --- PROXIMITY: Related items share tighter spacing --- */
.about-stats .stat {
  padding: 28px 20px;
}
.about-stats {
  gap: 16px; /* tighter within group */
}
.about-text {
  margin-bottom: 40px; /* clear separation between text and stats */
}

/* --- SIMILARITY: Consistent shapes for same-level elements --- */
.stat, .why-item, .service-item, .case {
  --radius: 16px;
}
.stat { border-radius: var(--radius); }
.case-visual { border-radius: var(--radius); }

/* --- COMMON REGION: Shared background groups related items --- */
.about-stats {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
}
.stat {
  border: 1px solid var(--border);
  background: var(--bg-surface);
}

.contact-info {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
}

/* --- CONTINUITY: Visual thread connecting sections --- */
.section-label {
  position: relative;
}
.section-label::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--primary);
  vertical-align: middle;
  margin-right: 10px;
}

/* --- FIGURE-GROUND: Primary actions pop from surface --- */
.btn-primary {
  box-shadow: 0 4px 24px rgba(0, 141, 210, 0.2);
}
.btn-primary:hover {
  box-shadow: 0 6px 32px rgba(0, 141, 210, 0.35);
}

.nav-cta {
  box-shadow: 0 2px 12px rgba(0, 141, 210, 0.15);
}

/* --- CLOSURE: Partial borders that imply complete shapes --- */
.hero-content::before {
  content: '';
  position: absolute;
  top: 60px;
  left: -40px;
  width: 100px;
  height: 100px;
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
  border-radius: 0;
  opacity: 0.5;
  pointer-events: none;
}

.hero-content::after {
  content: '';
  position: absolute;
  bottom: 20px;
  right: -40px;
  width: 80px;
  height: 80px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  opacity: 0.5;
  pointer-events: none;
}

/* --- SYMMETRY & ORDER: Balanced visual weight --- */
.section-header {
  align-items: center;
}
.section-header::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
  margin-left: 24px;
}

/* --- COMMON FATE: Grouped elements animate together --- */
.about-stats .stat:nth-child(1) { transition-delay: 0s; }
.about-stats .stat:nth-child(2) { transition-delay: 0.1s; }
.about-stats .stat:nth-child(3) { transition-delay: 0.2s; }

.services-list .service-item:nth-child(odd) { --stagger: 0s; }
.services-list .service-item:nth-child(even) { --stagger: 0.05s; }
.service-item { transition-delay: var(--stagger); }

/* --- PRÄGNANZ: Clean focus states, reduce noise --- */
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 141, 210, 0.12);
}

/* --- Brand color gradient for CTA section --- */
.section-cta {
  background: linear-gradient(135deg, var(--bg) 0%, #0a1428 100%);
}
.cta-circle-1 { border-color: rgba(0, 141, 210, 0.15); }
.cta-circle-2 { border-color: rgba(57, 49, 133, 0.15); }

/* --- Brand-tinted hover states --- */
.case:hover {
  box-shadow: inset 0 0 80px rgba(0, 141, 210, 0.03);
}

/* --- Footer brand line --- */
.footer {
  background: var(--bg-raised);
}
.footer::before {
  content: '';
  display: block;
  height: 3px;
  margin-bottom: 40px;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--tertiary));
}

/* =====================================================
   ENHANCED SCROLL & MOTION ANIMATIONS
   ===================================================== */

/* --- Parallax layer (applied via JS) --- */
[data-parallax] {
  will-change: transform;
  transition: transform 0.1s linear;
}

/* --- Magnetic button effect --- */
.magnetic {
  transition: transform 0.2s ease-out;
}

/* --- Word-by-word text reveal --- */
.word-reveal .word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding: 0.25em 0.05em;
  margin: -0.25em -0.05em;
}

.word-reveal .word-inner {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.word-reveal.visible .word-inner {
  transform: translateY(0);
}

.word-reveal.visible .word {
  overflow: visible;
}

/* Stagger per word */
.word-reveal .word:nth-child(1) .word-inner { transition-delay: 0.00s; }
.word-reveal .word:nth-child(2) .word-inner { transition-delay: 0.04s; }
.word-reveal .word:nth-child(3) .word-inner { transition-delay: 0.08s; }
.word-reveal .word:nth-child(4) .word-inner { transition-delay: 0.12s; }
.word-reveal .word:nth-child(5) .word-inner { transition-delay: 0.16s; }
.word-reveal .word:nth-child(6) .word-inner { transition-delay: 0.20s; }
.word-reveal .word:nth-child(7) .word-inner { transition-delay: 0.24s; }
.word-reveal .word:nth-child(8) .word-inner { transition-delay: 0.28s; }
.word-reveal .word:nth-child(9) .word-inner { transition-delay: 0.32s; }
.word-reveal .word:nth-child(10) .word-inner { transition-delay: 0.36s; }

/* --- Line draw animation --- */
.line-draw {
  width: 0;
  height: 1px;
  background: var(--primary);
  transition: width 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.line-draw.visible { width: 100%; }

/* --- Scale reveal for cards/images --- */
.scale-reveal {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.scale-reveal.visible {
  opacity: 1;
  transform: scale(1);
}

/* --- Slide from left/right --- */
.slide-left {
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.slide-left.visible { opacity: 1; transform: translateX(0); }

.slide-right {
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.slide-right.visible { opacity: 1; transform: translateX(0); }

/* --- Smooth tilt on hover (cards) --- */
.tilt-card {
  transition: transform 0.3s ease;
  will-change: transform;
}

/* --- Section divider animation --- */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border) 20%, var(--primary) 50%, var(--border) 80%, transparent);
  opacity: 0;
  transform: scaleX(0);
  transition: opacity 0.8s ease, transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.section-divider.visible {
  opacity: 1;
  transform: scaleX(1);
}

/* --- Floating animation for decorative elements --- */
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33% { transform: translateY(-12px) rotate(1deg); }
  66% { transform: translateY(6px) rotate(-1deg); }
}

/* --- Number ticker smooth --- */
.stat-number {
  font-variant-numeric: tabular-nums;
}
