/* ===================================================
   VARIABLES & RESET
   =================================================== */
:root {
  --bg:        #080810;
  --bg-card:   #0f0f1a;
  --bg-card2:  #13131f;
  --cyan:      #00D4FF;
  --purple:    #8B5CF6;
  --text:      #f0f0ff;
  --text-muted:#64748b;
  --border:    rgba(255,255,255,0.07);
  --font-d:    'Syne', sans-serif;
  --font-b:    'Inter', sans-serif;
  --font-m:    'Space Mono', monospace;
  --ease:      cubic-bezier(0.19,1,0.22,1);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  height: 100%;
  overscroll-behavior-y: none; /* отключает iOS rubber-band bounce */
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-b);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
  min-height: 100%;
  overscroll-behavior-y: none;
}

a { color: inherit; text-decoration: none; cursor: none; }
img { display: block; max-width: 100%; }

/* ===================================================
   CURSOR
   =================================================== */
#cursor-dot {
  position: fixed;
  width: 6px; height: 6px;
  background: var(--cyan);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.15s, opacity 0.3s;
}

#cursor-ring {
  position: fixed;
  width: 36px; height: 36px;
  border: 1.5px solid rgba(0,212,255,0.6);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.25s var(--ease), height 0.25s var(--ease), border-color 0.25s;
}

/* ===================================================
   PRELOADER
   =================================================== */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

#preloader-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#preloader-ui {
  position: relative;
  z-index: 1;
  text-align: center;
  pointer-events: none;
}

#preloader-count {
  font-family: var(--font-m);
  font-size: clamp(4rem, 12vw, 9rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.04em;
  line-height: 1;
}

#preloader-label {
  font-family: var(--font-m);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--text-muted);
  margin-top: 0.8rem;
}

/* ===================================================
   COLUMN WIPE
   =================================================== */
#col-wipe {
  position: fixed;
  inset: 0;
  z-index: 8000;
  display: flex;
  pointer-events: none;
}

#col-wipe .col {
  flex: 1;
  background: var(--bg-card);
  transform: scaleY(0);
  transform-origin: bottom center;
}

/* ===================================================
   NAVIGATION
   =================================================== */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.5rem clamp(1.5rem, 5vw, 4rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  opacity: 0;
}

#nav::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(8,8,16,0.85) 0%, transparent 100%);
  z-index: -1;
  pointer-events: none;
}

.nav-logo {
  font-family: var(--font-m);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--cyan);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-family: var(--font-b);
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color 0.3s;
}

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

.nav-cta {
  background: rgba(0,212,255,0.1);
  border: 1px solid rgba(0,212,255,0.3);
  padding: 0.5rem 1.2rem;
  border-radius: 2rem;
  color: var(--cyan) !important;
  font-size: 0.85rem;
  transition: background 0.3s, border-color 0.3s !important;
}

.nav-cta:hover {
  background: rgba(0,212,255,0.2) !important;
  border-color: var(--cyan) !important;
}

/* ===================================================
   BUTTONS
   =================================================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--cyan);
  color: var(--bg);
  font-family: var(--font-b);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.85rem 2rem;
  border-radius: 3rem;
  border: none;
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
  cursor: none;
  white-space: nowrap;
}

.btn-primary:hover {
  transform: scale(1.04);
  box-shadow: 0 0 30px rgba(0,212,255,0.4);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-b);
  font-size: 0.9rem;
  padding: 0.85rem 2rem;
  border-radius: 3rem;
  border: 1px solid var(--border);
  transition: color 0.3s, border-color 0.3s;
  cursor: none;
}

.btn-outline:hover {
  color: var(--text);
  border-color: rgba(255,255,255,0.25);
}

/* ===================================================
   LAYOUT
   =================================================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
}

.section-tag {
  font-family: var(--font-m);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  color: var(--cyan);
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s, transform 0.6s;
}

.section-tag.visible { opacity: 1; transform: translateY(0); }

.section-title {
  font-family: var(--font-d);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 3rem;
}

.reveal-title {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal-title.visible { opacity: 1; transform: translateY(0); }

.reveal-text {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease) 0.1s, transform 0.7s var(--ease) 0.1s;
}
.reveal-text.visible { opacity: 1; transform: translateY(0); }

/* ===================================================
   HERO
   hero-canvas is position:fixed — acts as global bg
   =================================================== */
#hero {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100svh; /* iOS Safari: stable viewport, не дёргается при скрытии адресной строки */
  display: flex;
  align-items: center;
  overflow: hidden;
}

#hero-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  filter: drop-shadow(0 0 6px rgba(0,212,255,0.35));
  /* opacity controlled by JS via scroll */
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  max-width: 900px;
  margin-top: -8vh;
}

.hero-label {
  font-family: var(--font-m);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: var(--cyan);
  margin-bottom: 1.5rem;
  opacity: 0;
}

.hero-title {
  font-family: var(--font-d);
  font-size: clamp(3.5rem, 9vw, 8rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
}

.hero-name-line {
  display: block;
  overflow: hidden;
  opacity: 0;
  transform: translateY(100%);
}

.hero-tagline {
  font-family: 'Inter', sans-serif;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 300;
  color: rgba(255,255,255,0.6);
  margin-bottom: 1.8rem;
  letter-spacing: 0.01em;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-m);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 2.5rem;
  opacity: 0;
  flex-wrap: wrap;
}

.hero-stats .sep { color: var(--cyan); }

.hero-content .btn-primary { opacity: 0; }

.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  right: clamp(1.5rem, 5vw, 4rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 2;
  opacity: 0;
}

.scroll-hint-text {
  font-family: var(--font-m);
  font-size: 0.55rem;
  letter-spacing: 0.25em;
  color: var(--text-muted);
  writing-mode: vertical-rl;
}

.scroll-line {
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, var(--cyan), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
  transform-origin: top;
}

@keyframes scrollPulse {
  0%   { transform: scaleY(0); opacity: 0; }
  50%  { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(0) translateY(50px); opacity: 0; }
}

/* ===================================================
   SECTIONS — unified background, no sharp borders
   =================================================== */
section {
  position: relative;
  background: transparent; /* show hero canvas through */
}

/* Semi-transparent overlay — gradient so no hard edge at section boundaries */
section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(8,8,16,0.82) 120px,
    rgba(8,8,16,0.82) calc(100% - 80px),
    transparent 100%
  );
  z-index: 1;
  pointer-events: none;
}

#hero::before { display: none; } /* Hero has no overlay */
#contact::before { display: none; } /* Contact has its own canvas */

/* All content inside sections needs z-index > 1 */
section .container,
section .ticker-wrap,
section .about-grid { position: relative; z-index: 2; }

/* ===================================================
   WHY / PAIN POINTS
   =================================================== */
#why {
  padding: clamp(5rem, 10vw, 9rem) 0;
}

.pain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.pain-card {
  background: rgba(15,15,26,0.85);
  border: 1px solid var(--border);
  border-radius: 1.2rem;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  cursor: none;
  transform-style: preserve-3d;
  transition: border-color 0.4s, box-shadow 0.4s;
  opacity: 0;
  transform: translateY(40px);
}

.pain-card.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease),
              border-color 0.4s, box-shadow 0.4s;
}

.pain-card:hover {
  border-color: rgba(0,212,255,0.25);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 30px rgba(0,212,255,0.05);
}

.pain-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx,50%) var(--my,50%), rgba(0,212,255,0.07) 0%, transparent 60%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s;
}

.pain-card:hover::after { opacity: 1; }

.pain-time {
  font-family: 'Inter', sans-serif;
  font-size: 3rem;
  font-weight: 800;
  color: var(--cyan);
  opacity: 0.32;
  line-height: 1;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.pain-card h3 {
  font-family: var(--font-d);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.8rem;
}

.pain-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.pain-cta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--cyan);
  margin-bottom: 1.5rem;
  transition: gap 0.3s;
}

.pain-card:hover .pain-cta { gap: 0.8rem; }

.pain-metric {
  font-family: var(--font-m);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

/* ===================================================
   ABOUT
   =================================================== */
#about {
  padding: clamp(5rem, 10vw, 9rem) 0 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(3rem, 6vw, 6rem);
  align-items: center;
  margin-bottom: 5rem;
}

.about-photo-wrap { position: relative; }

.about-photo-inner {
  position: relative;
  border-radius: 1.2rem;
  overflow: hidden;
  aspect-ratio: 3/4;
}

.about-photo-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(20%);
  transition: filter 0.5s;
}

.about-photo-inner:hover img { filter: grayscale(0%); }

.photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,212,255,0.06) 0%, transparent 60%);
  pointer-events: none;
}

.about-text .section-tag { margin-bottom: 1rem; }

.about-text h2 {
  font-family: var(--font-d);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

.about-text p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  line-height: 1.7;
}

.tools-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.tool-tag {
  background: rgba(15,15,26,0.9);
  border: 1px solid var(--border);
  border-radius: 2rem;
  padding: 0.35rem 1rem;
  font-family: var(--font-b);
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: border-color 0.3s, color 0.3s;
  opacity: 0;
  transform: translateY(10px);
}

.tool-tag:hover {
  border-color: rgba(0,212,255,0.4);
  color: var(--cyan);
}

/* Ticker */
.ticker-wrap {
  position: relative;
  z-index: 2;
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.2rem 0;
  white-space: nowrap;
  margin-top: 0;
}

.ticker {
  display: inline-block;
  animation: ticker 28s linear infinite;
}

.ticker span {
  font-family: var(--font-m);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.ticker .tsep {
  color: var(--cyan);
  margin: 0 1.5rem;
  letter-spacing: 0;
}

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

/* ===================================================
   RECOGNIZE
   =================================================== */
#recognize {
  padding: clamp(5rem, 10vw, 9rem) 0;
}

.recognize-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 3rem;
  margin-bottom: 3.5rem;
}

.recognize-item {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  background: rgba(255,255,255,0.02);
  transition: border-color 0.3s, background 0.3s;
}

.recognize-item {
  opacity: 0;
  transform: translateY(30px);
}
.recognize-item.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease),
              border-color 0.4s, box-shadow 0.4s;
}
.recognize-item:hover {
  border-color: rgba(0,212,255,0.25);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 30px rgba(0,212,255,0.05);
  background: rgba(0,212,255,0.04);
}
.recognize-item::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at var(--mx,50%) var(--my,50%), rgba(0,212,255,0.07) 0%, transparent 60%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s;
}
.recognize-item:hover::after { opacity: 1; }

.recognize-check {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0,212,255,0.12);
  border: 1px solid rgba(0,212,255,0.4);
  color: var(--cyan);
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.recognize-item p {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
  color: rgba(255,255,255,0.75);
  line-height: 1.5;
  margin: 0;
}

.recognize-cta {
  text-align: center;
  padding: 2.5rem;
  border: 1px solid rgba(0,212,255,0.2);
  border-radius: 12px;
  background: rgba(0,212,255,0.03);
  max-width: 560px;
  margin: 0 auto;
}

.recognize-offer {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: rgba(255,255,255,0.6);
  margin: 0 0 1.5rem;
  line-height: 1.5;
}

/* ===================================================
   CASES
   =================================================== */
#cases { padding: clamp(5rem, 10vw, 9rem) 0; }

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

.case-item {
  display: grid;
  grid-template-columns: 4rem 1fr auto 2rem;
  gap: 2rem;
  align-items: center;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  cursor: none;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.case-item.visible { opacity: 1; transform: translateX(0); }

.case-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,212,255,0.04) 0%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.5s var(--ease);
  pointer-events: none;
}

.case-item:hover::after { transform: translateX(0); }

.case-num {
  font-family: var(--font-m);
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.case-body h3 {
  font-family: var(--font-d);
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-weight: 700;
  margin-bottom: 0.3rem;
  transition: color 0.3s;
}

.case-item:hover .case-body h3 { color: var(--cyan); }

.case-body p { font-size: 0.82rem; color: var(--text-muted); }

.case-metric {
  font-family: var(--font-d);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--cyan);
  white-space: nowrap;
}

.case-arrow {
  color: var(--text-muted);
  transition: color 0.3s, transform 0.4s var(--ease);
  display: flex;
  align-items: center;
}

.case-item:hover .case-arrow {
  color: var(--cyan);
  transform: translateX(4px);
}

/* ===================================================
   SERVICES
   =================================================== */
#services { padding: clamp(5rem, 10vw, 9rem) 0; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.5rem;
}
.service-card { grid-column: span 2; }

@media (max-width: 900px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .service-card,
  .service-card:nth-child(4),
  .service-card:nth-child(5) { grid-column: span 1; }
}
@media (max-width: 560px) {
  .services-grid { grid-template-columns: 1fr; }
}

.service-card {
  position: relative;
  overflow: hidden;
  background: rgba(15,15,26,0.85);
  border: 1px solid var(--border);
  border-radius: 1.2rem;
  padding: 2rem;
  transition: border-color 0.4s, box-shadow 0.4s;
  transform-style: preserve-3d;
  cursor: none;
  opacity: 0;
  transform: translateY(30px);
}

.service-card.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease),
              border-color 0.4s, box-shadow 0.4s;
}

.service-card:hover {
  border-color: rgba(0,212,255,0.25);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 30px rgba(0,212,255,0.05);
}

.service-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at var(--mx,50%) var(--my,50%), rgba(0,212,255,0.07) 0%, transparent 60%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s;
}

.service-card:hover::after { opacity: 1; }

.service-icon { margin-bottom: 1.5rem; opacity: 0.9; }

.service-card h3 {
  font-family: var(--font-d);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.7rem;
}

.service-card p {
  font-size: 0.87rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===================================================
   CONTACT
   =================================================== */
#contact {
  position: relative;
  padding: clamp(6rem, 12vw, 10rem) 0;
  overflow: hidden;
  text-align: center;
}

#contact-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#contact .container { position: relative; z-index: 2; }

.contact-inner { position: relative; z-index: 2; }

.contact-title {
  font-family: var(--font-d);
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.contact-sub {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 2.5rem;
}

.contact-btns {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ===================================================
   FOOTER
   =================================================== */
#site-footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  background: rgba(8,8,16,0.95);
}

#site-footer p {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-m);
  letter-spacing: 0.05em;
}

#site-footer a {
  color: var(--cyan);
  transition: opacity 0.3s;
}

#site-footer a:hover { opacity: 0.7; }

/* ===================================================
   CASE MODALS
   =================================================== */
#modals-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: rgba(8,8,16,0.96);
  backdrop-filter: blur(12px);
  display: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

#modals-overlay.open { display: block; }

#modal-close {
  position: sticky;
  top: 1.5rem;
  float: right;
  margin: 1.5rem 1.5rem 0 0;
  z-index: 5100;
  background: rgba(15,15,26,0.9);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 48px; height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: none;
  transition: color 0.3s, border-color 0.3s, transform 0.3s;
  flex-shrink: 0;
}

#modal-close:hover {
  color: var(--text);
  border-color: rgba(255,255,255,0.2);
  transform: rotate(90deg);
}

.modal {
  display: none;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 5vw, 3rem) 4rem;
  clear: both;
}

.modal.active { display: block; }

.modal-scroll { padding-top: 1rem; }

.modal-header {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 2.5rem;
}

.modal-num {
  font-family: var(--font-m);
  font-size: 0.8rem;
  color: var(--cyan);
  letter-spacing: 0.1em;
  padding-top: 0.4rem;
  white-space: nowrap;
}

.modal-header h2 {
  font-family: var(--font-d);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  line-height: 1.15;
}

.modal-client {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

.modal-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1px;
  background: var(--border);
  border-radius: 1rem;
  overflow: hidden;
  margin-bottom: 2.5rem;
}

.modal-metric {
  background: rgba(15,15,26,0.95);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.modal-metric span {
  font-family: var(--font-d);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--cyan);
  line-height: 1;
}

.modal-metric small {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.modal-body { margin-bottom: 2.5rem; }

.modal-block { margin-bottom: 1.8rem; }

.modal-block h4 {
  font-family: var(--font-m);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--cyan);
  margin-bottom: 0.6rem;
}

.modal-block p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.modal-tags span {
  background: rgba(19,19,31,0.9);
  border: 1px solid var(--border);
  border-radius: 2rem;
  padding: 0.3rem 0.9rem;
  font-family: var(--font-m);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.modal-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.modal-gallery img {
  width: 100%;
  border-radius: 0.8rem;
  border: 1px solid var(--border);
  transition: transform 0.4s var(--ease), border-color 0.3s;
  cursor: zoom-in;
}

.modal-gallery img:hover {
  transform: scale(1.03);
  border-color: rgba(0,212,255,0.3);
}

.modal-price {
  background: rgba(15,15,26,0.9);
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  padding: 1rem 1.5rem;
  font-family: var(--font-m);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* ===================================================
   LIGHTBOX
   =================================================== */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: rgba(0,0,0,0.96);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

#lightbox.open { display: flex; }

#lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 0.5rem;
  object-fit: contain;
}

#lightbox-close {
  position: fixed;
  top: 1.5rem; right: 1.5rem;
  background: rgba(15,15,26,0.9);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 48px; height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: none;
  transition: color 0.3s, transform 0.3s;
}

#lightbox-close:hover {
  color: var(--text);
  transform: rotate(90deg);
}

/* ===================================================
   RESPONSIVE
   =================================================== */
@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-photo-wrap { max-width: 300px; margin: 0 auto; }
  .about-photo-inner { aspect-ratio: 1/1; }

  .case-item {
    grid-template-columns: 2.5rem 1fr;
    grid-template-rows: auto auto;
    gap: 0.5rem 1rem;
  }
  .case-metric { grid-column: 2; font-size: 1rem; }
  .case-arrow { display: none; }

  .nav-links a:not(.nav-cta) { display: none; }

  .hero-title { font-size: clamp(3rem, 14vw, 5rem); }

  .btn-primary { font-size: 0.82rem; padding: 0.75rem 1.4rem; }

  #cursor-dot, #cursor-ring { display: none; }
  body { cursor: auto; }
  a, button { cursor: pointer; }
}

@media (max-width: 480px) {
  .contact-btns { flex-direction: column; align-items: stretch; }
  .btn-primary, .btn-outline { justify-content: center; }
  .pain-grid { grid-template-columns: 1fr; }
}
