/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }

/* ===== Tokens ===== */
:root {
  --bg: #f7f7fb;
  --bg-white: #ffffff;
  --bg-alt: #f0f0f6;
  --bg-accent-light: #eef2ff;
  --border: #e2e2ec;
  --border-hover: #d0d0de;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-light: rgba(79, 70, 229, 0.08);
  --teal: #0d9488;
  --text: #1a1a2e;
  --text-mid: #4a4a64;
  --text-light: #8a8aa0;
  --gradient: linear-gradient(135deg, #4f46e5 0%, #0d9488 100%);
  --font-h: 'Space Grotesk', system-ui, sans-serif;
  --font-b: 'Inter', system-ui, sans-serif;
  --radius: 14px;
  --radius-sm: 8px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Base ===== */
body {
  font-family: var(--font-b);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

/* ===== Canvas ===== */
#gradient-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
}

/* ===== Layout ===== */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ===== Typography ===== */
h1, h2, h3, h4 {
  font-family: var(--font-h);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-header { text-align: center; margin-bottom: 3.5rem; }

.section-tag {
  display: inline-block;
  font-family: var(--font-b);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid rgba(79, 70, 229, 0.15);
  padding: 4px 14px;
  border-radius: 100px;
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(24px, 4vw, 38px);
  margin-bottom: 8px;
}

.section-desc {
  color: var(--text-mid);
  font-size: 16px;
  max-width: 460px;
  margin: 4px auto 0;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  padding: 0 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-b);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.btn svg { display: block; flex-shrink: 0; }

.btn-lg { height: 48px; padding: 0 28px; font-size: 15px; }

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-ghost {
  background: var(--bg-white);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-nav {
  height: 36px;
  padding: 0 16px;
  font-size: 13px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
}
.btn-nav:hover { background: var(--accent-hover); }

.btn-full { width: 100%; }

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(247, 247, 251, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header.scrolled {
  background: rgba(247, 247, 251, 0.95);
  box-shadow: 0 1px 8px rgba(0,0,0,0.04);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-h);
  font-size: 18px;
  font-weight: 700;
}

.logo span { color: var(--accent); }

.logo-mark {
  width: 28px; height: 28px;
  border-radius: 6px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-h);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

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

.nav-link {
  font-size: 14px;
  color: var(--text-mid);
  transition: color 0.2s;
}
.nav-link:hover { color: var(--text); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-mid);
  background: var(--bg-white);
  border: 1px solid var(--border);
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 28px;
}

.pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--teal);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.4); }
}

.hero-title {
  font-size: clamp(32px, 6vw, 56px);
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin-bottom: 20px;
  max-width: 800px;
  margin-inline: auto;
}

.hero-subtitle {
  font-size: clamp(15px, 2vw, 17px);
  color: var(--text-mid);
  max-width: 560px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-clients {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  max-width: 520px;
  margin: 0 auto;
}

.hero-clients-label {
  font-size: 12px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 14px;
}

.hero-clients-logos {
  display: flex;
  gap: 32px;
  justify-content: center;
  flex-wrap: wrap;
}

.client-logo {
  font-family: var(--font-h);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
}

/* ===== Bento Services ===== */
.services { padding: 80px 0; }

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

.bento-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.bento-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}

.bento-large { grid-row: span 2; }
.bento-wide { grid-column: span 2; }

.bento-icon {
  width: 40px; height: 40px;
  margin-bottom: 16px;
  color: var(--accent);
  background: var(--accent-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bento-icon svg { width: 20px; height: 20px; display: block; }

.bento-card h3 { font-size: 17px; margin-bottom: 8px; }

.bento-card p {
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.65;
}

.bento-large p { margin-bottom: 16px; }

.bento-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.bento-tag {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-mid);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 100px;
}

.bento-wide-content {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.bento-wide-content .bento-tag-row {
  flex-direction: column;
  margin-top: 0;
  flex-shrink: 0;
}

/* ===== Steps ===== */
.work {
  padding: 80px 0;
  background: var(--bg-white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.step-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s;
}

.step-card:hover { border-color: var(--border-hover); }

.step-number {
  font-family: var(--font-h);
  font-size: 32px;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0.4;
  line-height: 1;
  margin-bottom: 16px;
}

.step-card h3 { font-size: 16px; margin-bottom: 8px; }
.step-card p { font-size: 14px; color: var(--text-mid); line-height: 1.6; }

/* ===== About ===== */
.about { padding: 80px 0; }

.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-text .section-title { text-align: left; }

.about-text p {
  color: var(--text-mid);
  margin-bottom: 14px;
  max-width: 460px;
  line-height: 1.7;
  font-size: 15px;
}

.about-text .btn { margin-top: 8px; }

.about-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.metric-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}

.metric-value {
  font-family: var(--font-h);
  font-size: 36px;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}

.metric-suffix {
  font-family: var(--font-h);
  font-size: 20px;
  font-weight: 600;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.metric-label {
  display: block;
  font-size: 13px;
  color: var(--text-light);
  margin-top: 6px;
}

/* ===== Testimonials ===== */
.testimonials {
  padding: 80px 0;
  background: var(--bg-white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

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

.testimonial-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.testimonial-stars {
  color: #f59e0b;
  font-size: 14px;
  letter-spacing: 2px;
  margin-bottom: 14px;
}

.testimonial-card blockquote {
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 20px;
  font-style: normal;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.author-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-h);
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}

.author-name { font-size: 14px; font-weight: 600; }
.author-role { font-size: 12px; color: var(--text-light); }

/* ===== Pricing ===== */
.pricing { padding: 80px 0; }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  align-items: start;
}

.pricing-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.pricing-featured {
  border-color: var(--accent);
  background: var(--bg-accent-light);
}

.pricing-badge {
  position: absolute;
  top: -10px; left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pricing-header h3 { font-size: 18px; margin-bottom: 4px; }

.pricing-desc {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 20px;
}

.pricing-amount {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.price {
  font-family: var(--font-h);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.price-period { font-size: 14px; color: var(--text-light); }

.pricing-features {
  list-style: none;
  flex: 1;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pricing-features li {
  font-size: 14px;
  color: var(--text-mid);
  padding-left: 22px;
  position: relative;
}

.pricing-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

/* ===== CTA Banner ===== */
.cta-banner { padding: 60px 0; }

.cta-card {
  text-align: center;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 56px 40px;
  position: relative;
  overflow: hidden;
}

.cta-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gradient);
}

.cta-card h2 {
  font-size: clamp(22px, 3.5vw, 32px);
  margin-bottom: 12px;
}

.cta-card p {
  color: var(--text-mid);
  max-width: 440px;
  margin: 0 auto 24px;
  font-size: 15px;
}

/* ===== Contact ===== */
.contact {
  padding: 80px 0;
  background: var(--bg-white);
  border-top: 1px solid var(--border);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: start;
}

.contact-info .section-title { text-align: left; }

.contact-info p {
  color: var(--text-mid);
  margin-bottom: 20px;
  line-height: 1.7;
  font-size: 15px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-mid);
  font-size: 14px;
}

.contact-detail svg {
  width: 18px; height: 18px;
  color: var(--accent);
  flex-shrink: 0;
  display: block;
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-mid);
  margin-bottom: 5px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-b);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  appearance: none;
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238a8aa0' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: #b0b0c0; }

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { border-color: var(--accent); }

.form-group textarea { resize: vertical; min-height: 110px; }
.form-group-full { grid-column: 1 / -1; }

.form-group input.error,
.form-group textarea.error { border-color: #dc2626; }

.form-success {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
}

.success-check {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.form-success h3 { font-size: 20px; margin-bottom: 6px; }
.form-success p { color: var(--text-mid); }

/* ===== Footer ===== */
.footer {
  padding: 40px 0 20px;
  border-top: 1px solid var(--border);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.footer-brand { max-width: 300px; }
.footer-brand .logo { margin-bottom: 8px; }
.footer-brand p { font-size: 14px; color: var(--text-light); }

.footer-nav { display: flex; gap: 56px; }

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-col h4 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}

.footer-col a {
  font-size: 13px;
  color: var(--text-light);
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-bottom p { font-size: 12px; color: var(--text-light); }

.footer-links { display: flex; gap: 14px; }
.footer-links a {
  color: var(--text-light);
  display: flex;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--accent); }

/* ===== Scroll Reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.bento-grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.bento-grid .reveal:nth-child(3) { transition-delay: 0.16s; }
.bento-grid .reveal:nth-child(4) { transition-delay: 0.24s; }
.steps-grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.steps-grid .reveal:nth-child(3) { transition-delay: 0.16s; }
.steps-grid .reveal:nth-child(4) { transition-delay: 0.24s; }
.testimonials-grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.testimonials-grid .reveal:nth-child(3) { transition-delay: 0.16s; }
.pricing-grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.pricing-grid .reveal:nth-child(3) { transition-delay: 0.16s; }

/* ===== Focus ===== */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .bento-grid { grid-template-columns: 1fr 1fr; }
  .bento-large { grid-row: span 1; }
  .steps-grid { grid-template-columns: 1fr 1fr; }
  .testimonials-grid { grid-template-columns: 1fr 1fr; }
  .testimonials-grid .testimonial-card:last-child { grid-column: span 2; }
  .pricing-grid { grid-template-columns: 1fr 1fr; }
  .pricing-grid .pricing-card:last-child { grid-column: span 2; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav {
    position: fixed;
    top: 0; right: 0;
    width: 280px; height: 100vh;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    background: var(--bg-white);
    border-left: 1px solid var(--border);
    transform: translateX(100%);
    transition: transform 0.3s;
    z-index: 1000;
    padding: 24px;
  }

  .nav.open { transform: translateX(0); }
  .nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

  .hero { min-height: auto; padding: 100px 0 60px; }
  .bento-grid { grid-template-columns: 1fr; }
  .bento-wide { grid-column: span 1; }
  .bento-wide-content { flex-direction: column; gap: 12px; }
  .steps-grid { grid-template-columns: 1fr; }
  .about-layout { grid-template-columns: 1fr; gap: 32px; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .testimonials-grid .testimonial-card:last-child { grid-column: span 1; }
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-grid .pricing-card:last-child { grid-column: span 1; }
  .contact-layout { grid-template-columns: 1fr; gap: 32px; }
  .contact-form { grid-template-columns: 1fr; }
  .cta-card { padding: 40px 20px; }
  .footer-top { flex-direction: column; gap: 24px; }
  .footer-nav { gap: 40px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition-delay: 0s !important; }
}
