/* ===== CSS Variables ===== */
:root {
  --bg-primary:   #0a0a0f;
  --bg-surface:   #16181d;
  --bg-elevated:  #1e2028;
  --accent:       #f59e0b;
  --accent-glow:  rgba(245, 158, 11, 0.15);
  --accent-sec:   #06b6d4;
  --text-main:    #f1f5f9;
  --text-muted:   #94a3b8;
  --border:       rgba(255, 255, 255, 0.06);
}

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

/* ===== Base ===== */
html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-primary);
  color: var(--text-main);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-sec);
}

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
}

/* ===== Cursor Glow ===== */
.cursor-glow {
  position: fixed;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,158,11,0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: left 0.1s ease-out, top 0.1s ease-out;
  mix-blend-mode: screen;
}

@media (pointer: coarse) {
  .cursor-glow {
    display: none;
  }
}

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Typography ===== */
h1, h2, h3 {
  font-weight: 600;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
}

h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  margin-bottom: 12px;
}

h3 {
  font-size: 1.15rem;
  margin-bottom: 12px;
  font-weight: 600;
}

.lead {
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--text-muted);
  max-width: 640px;
  line-height: 1.75;
}

.section-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 8px;
  font-weight: 600;
}

/* ===== Header & Nav ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-main);
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.logo svg {
  width: 22px;
  height: 22px;
  color: var(--accent);
}

.logo span {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
}

.nav {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.92rem;
  position: relative;
}

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

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

.nav a:hover::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  padding: 8px;
  line-height: 0;
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 64px;
  position: relative;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 60px, rgba(255, 255, 255, 0.025) 60px, rgba(255, 255, 255, 0.025) 61px),
    repeating-linear-gradient(90deg, transparent, transparent 60px, rgba(255, 255, 255, 0.025) 60px, rgba(255, 255, 255, 0.025) 61px);
  mask-image: radial-gradient(circle at 50% 50%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, black 30%, transparent 75%);
}

.orbit {
  position: absolute;
  border: 1px solid rgba(245, 158, 11, 0.08);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.orbit-1 { width: 280px; height: 280px; animation: spin 20s linear infinite; }
.orbit-2 { width: 420px; height: 420px; border-color: rgba(6, 182, 212, 0.06); animation: spin 30s linear infinite reverse; }
.orbit-3 { width: 580px; height: 580px; border-color: rgba(245, 158, 11, 0.04); animation: spin 45s linear infinite; }

@keyframes spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}

.floating-badges {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.f-badge {
  position: absolute;
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-sec);
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.15);
  padding: 5px 10px;
  border-radius: 4px;
  animation: float var(--dur, 6s) ease-in-out var(--del, 0s) infinite;
  pointer-events: none;
}

.f-badge:nth-child(1) { top: 18%; left: 12%; }
.f-badge:nth-child(2) { top: 22%; right: 15%; }
.f-badge:nth-child(3) { top: 55%; left: 8%; }
.f-badge:nth-child(4) { top: 60%; right: 10%; }
.f-badge:nth-child(5) { top: 75%; left: 20%; }
.f-badge:nth-child(6) { top: 78%; right: 18%; }

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(var(--dx, 20px), var(--dy, -15px)); }
  50% { transform: translate(calc(var(--dx, 20px) * -0.5), calc(var(--dy, -15px) * -0.8)); }
  75% { transform: translate(calc(var(--dx, 20px) * 0.3), calc(var(--dy, -15px) * 0.5)); }
}

.hero__content {
  position: relative;
  z-index: 3;
  max-width: 820px;
  padding: 40px 24px;
}

.hero__title {
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff 30%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: clamp(0.85rem, 1.2vw, 1rem);
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero__lead {
  margin: 0 auto 32px;
  color: var(--text-muted);
}

.hero__cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  transition: transform 0.25s ease, filter 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.btn-primary:hover::before {
  transform: translateX(100%);
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.25);
  color: var(--bg-primary);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.btn-outline:hover {
  background: var(--accent-glow);
  border-color: var(--accent);
  transform: translateY(-2px);
  color: var(--accent);
}

/* ===== Sections ===== */
section {
  padding: 96px 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header p {
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
}

/* ===== Benefits ===== */
.benefits-grid {
  display: grid;
  gap: 20px;
  perspective: 1000px;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 30px;
  transition: border-color 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease;
  transform-style: preserve-3d;
  will-change: transform;
}

.card:hover {
  border-color: rgba(245, 158, 11, 0.25);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35), 0 0 0 1px var(--accent-glow);
}

.card__icon {
  width: 44px;
  height: 44px;
  color: var(--accent);
  margin-bottom: 18px;
  transition: transform 0.35s ease, color 0.35s ease;
}

.card:hover .card__icon {
  transform: scale(1.1);
  color: var(--accent-sec);
}

.card__icon svg {
  width: 100%;
  height: 100%;
}

.card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

/* ===== Trust ===== */
.trust-layout {
  display: grid;
  gap: 48px;
  align-items: start;
}

.trust-text {
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.75;
  font-size: 1.02rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.stat-item {
  text-align: center;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 12px;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.stat-item:hover {
  border-color: rgba(245, 158, 11, 0.2);
  transform: translateY(-3px);
}

.stat-number {
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  font-weight: 700;
  color: var(--accent);
  display: block;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 8px;
  display: block;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  background: rgba(6, 182, 212, 0.08);
  color: var(--accent-sec);
  border: 1px solid rgba(6, 182, 212, 0.15);
  padding: 5px 11px;
  border-radius: 4px;
  font-size: 0.82rem;
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
  transition: all 0.25s ease;
  cursor: default;
}

.tag:hover {
  background: rgba(6, 182, 212, 0.18);
  border-color: rgba(6, 182, 212, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.1);
}

/* ===== Works ===== */
.works-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

.work-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  cursor: pointer;
  aspect-ratio: 16 / 10;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.work-card--large {
  aspect-ratio: 16 / 10;
}

.work-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.work-card:hover {
  border-color: rgba(245, 158, 11, 0.2);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.work-card:hover img {
  transform: scale(1.08);
}

.work-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  background: linear-gradient(to top, rgba(10, 10, 15, 0.92) 0%, rgba(10, 10, 15, 0.4) 50%, transparent 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.work-card:hover .work-overlay {
  opacity: 1;
}

.work-tag {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 6px;
}

.work-overlay p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 320px;
}

/* ===== Contacts ===== */
.contacts {
  text-align: center;
}

.contacts-box {
  max-width: 640px;
  margin: 0 auto;
}

.contacts-box .lead {
  margin: 0 auto 32px;
}

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

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  transition: border-color 0.3s ease, color 0.3s ease, transform 0.25s ease;
  text-align: left;
  width: 100%;
}

a.contact-item:hover {
  border-color: rgba(245, 158, 11, 0.3);
  color: var(--accent);
  transform: translateY(-2px);
}

.contact-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

a.contact-item:hover svg {
  color: var(--accent);
}

.contact-label {
  font-weight: 600;
  color: var(--text-main);
  min-width: 85px;
  font-size: 0.92rem;
}

.contact-value {
  flex: 1;
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.92rem;
  word-break: break-all;
}

.copy-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.78rem;
  font-family: inherit;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  margin-left: auto;
}

.copy-btn svg {
  width: 13px !important;
  height: 13px !important;
}

.copy-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

.copy-btn.copied {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-glow);
}

/* ===== Footer ===== */
.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 44px 0;
  text-align: center;
}

.footer p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.footer-links span {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ===== Reveal Animation ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Stagger children ===== */
.stagger > .reveal.visible {
  transition-delay: calc(var(--i, 0) * 0.12s);
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .cursor-glow,
  .orbit,
  .f-badge {
    display: none !important;
  }

  .card,
  .btn,
  .contact-item,
  .tag,
  .stat-item,
  .nav a::after {
    transition: none !important;
    animation: none !important;
  }
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }

  section {
    padding: 72px 0;
  }

  .stats {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .hero__cta {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  .f-badge {
    font-size: 0.65rem;
    padding: 3px 7px;
  }
}

@media (min-width: 640px) {
  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .works-grid {
    grid-template-columns: 1.3fr 0.7fr;
    grid-auto-rows: 180px;
  }

  .work-card--large {
    grid-row: span 2;
    aspect-ratio: auto;
  }

  .work-card:not(.work-card--large) {
    aspect-ratio: auto;
  }
}

@media (max-width: 767px) {
  .menu-toggle {
    display: block;
  }

  .nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 24px;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-150%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s ease, opacity 0.35s ease;
    align-items: flex-start;
  }

  .nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav a {
    padding: 12px 0;
    font-size: 1.05rem;
    width: 100%;
    border-bottom: 1px solid var(--border);
  }

  .nav a:last-child {
    border-bottom: none;
  }

  .hero {
    min-height: auto;
    padding: 120px 0 80px;
  }

  .hero__title {
    font-size: 2.2rem;
  }

  .contact-item {
    flex-wrap: wrap;
    gap: 8px;
  }

  .contact-value {
    width: 100%;
    order: 3;
    margin-top: 4px;
  }

  .copy-btn {
    margin-left: 0;
    order: 2;
  }
}

@media (min-width: 768px) {
  .hero__title {
    margin-bottom: 18px;
  }
}

@media (min-width: 1024px) {
  .benefits-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .trust-layout {
    grid-template-columns: 1fr 1fr;
  }
}
