/* ============================================================
   Tercia — IT-агентство полного цикла
   Landing page styles
   ============================================================ */

:root {
  /* surfaces */
  --bg:        #0A0A0F;
  --panel:     #14141B;
  --panel-2:   #16161D;
  --panel-3:   #0C0C12;
  --chrome:    #16161D;

  /* lines */
  --line:      rgba(255, 255, 255, 0.08);
  --line-2:    rgba(255, 255, 255, 0.06);
  --line-3:    #24242E;

  /* text */
  --fg:        #F4F4F6;
  --muted:     #B4B4BE;
  --muted-2:   #8E8E98;
  --muted-3:   #7E7E8A;
  --muted-4:   #6C6C7A;

  /* brand */
  --acid:      #D3FB52;
  --acid-ink:  #0A0A0F;
  --acid-ink2: #2C2C08;
  --violet:    #7C3AED;

  --sans: 'Manrope', system-ui, -apple-system, sans-serif;
  --disp: 'Space Grotesk', system-ui, sans-serif;

  --maxw: 1440px;
  --pad: clamp(22px, 5vw, 56px);
  --radius: 26px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

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

.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }

.sparkle { display: block; }

/* generic acid pill button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--disp);
  font-weight: 700;
  border-radius: 100px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-acid {
  background: var(--acid);
  color: var(--acid-ink);
  box-shadow: 0 8px 30px rgba(211, 251, 82, 0.18);
}
.btn-acid:hover { box-shadow: 0 12px 40px rgba(211, 251, 82, 0.30); }
.btn-ghost {
  background: transparent;
  color: var(--fg);
  border-color: rgba(255, 255, 255, 0.22);
  font-weight: 600;
}
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.04); }

/* section heading kicker */
.kicker {
  font-family: var(--disp);
  font-size: clamp(11px, 1vw, 14px);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--acid);
  margin-bottom: 14px;
}
.h2 {
  font-family: var(--disp);
  font-size: clamp(2rem, 5.2vw, 4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.02;
  margin: 0;
}

/* ============================================================
   Header / nav
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(10, 10, 15, 0.72);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line-2);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 18px;
}
.brand { display: flex; align-items: center; gap: 16px; }
.brand-logo { display: flex; align-items: center; gap: 12px; }
.brand-logo .sparkle { width: 34px; height: 34px; }
.brand-name {
  font-family: var(--disp);
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 600;
}
.brand-sep { width: 1px; height: 24px; background: rgba(255, 255, 255, 0.16); }
.brand-tag {
  font-family: var(--disp);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
  line-height: 1.3;
}

.nav-links {
  display: flex;
  gap: clamp(20px, 2.4vw, 38px);
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
}
.nav-links a { transition: color .15s ease; }
.nav-links a:hover { color: var(--fg); }

.nav-cta { padding: 13px 26px; font-size: 15px; font-weight: 600; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
  border: 0;
  cursor: pointer;
}
.nav-toggle span {
  width: 24px; height: 2px; background: var(--fg);
  transition: transform .25s ease, opacity .25s ease;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(56px, 9vw, 130px) clamp(56px, 8vw, 110px);
}
.blob { position: absolute; border-radius: 50%; pointer-events: none; }
.blob-violet {
  top: -180px; right: -120px; width: min(780px, 90vw); aspect-ratio: 1;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.55), transparent 62%);
  filter: blur(90px);
}
.blob-acid {
  top: 180px; left: -140px; width: min(560px, 70vw); aspect-ratio: 1;
  background: radial-gradient(circle, rgba(211, 251, 82, 0.12), transparent 62%);
  filter: blur(80px);
}
.hero-inner { position: relative; max-width: 1120px; }
.hero h1 {
  font-family: var(--disp);
  font-size: clamp(2.5rem, 8.5vw, 8.25rem);
  line-height: 0.9;
  font-weight: 600;
  letter-spacing: -0.04em;
  margin: 0;
  overflow-wrap: break-word;
}
.hero h1 .accent { color: var(--acid); }
.hero-sub {
  font-size: clamp(17px, 2vw, 27px);
  line-height: 1.5;
  color: var(--muted);
  margin: clamp(22px, 3vw, 40px) 0 0;
  max-width: 680px;
}
.hero-actions {
  display: flex; flex-wrap: wrap; gap: 14px;
  margin-top: clamp(30px, 4vw, 52px);
}
.hero-actions .btn { padding: clamp(16px, 2vw, 22px) clamp(30px, 3vw, 44px); font-size: clamp(16px, 1.5vw, 19px); }

.hero-stats {
  display: flex; flex-wrap: wrap;
  gap: clamp(24px, 4vw, 44px);
  margin-top: clamp(40px, 5vw, 64px);
}
.hero-stats .divider { width: 1px; background: rgba(255, 255, 255, 0.1); align-self: stretch; }
.stat-num { font-family: var(--disp); font-size: clamp(34px, 3.4vw, 44px); font-weight: 600; }
.stat-label { color: var(--muted-3); font-size: 16px; margin-top: 4px; }

.hero-spark {
  position: absolute;
  fill: var(--acid);
  filter: drop-shadow(0 0 44px rgba(211, 251, 82, 0.4));
  pointer-events: none;
}
.hero-spark.s1 { top: 160px; right: 150px; width: 170px; height: 170px; animation: lfloat 8s ease-in-out infinite; }
.hero-spark.s2 { bottom: 150px; right: 360px; width: 70px; height: 70px; fill: var(--violet); filter: none; animation: lfloat2 7s ease-in-out infinite; }

/* ============================================================
   Marquee
   ============================================================ */
.marquee {
  height: clamp(64px, 8vw, 100px);
  background: var(--acid);
  overflow: hidden;
  display: flex;
  align-items: center;
}
.marquee-track { display: flex; white-space: nowrap; animation: ldrift 30s linear infinite; }
.marquee-track span {
  font-family: var(--disp);
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 600;
  color: var(--acid-ink);
}

/* ============================================================
   Section shell
   ============================================================ */
.section { padding-block: clamp(56px, 10vw, 112px); }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  margin-bottom: clamp(32px, 5vw, 52px);
  flex-wrap: wrap;
}
.section-head.center { flex-direction: column; align-items: center; text-align: center; }
.section-head .lead {
  color: var(--muted-2);
  font-size: 17px;
  max-width: 340px;
  margin: 0;
  text-align: right;
}
.section-link { font-family: var(--disp); color: var(--muted); font-size: 16px; font-weight: 500; transition: color .15s; }
.section-link:hover { color: var(--acid); }

/* ============================================================
   Services — bento grid
   ============================================================ */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 230px;
  gap: 20px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: transform .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(255, 255, 255, 0.16); }
.card .sparkle { width: 42px; height: 42px; fill: var(--acid); position: relative; }
.card-title { font-family: var(--disp); font-size: 28px; font-weight: 600; margin-bottom: 8px; overflow-wrap: break-word; }
.card p { margin: 0; color: var(--muted-2); font-size: 16px; line-height: 1.55; }

.card-feature {
  grid-column: span 3;
  grid-row: span 2;
  background: linear-gradient(150deg, #14141B, #0C0C12);
  padding: 48px;
}
.card-feature .card-glow {
  position: absolute; top: -80px; right: -60px; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.4), transparent 62%); filter: blur(50px);
}
.card-feature .sparkle { width: 60px; height: 60px; }
.card-feature .card-title { font-size: clamp(30px, 3.4vw, 44px); margin-bottom: 14px; letter-spacing: -0.01em; }
.card-feature p { color: #9A9AA6; font-size: 18px; line-height: 1.6; max-width: 420px; }

.card-half { grid-column: span 3; }
.card-third { grid-column: span 2; padding: 36px; }
.card-third .sparkle { width: 40px; height: 40px; }
.card-third .card-title { font-size: 25px; }
.card-third p { font-size: 15px; }

.card-acid { background: var(--acid); color: var(--acid-ink); border-color: transparent; }
.card-acid .sparkle { fill: var(--acid-ink); }
.card-acid p { color: var(--acid-ink2); }

/* ============================================================
   Stats band
   ============================================================ */
.band {
  background: var(--acid);
  color: var(--acid-ink);
  padding-block: clamp(44px, 7vw, 80px);
}
.band-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.band-num {
  font-family: var(--disp);
  font-size: clamp(48px, 6vw, 84px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 0.9;
}
.band-label { font-size: clamp(14px, 1.4vw, 19px); margin-top: 12px; color: var(--acid-ink2); }

/* ============================================================
   Process
   ============================================================ */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step {
  padding: 40px;
  border-radius: 22px;
  border: 1px solid var(--line);
  transition: transform .2s ease, background .2s ease;
}
.step:hover { transform: translateY(-4px); background: var(--panel); }
.step.filled { background: var(--panel); }
.step-num { font-family: var(--disp); font-size: 56px; font-weight: 700; color: var(--acid); margin-bottom: 22px; line-height: 1; }
.step-title { font-family: var(--disp); font-size: 25px; font-weight: 600; margin-bottom: 10px; }
.step p { margin: 0; color: var(--muted-2); font-size: 15px; line-height: 1.6; }

/* ============================================================
   Portfolio
   ============================================================ */
.cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.case {
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  transition: transform .2s ease, border-color .2s ease;
}
.case:hover { transform: translateY(-4px); border-color: rgba(255, 255, 255, 0.16); }
.case-cover {
  height: 280px;
  display: flex; align-items: center; justify-content: center;
}
.case-cover .sparkle { width: 78px; height: 78px; fill: rgba(211, 251, 82, 0.85); }
.case-cover.c1 { background: linear-gradient(135deg, #1a1a24, #0C0C12); }
.case-cover.c2 { background: linear-gradient(135deg, #221a2e, #0C0C12); }
.case-cover.c3 { background: linear-gradient(135deg, #1a2420, #0C0C12); }
.case-body { padding: 28px; background: var(--panel); }
.case-title { font-family: var(--disp); font-size: 21px; font-weight: 600; }
.case-meta { color: var(--muted-2); font-size: 15px; margin-top: 6px; }

/* ============================================================
   Testimonial
   ============================================================ */
.quote {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(40px, 6vw, 72px);
  position: relative;
  overflow: hidden;
}
.quote .card-glow {
  position: absolute; top: -80px; right: -40px; width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.35), transparent 62%); filter: blur(60px);
}
.quote .sparkle { width: 56px; height: 56px; fill: var(--acid); position: relative; margin-bottom: 32px; }
.quote blockquote {
  position: relative;
  font-family: var(--disp);
  font-size: clamp(24px, 3.6vw, 44px);
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0 0 40px;
  max-width: 1000px;
}
.quote-author { position: relative; display: flex; align-items: center; gap: 16px; }
.avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--bg); border: 1px solid rgba(255, 255, 255, 0.12); flex-shrink: 0; }
.quote-author .name { font-weight: 700; font-size: 17px; }
.quote-author .role { color: var(--muted-2); font-size: 15px; }

/* ============================================================
   Final CTA
   ============================================================ */
.cta {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding-block: clamp(64px, 11vw, 140px);
  border-top: 1px solid var(--line-2);
}
.cta-glow {
  position: absolute; inset: 0;
  background: radial-gradient(760px 400px at 50% 120%, rgba(124, 58, 237, 0.42), transparent 62%);
}
.cta-inner { position: relative; }
.cta .sparkle { width: 80px; height: 80px; fill: var(--acid); margin: 0 auto 36px; filter: drop-shadow(0 0 36px rgba(211, 251, 82, 0.4)); }
.cta h2 {
  font-family: var(--disp);
  font-size: clamp(2.2rem, 8vw, 6rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 0.95;
  margin: 0 auto 24px;
  max-width: 900px;
}
.cta-sub { color: var(--muted); font-size: clamp(17px, 2vw, 23px); margin: 0 auto 48px; max-width: 560px; }
.cta .btn { padding: 22px 52px; font-size: 20px; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  padding-block: 60px;
  border-top: 1px solid var(--line-2);
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 48px;
  flex-wrap: wrap;
}
.footer-about { max-width: 340px; }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.footer-brand .sparkle { width: 32px; height: 32px; fill: var(--acid); }
.footer-brand .brand-name { font-size: 24px; }
.footer-about p { margin: 0; color: var(--muted-4); font-size: 15px; line-height: 1.6; }
.footer-cols { display: flex; gap: clamp(32px, 5vw, 64px); flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 14px; color: var(--muted); font-size: 15px; }
.footer-col a { transition: color .15s; }
.footer-col a:hover { color: var(--fg); }
.footer-col .col-head {
  font-family: var(--disp);
  color: var(--muted-4);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.footer-col .tg { color: var(--acid); }
.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line-2);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted-4);
  font-size: 13px;
}

/* ============================================================
   Animations
   ============================================================ */
@keyframes ldrift { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@keyframes lfloat { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-20px) rotate(6deg); } }
@keyframes lfloat2 { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-14px) rotate(-8deg); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track, .hero-spark { animation: none !important; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1180px) {
  .hero-spark.s2 { right: 8%; }
  .hero-spark.s1 { right: 6%; }
}

@media (max-width: 1024px) {
  .bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: auto; }
  .card { min-height: 200px; }
  .card-feature, .card-half, .card-third { grid-column: span 2; grid-row: auto; }
  .cases { grid-template-columns: repeat(2, 1fr); }
  .case:last-child { grid-column: 1 / -1; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .hero-spark.s1 { width: 120px; height: 120px; }
  .hero-spark.s2 { display: none; }
}

/* keep the hero sparkle in the top-right corner (near the headline),
   away from the subtitle, matching the mobile design frame */
@media (max-width: 720px) {
  .hero-spark.s1 { top: 8px; right: 6px; width: 72px; height: 72px; }
}

@media (max-width: 860px) {
  .nav-links, .nav .brand-sep, .nav .brand-tag { display: none; }
  .nav-toggle { display: flex; }
  .nav-cta { display: none; }

  /* mobile drop menu */
  .mobile-menu {
    position: fixed;
    inset: 0 0 auto 0;
    top: 71px;
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    padding: 24px var(--pad) 32px;
    display: none;
    flex-direction: column;
    gap: 4px;
    z-index: 39;
  }
  .mobile-menu.open { display: flex; }
  .mobile-menu a {
    padding: 14px 0;
    font-family: var(--disp);
    font-size: 20px;
    color: var(--muted);
    border-bottom: 1px solid var(--line-2);
  }
  .mobile-menu .btn { margin-top: 18px; padding: 16px; font-size: 16px; }

  body.menu-open { overflow: hidden; }
  .nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.active span:nth-child(2) { opacity: 0; }
  .nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .section-head { flex-direction: column; align-items: flex-start; }
  .section-head .lead { text-align: left; }
  .band-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 20px; }
}

@media (min-width: 861px) {
  .mobile-menu { display: none !important; }
}

@media (max-width: 560px) {
  .bento { grid-template-columns: 1fr; }
  .card-feature, .card-half, .card-third { grid-column: 1 / -1; }
  .cases { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .hero-stats .divider { display: none; }
  .hero-actions .btn { flex: 1 1 100%; }
}
