/* ============================================================
   Luna Creations v2 — Design System
   ============================================================ */

/* ---- 1.0 Reset ---- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overflow-wrap: break-word;
}
/* Subtle grain texture overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}
h1, h2, h3, h4 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  line-height: 1.2;
  color: var(--text);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
ul, ol { list-style: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .scroll-progress { display: none; }
}

/* ---- 1.1 CSS Variables ---- */
:root {
  --bg: #0a0a12;
  --bg-elevated: #0e0e1a;
  --text: #f5f5f0;
  --text-dim: rgba(245, 245, 240, 0.6);
  --text-muted: rgba(245, 245, 240, 0.55);
  --accent-1: #7c3aed;
  --accent-2: #06b6d4;
  --accent-3: #ec4899;
  --gradient: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  --gradient-warm: linear-gradient(135deg, var(--accent-3), var(--accent-1));
  --glass: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-hover: rgba(255, 255, 255, 0.08);
  --nav-h: 72px;
  --container: 1200px;
  --glow-1: rgba(124, 58, 237, 0.15);
  --glow-2: rgba(6, 182, 212, 0.12);
  --glow-3: rgba(236, 72, 153, 0.1);
}

/* ---- 1.2 Typography ---- */
html { font-size: clamp(16px, 0.5rem + 0.7vw, 20px); }
@media (max-width: 1099px) { html { font-size: clamp(15px, 1.35vw, 18px); } }
@media (max-width: 499px) { html { font-size: clamp(16px, 3.5vw, 19px); } }

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3vw, 2.8rem); font-weight: 600; }
h3 { font-size: 1.4rem; font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }
small, .tag {
  font-size: 0.8rem;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 500;
  letter-spacing: 0.05em;
}

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

section {
  padding: 70px 0;
}

.section-title {
  margin-bottom: 60px;
}

/* ---- 1.4 Accessibility ---- */
:focus-visible {
  outline: 2px solid var(--accent-1);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  padding: 8px 16px;
  background: var(--accent-1);
  color: #fff;
  border-radius: 4px;
  z-index: 10000;
  font-size: 0.9rem;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 16px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- 1.5 Utility ---- */
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.honeypot {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}

/* ---- 1.6 Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  min-height: 44px;
  transition: box-shadow 0.3s, transform 0.3s, border-color 0.3s, background 0.3s;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.3);
}
.btn-primary:hover {
  box-shadow: 0 0 40px rgba(124, 58, 237, 0.5);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--glass-border);
}
.btn-outline:hover {
  border-color: var(--accent-1);
}

/* ---- 1.7 Glass Cards ---- */
.glass-card {
  background: linear-gradient(145deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 32px;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.glass-card:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 58, 237, 0.3);
  box-shadow: 0 8px 40px rgba(124, 58, 237, 0.1);
}
@supports not (backdrop-filter: blur(1px)) {
  .glass-card { background: rgba(10, 10, 15, 0.9); }
}

/* ============================================================
   2. Navigation
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  padding: 16px 0;
  transition: padding 0.3s, background 0.3s;
}
.nav.scrolled {
  padding: 8px 0;
  background: rgba(10, 10, 18, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}
.nav-links a {
  font-size: 0.95rem;
  opacity: 0.7;
  transition: opacity 0.3s;
  padding: 4px 0;
}
.nav-links a:hover,
.nav-links a.active {
  opacity: 1;
}

/* Language switch */
.lang-switch {
  display: flex;
  gap: 4px;
  margin-left: 16px;
}
.lang-btn {
  padding: 4px 10px;
  border-radius: 20px;
  background: transparent;
  color: var(--text-dim);
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 0.85rem;
  min-height: 32px;
  transition: color 0.3s, border-color 0.3s;
}
.lang-btn:hover {
  color: var(--text);
}
.lang-btn.active {
  color: var(--text);
  border-color: var(--glass-border);
}

/* Burger menu */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  min-height: 44px;
  min-width: 44px;
  align-items: center;
  justify-content: center;
}
.nav-burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s, opacity 0.3s;
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1100px) and (min-width: 769px) {
  .nav-links { gap: 20px; }
  .lang-switch { gap: 2px; margin-left: 8px; }
  .lang-btn { padding: 4px 7px; font-size: 0.8rem; }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    z-index: 999;
    font-size: 1.4rem;
  }
  .nav-links.open { display: flex; }
  .nav-burger { display: flex; }
  .lang-switch {
    position: absolute;
    bottom: 60px;
    margin-left: 0;
  }
}

/* ============================================================
   3. Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  clip-path: inset(0);
  perspective: 1000px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  transform-style: preserve-3d;
}
.hero-content {
  position: relative;
  z-index: 3;
  will-change: transform;
}
.hero h1 {
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 1.05;
}
.hero-subtitle {
  font-size: clamp(1rem, 1.5vw, 1.3rem);
  color: var(--text-dim);
  max-width: 600px;
  margin-top: 24px;
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
}
.hero-buttons {
  display: flex;
  gap: 16px;
  margin-top: 40px;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.9s forwards;
}
@keyframes heroFadeIn {
  to { opacity: 1; transform: none; }
}

/* Constellation canvas */
#constellation {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
#constellation.visible { opacity: 1; }

/* Orb parallax wrappers */
.orb-wrap {
  position: absolute;
  will-change: transform;
  z-index: 1;
}

/* Gradient orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.25;
  animation: float 20s ease-in-out infinite;
}
.orb-wrap:nth-child(2) { top: 10%; left: 10%; }
.orb-1 {
  width: 400px;
  height: 400px;
  background: var(--accent-1);
}
.orb-wrap:nth-child(3) { top: 50%; right: 10%; }
.orb-2 {
  width: 350px;
  height: 350px;
  background: var(--accent-2);
  animation-delay: -7s;
}
.orb-wrap:nth-child(4) { bottom: 10%; left: 40%; }
.orb-3 {
  width: 300px;
  height: 300px;
  background: var(--accent-3);
  animation-delay: -14s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -50px) scale(1.1); }
  66% { transform: translate(-20px, 40px) scale(0.9); }
}

/* Cursor glow */
.hero-glow {
  position: fixed;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.15), transparent 70%);
  pointer-events: none;
  z-index: 1;
  display: none;
}

/* ============================================================
   4. Page Header (subpages)
   ============================================================ */
.page-header {
  padding: calc(var(--nav-h) + 80px) 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(124,58,237,0.15) 0%, transparent 60%),
    radial-gradient(ellipse 60% 60% at 80% 80%, rgba(6,182,212,0.1) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 10% 60%, rgba(236,72,153,0.07) 0%, transparent 60%),
    var(--bg-elevated);
}
.page-header::before {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,0.18) 0%, transparent 70%);
  top: -180px; right: -100px;
  animation: pageOrbFloat 12s ease-in-out infinite;
  pointer-events: none;
}
.page-header::after {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6,182,212,0.15) 0%, transparent 70%);
  bottom: -120px; left: -80px;
  animation: pageOrbFloat 15s ease-in-out infinite reverse;
  pointer-events: none;
}
@keyframes pageOrbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 15px) scale(0.95); }
}
.page-header h1 {
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}
.page-header p {
  color: var(--text-dim);
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
@media (prefers-reduced-motion: reduce) {
  .page-header::before, .page-header::after { animation: none; }
}

/* ============================================================
   5. Animations
   ============================================================ */

/* Staggered reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  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: none;
}

/* Word reveal */
.word {
  display: inline-block;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.word.visible {
  opacity: 1;
  transform: none;
}

/* Scroll progress */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: var(--gradient);
  z-index: 1001;
  width: 0%;
  pointer-events: none;
}

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 50;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.back-to-top:hover,
.back-to-top:focus-visible {
  border-color: var(--accent-1);
  background: var(--glass-hover);
}
.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ============================================================
   6. Portfolio Cards
   ============================================================ */
.project-card {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s;
}
.project-card:hover {
  transform: translateY(-4px);
}

.card-images {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  position: relative;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(6, 182, 212, 0.2));
}
.card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
  will-change: opacity;
  clip-path: inset(3px 0 3px 0);
}
.card-img.active {
  opacity: 1;
}

.card-info {
  padding: 20px 0;
}
.card-tag {
  color: var(--accent-2);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.card-info h3 {
  margin: 8px 0 4px;
}
.card-info p {
  color: var(--text-dim);
  font-size: 0.95rem;
}

@media (hover: none) {
  .card-img:not(.active) { display: none; }
}

/* ============================================================
   7. Homepage Sections
   ============================================================ */

/* Selected Work */
.selected-work .view-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  margin-top: 40px;
  font-size: 1rem;
  transition: color 0.3s;
}
.selected-work .view-all:hover {
  color: var(--text);
}

/* Services strip */
.services-strip {
  display: flex;
  gap: 32px;
  justify-content: center;
  flex-wrap: wrap;
}
.service-item {
  text-align: center;
  padding: 24px;
  flex: 1;
  min-width: 160px;
}
.service-item .service-name {
  font-size: 1rem;
  color: var(--text-dim);
  margin-top: 8px;
}
@media (max-width: 768px) {
  .services-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

/* Testimonials */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.testimonial blockquote,
.testimonial p {
  font-size: 1.05rem;
  font-style: italic;
  margin-bottom: 20px;
  color: var(--text-dim);
  line-height: 1.7;
}
.testimonial {
  display: flex;
  flex-direction: column;
}
.testimonial-author {
  margin-top: auto;
}
.testimonial-author strong {
  display: block;
  color: var(--text);
  font-style: normal;
}
.testimonial-author span {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: normal;
}
@media (max-width: 1024px) {
  .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .testimonials-grid { grid-template-columns: 1fr; }
}

/* Client logos */
.logos-section {
  text-align: center;
}
.logos-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 40px;
  margin-top: 40px;
}
.logos-grid a {
  display: block;
  opacity: 0.4;
  transition: opacity 0.3s, transform 0.3s;
}
.logos-grid a:hover {
  opacity: 1;
  transform: scale(1.05);
}
.logos-grid svg {
  width: 140px;
  height: auto;
}
@media (max-width: 768px) {
  .logos-grid { gap: 24px; }
  .logos-grid svg { width: 110px; }
}

/* Stats */
.stats {
  display: flex;
  justify-content: center;
  gap: 80px;
  text-align: center;
}
.stat-num {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-top: 8px;
}
@media (max-width: 768px) {
  .stats { gap: 40px; }
}
@media (max-width: 480px) {
  .stats { flex-direction: column; gap: 32px; }
}

/* CTA banner */
.cta-banner {
  text-align: center;
  padding: 80px;
  background: linear-gradient(135deg, rgba(124,58,237,0.18), rgba(6,182,212,0.12), rgba(236,72,153,0.08));
  border: 1px solid rgba(124,58,237,0.25);
  border-radius: 24px;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(124,58,237,0.15), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.cta-banner::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(6,182,212,0.1), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.cta-banner h2 {
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}
.cta-banner p {
  position: relative;
  z-index: 1;
}
.cta-banner .btn {
  position: relative;
  z-index: 1;
}
@media (max-width: 768px) {
  .cta-banner { padding: 40px 24px; }
}
@media (max-width: 480px) {
  .cta-banner { padding: 32px 20px; }
}

/* ============================================================
   8. Services Page
   ============================================================ */
.service-section {
  padding: 60px 0;
  border-bottom: 1px solid var(--glass-border);
  position: relative;
  overflow: hidden;
}
.service-section::before {
  content: '';
  position: absolute;
  width: 350px; height: 350px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,0.1) 0%, transparent 70%);
  top: -100px; right: -100px;
  pointer-events: none;
  animation: pageOrbFloat 18s ease-in-out infinite;
}
.service-section:nth-of-type(even)::before {
  background: radial-gradient(circle, rgba(6,182,212,0.1) 0%, transparent 70%);
  top: auto; bottom: -100px; right: auto; left: -100px;
  animation-direction: reverse;
}
.service-section .container {
  display: block;
}
.service-section h2 {
  font-size: 1.8rem;
  margin-bottom: 16px;
}
.service-section p {
  color: var(--text-dim);
  margin-bottom: 16px;
  max-width: 700px;
}
.service-section .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.service-section .tag {
  padding: 4px 12px;
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--text-dim);
}
.service-section .project-links {
  margin-top: 24px;
}
.service-section .project-links a {
  color: var(--accent-2);
  font-size: 0.95rem;
  transition: opacity 0.3s;
}
.service-section .project-links a:hover {
  opacity: 0.7;
}

/* Process timeline */
.process-timeline {
  display: flex;
  justify-content: space-between;
  position: relative;
  gap: 24px;
  margin-top: 40px;
}
.process-line {
  position: absolute;
  top: 28px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: var(--gradient);
  z-index: 0;
}
.process-step {
  text-align: center;
  flex: 1;
  position: relative;
  z-index: 1;
}
.step-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.step-icon svg {
  width: 24px;
  height: 24px;
  color: var(--accent-2);
}
.process-step h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}
.process-step p {
  font-size: 0.9rem;
  color: var(--text-dim);
  max-width: 200px;
  margin: 0 auto;
}
@media (max-width: 1024px) {
  .process-timeline {
    flex-direction: column;
    align-items: center;
    gap: 40px;
  }
  .process-line { display: none; }
  .process-step { max-width: 300px; }
}

/* ============================================================
   9. Portfolio Page
   ============================================================ */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 40px;
}
.filter-btn {
  padding: 8px 20px;
  border-radius: 20px;
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.9rem;
  font-family: inherit;
  min-height: 44px;
  transition: border-color 0.3s, color 0.3s;
}
.filter-btn.active,
.filter-btn:hover {
  color: var(--text);
  border-color: var(--accent-1);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}
.project-card.hidden {
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
  max-height: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: none;
  transition: opacity 0.3s, transform 0.3s, max-height 0.3s;
}
@media (max-width: 768px) {
  .portfolio-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   10. About Page
   ============================================================ */
.mission-text {
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  color: var(--text-dim);
  max-width: 800px;
  line-height: 1.8;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.values-grid .glass-card .value-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  color: var(--accent-2);
}
.values-grid .glass-card h3 {
  margin-bottom: 12px;
}
.values-grid .glass-card p {
  color: var(--text-dim);
  font-size: 0.95rem;
}
@media (max-width: 768px) {
  .values-grid { grid-template-columns: 1fr; }
}

/* Team */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.team-card {
  text-align: center;
}
.team-photo {
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(6, 182, 212, 0.2));
  display: flex;
  align-items: center;
  justify-content: center;
}
.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-placeholder {
  color: var(--text-muted);
  font-size: 3rem;
}
.team-card h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}
.team-role {
  color: var(--accent-2);
  font-size: 0.9rem;
  margin-bottom: 8px;
}
.team-desc {
  color: var(--text-dim);
  font-size: 0.9rem;
}
@media (max-width: 1024px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .team-grid { grid-template-columns: 1fr; }
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 40px;
  max-width: 700px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gradient);
}
.timeline-item {
  position: relative;
  padding-bottom: 40px;
  padding-left: 24px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -45px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-1);
  border: 2px solid var(--bg);
}
.timeline-year {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--accent-1);
  margin-bottom: 4px;
}
.timeline-text {
  color: var(--text-dim);
  font-size: 0.95rem;
}

/* Tech stack */
.tech-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.tech-item {
  padding: 8px 16px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text-dim);
}

/* ============================================================
   11. Contact Page
   ============================================================ */
.contact-hero {
  position: relative;
  padding: calc(var(--nav-h) + 80px) 0 60px;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 60% at 30% 20%, rgba(124,58,237,0.1) 0%, transparent 70%),
    radial-gradient(ellipse 50% 50% at 70% 60%, rgba(6,182,212,0.08) 0%, transparent 70%),
    linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg) 100%);
}
.contact-hero-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.contact-hero .orb-1 {
  width: 350px;
  height: 350px;
  top: -10%;
  right: 10%;
}
.contact-hero .orb-2 {
  width: 250px;
  height: 250px;
  bottom: -20%;
  left: 15%;
}
.contact-form-card {
  padding: 40px;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
@media (max-width: 768px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.contact-info h2 {
  margin-bottom: 32px;
}
.contact-info-item {
  margin-bottom: 24px;
}
.contact-info-item .label {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.contact-info-item .value {
  font-size: 1.05rem;
}
.contact-info-item a {
  transition: color 0.3s;
}
.contact-info-item a:hover {
  color: var(--accent-2);
}
.live-time {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  font-size: 1.1rem;
}

/* Contact form */
.contact-form {
  position: relative;
}
.form-group {
  margin-bottom: 24px;
}
.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--text-dim);
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.3s;
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent-1);
}
.form-group input:focus:not(:focus-visible),
.form-group textarea:focus:not(:focus-visible) {
  outline: none;
}
.form-group textarea {
  resize: vertical;
  min-height: 120px;
}
.form-error {
  color: #ef4444;
  font-size: 0.85rem;
  margin-top: 8px;
  display: none;
}
.form-error.show {
  display: block;
}
.form-success {
  text-align: center;
  padding: 40px 0;
}
.form-success h3 {
  color: var(--accent-2);
  margin-bottom: 8px;
}
.form-success p {
  color: var(--text-dim);
}

/* ============================================================
   12. Project Detail Pages
   ============================================================ */
.project-hero {
  position: relative;
  height: 60vh;
  min-height: 400px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.project-hero-bg {
  position: absolute;
  inset: 0;
}
.project-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  clip-path: inset(3px 0 3px 0);
}
.project-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 40%, var(--bg));
}
.project-hero-content {
  position: relative;
  z-index: 2;
  padding: 40px 0;
  width: 100%;
}
.project-hero-content .container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.project-hero-content .card-tag {
  font-size: 0.85rem;
}
.project-hero-content h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
}

/* Project meta */
.project-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding: 40px 0;
  border-bottom: 1px solid var(--glass-border);
}
.meta-label {
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.meta-value {
  font-size: 1rem;
}
@media (max-width: 768px) {
  .project-meta { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .project-meta { grid-template-columns: 1fr; }
}

/* Project brief */
.project-brief {
  max-width: 800px;
}
.project-brief h2 {
  margin-bottom: 24px;
}
.project-brief p {
  color: var(--text-dim);
  margin-bottom: 16px;
}

/* Browser mockup */
.browser-mockup {
  background: #1a1a2e;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.3);
}
.browser-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.browser-dot:nth-child(1) { background: #ef4444; }
.browser-dot:nth-child(2) { background: #f59e0b; }
.browser-dot:nth-child(3) { background: #22c55e; }
.browser-mockup img {
  width: 100%;
  display: block;
}

/* Results */
.results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.result-card {
  text-align: center;
  padding: 32px;
}
.result-num {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
}
.result-label {
  color: var(--text-dim);
  margin-top: 8px;
  font-size: 0.95rem;
}
@media (max-width: 768px) {
  .results-grid { grid-template-columns: 1fr; }
}

/* Gallery */
.project-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.project-gallery img {
  border-radius: 8px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  width: 100%;
}
@media (max-width: 768px) {
  .project-gallery { grid-template-columns: 1fr; }
}

/* Testimonial block */
.testimonial-block {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}
.testimonial-block blockquote {
  font-size: 1.2rem;
  font-style: italic;
  color: var(--text-dim);
  margin-bottom: 24px;
  line-height: 1.7;
}
.testimonial-block cite {
  font-style: normal;
}
.cite-name {
  display: block;
  font-weight: 600;
  color: var(--text);
}
.cite-role {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Next project */
.next-project {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 40px 0;
  border-top: 1px solid var(--glass-border);
}
.next-project a {
  font-size: 1.2rem;
  font-weight: 600;
  transition: color 0.3s;
}
.next-project a:hover {
  color: var(--accent-2);
}
@media (max-width: 480px) {
  .next-project {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

/* ============================================================
   13. Footer
   ============================================================ */
.footer {
  padding: 80px 0 40px;
  border-top: 1px solid var(--glass-border);
  background: var(--bg-elevated);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-brand .nav-logo {
  margin-bottom: 12px;
  display: inline-block;
}
.footer-brand p {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-top: 12px;
  max-width: 280px;
}
.footer-col h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  color: var(--text-dim);
  font-size: 0.95rem;
  padding: 4px 0;
  transition: color 0.3s;
}
.footer-col a:hover {
  color: var(--text);
}
.footer-social {
  display: flex;
  gap: 16px;
  margin-top: 20px;
}
.footer-social a {
  opacity: 0.5;
  transition: opacity 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
}
.footer-social a:hover {
  opacity: 1;
}
.footer-social svg {
  width: 20px;
  height: 20px;
}
.footer-bottom {
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* ============================================================
   14. Cookie Banner
   ============================================================ */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: 24px;
  max-width: 600px;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.4s, transform 0.4s;
  z-index: 9999;
  background: rgba(10, 10, 15, 0.95);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.cookie-banner.show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.cookie-banner p {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-bottom: 12px;
}
.cookie-banner a {
  color: var(--accent-2);
  text-decoration: underline;
}
.cookie-buttons {
  display: flex;
  gap: 12px;
}
.cookie-decline {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-dim);
  padding: 8px 20px;
  border-radius: 20px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  min-height: 44px;
  transition: border-color 0.3s, color 0.3s;
}
.cookie-decline:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

/* ============================================================
   15. Privacy & 404 Pages
   ============================================================ */
.privacy-content,
.error-content {
  max-width: 800px;
  margin: 0 auto;
}
.privacy-content h2 {
  margin: 40px 0 16px;
}
.privacy-content p {
  color: var(--text-dim);
  margin-bottom: 16px;
}

.error-content {
  text-align: center;
  padding: calc(var(--nav-h) + 120px) 0 120px;
}
.error-content .error-code {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: clamp(5rem, 15vw, 12rem);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 16px;
}
.error-content p {
  color: var(--text-dim);
  margin-bottom: 32px;
  font-size: 1.1rem;
}

/* ============================================================
   16. Visual Enhancements — Images & Rich Sections
   ============================================================ */

/* About hero banner */
.about-hero {
  position: relative;
  min-height: 50vh;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding-top: var(--nav-h);
}
.about-hero-bg {
  position: absolute;
  inset: 0;
}
.about-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.about-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(5,5,8,0.2) 0%, rgba(5,5,8,0.6) 50%, var(--bg) 100%);
}
.about-hero-content {
  position: relative;
  z-index: 2;
  padding: 60px 0 40px;
}
.about-hero-content h1 {
  margin-bottom: 12px;
}
.about-hero-content p {
  color: var(--text-dim);
  font-size: 1.1rem;
}

/* Visual Timeline with images */
.timeline-visual {
  display: flex;
  flex-direction: column;
}
.timeline-visual-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 60px 0;
  border-bottom: 1px solid var(--glass-border);
}
.timeline-visual-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.timeline-visual-item:nth-child(even) .timeline-content {
  order: 2;
}
.timeline-visual-item:nth-child(even) .timeline-img {
  order: 1;
}
.timeline-img {
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, rgba(124,58,237,0.2), rgba(6,182,212,0.2));
}
.timeline-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16,1,0.3,1);
}
.timeline-visual-item:hover .timeline-img img {
  transform: scale(1.03);
}
.timeline-content .timeline-year {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  color: var(--accent-1);
  margin-bottom: 12px;
}
.timeline-content .timeline-text {
  color: var(--text-dim);
  font-size: 1rem;
  line-height: 1.7;
}
@media (max-width: 768px) {
  .timeline-visual-item {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 40px 0;
  }
  .timeline-visual-item:nth-child(even) .timeline-content,
  .timeline-visual-item:nth-child(even) .timeline-img {
    order: unset;
  }
}

/* Photo strip */
.photo-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.photo-strip img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.4s;
}
.photo-strip img:hover {
  transform: scale(1.02);
}
@media (max-width: 768px) {
  .photo-strip {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* Section accent backgrounds — rich gradient mesh fills */
.section-accent {
  background:
    radial-gradient(ellipse 80% 60% at 20% 50%, rgba(124,58,237,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 60% 80% at 80% 30%, rgba(6,182,212,0.06) 0%, transparent 70%),
    linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg) 100%);
}
.section-accent-alt {
  background:
    radial-gradient(ellipse 70% 50% at 70% 60%, rgba(6,182,212,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 50% 70% at 20% 40%, rgba(124,58,237,0.06) 0%, transparent 70%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-elevated) 50%, var(--bg) 100%);
}
.section-accent-warm {
  background:
    radial-gradient(ellipse 60% 50% at 30% 50%, rgba(236,72,153,0.07) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 80% 40%, rgba(124,58,237,0.06) 0%, transparent 70%),
    linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg) 100%);
}
.section-accent-deep {
  background:
    radial-gradient(ellipse 80% 80% at 50% 0%, rgba(124,58,237,0.1) 0%, transparent 60%),
    radial-gradient(ellipse 60% 60% at 80% 100%, rgba(6,182,212,0.07) 0%, transparent 60%),
    var(--bg-elevated);
}

/* Gradient divider line between sections */
.gradient-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-1), var(--accent-2), transparent);
  opacity: 0.3;
  border: none;
}

/* Ambient glow — decorative blurred orbs behind sections */
.ambient-glow {
  position: relative;
  overflow: hidden;
}
.ambient-glow::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-1), transparent 70%);
  top: -200px;
  right: -150px;
  pointer-events: none;
  z-index: 0;
}
.ambient-glow::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-2), transparent 70%);
  bottom: -150px;
  left: -100px;
  pointer-events: none;
  z-index: 0;
}
.ambient-glow > .container {
  position: relative;
  z-index: 1;
}

/* Full-width image break */
.image-break {
  position: relative;
  height: 50vh;
  min-height: 350px;
  overflow: hidden;
}
.image-break img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.image-break-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, var(--bg) 0%, transparent 15%, transparent 85%, var(--bg) 100%);
  pointer-events: none;
}
.image-break-text {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 40px 0;
  text-align: center;
}
.image-break-text p {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  color: var(--text-dim);
  font-style: italic;
}

/* Service section image */
.service-image {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  margin-top: 32px;
  background: linear-gradient(135deg, rgba(124,58,237,0.2), rgba(6,182,212,0.2));
}
.service-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.service-image:hover img {
  transform: scale(1.02);
}

/* ============================================================
   17. Small Screen Optimizations
   ============================================================ */
@media (max-width: 360px) {
  .container { padding: 0 16px; }
  .back-to-top { bottom: 16px; right: 16px; }
}

@media (max-width: 480px) {
  .project-hero { height: auto; min-height: 300px; }
  .footer-grid { gap: 24px; }
  .filter-btn { padding: 6px 14px; font-size: 0.85rem; }
  .result-card { padding: 20px 16px; }
}
