/* ===== Tokens ===== */
:root{
  --ink: #0A0A14;
  --ink-soft: #131320;
  --ink-soft-2: #1A1A2C;
  --paper: #F3F1FF;
  --muted: #9A96B8;
  --muted-2: #6E6A8C;
  --border: rgba(243,241,255,0.10);
  --border-strong: rgba(243,241,255,0.18);

  --violet: #7C5CFF;
  --magenta: #FF4FD8;
  --cyan: #22E0FF;
  --teal: #2DD4BF;
  --amber: #FFC24B;

  --spectrum: linear-gradient(90deg, var(--violet), var(--magenta), var(--cyan), var(--teal), var(--amber));

  --font-display: "Space Grotesk", "Arial Narrow", sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --radius: 16px;
  --radius-sm: 10px;
  --wrap: 1180px;
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *, *::before, *::after{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body{
  margin:0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,h2,h3{
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 .5em;
}

p{ margin: 0 0 1em; color: var(--muted); }

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

.mono{ font-family: var(--font-mono); }

.wrap{
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.grad-text{
  background: var(--spectrum);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: grad-shift 8s ease-in-out infinite;
}
@keyframes grad-shift{
  0%,100%{ background-position: 0% 50%; }
  50%{ background-position: 100% 50%; }
}

.skip-link{
  position:absolute; left:-999px; top:0;
  background: var(--paper); color: var(--ink);
  padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 200;
}
.skip-link:focus{ left:0; }

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

/* ===== Buttons ===== */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding: 14px 28px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn-primary{
  background: var(--spectrum);
  background-size: 200% auto;
  color: #0A0A14;
}
.btn-primary:hover{
  background-position: 100% 50%;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -8px rgba(124,92,255,0.5);
}
.btn-ghost{
  background: transparent;
  border-color: var(--border-strong);
  color: var(--paper);
}
.btn-ghost:hover{
  border-color: var(--cyan);
  transform: translateY(-2px);
}
.btn-small{ padding: 10px 20px; font-size: 14px; }

/* ===== Header ===== */
.site-header{
  position: sticky; top:0; z-index: 100;
  background: rgba(10,10,20,0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner{
  display:flex; align-items:center; gap: 32px;
  height: 72px;
}
.brand{ display:flex; align-items:center; gap:10px; margin-right: auto; }
.brand-mark{ display:block; }
.brand-word{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.08em;
}
.nav{ display:flex; gap: 28px; }
.nav a{
  font-size: 14px;
  color: var(--muted);
  transition: color .2s ease;
  position: relative;
}
.nav a:hover{ color: var(--paper); }

.header-cta{ display: inline-flex; }

.burger{
  display:none;
  flex-direction:column; justify-content:center; gap:5px;
  width: 40px; height: 40px;
  background:none; border:none; cursor:pointer;
  padding: 0;
}
.burger span{
  display:block; width: 22px; height: 2px; background: var(--paper);
  margin: 0 auto; transition: transform .25s ease, opacity .25s ease;
}
.burger[aria-expanded="true"] span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2){ opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

.mobile-nav{
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px 24px 24px;
  border-top: 1px solid var(--border);
}
.mobile-nav a{
  padding: 12px 4px;
  font-size: 16px;
  color: var(--paper);
  border-bottom: 1px solid var(--border);
}
.mobile-nav .btn{ margin-top: 12px; align-self: flex-start; }
.mobile-nav.open{ display: flex; }

/* ===== Spectrum rule (signature divider) ===== */
.spectrum-rule{
  height: 2px;
  background: var(--spectrum);
  background-size: 200% auto;
  opacity: 0.7;
  animation: grad-shift 10s ease-in-out infinite;
}

/* ===== Hero ===== */
.hero{
  position: relative;
  padding: 96px 0 64px;
  overflow: hidden;
  text-align: center;
}
.hero-glow{
  position: absolute; inset: -20% -10% auto -10%;
  height: 130%;
  background:
    radial-gradient(circle at 20% 20%, rgba(124,92,255,0.35), transparent 45%),
    radial-gradient(circle at 80% 10%, rgba(255,79,216,0.28), transparent 45%),
    radial-gradient(circle at 50% 60%, rgba(34,224,255,0.22), transparent 50%);
  filter: blur(40px);
  animation: drift 16s ease-in-out infinite alternate;
  z-index: 0;
  pointer-events: none;
}
@keyframes drift{
  0%{ transform: translate(0,0) scale(1); }
  100%{ transform: translate(2%,3%) scale(1.05); }
}
.hero-starfield{
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}
.hero-inner{ position: relative; z-index: 1; }

.hero-graphic{
  max-width: 460px;
  margin: 0 auto 8px;
  opacity: 0.9;
}
.hero-graphic-svg{ width: 100%; height: auto; }
.hero-rays line{ animation: ray-pulse 4s ease-in-out infinite; }
.hero-rays line:nth-child(2){ animation-delay: .3s; }
.hero-rays line:nth-child(3){ animation-delay: .6s; }
.hero-rays line:nth-child(4){ animation-delay: .9s; }
.hero-rays line:nth-child(5){ animation-delay: 1.2s; }
@keyframes ray-pulse{
  0%,100%{ opacity: 0.55; }
  50%{ opacity: 1; }
}

.eyebrow{
  color: var(--cyan);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.hero-title{
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  margin-bottom: 20px;
}
.hero-sub{
  max-width: 620px;
  margin: 0 auto 32px;
  font-size: 18px;
}
.hero-actions{
  display:flex; gap: 16px; justify-content: center; flex-wrap: wrap;
  margin-bottom: 56px;
}
.hero-stats{
  display:flex; justify-content:center; gap: 48px; flex-wrap: wrap;
}
.stat{ display:flex; flex-direction: column; align-items:center; }
.stat-num{
  font-family: var(--font-display); font-weight:700; font-size: 32px;
}
.stat-label{
  font-size: 13px; color: var(--muted); max-width: 140px; text-align:center;
}

/* ===== Sections ===== */
.section{ padding: 88px 0; }
.section-title{
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  max-width: 640px;
}
.section-sub{
  max-width: 560px;
  font-size: 17px;
  margin-bottom: 48px;
}

/* ===== Services (bento) ===== */
.bento{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card{
  background: var(--ink-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.service-card{ position: relative; overflow: hidden; }
.service-card::before{
  content:"";
  position:absolute; inset:0 0 auto 0; height: 3px;
  background: var(--accent);
  opacity: 0;
  transition: opacity .25s ease;
}
.service-card:hover{
  transform: translateY(-4px);
  border-color: var(--border-strong);
  background: var(--ink-soft-2);
}
.service-card:hover::before{ opacity: 1; }
.service-icon{
  width: 44px; height: 44px;
  color: var(--accent);
  margin-bottom: 18px;
}
.service-icon svg{ width:100%; height:100%; }
.service-card h3{ font-size: 19px; margin-bottom: 10px; }
.service-card p{ font-size: 14.5px; margin: 0; }

/* ===== Portfolio ===== */
.portfolio-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.pf-card{
  background: var(--ink-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .25s ease, border-color .25s ease;
}
.pf-card:hover{ transform: translateY(-4px); border-color: var(--border-strong); }
.pf-visual{
  aspect-ratio: 16/10;
  background: var(--ink-soft-2);
  position: relative;
}
.pf-photo img{ width:100%; height:100%; object-fit: cover; display:block; }
.pf-body{ padding: 22px; }
.pf-tag{
  display:inline-block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 4px 10px;
  margin-bottom: 12px;
  margin-right: 8px;
}
.pf-personal{
  display:inline-block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--muted-2);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 4px 10px;
  margin-bottom: 12px;
}
.pf-body h3{ font-size: 19px; margin-bottom: 8px; }
.pf-body p{ font-size: 14.5px; margin: 0; }
.pf-demo{
  display: inline-flex;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--cyan);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.pf-demo:hover{ border-color: currentColor; }
.pf-note{
  display: block;
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--muted-2);
}

/* ===== Process timeline ===== */
.timeline{
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}
.timeline-step{
  padding-top: 20px;
  border-top: 2px solid var(--border-strong);
  position: relative;
}
.timeline-step:nth-child(1){ border-top-color: var(--violet); }
.timeline-step:nth-child(2){ border-top-color: var(--magenta); }
.timeline-step:nth-child(3){ border-top-color: var(--cyan); }
.timeline-step:nth-child(4){ border-top-color: var(--teal); }
.timeline-step:nth-child(5){ border-top-color: var(--amber); }
.timeline-num{
  display:block; color: var(--muted-2); font-size: 13px; margin-bottom: 10px;
}
.timeline-step h3{ font-size: 17px; margin-bottom: 8px; }
.timeline-step p{ font-size: 14px; margin:0; }

/* ===== Pricing ===== */
.pricing-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
}
.price-card{
  background: var(--ink-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  display:flex; flex-direction:column;
  position: relative;
}
.price-card-featured{
  border-color: var(--violet);
  background: linear-gradient(180deg, rgba(124,92,255,0.10), var(--ink-soft) 40%);
}
.price-badge{
  position:absolute; top:-13px; left: 32px;
  background: var(--spectrum);
  color: #0A0A14;
  font-family: var(--font-mono); font-size: 11px; font-weight:600;
  padding: 5px 12px; border-radius: 999px;
}
.price-card h3{ font-size: 20px; margin-bottom: 8px; }
.price-desc{ font-size: 14px; min-height: 42px; margin-bottom: 8px; }
.price-list{
  list-style:none; margin:0 0 28px; padding:0;
  display:flex; flex-direction:column; gap:10px;
  font-size: 14px; color: var(--muted);
  flex: 1;
}
.price-list li{ padding-left: 20px; position: relative; }
.price-list li::before{
  content:"";
  position:absolute; left:0; top:7px;
  width:8px; height:2px; background: var(--cyan);
}
.price-card .btn{ align-self: flex-start; }

/* ===== Contact ===== */
.contact-wrap{
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 56px;
  align-items: start;
}
.contact-intro .section-title{ max-width: none; }
.contact-links{
  display:flex; flex-direction:column; gap:12px;
  margin-top: 12px;
}
.contact-link{
  display:inline-flex; align-items:center; gap:10px;
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--paper);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 10px 18px;
  width: fit-content;
  transition: border-color .2s ease, color .2s ease;
}
.contact-link svg{ width:18px; height:18px; flex-shrink:0; }
.contact-link:hover{ border-color: var(--cyan); color: var(--cyan); }
.contact-link-telegram{
  color: var(--cyan);
  border-color: var(--cyan);
}
.contact-form{
  background: var(--ink-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  display:flex; flex-direction:column; gap:18px;
}
.form-row{ display:flex; flex-direction:column; gap:8px; }
.form-row label{ font-size: 13px; color: var(--muted); }
.form-row input, .form-row select, .form-row textarea{
  background: var(--ink);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 15px;
  resize: vertical;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus{
  border-color: var(--cyan);
  outline: none;
}
.form-submit{ margin-top: 4px; }
.form-note{ font-size: 13.5px; color: var(--teal); min-height: 1.2em; margin:0; }
.form-note.error{ color: var(--magenta); }

/* ===== Footer ===== */
.site-footer{
  border-top: 1px solid var(--border);
  padding: 40px 0 28px;
}
.footer-inner{
  display:flex; align-items:center; gap: 32px; flex-wrap: wrap;
  padding-bottom: 24px;
}
.footer-nav{ display:flex; gap:22px; flex-wrap: wrap; margin-right:auto; }
.footer-nav a{ font-size: 14px; color: var(--muted); }
.footer-nav a:hover{ color: var(--paper); }
.footer-contacts{ display:flex; gap:20px; flex-wrap:wrap; }
.footer-email{ font-family: var(--font-mono); font-size: 14px; color: var(--muted); }
.footer-email:hover{ color: var(--cyan); }
.footer-copy{ font-size: 13px; color: var(--muted-2); margin:0; }

/* ===== Scroll reveal ===== */
[data-reveal]{
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s ease;
}
[data-reveal].in-view{
  opacity: 1;
  transform: none;
}

/* ===== Responsive ===== */
@media (max-width: 980px){
  .bento{ grid-template-columns: repeat(2, 1fr); }
  .portfolio-grid{ grid-template-columns: repeat(2, 1fr); }
  .pricing-grid{ grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
  .timeline{ grid-template-columns: repeat(2, 1fr); }
  .contact-wrap{ grid-template-columns: 1fr; }
}

@media (max-width: 720px){
  .nav, .header-cta{ display:none; }
  .burger{ display:flex; }
  .bento{ grid-template-columns: 1fr; }
  .portfolio-grid{ grid-template-columns: 1fr; }
  .timeline{ grid-template-columns: 1fr; }
  .hero{ padding: 72px 0 48px; }
  .hero-stats{ gap: 28px; }
  .section{ padding: 64px 0; }
}
