/* =============================================================
   ProLink — main site theme
   Dark, minimal, monospace-accented. Dithered wave background.
   ============================================================= */

:root {
  --bg:        #08080b;
  --bg-soft:   #0d0d13;
  --ink:       #f5f3ef;
  --muted:     rgba(245, 243, 239, 0.56);
  --faint:     rgba(245, 243, 239, 0.34);
  --line:      rgba(255, 255, 255, 0.10);
  --line-soft: rgba(255, 255, 255, 0.06);
  --card:      rgba(16, 16, 22, 0.55);
  --card-hi:   rgba(22, 22, 30, 0.78);
  --accent:    #b98cff;
  --accent-2:  #ec4899;
  --mono:      'IBM Plex Mono', ui-monospace, 'Courier New', monospace;
  --sans:      'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --maxw:      1180px;
  --gutter:    clamp(20px, 5vw, 64px);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: #0a0a0f; }

/* ── Preloader ─────────────────────────────────────────────── */
.preloader {
  position: fixed; inset: 0;
  z-index: 100000;
  background: #07070a;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 22px;
  transition: opacity .6s ease, visibility .6s ease;
}
.preloader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.pl-logo {
  position: relative;
  width: min(78vw, 420px);
  height: clamp(64px, 16vw, 120px);
  pointer-events: none;
}
.pl-bar {
  width: min(72vw, 300px); height: 2px;
  background: rgba(255,255,255,.12); border-radius: 2px; overflow: hidden;
}
.pl-bar span { display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .18s ease; }
.pl-meta {
  display: flex; justify-content: space-between; width: min(72vw, 300px);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted);
}
.pl-pct { color: var(--ink); }

/* ── Custom cursor (desktop / fine pointer only) ───────────── */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 99998;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  will-change: transform;
  opacity: 0;
  transition: opacity .3s ease;
}
.cursor-dot { width: 6px; height: 6px; background: var(--accent); }
.cursor-ring {
  width: 34px; height: 34px;
  border: 1px solid rgba(185,140,255,.6);
  transition: width .2s ease, height .2s ease, border-color .2s ease, background .2s ease, opacity .3s ease;
}
.cursor-ready .cursor-dot, .cursor-ready .cursor-ring { opacity: 1; }
.cursor-ring.hover { width: 56px; height: 56px; background: rgba(185,140,255,.10); border-color: var(--accent); }
@media (hover: hover) and (pointer: fine) {
  .cursor-active, .cursor-active a, .cursor-active button, .cursor-active .pc-card { cursor: none; }
}

/* ── Floating WhatsApp button ──────────────────────────────── */
.wa-float {
  position: fixed; right: 22px; bottom: 22px;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25d366;
  display: flex; align-items: center; justify-content: center;
  z-index: 9500;
  box-shadow: 0 8px 26px rgba(37,211,102,.45);
  transition: transform .2s ease, box-shadow .2s ease;
}
.wa-float img { width: 30px; height: 30px; }
.wa-float:hover { transform: scale(1.08); box-shadow: 0 12px 34px rgba(37,211,102,.6); }
.wa-float::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid #25d366; animation: waPulse 2.2s ease-out infinite;
}
@keyframes waPulse { 0%{transform:scale(1);opacity:.7;} 100%{transform:scale(1.7);opacity:0;} }

/* ── Camera mode (hero viewfinder) ─────────────────────────── */
.cam { position: absolute; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; }
.cam-corner { position: absolute; width: 30px; height: 30px; border: 2px solid rgba(255,255,255,.35); }
.cam-corner.tl { top: 84px; left: 22px; border-right: none; border-bottom: none; }
.cam-corner.tr { top: 84px; right: 22px; border-left: none; border-bottom: none; }
.cam-corner.bl { bottom: 22px; left: 22px; border-right: none; border-top: none; }
.cam-corner.br { bottom: 22px; right: 22px; border-left: none; border-top: none; }
.cam-rec {
  position: absolute; top: 92px; right: 60px;
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em; color: rgba(255,255,255,.7);
}
.cam-rec .rec-dot { width: 9px; height: 9px; border-radius: 50%; background: #ff3b47; box-shadow: 0 0 10px #ff3b47; animation: recBlink 1.1s steps(1) infinite; }
@keyframes recBlink { 50% { opacity: 0.15; } }
.cam-scan {
  position: absolute; left: 0; right: 0; height: 140px;
  background: linear-gradient(180deg, rgba(185,140,255,0) 0%, rgba(185,140,255,.06) 50%, rgba(185,140,255,0) 100%);
  border-top: 1px solid rgba(185,140,255,.25);
  animation: scanMove 6s linear infinite;
}
@keyframes scanMove { 0%{ top:-140px; } 100%{ top:100%; } }
.cam-grid {
  position: absolute; inset: 0; opacity: .10;
  background-image: linear-gradient(rgba(255,255,255,.4) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.4) 1px, transparent 1px);
  background-size: 33.33% 33.33%;
}
@media (prefers-reduced-motion: reduce) { .cam-scan { animation: none; display: none; } }

/* Tilt cards get a smooth reset */
.tilt { transform-style: preserve-3d; will-change: transform; transition: transform .18s ease; }

/* ── Scroll progress bar ───────────────────────────────────── */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  z-index: 10000;
  box-shadow: 0 0 12px rgba(185,140,255,.6);
  transition: width .08s linear;
}

/* ── Background layers ─────────────────────────────────────── */
.bg-dither {
  position: fixed;
  inset: 0;
  z-index: -3;
  background: #070709;
}
.bg-dither canvas { opacity: 0.92; }

/* subtle vignette + top/bottom fade for legibility */
.bg-veil {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(125% 95% at 50% 0%, rgba(8,8,11,0) 52%, rgba(8,8,11,0.55) 100%),
    linear-gradient(180deg, rgba(8,8,11,0.34) 0%, rgba(8,8,11,0.05) 24%, rgba(8,8,11,0.05) 76%, rgba(8,8,11,0.62) 100%);
}
/* fine film grain */
.bg-grain {
  position: fixed;
  inset: -50%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.04;
  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'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Layout helpers ────────────────────────────────────────── */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

.section { position: relative; padding: clamp(72px, 12vh, 140px) 0; }
.section + .section { border-top: 1px solid var(--line-soft); }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: var(--accent);
  opacity: 0.7;
}

.section-title {
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin-top: 18px;
  max-width: 18ch;
}
.section-lead {
  margin-top: 18px;
  color: var(--muted);
  font-size: clamp(15px, 1.6vw, 18px);
  max-width: 56ch;
}
.grad { background: linear-gradient(100deg, #fff 0%, var(--accent) 55%, var(--accent-2) 100%);
        -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  --pad: 15px 30px;
  padding: var(--pad);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: 1px solid transparent;
  display: inline-flex; align-items: center; gap: 9px;
  transition: transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(0) scale(.99); }
.btn-primary {
  background: var(--ink);
  color: #0a0a0f;
  box-shadow: 0 8px 30px rgba(255,255,255,.10);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(255,255,255,.16); }
.btn-ghost {
  background: rgba(255,255,255,.04);
  border-color: var(--line);
  color: var(--ink);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.24); transform: translateY(-2px); }
.btn svg { width: 17px; height: 17px; }

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding-top: 90px;
  padding-bottom: 60px;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 8px 14px; border-radius: 999px;
  width: fit-content;
  background: rgba(10,10,15,.4);
  backdrop-filter: blur(6px);
}
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: #38e08a; box-shadow: 0 0 10px #38e08a; }

.hero-logo {
  position: relative;
  width: min(92vw, 760px);
  height: clamp(90px, 20vw, 210px);
  margin: 26px 0 6px;
  pointer-events: none;
}

.hero h1 {
  font-size: clamp(30px, 6vw, 66px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.025em;
  max-width: 16ch;
}
.hero-sub {
  margin-top: 22px;
  color: var(--muted);
  font-size: clamp(15px, 1.9vw, 19px);
  max-width: 52ch;
  line-height: 1.65;
}
.hero-actions { margin-top: 38px; display: flex; gap: 14px; flex-wrap: wrap; }

.hero-scroll {
  position: absolute;
  bottom: 26px; left: var(--gutter);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--faint);
  display: flex; align-items: center; gap: 10px;
}
.hero-scroll .line { width: 46px; height: 1px; background: var(--faint); position: relative; overflow: hidden; }
.hero-scroll .line::after { content:""; position:absolute; inset:0; width:40%; background: var(--accent); animation: scrollLine 2.2s ease-in-out infinite; }
@keyframes scrollLine { 0%{transform:translateX(-120%);} 100%{transform:translateX(320%);} }

/* ── Marquee ticker ────────────────────────────────────────── */
.marquee {
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  overflow: hidden;
  background: rgba(8,8,11,.5);
  backdrop-filter: blur(4px);
  padding: 16px 0;
}
.marquee-track { display: flex; gap: 44px; width: max-content; animation: marquee 34s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee span {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); display: inline-flex; align-items: center; gap: 44px;
}
.marquee span::after { content: "◆"; color: var(--accent); font-size: 9px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ── Services carousel ─────────────────────────────────────── */
.pc-carousel { position: relative; margin-top: 44px; }
.pc-viewport { position: relative; }
.pc-track {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 6px 2px 2px;
  scroll-padding-left: 2px;
}
.pc-track::-webkit-scrollbar { display: none; }
.pc-track.dragging { cursor: grabbing; scroll-snap-type: none; }

.pc-card {
  scroll-snap-align: start;
  flex: 0 0 auto;
  width: clamp(260px, 33%, 340px);
  min-height: 300px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  transition: border-color .25s ease, transform .25s ease, background .25s ease;
  cursor: grab;
}
.pc-card:hover { border-color: rgba(185,140,255,.4); background: var(--card-hi); transform: translateY(-3px); }
.pc-card-num {
  font-family: var(--mono); font-size: 12px; color: var(--faint); letter-spacing: 0.1em;
  position: absolute; top: 22px; right: 24px;
}
.pc-card-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(185,140,255,.10);
  border: 1px solid rgba(185,140,255,.22);
  margin-bottom: 22px;
}
.pc-card-icon svg { width: 26px; height: 26px; stroke: var(--accent); }
.pc-card-title { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 10px; }
.pc-card-desc { color: var(--muted); font-size: 14.5px; line-height: 1.6; flex: 1; }
.pc-card-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.pc-tag {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em;
  color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px;
}

.pc-controls { display: flex; align-items: center; gap: 16px; margin-top: 26px; }
.pc-arrow {
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(255,255,255,.03);
  color: var(--ink); font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s ease;
}
.pc-arrow:hover { background: var(--ink); color: #0a0a0f; }
.pc-arrow.disabled { opacity: 0.3; pointer-events: none; }
.pc-dots { display: flex; gap: 9px; margin-left: auto; }
.pc-dot { width: 8px; height: 8px; border-radius: 50%; border: none; background: var(--line); cursor: pointer; transition: all .2s ease; }
.pc-dot.active { background: var(--accent); transform: scale(1.3); }

/* ── About / stats ─────────────────────────────────────────── */
.about-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(30px, 6vw, 80px); align-items: center; }
.about-copy p { color: var(--muted); font-size: clamp(15px,1.7vw,18px); line-height: 1.75; margin-top: 18px; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.stat { background: var(--bg-soft); padding: 30px 26px; }
.stat-num { font-size: clamp(30px, 5vw, 46px); font-weight: 700; letter-spacing: -0.02em; }
.stat-num .grad { display: inline; }
.stat-label { margin-top: 8px; color: var(--muted); font-size: 13.5px; }

/* ── Advantages grid ───────────────────────────────────────── */
.adv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 46px; }
.adv {
  border: 1px solid var(--line); border-radius: 18px; padding: 26px;
  background: var(--card); backdrop-filter: blur(8px);
  transition: border-color .25s ease, transform .25s ease;
}
.adv:hover { border-color: rgba(185,140,255,.35); transform: translateY(-3px); }
.adv-ico { width: 40px; height: 40px; margin-bottom: 18px; color: var(--accent); }
.adv-ico svg { width: 40px; height: 40px; stroke: var(--accent); }
.adv h3 { font-size: 17px; font-weight: 700; margin-bottom: 9px; }
.adv p { color: var(--muted); font-size: 14px; line-height: 1.6; }

/* ── Process / steps ───────────────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 46px; }
.step { position: relative; padding: 26px 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); }
.step-num { font-family: var(--mono); font-size: 13px; color: var(--accent); letter-spacing: 0.1em; }
.step h3 { font-size: 16px; font-weight: 700; margin: 14px 0 8px; }
.step p { color: var(--muted); font-size: 13.5px; line-height: 1.55; }

/* ── Projects ──────────────────────────────────────────────── */
.proj-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 46px; }
.proj {
  position: relative; border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  min-height: 260px; padding: 26px; display: flex; flex-direction: column; justify-content: flex-end;
  background:
    radial-gradient(130% 120% at 15% 0%, rgba(185,140,255,.14) 0%, rgba(185,140,255,0) 55%),
    var(--bg-soft);
  transition: transform .25s ease, border-color .25s ease;
}
.proj::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M0 20h40M20 0v40' stroke='rgba(255,255,255,0.05)' stroke-width='1'/%3E%3C/svg%3E");
  opacity: .5;
}
.proj > * { position: relative; z-index: 1; }
.proj:hover { transform: translateY(-4px); border-color: rgba(185,140,255,.35); }
.proj-tag { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.proj h3 { font-size: 19px; font-weight: 700; margin: 12px 0 6px; }
.proj p { color: var(--muted); font-size: 14px; }

/* ── FAQ accordion ─────────────────────────────────────────── */
.faq { margin-top: 40px; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; text-align: left; background: none; border: none; color: var(--ink);
  padding: 24px 48px 24px 0; font-size: clamp(16px, 2vw, 20px); font-weight: 600;
  cursor: pointer; position: relative; display: block; letter-spacing: -0.01em;
}
.faq-q::after {
  content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font-size: 26px; font-weight: 300; color: var(--accent); transition: transform .3s ease;
}
.faq-item.open .faq-q::after { transform: translateY(-50%) rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .38s ease; }
.faq-a p { color: var(--muted); font-size: 15px; line-height: 1.7; padding: 0 48px 26px 0; }

/* ── CTA / contacts ────────────────────────────────────────── */
.cta {
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: clamp(40px, 8vw, 88px) var(--gutter);
  background:
    radial-gradient(90% 130% at 50% 0%, rgba(185,140,255,.16) 0%, rgba(185,140,255,0) 60%),
    var(--card);
  backdrop-filter: blur(10px);
}
.cta h2 { font-size: clamp(28px, 5vw, 52px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; }
.cta p { color: var(--muted); margin: 18px auto 34px; max-width: 48ch; font-size: clamp(15px,1.7vw,18px); }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.cta-meta { margin-top: 34px; display: flex; gap: 28px; justify-content: center; flex-wrap: wrap; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.cta-meta a { border-bottom: 1px solid transparent; transition: border-color .2s; }
.cta-meta a:hover { border-color: var(--accent); }

/* ── Footer ────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); padding: 44px 0 40px; }
.footer-grid { display: flex; justify-content: space-between; align-items: flex-start; gap: 30px; flex-wrap: wrap; }
.footer-brand { font-family: var(--mono); font-size: 15px; letter-spacing: 0.06em; }
.footer-legal { color: var(--faint); font-size: 12.5px; line-height: 1.7; max-width: 46ch; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); }
.footer-links a:hover { color: var(--ink); }

/* ── Scroll reveal ─────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s cubic-bezier(.16,.8,.3,1), transform .7s cubic-bezier(.16,.8,.3,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .adv-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .proj-grid { grid-template-columns: 1fr; }
  .pc-card { width: 82vw; }
}
@media (max-width: 560px) {
  .adv-grid, .steps { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .hero-scroll { display: none; }
  .footer-grid { flex-direction: column; }
}

/* ── New effects: mobile adaptation ────────────────────────── */
@media (max-width: 700px) {
  .cam-corner { width: 20px; height: 20px; }
  .cam-corner.tl, .cam-corner.tr { top: 72px; }
  .cam-corner.tl, .cam-corner.bl { left: 14px; }
  .cam-corner.tr, .cam-corner.br { right: 14px; }
  .cam-corner.bl, .cam-corner.br { bottom: 14px; }
  .cam-rec { top: 78px; right: 44px; font-size: 10px; }
  .cam-grid { display: none; }
  .wa-float { right: 16px; bottom: 16px; width: 52px; height: 52px; }
  .wa-float img { width: 27px; height: 27px; }
}
/* Touch devices: no custom cursor, no hover-tilt jitter */
@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none !important; }
}
