/* ============================================
   SANZ CREATIVE — Kinetic Poster Design System
   Theming: [data-theme="vivid"] (default) / [data-theme="midnight"] (alt)
   ============================================ */

:root,
html[data-theme="vivid"] {
  --ink: #170e2e;
  --ink-soft: #22163f;
  --card: #271a49;
  --paper: #f5f1ff;
  --muted: #ab9fd6;
  --lime: #ff8a3d;
  --coral: #ff2d78;
  --accent-3: #8b3dff;
  --accent-4: #3d7bff;
  --grad: linear-gradient(135deg, var(--coral), var(--lime));
  --grad4: linear-gradient(115deg, #ff2d78, #ff8a3d, #8b3dff, #3d7bff);
}

html[data-theme="midnight"] {
  --ink: #120f1b;
  --ink-soft: #1c1728;
  --card: #1e1a2c;
  --paper: #f4f0e6;
  --muted: #948da8;
  --lime: #c6ff3d;
  --coral: #ff4d6d;
  --accent-3: #4d7cff;
  --accent-4: #a855f7;
  --grad: linear-gradient(135deg, var(--coral), var(--lime));
  --grad4: linear-gradient(115deg, #ff4d6d, #ffb14d, #c6ff3d, #4d7cff);
}

:root {
  --font-display: 'Unbounded', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'Space Mono', monospace;

  --container: 1180px;
  --edge: clamp(24px, 6vw, 72px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  transition: background 0.5s ease, color 0.5s ease;
  overflow-x: hidden;
  position: relative;
}

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

::selection { background: var(--lime); color: var(--ink); }

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

/* ---------- Texture layers ---------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.spotlight {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(600px circle at var(--x, 50%) var(--y, 20%), rgba(198, 255, 61, 0.08), transparent 60%);
  transition: background 0.15s ease-out;
}

/* ---------- Header ---------- */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--edge);
  backdrop-filter: blur(10px);
  background: linear-gradient(180deg, rgba(18, 15, 27, 0.85), transparent);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

.logo-ring {
  position: relative;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
}

.logo-ring::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--coral), var(--lime), #4d7cff, var(--coral));
  animation: ring-spin 6s linear infinite;
  filter: drop-shadow(0 0 8px rgba(198,255,61,0.35));
}

.logo-ring::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--ink);
}

@keyframes ring-spin {
  to { transform: rotate(360deg); }
}

.logo-mark {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  display: block;
  width: 44px;
  height: 44px;
  max-width: 44px;
  max-height: 44px;
  object-fit: contain;
  border-radius: 50%;
  transition: transform 0.5s cubic-bezier(.2,.8,.2,1);
}
.logo:hover .logo-mark { transform: scale(1.08); }
.logo:hover .logo-ring::before { animation-duration: 1.5s; }

.logo-word { color: var(--paper); }
.logo-word .tld {
  background-image: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 22px;
}

.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(244, 240, 230, 0.2);
  background: transparent;
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.3s ease, transform 0.4s ease, color 0.3s ease;
  flex-shrink: 0;
}
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle:hover {
  border-color: var(--lime);
  color: var(--lime);
  transform: rotate(90deg);
}

nav {
  display: flex;
  gap: 26px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

nav a {
  position: relative;
  padding-bottom: 4px;
  opacity: 0.85;
  transition: opacity 0.25s ease;
}

nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  height: 1px;
  width: 0;
  background: var(--lime);
  transition: width 0.3s ease;
}

nav a:hover { opacity: 1; }
nav a:hover::after { width: 100%; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--paper);
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 140px var(--edge) 80px;
  position: relative;
}

/* ---------- Icon rain ---------- */
.icon-rain {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.falling-icon {
  position: absolute;
  top: -10%;
  color: var(--paper);
  opacity: 0;
  animation-name: fall, sway;
  animation-timing-function: linear, ease-in-out;
  animation-iteration-count: infinite, infinite;
  will-change: transform, opacity;
}

.falling-icon svg { display: block; width: 100%; height: 100%; }

@keyframes fall {
  0%   { transform: translateY(-10vh) rotate(0deg); opacity: 0; }
  8%   { opacity: var(--icon-op, 0.5); }
  85%  { opacity: var(--icon-op, 0.5); }
  100% { transform: translateY(115vh) rotate(var(--spin, 180deg)); opacity: 0; }
}

@keyframes sway {
  0%, 100% { margin-left: 0px; }
  50% { margin-left: 26px; }
}

/* ---------- Custom cursor ---------- */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 200;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
}

.cursor-dot {
  width: 8px;
  height: 8px;
  background: var(--lime);
}

.cursor-ring {
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--paper);
  transition: width 0.25s ease, height 0.25s ease, border-color 0.25s ease, opacity 0.25s ease;
}

.cursor-ring.hovering {
  width: 56px;
  height: 56px;
  border-color: var(--lime);
}

@media (hover: none) {
  .cursor-dot, .cursor-ring { display: none; }
}

.hero::before {
  content: '';
  position: absolute;
  top: 20%;
  right: 8%;
  width: 380px;
  height: 380px;
  background: var(--grad);
  filter: blur(120px);
  opacity: 0.25;
  border-radius: 50%;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 620px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--lime);
  margin-bottom: 18px;
}
.eyebrow.center { text-align: center; }

.hero h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.4rem, 5.4vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.hero h1 .line { display: block; }
.hero h1 .accent { color: transparent; -webkit-background-clip: text; background-clip: text; background-image: var(--grad); }
.hero h1 em { font-style: italic; }

.hero-copy {
  margin-top: 28px;
  max-width: 520px;
  font-size: 1.08rem;
  line-height: 1.6;
  color: var(--muted);
}

.hero-cta {
  margin-top: 44px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.btn, .btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 16px 32px;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: transform 0.2s ease-out, box-shadow 0.35s ease;
}

.magnetic span { display: inline-block; transition: transform 0.2s ease-out; }

.btn {
  background: var(--grad);
  color: var(--ink);
  font-weight: 700;
}
.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px -8px rgba(255, 77, 109, 0.5);
}

.btn-ghost {
  border: 1px solid rgba(244, 240, 230, 0.25);
  color: var(--paper);
}
.btn-ghost:hover {
  border-color: var(--lime);
  color: var(--lime);
  transform: translateY(-3px);
}

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  border-top: 1px solid rgba(244, 240, 230, 0.12);
  border-bottom: 1px solid rgba(244, 240, 230, 0.12);
  padding: 20px 0;
  background: var(--ink-soft);
  white-space: nowrap;
}

.marquee-track {
  display: inline-flex;
  gap: 28px;
  animation: scroll-left 26s linear infinite;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  text-transform: uppercase;
}

.marquee .sep { color: var(--coral); font-size: 1rem; }

@keyframes scroll-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Sections (shared) ---------- */
section {
  padding: 120px var(--edge);
  position: relative;
  z-index: 2;
}

h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 1.08;
}

h2.center { text-align: center; margin-bottom: 64px; }

/* ---------- About ---------- */
.about-grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 48px;
  align-items: start;
}

.about-grid .eyebrow { grid-column: 1 / -1; }

.about-copy {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.lead {
  font-size: 1.15rem;
  line-height: 1.75;
  color: var(--muted);
  max-width: 560px;
}

/* ---------- Services ---------- */
.grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(244, 240, 230, 0.1);
  border: 1px solid rgba(244, 240, 230, 0.1);
}

.card {
  background: var(--card);
  padding: 44px 34px;
  transition: background 0.35s ease, transform 0.35s ease;
  position: relative;
}

.card:hover {
  background: var(--ink);
  transform: translateY(-4px);
}

.card .num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--coral);
  display: block;
  margin-bottom: 18px;
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: 12px;
  font-weight: 600;
}

.card p {
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.5;
}

/* ---------- Portfolio ---------- */
.portfolio {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.work {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 18px;
  overflow: hidden;
  background: var(--card);
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.25s ease;
}

.work img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(.2,.8,.2,1), filter 0.6s ease;
  filter: grayscale(60%) contrast(1.05);
}

.work:hover img {
  transform: scale(1.08);
  filter: grayscale(0%) contrast(1.05);
}

.overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 26px 24px;
  background: linear-gradient(0deg, rgba(18,15,27,0.95) 10%, transparent 100%);
  transform: translateY(12px);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.work:hover .overlay {
  transform: translateY(0);
  opacity: 1;
}

.overlay h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.overlay p {
  font-size: 0.85rem;
  color: var(--lime);
}

/* ---------- Contact ---------- */
.contact-grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 64px;
  align-items: start;
}

.contact-side .contact-list { margin-top: 44px; }

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.contact-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 22px 0;
  border-bottom: 1px solid rgba(244, 240, 230, 0.15);
  transition: padding-left 0.3s ease, color 0.3s ease;
}

a.contact-item:hover {
  color: var(--lime);
  padding-left: 10px;
}

.contact-item .label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.contact-item .value {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
}

/* ---------- Lead form ---------- */
.lead-form {
  background: var(--card);
  border: 1px solid rgba(244, 240, 230, 0.1);
  border-radius: 20px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.botcheck { display: none; }

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.field-row {
  display: flex;
  gap: 20px;
}

.field label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(244, 240, 230, 0.2);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 10px 2px;
  transition: border-color 0.3s ease;
  resize: vertical;
}

.field select { cursor: pointer; }
.field select option { background: var(--card); color: var(--paper); }

.field input::placeholder,
.field textarea::placeholder { color: rgba(148, 141, 168, 0.6); }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--lime);
}

.lead-submit {
  align-self: flex-start;
  border: none;
  cursor: pointer;
  margin-top: 6px;
}

.lead-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.form-status {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  min-height: 20px;
}

.form-status.success { color: var(--lime); }
.form-status.error { color: var(--coral); }

@media (max-width: 640px) {
  .field-row { flex-direction: column; }
  .lead-form { padding: 28px 22px; }
}

/* ---------- Tools / tech stack (floating logo cloud) ---------- */
.tools-grid {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  position: relative;
  z-index: 1;
}

.tool-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 132px;
  padding: 22px 14px 18px;
  border: 1px solid rgba(244, 240, 230, 0.12);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(244,240,230,0.04), transparent);
  backdrop-filter: blur(6px);
  text-align: center;
  transition: border-color 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease;
  animation: float-y 4.5s ease-in-out infinite;
  position: relative;
}

.tool-badge:nth-child(2n) { animation-duration: 5.4s; animation-delay: -1.2s; }
.tool-badge:nth-child(3n) { animation-duration: 3.9s; animation-delay: -2.4s; }
.tool-badge:nth-child(4n) { animation-delay: -0.7s; animation-duration: 5s; }
.tool-badge:nth-child(5n) { animation-delay: -1.8s; }

@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.tool-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  box-shadow: 0 8px 20px -6px var(--c1);
  animation: glow-pulse 2.6s ease-in-out infinite;
}

.tool-avatar svg { width: 24px; height: 24px; color: #0a0810; }

@keyframes glow-pulse {
  0%, 100% { filter: drop-shadow(0 0 2px transparent); transform: scale(1); }
  50% { filter: drop-shadow(0 0 10px var(--c1)); transform: scale(1.05); }
}

.tool-badge span {
  display: flex;
  flex-direction: column;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--paper);
  line-height: 1.3;
}

.tool-badge span em {
  font-style: normal;
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--muted);
  margin-top: 2px;
}

.tool-badge:hover {
  border-color: var(--c1);
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 20px 40px -16px var(--c1);
}

/* ---------- Results / achievements ---------- */
.lead.center { margin: -32px auto 56px; text-align: center; }

.achievements {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  position: relative;
  z-index: 1;
}

.achieve {
  background: var(--card);
  border: 1px solid rgba(244, 240, 230, 0.1);
  border-radius: 20px;
  padding: 32px 20px;
  text-align: center;
  transition: transform 0.35s ease, border-color 0.35s ease;
}

.achieve:hover {
  transform: translateY(-6px);
  border-color: var(--lime);
}

.achieve svg {
  width: 30px;
  height: 30px;
  color: var(--lime);
  margin-bottom: 14px;
  filter: drop-shadow(0 0 6px rgba(198,255,61,0.4));
}

.achieve-stat {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  background-image: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.achieve-label {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}

@media (max-width: 900px) {
  .achievements { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .achievements { grid-template-columns: 1fr; }
}

/* ---------- Hero scene widget (animated work illustrations) ---------- */
.scene-widget {
  position: relative;
  z-index: 2;
  width: 400px;
  flex-shrink: 0;
}

@media (max-width: 1100px) {
  .scene-widget { display: none; }
}

.scene-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
}

.scene-tabs button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(244, 240, 230, 0.25);
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
}
.scene-tabs button.active { background: var(--lime); transform: scale(1.3); }

.scene-frame {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(244, 240, 230, 0.14);
  background: var(--card);
  box-shadow: 0 30px 70px -30px rgba(0,0,0,0.65);
}

.scene-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 11px 14px;
  background: rgba(244, 240, 230, 0.05);
  border-bottom: 1px solid rgba(244, 240, 230, 0.08);
}
.scene-bar span { width: 8px; height: 8px; border-radius: 50%; background: rgba(244,240,230,0.2); }
.scene-bar span:nth-child(1) { background: var(--coral); }
.scene-bar span:nth-child(2) { background: var(--lime); }
.scene-bar span:nth-child(3) { background: var(--accent-3, #4d7cff); }
.scene-bar em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
  margin-left: 8px;
}

.scene-stage {
  position: relative;
  height: 260px;
  padding: 24px;
  overflow: hidden;
}

.scene {
  position: absolute;
  inset: 0;
  padding: 24px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}
.scene.active { opacity: 1; transform: translateY(0); pointer-events: auto; }

.scene-caption {
  position: absolute;
  bottom: 22px;
  left: 24px;
  right: 24px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
}

/* Video editing scene */
.clip-track {
  display: flex;
  gap: 6px;
  height: 46px;
  margin-top: 20px;
}
.clip {
  height: 100%;
  border-radius: 6px;
  transform-origin: left center;
  animation: clip-grow 1.4s cubic-bezier(.2,.8,.2,1) infinite alternate;
}
.clip-1 { flex: 1.2; background: linear-gradient(135deg, var(--coral), var(--lime)); animation-delay: 0s; }
.clip-2 { flex: 0.8; background: linear-gradient(135deg, var(--accent-3, #4d7cff), var(--accent-4, #a855f7)); animation-delay: 0.2s; }
.clip-3 { flex: 1.4; background: linear-gradient(135deg, var(--lime), var(--accent-4, #a855f7)); animation-delay: 0.4s; }

@keyframes clip-grow {
  from { transform: scaleY(0.7); opacity: 0.7; }
  to { transform: scaleY(1); opacity: 1; }
}

.waveform {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 30px;
  margin-top: 16px;
}
.waveform span {
  width: 3px;
  background: var(--muted);
  border-radius: 2px;
  animation: wave 1.2s ease-in-out infinite;
}
.waveform span:nth-child(odd) { animation-delay: 0.1s; }
.waveform span:nth-child(3n) { animation-delay: 0.25s; }
.waveform span:nth-child(4n) { animation-delay: 0.4s; }
@keyframes wave {
  0%, 100% { height: 6px; }
  50% { height: 26px; }
}

.playhead {
  position: absolute;
  top: 90px;
  left: 24px;
  width: 2px;
  height: 90px;
  background: var(--lime);
  box-shadow: 0 0 8px var(--lime);
  animation: playhead-move 3s linear infinite;
}
@keyframes playhead-move {
  from { left: 24px; }
  to { left: calc(100% - 24px); }
}

/* Website building scene */
.web-nav { display: flex; gap: 5px; margin-bottom: 18px; }
.web-nav span { width: 7px; height: 7px; border-radius: 50%; background: rgba(244,240,230,0.25); }

.web-line {
  height: 10px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--lime), transparent);
  background-color: rgba(244,240,230,0.12);
  width: 0;
  animation: type-grow 3.2s ease-in-out infinite;
  margin-bottom: 10px;
}
.web-line.w1 { animation-delay: 0s; max-width: 70%; }
.web-line.w2 { animation-delay: 0.3s; max-width: 45%; }
.web-line.w3 { animation-delay: 1.6s; max-width: 80%; }
.web-line.w4 { animation-delay: 1.9s; max-width: 55%; }

@keyframes type-grow {
  0% { width: 0; }
  30%, 60% { width: 100%; }
  90%, 100% { width: 100%; opacity: 0.5; }
}

.web-block {
  height: 44px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-3, #4d7cff), var(--accent-4, #a855f7));
  margin: 14px 0;
  transform: scale(0);
  animation: block-pop 3.2s ease-in-out infinite;
  animation-delay: 0.7s;
}
@keyframes block-pop {
  0%, 20% { transform: scale(0); opacity: 0; }
  40%, 90% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1); opacity: 0.7; }
}

/* Poster design scene */
.poster-shape {
  position: absolute;
  animation: shape-in 3s ease-in-out infinite;
}
.poster-shape.circle {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--coral), var(--lime));
  top: 28px; left: 28px;
  animation-delay: 0s;
}
.poster-shape.rect {
  width: 90px; height: 50px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-3, #4d7cff), var(--accent-4, #a855f7));
  top: 40px; right: 24px;
  animation-delay: 0.4s;
}
@keyframes shape-in {
  0%, 15% { transform: scale(0) rotate(-20deg); opacity: 0; }
  35%, 85% { transform: scale(1) rotate(0deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 0.6; }
}

.poster-text-line {
  position: absolute;
  height: 9px;
  border-radius: 4px;
  background: rgba(244,240,230,0.2);
  width: 0;
  animation: type-grow 3s ease-in-out infinite;
}
.poster-text-line.l1 { bottom: 62px; left: 28px; right: 28px; animation-delay: 0.9s; }
.poster-text-line.l2 { bottom: 44px; left: 28px; width: 60%; animation-delay: 1.2s; }

.poster-cursor {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 10px var(--lime);
  animation: cursor-move 3s ease-in-out infinite;
}
@keyframes cursor-move {
  0% { top: 30px; left: 30px; opacity: 0; }
  15% { opacity: 1; }
  40% { top: 60px; left: 100px; }
  70% { top: 130px; left: 60px; }
  100% { top: 130px; left: 60px; opacity: 0; }
}

/* ---------- Ambient mouse-reactive blob layer (whole page depth) ---------- */
.ambient-blobs {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(.2,.8,.2,1);
}

.ambient-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(150px);
  opacity: 0.24;
  mix-blend-mode: screen;
}

.ambient-blob.b1 {
  width: 520px; height: 520px;
  background: var(--coral);
  top: -12%; left: -8%;
  animation: amb-drift 26s ease-in-out infinite;
}
.ambient-blob.b2 {
  width: 460px; height: 460px;
  background: var(--accent-3, var(--lime));
  bottom: -14%; right: -6%;
  animation: amb-drift 32s ease-in-out infinite reverse;
}
.ambient-blob.b3 {
  width: 400px; height: 400px;
  background: var(--accent-4, var(--coral));
  top: 40%; left: 45%;
  animation: amb-drift 38s ease-in-out infinite;
}

@keyframes amb-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(80px, 50px) scale(1.15); }
  66% { transform: translate(-60px, 70px) scale(0.9); }
}

/* ---------- Drifting section blobs (multi-color mesh) ---------- */
.has-blob { overflow: hidden; }

.has-blob::before,
.has-blob::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}

.has-blob::before {
  width: 480px;
  height: 480px;
  filter: blur(140px);
  opacity: 0.22;
  background: var(--b1, var(--coral));
  top: -14%;
  left: -10%;
  animation: drift 24s ease-in-out infinite;
}

.has-blob::after {
  width: 380px;
  height: 380px;
  filter: blur(120px);
  opacity: 0.18;
  background: var(--b2, var(--lime));
  bottom: -16%;
  right: -8%;
  animation: drift 30s ease-in-out infinite reverse;
}

@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(70px, 50px) scale(1.18); }
  66% { transform: translate(-50px, 70px) scale(0.88); }
}

.has-blob > * { position: relative; z-index: 1; }

/* ---------- Ambient grid texture (premium tech backdrop) ---------- */
.mesh-grid {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.05;
  background-image:
    linear-gradient(rgba(244,240,230,0.6) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244,240,230,0.6) 1px, transparent 1px);
  background-size: 46px 46px;
  animation: grid-pan 40s linear infinite;
}

@keyframes grid-pan {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 460px 0, 0 460px; }
}

/* ---------- Floating icon layer (Tools section) ---------- */
.icon-float {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.float-icon {
  position: absolute;
  color: var(--paper);
  opacity: 0.1;
  animation: bob ease-in-out infinite;
}
.float-icon svg { width: 100%; height: 100%; display: block; }

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-22px) rotate(8deg); }
}

.card, .case-card {
  position: relative;
  overflow: hidden;
}

.card::after, .case-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(115deg, transparent, rgba(244, 240, 230, 0.08), transparent);
  transform: skewX(-20deg);
  transition: left 0.7s ease;
  pointer-events: none;
}

.card:hover::after, .case-card:hover::after { left: 130%; }

/* ---------- Live site grid (always visible, no interaction needed) ---------- */
.site-grid {
  max-width: var(--container);
  margin: 32px auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.site-grid .site-slide {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

/* ---------- Floating "My Work" boxes ---------- */
.work-grid {
  max-width: var(--container);
  margin: 32px auto 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.work-box {
  background: var(--card);
  border: 1px solid rgba(244, 240, 230, 0.1);
  border-radius: 20px;
  padding: 32px 22px;
  text-align: center;
  animation: float-y 4.6s ease-in-out infinite;
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
.work-grid .work-box:nth-child(2n) { animation-duration: 5.4s; animation-delay: -1.4s; }
.work-grid .work-box:nth-child(3n) { animation-duration: 4s; animation-delay: -2.2s; }
.work-grid .work-box:nth-child(4n) { animation-delay: -0.8s; }

.work-box:hover {
  transform: translateY(-8px) scale(1.03);
  border-color: var(--lime);
  box-shadow: 0 20px 44px -18px rgba(198,255,61,0.28);
}

.work-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--wc1, var(--coral)), var(--wc2, var(--lime)));
  color: #0a0810;
}
.work-icon svg { width: 24px; height: 24px; }

.work-box h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  margin-bottom: 8px;
}

.work-box p {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.5;
}

.work-box-add {
  border: 1px dashed rgba(244, 240, 230, 0.25);
  background: transparent;
}
.work-box-add:hover { border-color: var(--lime); }
.add-icon {
  background: transparent;
  border: 1.5px dashed rgba(244,240,230,0.35);
  color: var(--lime);
}

@media (max-width: 900px) {
  .work-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .work-grid { grid-template-columns: 1fr; }
}

/* ---------- Live site carousel ---------- */
.site-carousel {
  max-width: var(--container);
  margin: 32px auto 0;
  position: relative;
}

.carousel-track {
  display: flex;
  overflow: hidden;
  border-radius: 20px;
}

.site-slide {
  flex: 0 0 100%;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 36px;
  align-items: center;
  padding: 8px;
}

.browser-frame {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(244, 240, 230, 0.12);
  background: var(--card);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,0.6);
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 14px;
  background: rgba(244, 240, 230, 0.04);
  border-bottom: 1px solid rgba(244, 240, 230, 0.08);
}

.browser-bar span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(244, 240, 230, 0.25);
}
.browser-bar span:nth-child(1) { background: var(--coral); }
.browser-bar span:nth-child(2) { background: #ffb14d; }
.browser-bar span:nth-child(3) { background: var(--lime); }

.browser-bar em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  margin-left: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.browser-body {
  aspect-ratio: 16 / 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 20px;
}

.browser-body svg {
  width: 56px;
  height: 56px;
  color: rgba(255,255,255,0.9);
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
}

.browser-body h4 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: #fff;
}

.browser-body p {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.75);
}

.preview-a { background: linear-gradient(135deg, #1a2c4d, #ff4d6d 140%); }
.preview-b { background: linear-gradient(135deg, #4a1a3d, #c6ff3d 160%); }

.site-info h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.site-info p {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.site-link {
  display: inline-flex;
  align-items: center;
  padding: 12px 26px;
  border-radius: 100px;
  border: 1px solid rgba(244, 240, 230, 0.25);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: border-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}
.site-link:hover { border-color: var(--lime); color: var(--lime); transform: translateY(-2px); }

.carousel-nav {
  position: absolute;
  top: 46%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(244, 240, 230, 0.2);
  background: var(--ink);
  color: var(--paper);
  font-size: 1.4rem;
  cursor: pointer;
  transition: border-color 0.3s ease, transform 0.3s ease;
  z-index: 2;
}
.carousel-nav:hover { border-color: var(--lime); transform: translateY(-50%) scale(1.08); }
.carousel-nav.prev { left: -22px; }
.carousel-nav.next { right: -22px; }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}

.carousel-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(244, 240, 230, 0.25);
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
}
.carousel-dots button.active { background: var(--lime); transform: scale(1.3); }

@media (max-width: 800px) {
  .site-slide { grid-template-columns: 1fr; }
  .carousel-nav { display: none; }
}

/* ---------- Pricing ---------- */
.pricing-grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.price-card {
  position: relative;
  background: var(--card);
  border: 1px solid rgba(244, 240, 230, 0.1);
  border-radius: 20px;
  padding: 34px 24px;
  text-align: center;
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
  overflow: hidden;
}

.price-card:hover {
  transform: translateY(-8px);
  border-color: var(--lime);
  box-shadow: 0 24px 48px -20px rgba(198,255,61,0.25);
}

.price-card.featured {
  border-color: rgba(198,255,61,0.4);
  background: linear-gradient(180deg, rgba(198,255,61,0.06), var(--card) 60%);
}

.price-tag {
  position: absolute;
  top: 14px;
  right: -34px;
  transform: rotate(45deg);
  background: var(--grad);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 40px;
}

.price-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(198,255,61,0.1);
  color: var(--lime);
}
.price-icon svg { width: 22px; height: 22px; }

.price-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin-bottom: 12px;
}

.price-amount {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 700;
  background-image: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.price-amount span { font-size: 1.2rem; }

.price-note {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}

.price-cta {
  display: inline-block;
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--paper);
  border-bottom: 1px solid transparent;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.price-cta:hover { color: var(--lime); border-color: var(--lime); }

.price-footnote {
  max-width: var(--container);
  margin: 32px auto 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--muted);
}
.price-footnote a { color: var(--lime); }

@media (max-width: 900px) {
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .pricing-grid { grid-template-columns: 1fr; }
}

/* ---------- Floating action buttons ---------- */
.fab-stack {
  position: fixed;
  right: 24px;
  bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 150;
}

.fab {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  position: relative;
  box-shadow: 0 10px 30px -8px rgba(0,0,0,0.5);
  transition: transform 0.3s ease;
  animation: fab-pulse 2.6s ease-in-out infinite;
}

.fab:hover { transform: scale(1.08); }

.fab-insta {
  background: linear-gradient(135deg, #ff4d6d, #ffb14d, #a855f7);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
}
.fab-insta .fab-glyph { line-height: 1; }

.fab-contact {
  background: var(--lime);
  animation-delay: 0.4s;
}
.fab-contact svg { width: 22px; height: 22px; }

@keyframes fab-pulse {
  0%, 100% { box-shadow: 0 10px 30px -8px rgba(198,255,61,0.3); }
  50% { box-shadow: 0 10px 34px -6px rgba(198,255,61,0.55); }
}

.fab-label {
  position: absolute;
  right: 66px;
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  background: var(--card);
  border: 1px solid rgba(244,240,230,0.15);
  color: var(--paper);
  padding: 6px 14px;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.fab:hover .fab-label {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

@media (max-width: 640px) {
  .fab-stack { right: 16px; bottom: 20px; }
  .fab { width: 48px; height: 48px; }
  .fab-label { display: none; }
}

/* ---------- Footer ---------- */
footer {
  padding: 32px var(--edge) 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid rgba(244, 240, 230, 0.1);
}

.to-top:hover { color: var(--lime); }

/* ---------- Scroll reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2,.8,.2,1);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  nav {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(70vw, 320px);
    flex-direction: column;
    justify-content: center;
    gap: 32px;
    padding: 40px;
    background: var(--ink-soft);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(.2,.8,.2,1);
    z-index: 99;
  }
  nav.open { transform: translateX(0); }
  .nav-toggle { display: flex; z-index: 101; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .portfolio { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; align-items: flex-start; }
  footer { flex-direction: column; gap: 12px; text-align: center; }
}
