/* ==========================================================================
   creatizone — Maximalist Design System
   Layered depth · 3D tilt · animated gradient borders · kinetic type
   ========================================================================== */

/* Animatable custom properties (progressive enhancement) */
@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@property --shimmer { syntax: "<percentage>"; initial-value: 0%; inherits: false; }

/* ==========================================================================
   1. TOKENS
   ========================================================================== */
:root {
  /* Ground */
  --bg: #050509;
  --bg-2: #0a0a14;
  --bg-3: #10101f;

  /* Surfaces (glass stack) */
  --glass-1: rgba(255, 255, 255, 0.028);
  --glass-2: rgba(255, 255, 255, 0.055);
  --glass-3: rgba(255, 255, 255, 0.085);
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.15);
  --line-3: rgba(255, 255, 255, 0.26);

  /* Ink */
  --text: #f6f6fc;
  --muted: #a8a8c6;
  --dim: #6e6e8e;

  /* Brand spectrum */
  --violet: #a78bfa;
  --violet-2: #7c3aed;
  --pink: #ec4899;
  --cyan: #22d3ee;
  --indigo: #6366f1;
  --amber: #fbbf24;
  --lime: #4ade80;
  --orange: #fb923c;

  /* Gradients */
  --grad-brand: linear-gradient(115deg, #a78bfa 0%, #ec4899 50%, #22d3ee 100%);
  --grad-dev: linear-gradient(135deg, #22d3ee, #6366f1);
  --grad-creative: linear-gradient(135deg, #ec4899, #fb923c);
  --grad-ring: conic-gradient(from var(--angle),
      transparent 0%, var(--violet) 12%, var(--pink) 26%,
      var(--cyan) 40%, transparent 55%, transparent 100%);

  /* Depth */
  --lift-1: 0 12px 30px -14px rgba(0, 0, 0, .7);
  --lift-2: 0 30px 70px -28px rgba(0, 0, 0, .85);
  --lift-3: 0 50px 120px -40px rgba(0, 0, 0, .9);
  --glow-v: 0 0 40px -6px rgba(167, 139, 250, .55);
  --glow-p: 0 0 40px -6px rgba(236, 72, 153, .55);

  /* Geometry */
  --r-xs: 10px;
  --r-sm: 16px;
  --r: 22px;
  --r-lg: 30px;
  --maxw: 1240px;

  /* Motion */
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-back: cubic-bezier(.34, 1.56, .64, 1);

  --font: 'Vazirmatn', system-ui, -apple-system, sans-serif;
  --font-latin: 'Space Grotesk', 'Vazirmatn', sans-serif;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; overflow-x: hidden; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.85;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { max-width: 100%; display: block; }
input, textarea, select { font-family: inherit; }
::selection { background: var(--pink); color: #fff; }

/* Scrollbar */
::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--violet-2), var(--pink)); border-radius: 10px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(var(--violet), var(--cyan)); }

/* Accessibility */
.skip-link {
  position: fixed; top: -100px; inset-inline-start: 16px; z-index: 500;
  background: var(--violet-2); color: #fff; padding: 12px 22px; border-radius: 12px;
  font-weight: 700; font-size: 14px; transition: top .25s var(--ease);
}
.skip-link:focus { top: 16px; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 6px; }

/* Layout */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 26px; }
.section { padding-block: clamp(76px, 10vw, 140px); position: relative; }

/* ==========================================================================
   3. BACKGROUND SYSTEM — layered depth
   ========================================================================== */
.bg-decor {
  position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none;
  transition: transform .5s var(--ease); will-change: transform;
}

/* Floating colour orbs */
.blob { position: absolute; border-radius: 50%; filter: blur(100px); opacity: .34; animation: drift 26s ease-in-out infinite; }
.blob-1 { width: 520px; height: 520px; background: #7c3aed; top: -140px; inset-inline-end: -90px; }
.blob-2 { width: 460px; height: 460px; background: #ec4899; top: 42%; inset-inline-start: -140px; animation-delay: -9s; }
.blob-3 { width: 400px; height: 400px; background: #22d3ee; bottom: -140px; inset-inline-end: 18%; animation-delay: -17s; }
@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33%      { transform: translate3d(46px, -46px, 0) scale(1.12); }
  66%      { transform: translate3d(-34px, 34px, 0) scale(.93); }
}

/* Top mesh grid */
.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: radial-gradient(ellipse 85% 55% at 50% 0%, #000 15%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 85% 55% at 50% 0%, #000 15%, transparent 72%);
}

/* 3D perspective grid floor — the signature depth cue */
.bg-decor::before {
  content: ""; position: absolute; inset-inline: -50%; bottom: -12%; height: 62vh;
  background-image:
    linear-gradient(rgba(167,139,250,.30) 1px, transparent 1px),
    linear-gradient(90deg, rgba(167,139,250,.30) 1px, transparent 1px);
  background-size: 70px 70px;
  transform: perspective(420px) rotateX(66deg);
  transform-origin: 50% 100%;
  mask-image: linear-gradient(to top, #000 5%, transparent 82%);
  -webkit-mask-image: linear-gradient(to top, #000 5%, transparent 82%);
  animation: floorPan 14s linear infinite;
  opacity: .5;
}
@keyframes floorPan { to { background-position: 0 70px, 70px 0; } }

/* Vignette */
.bg-decor::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 120% 80% at 50% 40%, transparent 40%, rgba(5,5,9,.75) 100%);
}

/* Film grain — removes the flat, synthetic look */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 400; pointer-events: none;
  opacity: .038; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Scroll progress */
.scroll-progress { position: fixed; top: 0; inset-inline: 0; height: 3px; z-index: 300; pointer-events: none; }
.scroll-progress span {
  display: block; height: 100%; transform: scaleX(0); transform-origin: right center;
  background: var(--grad-brand); box-shadow: 0 0 16px rgba(167,139,250,.85);
}

/* ==========================================================================
   5. TYPOGRAPHY
   ========================================================================== */
.gradient-text {
  display: inline-block;
  background: var(--grad-brand); background-size: 220% auto;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: shine 7s linear infinite;
  transition: opacity .2s var(--ease), transform .2s var(--ease), filter .2s var(--ease);
}
@keyframes shine { to { background-position: 220% center; } }
/* Kept brief and partially opaque so the headline never reads as a blank line */
.gradient-text.swap { opacity: .18; transform: translateY(-9px) scale(.97); filter: blur(3px); }

/* Oversized ghost numerals / words used as decoration */
.ghost-type {
  position: absolute; font-family: var(--font-latin); font-weight: 700; line-height: .8;
  color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.055);
  pointer-events: none; user-select: none; z-index: 0;
}

/* ==========================================================================
   6. BUTTONS
   ========================================================================== */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 15px 30px; border-radius: 100px; font-weight: 700; font-size: 15px;
  white-space: nowrap; cursor: pointer; isolation: isolate; overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease),
              background .35s var(--ease), border-color .35s var(--ease), color .3s;
}
.btn svg { transition: transform .35s var(--ease); }
.btn:hover svg { transform: translateX(-5px); }
.btn-sm { padding: 11px 22px; font-size: 14px; }
.btn-block { width: 100%; }

/* Primary — animated gradient fill + travelling sheen */
.btn-primary {
  background: var(--grad-brand); background-size: 220% 220%; color: #fff;
  box-shadow: 0 14px 34px -12px rgba(236, 72, 153, .65), inset 0 1px 0 rgba(255,255,255,.28);
  animation: shine 7s linear infinite;
}
.btn-primary::after {
  content: ""; position: absolute; top: 0; inset-inline-start: -70%; width: 45%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent);
  transform: skewX(-20deg); transition: inset-inline-start .65s var(--ease); pointer-events: none;
}
.btn-primary:hover { transform: translateY(-4px) scale(1.03); box-shadow: 0 22px 50px -12px rgba(236,72,153,.85), var(--glow-v); }
.btn-primary:hover::after { inset-inline-start: 140%; }

/* Ghost — animated conic ring border (uiverse-style) */
.btn-ghost { background: var(--glass-2); color: var(--text); border: 1px solid var(--line-2); }
.btn-ghost::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; z-index: -1; padding: 1px;
  background: var(--grad-ring);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .4s var(--ease);
}
.btn-ghost:hover { background: var(--glass-3); transform: translateY(-4px); border-color: transparent; }
.btn-ghost:hover::before { opacity: 1; animation: spinRing 4s linear infinite; }
@keyframes spinRing { to { --angle: 360deg; } }

/* ==========================================================================
   7. HEADER / NAV
   ========================================================================== */
.header {
  position: fixed; top: 0; inset-inline: 0; z-index: 200;
  transition: background .4s var(--ease), backdrop-filter .4s, border-color .4s, padding .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.header.scrolled {
  background: rgba(5, 5, 9, .72);
  backdrop-filter: blur(22px) saturate(160%); -webkit-backdrop-filter: blur(22px) saturate(160%);
  border-bottom-color: var(--line);
  box-shadow: 0 10px 40px -20px rgba(0,0,0,.9);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 78px; gap: 18px; }

.brand { display: flex; align-items: center; gap: 11px; transition: transform .4s var(--ease-back); }
.brand:hover { transform: scale(1.05); }
.brand-mark { display: grid; place-items: center; filter: drop-shadow(0 0 12px rgba(167,139,250,.6)); }
.brand-mark svg { animation: logoSpin 22s linear infinite; transform-origin: center; }
/* Uploaded logo (admin → «عمومی و برند»): keeps its own proportions, never spins */
.brand-logo { display: block; height: 38px; width: auto; max-width: min(200px, 50vw); object-fit: contain; }
@keyframes logoSpin { to { transform: rotate(360deg); } }
.brand-text { font-family: var(--font-latin); font-weight: 700; font-size: 23px; letter-spacing: .4px; }
.brand-accent {
  background: var(--grad-brand); background-size: 220% auto;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: shine 7s linear infinite;
}

/* Glass pill nav */
.nav-links {
  display: flex; align-items: center; gap: 4px; padding: 5px;
  background: var(--glass-1); border: 1px solid var(--line); border-radius: 100px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.nav-link {
  position: relative; padding: 9px 17px; font-size: 14.5px; font-weight: 500; color: var(--muted);
  border-radius: 100px; transition: color .3s, background .3s, transform .3s var(--ease);
  white-space: nowrap;
}
.nav-link:hover { color: var(--text); transform: translateY(-2px); }
.nav-link.active { color: #fff; background: var(--grad-brand); box-shadow: 0 8px 22px -10px rgba(236,72,153,.8); }

.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 9px; }
.nav-toggle span { width: 25px; height: 2px; background: var(--text); border-radius: 2px; transition: .35s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   8. HERO — 3D stage
   ========================================================================== */
.hero { position: relative; padding-top: 140px; padding-bottom: 90px; overflow: hidden; }
.hero-inner { display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; z-index: 2; }

.hero-aurora {
  position: absolute; top: -16%; left: 50%; transform: translateX(-50%);
  width: min(1100px, 140%); aspect-ratio: 1.55 / 1; z-index: 0; pointer-events: none;
  background: conic-gradient(from 0deg, #7c3aed, #ec4899, #22d3ee, #6366f1, #7c3aed);
  filter: blur(110px); opacity: .24; border-radius: 50%;
  animation: aurora 20s linear infinite;
}
@keyframes aurora { to { transform: translateX(-50%) rotate(360deg); } }

/* Orbiting rings — 3D depth behind the headline */
.hero-orbits {
  position: absolute; top: 3%; left: 50%; z-index: 0; pointer-events: none;
  width: min(880px, 120%); aspect-ratio: 1; transform: translateX(-50%) rotateX(72deg);
  transform-style: preserve-3d;
}
.hero-orbits i {
  position: absolute; inset: 0; border-radius: 50%; display: block;
  border: 1px solid rgba(167, 139, 250, .16);
  animation: orbit 26s linear infinite;
}
.hero-orbits i:nth-child(2) { inset: 12%; border-color: rgba(236, 72, 153, .14); animation-duration: 20s; animation-direction: reverse; }
.hero-orbits i:nth-child(3) { inset: 26%; border-color: rgba(34, 211, 238, .14); animation-duration: 32s; }
/* Travelling node on each ring */
.hero-orbits i::after {
  content: ""; position: absolute; top: -4px; left: 50%; width: 8px; height: 8px; border-radius: 50%;
  background: var(--violet); box-shadow: 0 0 16px var(--violet);
}
.hero-orbits i:nth-child(2)::after { background: var(--pink); box-shadow: 0 0 16px var(--pink); }
.hero-orbits i:nth-child(3)::after { background: var(--cyan); box-shadow: 0 0 16px var(--cyan); }
@keyframes orbit { to { transform: rotate(360deg); } }
@media (max-width: 680px) { .hero-orbits { display: none; } }

.hero-badge {
  display: inline-flex; align-items: center; gap: 11px; position: relative;
  padding: 9px 20px; border-radius: 100px; font-size: 14px; font-weight: 500; color: var(--muted);
  background: var(--glass-2); border: 1px solid var(--line-2); margin-bottom: 30px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.hero-badge .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--lime);
  box-shadow: 0 0 14px var(--lime); animation: livePulse 2.2s ease-in-out infinite;
}
@keyframes livePulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.75); } }

.hero-title {
  font-size: clamp(2.4rem, 6.4vw, 5.2rem); font-weight: 900; line-height: 1.28;
  letter-spacing: -1.6px; max-width: 17ch; margin-bottom: 28px;
  text-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.hero-sub { font-size: clamp(1.02rem, 2vw, 1.26rem); color: var(--muted); max-width: 62ch; margin-bottom: 40px; }
.hero-sub strong { color: var(--text); font-weight: 700; }
.hero-cta { display: flex; gap: 15px; flex-wrap: wrap; justify-content: center; }

/* --- 3D showcase stage --- */
.hero-showcase { position: relative; width: min(940px, 100%); margin-top: 64px; perspective: 1800px; z-index: 2; }
.showcase-glow {
  position: absolute; inset: -10% -6% -18%; z-index: -1; filter: blur(46px);
  background: radial-gradient(closest-side, rgba(167,139,250,.4), rgba(34,211,238,.16) 58%, transparent 78%);
  animation: glowPulse 6s ease-in-out infinite;
}
@keyframes glowPulse { 0%, 100% { opacity: .75; } 50% { opacity: 1; } }

/* Browser frame whose screen cycles through real project screenshots */
.mockup {
  width: 100%; display: block; border-radius: 16px; overflow: hidden;
  background: #0e0e1a; border: 1px solid rgba(255,255,255,.1);
  box-shadow: var(--lift-3), 0 0 0 1px rgba(255,255,255,.04);
  transform: rotateX(12deg) rotateZ(-1deg); transform-origin: center 80%;
  animation: hover3d 8s ease-in-out infinite;
}
@keyframes hover3d {
  0%, 100% { transform: rotateX(12deg) rotateZ(-1deg) translateY(0); }
  50%      { transform: rotateX(8deg) rotateZ(1deg) translateY(-18px); }
}

/* Window chrome — traffic lights stay on the left like a real macOS window */
.mockup-bar {
  display: flex; align-items: center; gap: 14px; height: 42px; padding: 0 16px;
  background: #14141f; border-bottom: 1px solid rgba(255,255,255,.06); direction: ltr;
}
.mockup-dots { display: flex; gap: 7px; flex-shrink: 0; }
.mockup-dots i { width: 11px; height: 11px; border-radius: 50%; background: #ef4444; }
.mockup-dots i:nth-child(2) { background: #fbbf24; }
.mockup-dots i:nth-child(3) { background: #22c55e; }
.mockup-url {
  flex: 1; max-width: 380px; margin-inline: auto; height: 26px; padding: 0 14px;
  border-radius: 13px; background: rgba(255,255,255,.06); color: var(--muted);
  font: 500 12.5px/26px var(--font-latin); text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: opacity .25s var(--ease);
}

/* Screen — laptop proportions; screenshots crossfade and slowly scroll */
.mockup-screen { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-2); }
.mockup-screen.is-empty { background: var(--grad-brand); opacity: .35; }
.mockup-shot {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 0%;
  opacity: 0; transition: opacity .9s var(--ease);
}
.mockup-shot.is-active { opacity: 1; }

.mockup-caption {
  position: absolute; inset-inline-start: 14px; bottom: 14px; z-index: 2;
  display: inline-flex; align-items: center; gap: 10px; max-width: calc(100% - 28px);
  padding: 8px 16px; border-radius: 100px; color: #fff; font-size: 13.5px;
  background: rgba(5,5,9,.8); border: 1px solid var(--line-2);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--lift-1);
  transition: opacity .25s var(--ease), transform .35s var(--ease);
}
.mockup-caption b { font-weight: 800; white-space: nowrap; }
.mockup-caption span { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mockup-caption::after { content: "←"; color: var(--violet); transition: transform .3s var(--ease); }
.mockup-screen:hover .mockup-caption { transform: translateY(-3px); border-color: rgba(167,139,250,.5); }
.mockup-screen:hover .mockup-caption::after { transform: translateX(-4px); }
.mockup-screen:focus-visible { outline: 2px solid var(--violet); outline-offset: -4px; }

/* Swapping text between slides */
.mockup.swapping .mockup-url, .mockup.swapping .mockup-caption { opacity: 0; }

.showcase-chip {
  position: absolute; display: inline-flex; align-items: center; gap: 9px; z-index: 3;
  padding: 11px 18px; border-radius: 100px; font-size: 13.5px; font-weight: 700; color: var(--text);
  background: rgba(16, 16, 31, .85); border: 1px solid var(--line-2);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--lift-2); animation: chipFloat 6.5s ease-in-out infinite;
}
.showcase-chip .cdot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 12px var(--lime); }
.chip-1 { top: 12%; inset-inline-start: -4%; }
.chip-2 { bottom: 16%; inset-inline-end: -4%; animation-delay: -3.2s; }
@keyframes chipFloat { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-14px) rotate(2deg); } }

/* ==========================================================================
   9. MARQUEES — 3D banded ticker
   ========================================================================== */
.marquee, .tech-marquee {
  overflow: hidden; padding: 22px 0; border-block: 1px solid var(--line);
  background: linear-gradient(90deg, var(--bg-2), var(--bg-3), var(--bg-2));
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  position: relative;
}
.marquee-track { display: flex; gap: 30px; width: max-content; animation: marquee 40s linear infinite; align-items: center; }
.marquee-track span { font-size: 19px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.marquee-track span:nth-child(4n+2) { color: var(--violet); }
.marquee-track span:nth-child(4n) { color: var(--cyan); }
@keyframes marquee { to { transform: translateX(50%); } }

.tech-track { display: flex; gap: 14px; width: max-content; animation: marquee 36s linear infinite; }
.tech-chip {
  white-space: nowrap; font-size: 14px; font-weight: 700; color: var(--muted);
  padding: 9px 20px; border: 1px solid var(--line); border-radius: 100px; background: var(--glass-1);
  transition: color .3s, border-color .3s, transform .3s var(--ease);
}
.tech-chip:nth-child(3n)   { color: var(--violet); border-color: rgba(167,139,250,.35); }
.tech-chip:nth-child(3n+2) { color: var(--cyan);   border-color: rgba(34,211,238,.32); }
.marquee:hover .marquee-track, .tech-marquee:hover .tech-track { animation-play-state: paused; }

/* ==========================================================================
   10. SECTION HEADS
   ========================================================================== */
.section-head { text-align: center; max-width: 680px; margin: 0 auto 62px; position: relative; z-index: 2; }
.eyebrow {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 700; color: var(--violet);
  padding: 7px 18px; border: 1px solid var(--line-2); border-radius: 100px;
  margin-bottom: 20px; background: var(--glass-2);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--violet); box-shadow: 0 0 10px var(--violet);
  animation: livePulse 2.2s ease-in-out infinite;
}
.section-title { font-size: clamp(1.8rem, 4.4vw, 3rem); font-weight: 900; line-height: 1.35; letter-spacing: -1px; }
.section-head .section-title::after {
  content: ""; display: block; width: 80px; height: 4px; margin: 20px auto 0; border-radius: 4px;
  background: var(--grad-brand); background-size: 220% auto; animation: shine 7s linear infinite;
  box-shadow: 0 0 18px rgba(167,139,250,.6);
}
.section-desc { color: var(--muted); margin-top: 18px; font-size: 1.06rem; }

/* ==========================================================================
   11. CARD ENGINE — 3D tilt + animated ring + glare
   ========================================================================== */
.card, .why-card, .team-card, .step, .teaser-group, .project-card, .post-card, .testi-card {
  position: relative; isolation: isolate;
  background: linear-gradient(160deg, var(--glass-2), var(--glass-1));
  border: 1px solid var(--line); border-radius: var(--r);
  transition: transform .5s var(--ease), border-color .4s, box-shadow .5s var(--ease), background .4s;
  transform-style: preserve-3d;
}

/* Animated conic ring, revealed on hover */
.card::before, .why-card::before, .team-card::before, .step::before,
.teaser-group::before, .project-card::before, .post-card::before, .testi-card::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; z-index: -1; padding: 1px;
  background: var(--grad-ring);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .45s var(--ease);
  /* The animation is attached on hover only — running 20+ conic gradients
     continuously behind invisible borders burns GPU and battery for nothing. */
}

/* Pointer-tracked glare */
.card::after, .why-card::after, .team-card::after, .step::after,
.teaser-group::after, .project-card::after, .post-card::after, .testi-card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 3;
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.10), transparent 62%);
  opacity: 0; transition: opacity .4s;
}

.card:hover, .why-card:hover, .team-card:hover, .step:hover,
.teaser-group:hover, .project-card:hover, .post-card:hover, .testi-card:hover {
  border-color: transparent; box-shadow: var(--lift-2), var(--glow-v);
  background: linear-gradient(160deg, var(--glass-3), var(--glass-2));
}
.card:hover::before, .why-card:hover::before, .team-card:hover::before, .step:hover::before,
.teaser-group:hover::before, .project-card:hover::before, .post-card:hover::before, .testi-card:hover::before {
  opacity: 1; animation: spinRing 4s linear infinite;
}
.card:hover::after, .why-card:hover::after, .team-card:hover::after, .step:hover::after,
.teaser-group:hover::after, .project-card:hover::after, .post-card:hover::after, .testi-card:hover::after { opacity: 1; }

/* 3D tilt — JS feeds --rx / --ry */
.tilt { transition: transform .45s var(--ease), border-color .4s, box-shadow .5s var(--ease), background .4s; }
.tilt.tilting {
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-8px) scale(1.02);
  transition: transform .12s linear, border-color .4s, box-shadow .5s var(--ease), background .4s;
}
/* Lift inner content off the card surface */
.tilt > * { transform: translateZ(28px); }
.tilt::before, .tilt::after { transform: translateZ(1px); }

/* Non-tilt fallback lift */
.card:hover, .why-card:hover, .team-card:hover, .step:hover, .testi-card:hover { transform: translateY(-8px); }
.tilt:hover { transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-8px) scale(1.02); }

/* ==========================================================================
   12. SERVICES
   ========================================================================== */
.service-group { margin-top: 70px; position: relative; }
.group-head { display: flex; align-items: center; gap: 18px; margin-bottom: 32px; }
.group-icon {
  width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center;
  color: #fff; flex-shrink: 0; position: relative;
  transition: transform .5s var(--ease-back);
}
.group-icon::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1;
  filter: blur(18px); opacity: .8; background: inherit;
}
.group-icon.dev { background: var(--grad-dev); box-shadow: 0 14px 34px -14px var(--indigo); }
.group-icon.creative { background: var(--grad-creative); box-shadow: 0 14px 34px -14px var(--orange); }
.group-head:hover .group-icon { transform: rotate(-8deg) scale(1.1); }
.group-title { font-size: 1.6rem; font-weight: 800; letter-spacing: -.5px; }
.group-sub { color: var(--dim); font-size: 14px; }

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.card { padding: 30px 26px; }
.card-icon {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 20px;
  background: var(--glass-2); border: 1px solid var(--line); position: relative;
  transition: transform .5s var(--ease-back), background .4s, border-color .4s;
}
.card[data-accent="dev"] .card-icon { color: var(--cyan); }
.card[data-accent="creative"] .card-icon { color: var(--pink); }
.card:hover .card-icon { transform: translateY(-4px) rotate(-8deg) scale(1.08); background: var(--glass-3); border-color: var(--line-2); }
.card h4 { font-size: 1.18rem; font-weight: 800; margin-bottom: 11px; }
.card p { color: var(--muted); font-size: 14.5px; line-height: 1.95; }
.card p b { color: var(--text); font-weight: 700; }
.card-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.card-tags li {
  font-size: 12px; padding: 5px 12px; border-radius: 100px;
  background: var(--glass-2); color: var(--dim); border: 1px solid var(--line);
  transition: color .3s, border-color .3s, transform .3s var(--ease);
}
.card:hover .card-tags li { color: var(--muted); border-color: var(--line-2); }

/* Service teasers on home */
.teaser-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.teaser-group { display: block; padding: 36px; }
.teaser-group .group-icon { width: 60px; height: 60px; border-radius: 18px; margin-bottom: 20px; }
.teaser-group h3 { font-size: 1.5rem; font-weight: 800; margin-bottom: 9px; letter-spacing: -.5px; }
.teaser-group > p { color: var(--muted); font-size: 14.5px; margin-bottom: 20px; }
.teaser-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.teaser-list li {
  font-size: 13px; padding: 7px 14px; border-radius: 100px;
  background: var(--glass-2); border: 1px solid var(--line); color: var(--muted);
}
.teaser-link { font-weight: 700; color: var(--violet); font-size: 14.5px; display: inline-flex; align-items: center; gap: 6px; transition: gap .3s var(--ease); }
.teaser-group:hover .teaser-link { gap: 12px; }

/* ==========================================================================
   13. WHY CARDS
   ========================================================================== */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.why-card { padding: 32px 26px; }
.why-ic {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center;
  background: var(--glass-2); border: 1px solid var(--line); color: var(--violet); margin-bottom: 18px;
  transition: transform .5s var(--ease-back), color .4s, box-shadow .4s;
}
.why-ic svg { width: 25px; height: 25px; }
.why-card:hover .why-ic { transform: translateY(-4px) rotate(8deg) scale(1.1); color: var(--pink); box-shadow: var(--glow-p); }
.why-card h4 { font-size: 1.15rem; font-weight: 800; margin-bottom: 10px; }
.why-card p { color: var(--muted); font-size: 14px; line-height: 1.95; }

/* ==========================================================================
   14. ABOUT / TEAM
   ========================================================================== */
.about-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 60px; align-items: center; }
.about-text .section-title { text-align: right; }
.about-text .section-title::after { margin-inline: 0; }
.about-text > p { color: var(--muted); margin-top: 22px; }
.about-text b { color: var(--text); font-weight: 700; }
.about-points { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 32px 0; }
.point { display: flex; align-items: center; gap: 11px; font-size: 15px; color: var(--muted); transition: color .3s, transform .3s var(--ease); }
.point:hover { color: var(--text); transform: translateX(-6px); }
.check {
  width: 24px; height: 24px; border-radius: 50%; background: rgba(74,222,128,.16); color: var(--lime);
  display: grid; place-items: center; font-size: 12px; flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(74,222,128,.25); transition: transform .4s var(--ease-back), box-shadow .4s;
}
.point:hover .check { transform: scale(1.2) rotate(360deg); box-shadow: 0 0 18px rgba(74,222,128,.5); }

.team-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.team-card { padding: 32px 24px; text-align: center; }
.team-avatar {
  width: 78px; height: 78px; border-radius: 24px; display: grid; place-items: center; margin: 0 auto 18px;
  font-family: var(--font-latin); font-size: 28px; font-weight: 700; color: #fff; position: relative;
  transition: transform .55s var(--ease-back), border-radius .55s var(--ease);
}
.team-avatar::after { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; filter: blur(20px); opacity: .85; background: inherit; }
.dev-av { background: var(--grad-dev); }
.creative-av { background: var(--grad-creative); }
.team-card:hover .team-avatar { transform: rotate(-10deg) scale(1.12); border-radius: 50%; }
.team-card h4 { font-size: 1.18rem; font-weight: 800; }
.team-role { font-family: var(--font-latin); font-size: 13px; color: var(--violet); margin-bottom: 13px; }
.team-bio { font-size: 13.5px; color: var(--muted); line-height: 1.9; }
.team-skills { display: flex; justify-content: center; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.team-skills span {
  font-size: 12px; padding: 5px 12px; border-radius: 100px;
  background: var(--glass-2); color: var(--dim); border: 1px solid var(--line);
}

/* ==========================================================================
   15. PROCESS — numbered 3D steps
   ========================================================================== */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: stepc; }
.step { padding: 36px 26px; overflow: hidden; counter-increment: stepc; }
/* Oversized ghost numeral bleeding off the card corner */
.step-num::after {
  content: counter(stepc, persian);
  position: absolute; top: -46px; inset-inline-start: -78px; z-index: -1;
  font-family: var(--font-latin); font-size: 155px; font-weight: 700; line-height: 1;
  color: transparent; -webkit-text-stroke: 2px rgba(255, 255, 255, .06);
  pointer-events: none; user-select: none;
  transition: -webkit-text-stroke-color .5s var(--ease), transform .6s var(--ease);
}
.step:hover .step-num::after { -webkit-text-stroke-color: rgba(167, 139, 250, .22); transform: scale(1.08); }
.step-num {
  display: grid; place-items: center; width: 54px; height: 54px; border-radius: 17px;
  font-family: var(--font-latin); font-size: 22px; font-weight: 700;
  background: var(--grad-brand); background-size: 200% auto; color: #fff; margin-bottom: 20px;
  box-shadow: 0 14px 30px -12px rgba(236,72,153,.75); position: relative;
  animation: shine 7s linear infinite;
  transition: transform .5s var(--ease-back);
}
.step:hover .step-num { transform: rotate(-10deg) scale(1.12); }
.step h4 { font-size: 1.14rem; font-weight: 800; margin-bottom: 9px; }
.step p { font-size: 14px; color: var(--muted); }
/* Ghost index numeral */
.step::marker { content: none; }

/* ==========================================================================
   16. WORKS / PROJECT CARDS
   ========================================================================== */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.works-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.project-card, .post-card { display: flex; flex-direction: column; overflow: hidden; }
.project-card > *, .post-card > * { transform: none; }

.project-cover, .post-cover {
  position: relative; overflow: hidden;
  background: center/cover no-repeat var(--bg-2); display: grid; place-items: center;
  transition: transform .8s var(--ease);
}
.project-cover { aspect-ratio: 16/10; }
.post-cover { aspect-ratio: 16/9; }
.project-cover.placeholder { background: linear-gradient(140deg, rgba(167,139,250,.24), rgba(236,72,153,.16) 58%, rgba(34,211,238,.16)); }
.post-cover.placeholder { background: linear-gradient(135deg, rgba(167,139,250,.26), rgba(236,72,153,.22) 55%, rgba(34,211,238,.2)); }
/* Covers are now real <img> so the browser can lazy-load them.
   The image fills the cover box; the zoom moved from the box to the image. */
.project-cover img, .post-cover img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .8s var(--ease);
}
.project-card:hover .project-cover img { transform: scale(1.08); }

.project-ph { color: rgba(255,255,255,.94); filter: drop-shadow(0 8px 20px rgba(0,0,0,.5)); }
.project-ph svg { width: 54px; height: 54px; }
.post-cover-ph { color: var(--violet); opacity: .6; }
.post-cover-ph svg { width: 42px; height: 42px; }

.project-cat, .post-cat {
  position: absolute; top: 14px; inset-inline-end: 14px; z-index: 4;
  font-size: 12px; font-weight: 600; padding: 6px 14px; border-radius: 100px;
  background: rgba(5,5,9,.78); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--line-2); color: var(--text);
}

/* "View project" veil */
.project-cover::after {
  content: "مشاهده‌ی پروژه"; position: absolute; inset: 0; display: grid; place-items: center; z-index: 3;
  background: linear-gradient(0deg, rgba(5,5,9,.72), rgba(5,5,9,.34));
  color: #fff; font-weight: 800; font-size: 15.5px; letter-spacing: .3px;
  opacity: 0; transition: opacity .4s var(--ease); backdrop-filter: blur(2px);
}
.project-card:hover .project-cover::after { opacity: 1; }

.project-card-body, .post-card-body { padding: 24px; display: flex; flex-direction: column; gap: 9px; flex: 1; position: relative; z-index: 4; }
.project-card-body h3, .post-card-body h3 { font-size: 1.22rem; font-weight: 800; line-height: 1.6; }
.project-card-body p, .post-card-body > p { color: var(--muted); font-size: 14px; flex: 1; line-height: 1.85; }
.project-link, .post-readmore { color: var(--violet); font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; transition: gap .3s var(--ease); }
.project-card:hover .project-link, .post-card:hover .post-readmore { gap: 12px; }
.post-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; font-size: 13px; color: var(--dim); }

/* Generic work tile */
.work-item {
  position: relative; aspect-ratio: 4/3; border-radius: var(--r); padding: 26px;
  display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(160deg, var(--glass-2), var(--glass-1));
  border: 1px solid var(--line); overflow: hidden; transition: transform .4s var(--ease), border-color .3s;
}
.work-item:hover { transform: translateY(-8px); border-color: var(--line-2); }
.work-cat { align-self: flex-start; font-size: 12px; padding: 5px 13px; border-radius: 100px; background: var(--glass-2); border: 1px solid var(--line); color: var(--muted); }

.blog-more { text-align: center; margin-top: 46px; }
.blog-empty { text-align: center; color: var(--dim); padding: 90px 20px; font-size: 1.1rem; }
.blog-teaser { background: linear-gradient(180deg, transparent, rgba(167,139,250,.035)); }

/* --------------------------------------------------------------------------
   Article cards — floating header layout: the cover lifts out of the top of
   the card, inset from both sides, carrying the brand glow. Same structure as
   the Material reference, recoloured to the site's dark palette.
   -------------------------------------------------------------------------- */
.post-card {
  overflow: visible;          /* the cover deliberately breaks out of the box */
  transform-style: flat;      /* keep the raised cover out of the 3D stack */
  margin-top: 28px;           /* reserve the space the cover rises into */
}
.post-card-link { display: flex; flex-direction: column; height: 100%; }

.post-cover {
  margin: -28px 18px 0;       /* rise above the card, inset from the sides */
  aspect-ratio: 16/10;
  border-radius: var(--r-sm);
  overflow: hidden;
  z-index: 2;
  box-shadow: 0 20px 42px -16px rgba(167, 139, 250, .6), var(--lift-1);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
/* No image → the gradient header from the reference, in brand colours */
.post-cover.placeholder {
  background: var(--grad-brand); background-size: 190% auto;
  animation: shine 7s linear infinite;
}
.post-cover-ph { color: #fff; opacity: .9; }
.post-cover-ph svg { width: 44px; height: 44px; }

/* Lift instead of zoom — a floating header should not grow past its inset */
.post-card:hover .post-cover {
  transform: translateY(-6px);
  box-shadow: 0 28px 56px -16px rgba(236, 72, 153, .7), var(--lift-2);
}

.post-card-body { padding: 26px 24px 18px; gap: 10px; }
.post-card-body h3 { font-size: 1.24rem; font-weight: 800; line-height: 1.65; color: var(--text); }
.post-card-body > p { color: var(--muted); font-size: 14.5px; line-height: 1.95; }

.post-card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 0 24px 26px; position: relative; z-index: 4;
}
.post-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 24px; border-radius: var(--r-xs);
  background: var(--grad-brand); background-size: 200% auto; color: #fff;
  font-size: 13px; font-weight: 800; letter-spacing: .2px; white-space: nowrap;
  box-shadow: 0 10px 22px -10px rgba(236, 72, 153, .65), inset 0 1px 0 rgba(255,255,255,.26);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background-position .5s var(--ease);
}
.post-card:hover .post-btn {
  transform: translateY(-3px); background-position: 100% 50%;
  box-shadow: 0 18px 34px -10px rgba(236, 72, 153, .85);
}
.post-date { font-size: 12.5px; color: var(--dim); white-space: nowrap; }

/* ==========================================================================
   17. TESTIMONIALS
   ========================================================================== */
.testi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.testi-card { padding: 34px 26px 28px; overflow: hidden; }
.testi-quote {
  position: absolute; top: -12px; inset-inline-start: 18px; font-size: 130px; line-height: 1;
  color: var(--violet); opacity: .12; font-family: Georgia, 'Times New Roman', serif;
  pointer-events: none; z-index: 0; transition: opacity .4s, transform .5s var(--ease);
}
.testi-card:hover .testi-quote { opacity: .2; transform: scale(1.15) rotate(-6deg); }
.testi-stars { position: relative; z-index: 2; color: var(--amber); letter-spacing: 3px; font-size: 14px; margin-bottom: 16px; }
.testi-text { position: relative; z-index: 2; color: var(--muted); font-size: 14.5px; line-height: 2.05; margin-bottom: 24px; }
.testi-by { display: flex; align-items: center; gap: 13px; position: relative; z-index: 2; }
.testi-avatar {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: var(--grad-brand); background-size: 200% auto; color: #fff; font-weight: 800; font-size: 19px;
  flex-shrink: 0; animation: shine 7s linear infinite;
  transition: transform .5s var(--ease-back), border-radius .5s var(--ease);
}
.testi-card:hover .testi-avatar { transform: rotate(-10deg) scale(1.1); border-radius: 50%; }
.testi-meta { display: flex; flex-direction: column; }
.testi-name { font-weight: 800; font-size: 14px; }
.testi-role { font-size: 12.5px; color: var(--dim); }

/* ==========================================================================
   18. FAQ
   ========================================================================== */
.faq-inner { max-width: 820px; }
.faq-list { display: flex; flex-direction: column; gap: 15px; }
.faq-item {
  border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden;
  background: linear-gradient(160deg, var(--glass-2), var(--glass-1));
  transition: border-color .35s, background .35s, box-shadow .4s;
}
.faq-item:hover { border-color: var(--line-2); }
.faq-item[open] { border-color: rgba(167,139,250,.4); box-shadow: var(--lift-1), 0 0 30px -14px rgba(167,139,250,.5); }
.faq-item summary {
  padding: 22px 26px; font-weight: 700; font-size: 1.06rem; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; list-style: none; gap: 18px;
  transition: color .3s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--violet); }
.faq-item summary::after {
  content: "+"; font-size: 26px; color: var(--violet); flex-shrink: 0; line-height: 1;
  transition: transform .45s var(--ease-back);
}
.faq-item[open] summary::after { transform: rotate(135deg); }
.faq-body { padding: 0 26px 24px; color: var(--muted); font-size: 15px; animation: faqIn .45s var(--ease); }
@keyframes faqIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   19. CONTACT
   ========================================================================== */
.contact-card {
  display: grid; grid-template-columns: 1fr 1fr; gap: 52px; align-items: start;
  padding: clamp(30px, 5vw, 60px); border-radius: var(--r-lg); position: relative; isolation: isolate;
  background: linear-gradient(160deg, rgba(167,139,250,.1), var(--glass-1));
  border: 1px solid var(--line-2); box-shadow: var(--lift-2);
}
.contact-card::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; z-index: -1; padding: 1px;
  background: var(--grad-ring);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: .55; animation: spinRing 6s linear infinite;
}
.contact-info .section-title { text-align: right; }
.contact-info .section-title::after { margin-inline: 0; }
.contact-info > p { color: var(--muted); margin: 18px 0 30px; }
.contact-list { display: flex; flex-direction: column; gap: 17px; }
.contact-list li { display: flex; align-items: center; gap: 15px; transition: transform .35s var(--ease); }
.contact-list li:hover { transform: translateX(-8px); }
.ci-icon {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: var(--glass-2); border: 1px solid var(--line); color: var(--violet); flex-shrink: 0;
  transition: transform .5s var(--ease-back), color .35s, box-shadow .35s, background .35s;
}
.ci-icon svg { width: 21px; height: 21px; }
.contact-list li:hover .ci-icon { transform: rotate(-10deg) scale(1.1); color: var(--pink); background: var(--glass-3); box-shadow: var(--glow-p); }
.ci-label { display: block; font-size: 12px; color: var(--dim); }
.contact-list a { font-weight: 700; transition: color .25s; }
.contact-list a:hover { color: var(--violet); }

.contact-form { display: flex; flex-direction: column; gap: 17px; }
.field { display: flex; flex-direction: column; gap: 9px; }
.field label { font-size: 14px; color: var(--muted); font-weight: 600; }
.field input, .field select, .field textarea {
  padding: 14px 17px; border-radius: 14px; background: rgba(5,5,9,.6);
  border: 1px solid var(--line); color: var(--text); font-size: 15px; width: 100%;
  transition: border-color .3s, background .3s, box-shadow .3s, transform .3s var(--ease);
}
.field textarea { resize: vertical; min-height: 100px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--violet); background: rgba(5,5,9,.85);
  box-shadow: 0 0 0 4px rgba(167,139,250,.14); transform: translateY(-2px);
}
.field input::placeholder, .field textarea::placeholder { color: var(--dim); }
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%23a8a8c6' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left 17px center;
}
.form-note { font-size: 14px; padding: 13px 17px; border-radius: 14px; margin-top: 4px; animation: faqIn .4s var(--ease); }
.form-note.success { background: rgba(74,222,128,.13); color: var(--lime); border: 1px solid rgba(74,222,128,.32); }
.form-note.error { background: rgba(248,113,113,.13); color: #f87171; border: 1px solid rgba(248,113,113,.32); }

/* ==========================================================================
   19b. LIGHT BUTTONS — spotlight beam switches on over the icon on hover
   ========================================================================== */
.light-row { display: flex; justify-content: center; flex-wrap: wrap; gap: clamp(20px, 6vw, 72px); }

.light-button .bt {
  --lb: var(--violet);
  position: relative; height: 200px; display: flex; align-items: flex-end;
  outline: none; background: none; border: none; cursor: pointer;
}
.light-button:nth-child(2) .bt { --lb: var(--pink); }
.light-button:nth-child(3) .bt { --lb: var(--cyan); }

.light-button .bt .button-holder {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  height: 100px; width: 100px; border-radius: 8px;
  background-color: var(--bg-2);
  /* Legible at rest, then lights up — the original's near-black label would
     have made these navigation items unreadable until hovered. */
  color: var(--dim); font-weight: 700; font-size: 13px;
  outline: rgba(255, 255, 255, .12) 2px solid; outline-offset: 20px;
  transition: 300ms;
}
.light-button .bt .button-holder svg { height: 34px; width: 34px; transition: 300ms; }

.light-button .bt .light-holder {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  height: 200px; width: 100px; display: flex; flex-direction: column; align-items: center;
}
.light-button .bt .light-holder .dot {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 10px; height: 10px; border-radius: 10px; z-index: 2;
  background-color: var(--bg-2); transition: 300ms;
}
.light-button .bt .light-holder .light {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  /* The visible beam is a triangle exactly as wide as the button at its base.
     The box is sized to that triangle (it used to be a 200px box whose outer
     half was always clipped away — invisible, but still wide enough to push
     the page 3px sideways on 320px phones). Height follows the holder so the
     beam also stops at the button on small screens. */
  width: 100%; height: 100%; background: transparent;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  transition: background 300ms;
}

.light-button .bt:hover .button-holder,
.light-button .bt:focus-visible .button-holder {
  color: var(--lb); outline: var(--lb) 2px solid; outline-offset: 2px;
}
.light-button .bt:hover .light-holder .dot,
.light-button .bt:focus-visible .light-holder .dot {
  background-color: var(--lb); box-shadow: 0 0 14px var(--lb);
}
.light-button .bt:hover .light-holder .light,
.light-button .bt:focus-visible .light-holder .light {
  background: linear-gradient(180deg, var(--lb) 0%, transparent 75%, transparent 100%);
}

@media (max-width: 420px) {
  .light-row { gap: 26px; }
  .light-button .bt { height: 170px; }
  .light-button .bt .light-holder { height: 170px; }
}

/* ==========================================================================
   20. CTA BAND
   ========================================================================== */
.cta-band .cta-inner {
  text-align: center; padding: clamp(46px, 6vw, 80px) 32px; border-radius: var(--r-lg);
  position: relative; isolation: isolate; overflow: hidden;
  background: linear-gradient(135deg, rgba(124,58,237,.26), rgba(236,72,153,.18) 58%, rgba(34,211,238,.18));
  border: 1px solid var(--line-2); box-shadow: var(--lift-2);
}
.cta-band .cta-inner::before {
  content: ""; position: absolute; inset: -60%; z-index: -1;
  background: conic-gradient(from 0deg, transparent, rgba(167,139,250,.22), transparent 40%);
  animation: spin360 12s linear infinite;
}
@keyframes spin360 { to { transform: rotate(360deg); } }
.cta-band h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 900; letter-spacing: -1px; }
.cta-band p { color: var(--muted); margin: 16px auto 30px; max-width: 50ch; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ==========================================================================
   21. FOOTER
   ========================================================================== */
.footer { border-top: 1px solid var(--line); background: linear-gradient(180deg, transparent, var(--bg-2)); padding-top: 70px; margin-top: 50px; position: relative; }
.footer-inner { display: grid; grid-template-columns: 1.3fr 2fr; gap: 46px; padding-bottom: 46px; }
.footer-brand .brand-text { font-size: 26px; }
.footer-logo { display: block; height: 44px; width: auto; max-width: 220px; object-fit: contain; }
.footer-brand p { color: var(--muted); margin-top: 16px; max-width: 36ch; font-size: 14.5px; }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.footer-col h5 { font-size: 15px; font-weight: 800; margin-bottom: 18px; }
.footer-col a { display: block; color: var(--muted); font-size: 14px; padding: 6px 0; transition: color .25s, transform .3s var(--ease); }
.footer-col a:hover { color: var(--violet); transform: translateX(-6px); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  padding-block: 26px; border-top: 1px solid var(--line); color: var(--dim); font-size: 13px;
}

/* Back to top */
.to-top {
  position: fixed; bottom: 28px; inset-inline-start: 28px; z-index: 250;
  width: 52px; height: 52px; border-radius: 17px; display: grid; place-items: center;
  background: var(--grad-brand); background-size: 200% auto; color: #fff;
  box-shadow: 0 16px 40px -14px rgba(236,72,153,.8);
  opacity: 0; visibility: hidden; transform: translateY(24px) scale(.85);
  transition: opacity .4s var(--ease), transform .4s var(--ease-back), visibility .4s;
  animation: shine 7s linear infinite;
}
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.to-top:hover { transform: translateY(-6px) scale(1.1) rotate(-8deg); }

/* ==========================================================================
   22. PAGE / ARTICLE
   ========================================================================== */
.page { padding-top: 78px; }
.page-head { padding: clamp(54px, 8vw, 100px) 0 34px; text-align: center; position: relative; }
.page-title { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 900; letter-spacing: -1.2px; margin-top: 18px; }
.page-desc { color: var(--muted); max-width: 58ch; margin: 18px auto 0; font-size: 1.06rem; }

.article { padding: 24px 0 46px; }
.article-narrow { max-width: 790px; }
.article-back { display: inline-flex; align-items: center; gap: 7px; color: var(--dim); font-size: 14px; margin-bottom: 26px; transition: color .25s, gap .3s var(--ease); }
.article-back:hover { color: var(--violet); gap: 13px; }
.draft-badge { padding: 11px 18px; border-radius: 14px; background: rgba(251,191,36,.13); border: 1px solid rgba(251,191,36,.32); color: var(--amber); font-size: 14px; margin-bottom: 22px; }
.article-cat { display: inline-block; font-size: 13px; font-weight: 600; padding: 6px 16px; border-radius: 100px; background: var(--glass-2); border: 1px solid var(--line-2); color: var(--violet); margin-bottom: 20px; }
.article-title { font-size: clamp(1.9rem, 4.5vw, 3.1rem); font-weight: 900; line-height: 1.35; letter-spacing: -1.2px; }
.article-meta { display: flex; align-items: center; gap: 13px; color: var(--dim); font-size: 14px; margin-top: 22px; flex-wrap: wrap; }
.article-meta span { display: inline-flex; align-items: center; gap: 7px; }
.article-meta svg { width: 15px; height: 15px; color: var(--violet); }
.article-cover {
  display: block; width: 100%; aspect-ratio: 16/8; object-fit: cover;
  border-radius: var(--r); background: var(--bg-2);
  margin: 34px 0; border: 1px solid var(--line); box-shadow: var(--lift-2);
}

.article-body { font-size: 1.08rem; line-height: 2.15; color: var(--muted); margin-top: 32px; }
.article-body > *:first-child { margin-top: 0; }
.article-body h2 { color: var(--text); font-size: 1.55rem; font-weight: 800; margin: 42px 0 16px; letter-spacing: -.5px; position: relative; padding-inline-start: 18px; }
.article-body h2::before { content: ""; position: absolute; inset-inline-start: 0; top: .3em; width: 5px; height: 1.1em; border-radius: 3px; background: var(--grad-brand); }
.article-body h3 { color: var(--text); font-size: 1.28rem; font-weight: 800; margin: 30px 0 13px; }
.article-body p { margin-bottom: 22px; }
.article-body a { color: var(--violet); text-decoration: underline; text-underline-offset: 4px; transition: color .25s; }
.article-body a:hover { color: var(--pink); }
.article-body ul, .article-body ol { margin: 0 20px 22px 0; padding-inline-start: 24px; }
.article-body li { margin-bottom: 9px; }
.article-body ul li { list-style: none; position: relative; }
.article-body ul li::before { content: ""; position: absolute; inset-inline-start: -18px; top: .75em; width: 7px; height: 7px; border-radius: 50%; background: var(--grad-brand); }
.article-body ol { list-style: decimal; }
.article-body img { border-radius: var(--r); margin: 26px 0; width: 100%; border: 1px solid var(--line); box-shadow: var(--lift-1); }
.article-body blockquote {
  border-inline-start: 4px solid var(--violet); background: var(--glass-2);
  padding: 18px 24px; border-radius: 0 14px 14px 0; margin: 26px 0; color: var(--text); font-size: 1.1rem;
}
.article-body strong, .article-body b { color: var(--text); font-weight: 800; }
.article-body code { background: var(--glass-3); padding: 3px 8px; border-radius: 7px; font-size: .9em; direction: ltr; display: inline-block; }

.article-cta {
  text-align: center; margin-top: 56px; padding: 40px; border-radius: var(--r-lg);
  background: linear-gradient(160deg, rgba(167,139,250,.12), var(--glass-1)); border: 1px solid var(--line-2);
}
.article-cta h3 { font-size: 1.55rem; font-weight: 900; }
.article-cta p { color: var(--muted); margin: 12px 0 24px; }
.related { margin-top: 76px; }
.related-title { font-size: 1.7rem; font-weight: 900; margin-bottom: 30px; text-align: center; }

/* Project detail extras */
.project-lead { font-size: 1.16rem; color: var(--text); font-weight: 500; margin-bottom: 24px; line-height: 1.95; }
.project-tags { display: flex; flex-wrap: wrap; gap: 9px; margin: 28px 0; }
.project-tags span {
  font-size: 13px; padding: 7px 16px; border-radius: 100px; background: var(--glass-2);
  border: 1px solid var(--line); color: var(--muted); transition: border-color .3s, color .3s, transform .3s var(--ease);
}
.project-tags span:hover { border-color: var(--line-2); color: var(--text); transform: translateY(-3px); }
.project-visit { margin: 24px 0; }
.project-visit .btn svg { width: 17px; height: 17px; }
.project-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin: 44px 0; }
.gallery-item {
  display: block; aspect-ratio: 4/3; border-radius: var(--r); overflow: hidden;
  background: var(--bg-2); border: 1px solid var(--line);
  transition: transform .5s var(--ease), border-color .35s, box-shadow .5s var(--ease);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-item[data-lightbox] { cursor: zoom-in; }

/* Creative work: photos keep their own proportions (masonry columns)
   instead of being cropped to a fixed tile. */
.project-gallery.is-masonry { display: block; columns: 3 240px; column-gap: 18px; }
.project-gallery.is-masonry .gallery-item { aspect-ratio: auto; margin-bottom: 18px; break-inside: avoid; }
.project-gallery.is-masonry .gallery-item img { height: auto; }

/* Project video (Aparat / YouTube) — 16:9, takes the cover's place */
.video-frame {
  position: relative; aspect-ratio: 16 / 9; margin: 34px 0; border-radius: var(--r);
  overflow: hidden; background: #000; border: 1px solid var(--line); box-shadow: var(--lift-2);
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Lightbox */
.lb-open { overflow: hidden; }
.lightbox {
  position: fixed; inset: 0; z-index: 600; display: flex; align-items: center; justify-content: center;
  padding: clamp(14px, 4vw, 56px); background: rgba(5, 5, 9, .94);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  animation: faqIn .25s var(--ease);
}
.lightbox[hidden] { display: none; }
.lb-stage { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 100%; max-height: 100%; }
.lb-img {
  max-width: min(1400px, 100%); max-height: calc(100vh - 120px); object-fit: contain;
  border-radius: 12px; box-shadow: var(--lift-3); background: var(--bg-2);
}
.lb-count { color: var(--muted); font-size: 13px; font-weight: 600; }
.lb-btn {
  position: absolute; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center;
  font-size: 28px; line-height: 1; color: #fff; background: rgba(255,255,255,.08);
  border: 1px solid var(--line-2); transition: background .25s, transform .3s var(--ease);
}
.lb-btn:hover { background: rgba(167,139,250,.3); transform: scale(1.08); }
.lb-close { top: 18px; inset-inline-end: 18px; }
.lb-prev { inset-inline-start: 18px; top: 50%; translate: 0 -50%; }
.lb-next { inset-inline-end: 18px; top: 50%; translate: 0 -50%; }
@media (max-width: 600px) {
  .lb-prev, .lb-next { top: auto; bottom: 18px; translate: none; }
  .lb-img { max-height: calc(100vh - 170px); }
}
.gallery-item:hover { transform: scale(1.04) translateY(-6px); border-color: var(--line-2); box-shadow: var(--lift-2); }

/* 404 */
.notfound { min-height: 72vh; display: grid; place-items: center; text-align: center; }
.notfound-code {
  font-family: var(--font-latin); font-size: clamp(5.5rem, 19vw, 11rem); font-weight: 700; line-height: 1;
  background: var(--grad-brand); background-size: 220% auto;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: shine 7s linear infinite;
}
.notfound h1 { font-size: 1.9rem; margin: 12px 0; }
.notfound p { color: var(--muted); margin-bottom: 28px; }
.notfound-cta { display: flex; gap: 13px; justify-content: center; flex-wrap: wrap; }

/* ==========================================================================
   23. REVEAL / STAGGER
   The hidden state is scoped to .js (set by an inline script in <head>), so
   without JavaScript every section renders fully visible instead of blank.
   ========================================================================== */
.js .reveal {
  opacity: 0; transform: translateY(42px);
  transition: opacity .85s var(--ease), transform .85s var(--ease);
}
/* Directional entrances — pick per block in the templates */
.js .reveal.from-right  { transform: translateX(80px); }
.js .reveal.from-left   { transform: translateX(-80px); }
.js .reveal.from-bottom { transform: translateY(64px); }
.js .reveal.from-top    { transform: translateY(-56px); }
.js .reveal.from-zoom   { transform: scale(.86); }
.js .reveal.from-flip   { transform: perspective(1000px) rotateY(-14deg) translateX(60px); }

.js .reveal.visible { opacity: 1; transform: none; }

/* Sideways entrances sit off-canvas before they land; html+body both clip so
   that never adds a horizontal scrollbar. Clipping per-section instead would
   cut the cards' glow and shadows at the container edges. */

.js .rise {
  opacity: 0; transform: translateY(38px) rotateX(10deg) scale(.97);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: var(--d, 0ms);
}
.js .rise.in { opacity: 1; transform: none; }

/* ==========================================================================
   24. RESPONSIVE
   ========================================================================== */
@media (max-width: 1100px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .testi-grid { grid-template-columns: repeat(2, 1fr); }
  .post-grid, .works-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 940px) {
  .about-grid { grid-template-columns: 1fr; gap: 46px; }
  .about-text .section-title { text-align: center; }
  .about-text .section-title::after { margin-inline: auto; }
  .contact-card { grid-template-columns: 1fr; gap: 40px; }
  .contact-info .section-title { text-align: center; }
  .contact-info .section-title::after { margin-inline: auto; }
  .footer-inner { grid-template-columns: 1fr; gap: 36px; }
  .teaser-groups { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .nav-links {
    position: fixed; inset: 78px 14px auto 14px; flex-direction: column; align-items: stretch;
    background: rgba(8, 8, 16, .97); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    padding: 14px; gap: 5px; border: 1px solid var(--line-2); border-radius: var(--r);
    box-shadow: var(--lift-3);
    transform: translateY(-140%) scale(.96); opacity: 0; visibility: hidden;
    transition: transform .45s var(--ease), opacity .35s, visibility .45s;
  }
  .nav-links.open { transform: translateY(0) scale(1); opacity: 1; visibility: visible; }
  .nav-link { display: block; padding: 15px 18px; font-size: 16px; border-radius: var(--r-xs); }
  .nav-link.active { background: var(--grad-brand); }
  .nav-toggle { display: flex; }
  .nav-actions .btn-sm { display: none; }
  .hero { padding-top: 118px; }
  .about-points { grid-template-columns: 1fr; }
  /* 3D tilt is a pointer affordance — disable on touch */
  .tilt.tilting, .tilt:hover { transform: translateY(-6px); }
  .tilt > * { transform: none; }
}
@media (max-width: 680px) {
  .showcase-chip { display: none; }
  .hero-showcase { margin-top: 42px; }
  .mockup { transform: rotateX(6deg); animation: none; border-radius: 12px; }
  .mockup-bar { height: 32px; gap: 10px; padding: 0 11px; }
  .mockup-dots { gap: 5px; }
  .mockup-dots i { width: 8px; height: 8px; }
  .mockup-url { height: 20px; font-size: 10.5px; line-height: 20px; padding: 0 10px; }
  .mockup-caption { inset-inline-start: 8px; bottom: 8px; padding: 5px 11px; font-size: 12.5px; gap: 7px; }
  .mockup-caption span { display: none; }
}
@media (max-width: 600px) {
  .cards, .steps, .why-grid, .testi-grid, .post-grid, .works-grid,
  .team-cards, .footer-cols, .project-gallery { grid-template-columns: 1fr; }
  .container { padding-inline: 18px; }
  .hero-cta { width: 100%; gap: 10px; }
  .hero-cta .btn { flex: 1; padding-inline: 12px; }
  .footer-bottom { justify-content: center; text-align: center; }
  .bg-decor::before { display: none; }
  .section-head { margin-bottom: 44px; }
}

/* ==========================================================================
   25. REDUCED MOTION — everything above degrades to a calm, static site
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal, .js .rise { opacity: 1 !important; transform: none !important; }
  body::after { display: none; }
  .bg-decor::before { display: none; }
  .btn-primary::after { display: none; }
  .tilt.tilting, .tilt:hover { transform: none !important; }
  .tilt > * { transform: none !important; }
}

/* iOS Safari zooms the whole page when a focused field's text is under 16px.
   Keep form fields at 16px on touch devices so typing never jumps the view. */
@media (pointer: coarse) {
  .field input, .field select, .field textarea { font-size: 16px; }
}
