/* ============================
   Chainlab — modern dark theme
   Brand: deep grey + teal blue
   ============================ */

:root {
  --bg: #0a0e1a;
  --bg-2: #0e131f;
  --surface: #11151f;
  --surface-2: #161b29;
  --border: #1f2433;
  --border-2: #2a3147;
  --text: #e8ecf5;
  --text-dim: #aab2c5;
  --muted: #6f7896;
  --grey: #393838;
  --grey-2: #2a2929;
  --teal: #00afb7;
  --teal-2: #0b949a;
  --teal-glow: rgba(0, 175, 183, 0.35);
  --radius: 14px;
  --radius-lg: 20px;
  --max: 1200px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 0 1px rgba(0, 175, 183, 0.25), 0 20px 60px -20px rgba(0, 175, 183, 0.4);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--teal); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: #5be0e6; }
h1, h2, h3, h4 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
}
ul { margin: 0; padding: 0; list-style: none; }
p { margin: 0; }

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

/* ====== background flourishes ====== */
.bg-grid {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 80%);
}
.bg-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(600px circle at 15% -10%, rgba(0,175,183,0.18), transparent 60%),
    radial-gradient(700px circle at 90% 10%, rgba(11,148,154,0.10), transparent 60%);
}

/* ====== nav ====== */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(10, 14, 26, 0.65);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.nav.scrolled {
  background: rgba(10, 14, 26, 0.85);
  border-bottom-color: var(--border);
}
.nav-inner {
  display: flex; align-items: center; gap: 24px;
  height: 68px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--text); font-weight: 600; font-family: 'Space Grotesk', sans-serif;
  font-size: 18px; letter-spacing: -0.01em;
}
.brand img { width: 28px; height: 28px; object-fit: contain; }
.brand:hover { color: var(--text); }
.nav-links {
  display: flex; gap: 28px; margin-left: auto;
  font-size: 14px;
}
.nav-links a {
  color: var(--text-dim); font-weight: 500;
  position: relative; padding: 6px 2px;
}
.nav-links a:hover { color: var(--text); }
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 0; height: 1px; background: var(--teal);
  transition: width 0.25s var(--ease);
}
.nav-links a:hover::after { width: 100%; }
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  padding: 8px; gap: 5px; flex-direction: column;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}

/* ====== buttons ====== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px;
  border-radius: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: 15px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
  text-decoration: none;
  white-space: nowrap;
}
.btn-sm { padding: 10px 16px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-primary {
  background: linear-gradient(135deg, var(--teal), var(--teal-2));
  color: #06121a;
  box-shadow: 0 8px 24px -8px var(--teal-glow);
}
.btn-primary:hover {
  color: #06121a;
  transform: translateY(-1px);
  box-shadow: 0 14px 32px -10px var(--teal-glow);
}
.btn-ghost {
  background: transparent; color: var(--text);
  border-color: var(--border-2);
}
.btn-ghost:hover {
  color: var(--text);
  border-color: var(--teal);
  background: rgba(0, 175, 183, 0.06);
}

/* ====== hero ====== */
.hero {
  padding: 100px 0 80px;
  position: relative;
}
.hero-inner { text-align: center; max-width: 880px; margin: 0 auto; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--border-2);
  border-radius: 100px;
  font-size: 13px; color: var(--text-dim);
  background: rgba(255,255,255,0.02);
  margin-bottom: 28px;
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(0,175,183,0.15);
  animation: pulse 2s infinite var(--ease);
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(0,175,183,0.15); }
  50% { box-shadow: 0 0 0 8px rgba(0,175,183,0.05); }
}
.hero-title {
  font-size: clamp(40px, 6.2vw, 76px);
  margin-bottom: 24px;
  letter-spacing: -0.035em;
}
.grad {
  background: linear-gradient(135deg, #5be0e6 0%, var(--teal) 45%, var(--teal-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--text-dim);
  max-width: 640px; margin: 0 auto 40px;
}
.hero-cta {
  display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
  margin-bottom: 80px;
}
.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 760px; margin: 0 auto;
}
.hero-stats > div {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.hero-stats strong {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 32px; font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}
.hero-stats span {
  font-size: 12px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em;
}

/* ====== sections ====== */
.section { padding: 100px 0; position: relative; }
.section-head { max-width: 720px; margin: 0 auto 60px; text-align: center; }
.kicker {
  display: inline-block;
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--teal);
  margin-bottom: 16px;
}
.section-head h2 {
  font-size: clamp(28px, 3.4vw, 44px);
  margin-bottom: 16px;
}
.lede {
  color: var(--text-dim);
  font-size: 17px;
  max-width: 600px; margin: 0 auto;
}

/* ====== card grid ====== */
.cards { display: grid; gap: 20px; }
.services { grid-template-columns: repeat(2, 1fr); }
.pricing { grid-template-columns: repeat(3, 1fr); align-items: stretch; }

.card {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--border-2);
  box-shadow: var(--shadow);
}
.card .icon {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0,175,183,0.18), rgba(11,148,154,0.06));
  color: var(--teal);
  font-size: 22px;
  margin-bottom: 20px;
  border: 1px solid rgba(0,175,183,0.2);
}
.card h3 {
  font-size: 20px; margin-bottom: 10px;
}
.card p { color: var(--text-dim); font-size: 15px; }
.tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 18px;
}
.tags li {
  font-size: 12px; color: var(--text-dim);
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: rgba(255,255,255,0.02);
}

/* ====== process ====== */
.process-section {
  background: linear-gradient(180deg, transparent, rgba(0,175,183,0.03), transparent);
}
.process {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  counter-reset: step;
  position: relative;
}
.process li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.process li:hover {
  border-color: var(--border-2);
  transform: translateY(-3px);
}
.process .step {
  display: inline-block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px; font-weight: 600;
  color: var(--teal);
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}
.process h3 { font-size: 19px; margin-bottom: 8px; }
.process p { color: var(--text-dim); font-size: 14.5px; }

/* ====== portfolio ====== */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 760px;
  margin: 0 auto;
}
@media (max-width: 560px) {
  .portfolio-grid { grid-template-columns: 1fr; }
}
.port-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: block;
  color: var(--text);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}
.port-card::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--teal), var(--teal-2));
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.port-card::after {
  content: '↗';
  position: absolute; top: 18px; right: 20px;
  color: var(--muted);
  font-size: 16px;
  transition: color 0.25s var(--ease), transform 0.25s var(--ease);
}
.port-card:hover {
  color: var(--text);
  transform: translateY(-2px);
  border-color: var(--border-2);
  background: var(--surface-2);
}
.port-card:hover::before { opacity: 1; }
.port-card:hover::after {
  color: var(--teal);
  transform: translate(2px, -2px);
}
.port-meta { padding: 22px 24px; }
.port-meta h3 { font-size: 18px; margin-bottom: 6px; }
.port-meta p { color: var(--text-dim); font-size: 14px; margin-bottom: 14px; }
.port-stat {
  display: inline-block;
  font-size: 12px; font-weight: 500;
  color: var(--teal);
  padding: 4px 10px;
  background: rgba(0,175,183,0.08);
  border: 1px solid rgba(0,175,183,0.2);
  border-radius: 100px;
}

/* ====== pricing ====== */
.price-card {
  display: flex; flex-direction: column;
  padding: 36px 32px;
}
.price-card.featured {
  border-color: var(--teal);
  background: linear-gradient(180deg, rgba(0,175,183,0.06), var(--surface-2));
  box-shadow: var(--shadow-glow);
  position: relative;
}
.badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--teal), var(--teal-2));
  color: #06121a;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px; font-weight: 600;
  padding: 5px 12px; border-radius: 100px;
  letter-spacing: 0.04em;
}
.price-head h3 { font-size: 22px; margin-bottom: 6px; }
.price-head p { color: var(--text-dim); font-size: 14px; }
.price {
  margin: 24px 0; display: flex; align-items: baseline; gap: 8px;
}
.price .amount {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 44px; font-weight: 600;
  letter-spacing: -0.03em;
}
.price .per { color: var(--muted); font-size: 14px; }
.features {
  margin-bottom: 28px;
  display: flex; flex-direction: column; gap: 10px;
  flex: 1;
}
.features li {
  font-size: 14.5px; color: var(--text-dim);
  padding-left: 24px; position: relative;
}
.features li::before {
  content: ''; position: absolute; left: 0; top: 9px;
  width: 14px; height: 8px;
  border-left: 2px solid var(--teal);
  border-bottom: 2px solid var(--teal);
  transform: rotate(-45deg);
}

/* ====== FAQ ====== */
.faq-wrap { max-width: 820px; margin: 0 auto; }
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  transition: border-color 0.2s var(--ease);
}
.faq details[open] { border-color: var(--border-2); }
.faq summary {
  cursor: pointer; list-style: none;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: 16px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; color: var(--teal);
  font-size: 22px; font-weight: 400;
  transition: transform 0.25s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p {
  color: var(--text-dim);
  margin-top: 14px;
  font-size: 15px;
}

/* ====== contact ====== */
.contact-section {
  background: linear-gradient(180deg, transparent, rgba(0,175,183,0.04));
}
.contact-wrap {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px;
  align-items: start;
}
.contact-wrap .kicker { text-align: left; }
.contact-wrap h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  margin-bottom: 18px;
}
.contact-wrap .lede { text-align: left; margin: 0 0 28px; }
.contact-list {
  display: flex; flex-direction: column; gap: 14px;
  border-top: 1px solid var(--border);
  padding-top: 24px;
}
.contact-list li {
  display: flex; gap: 16px; align-items: baseline;
  font-size: 15px;
}
.contact-list strong {
  color: var(--muted); font-weight: 500;
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em;
  min-width: 110px;
}
.contact-list a { color: var(--text); }
.contact-list a:hover { color: var(--teal); }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex; flex-direction: column; gap: 18px;
}
.contact-form label {
  display: flex; flex-direction: column; gap: 8px;
}
.contact-form span {
  font-size: 13px; color: var(--text-dim);
  font-weight: 500;
}
.contact-form input,
.contact-form textarea {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  resize: vertical;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0,175,183,0.15);
}

/* ====== footer ====== */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  background: var(--bg-2);
  margin-top: 40px;
}
.footer-mini {
  display: flex; align-items: center; gap: 20px;
  font-size: 13px; color: var(--muted);
}
.footer-brand-mini {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text); font-family: 'Space Grotesk', sans-serif;
  font-weight: 600; font-size: 15px;
  letter-spacing: -0.01em;
}
.footer-brand-mini:hover { color: var(--text); }
.footer-brand-mini img { width: 22px; height: 22px; object-fit: contain; }
.footer-tag {
  color: var(--text-dim);
  border-left: 1px solid var(--border);
  padding-left: 20px;
}
.footer-copy { margin-left: auto; }
@media (max-width: 560px) {
  .footer-mini {
    flex-direction: column; gap: 10px; text-align: center;
  }
  .footer-tag { border-left: none; padding-left: 0; }
  .footer-copy { margin-left: 0; }
}

/* ====== reveal animation ====== */
.reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ====== responsive ====== */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav.menu-open .nav-links {
    display: flex; flex-direction: column;
    position: absolute; top: 68px; left: 0; right: 0;
    background: var(--bg-2);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 20px 24px;
    gap: 8px;
  }
  .nav.menu-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-inner > .btn { display: none; }

  .services { grid-template-columns: 1fr; }
  .pricing { grid-template-columns: 1fr; }
  .process { grid-template-columns: 1fr 1fr; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .contact-wrap { grid-template-columns: 1fr; gap: 40px; }
  .footer-inner { grid-template-columns: 1fr; gap: 40px; }
  .section { padding: 70px 0; }
  .hero { padding: 60px 0 50px; }
}

@media (max-width: 560px) {
  .process { grid-template-columns: 1fr; }
  .hero-stats { padding: 20px; gap: 14px; }
  .hero-stats strong { font-size: 26px; }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .card { padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
