/* Reset / base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #0f172a 0, #020617 50%, #020617 100%);
  color: #e5e7eb;
  overflow-x: hidden;
}

/* Cursor trail layer */
.cursor-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.cursor-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: radial-gradient(
    circle at 30% 0,
    #f9fafb 0,
    #38bdf8 30%,
    #a855f7 100%
  );
  opacity: 0.7;
  transform: translate(-50%, -50%) scale(1);
  animation: cursor-fade 0.55s ease-out forwards;
}

@keyframes cursor-fade {
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.35);
  }
}

/* Layout container */
.page {
  max-width: 1040px;
  margin: 0 auto;
  padding: 20px 16px 56px;
  position: relative;
  z-index: 2;
}

/* Nav */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 20px;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(18px);
  background: linear-gradient(
    to bottom,
    rgba(2, 6, 23, 0.96),
    rgba(2, 6, 23, 0.8),
    transparent
  );
}

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

.logo-img {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.6),
    0 0 36px rgba(129, 140, 248, 0.6);
  animation: logo-pulse 4s ease-in-out infinite;
}

.brand-name {
  font-weight: 700;
  font-size: 20px;
  background: linear-gradient(135deg, #38bdf8, #a855f7, #ec4899);
  -webkit-background-clip: text;
  color: transparent;
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
  flex-wrap: wrap;
}

.nav-links a {
  color: #e5e7eb;
  text-decoration: none;
  opacity: 0.8;
  position: relative;
  padding-bottom: 2px;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8, #a855f7);
  transition: width 0.18s ease-out;
}

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

.nav-links a:hover {
  opacity: 1;
}

.nav-cta {
  padding: 7px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #38bdf8, #a855f7);
  color: #0b1120 !important;
  font-weight: 600;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.9);
}

/* Hamburger button */
.nav-toggle {
  display: none;
  border: none;
  outline: none;
  background: transparent;
  cursor: pointer;
  padding: 6px;
  border-radius: 999px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #e5e7eb;
  margin: 3px 0;
  transition: transform 0.18s ease-out, opacity 0.18s ease-out;
}

/* Hero */
.hero {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  align-items: stretch;
  margin-bottom: 30px;
}

.hero-text {
  flex: 1 1 320px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.9);
  font-size: 11px;
  color: #cbd5f5;
  margin-bottom: 10px;
}

.pill-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: radial-gradient(
    circle at 20% 0,
    #f9fafb 0,
    #38bdf8 25%,
    #6366f1 60%,
    #a855f7 100%
  );
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.6),
    0 0 28px rgba(129, 140, 248, 0.7);
}

.hero-text h1 {
  margin: 0 0 10px;
  font-size: 32px;
  line-height: 1.2;
}

.hero-gradient {
  background: linear-gradient(90deg, #38bdf8, #a855f7, #ec4899);
  -webkit-background-clip: text;
  color: transparent;
}

.hero-text p {
  margin: 0 0 14px;
  font-size: 15px;
  color: #cbd5f5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

.primary-btn,
.ghost-btn {
  font-size: 14px;
  padding: 9px 16px;
  border-radius: 999px;
  border: none;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.primary-btn {
  background: linear-gradient(135deg, #38bdf8, #a855f7);
  color: #0b1120;
  font-weight: 600;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out;
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 1);
}

.ghost-btn {
  border: 1px solid #4b5563;
  color: #e5e7eb;
  background: transparent;
}

.hero-tagline {
  margin: 0;
  font-size: 13px;
  color: #9ca3af;
}

/* Hero card */
.hero-card {
  flex: 1 1 260px;
  max-width: 320px;
  background: radial-gradient(circle at top left, #111827, #020617 55%);
  border-radius: 20px;
  padding: 16px 18px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: conic-gradient(
    from 180deg,
    rgba(56, 189, 248, 0.05),
    rgba(129, 140, 248, 0.18),
    rgba(168, 85, 247, 0.12),
    transparent 65%
  );
  opacity: 0.7;
  filter: blur(18px);
  animation: card-glow 10s linear infinite;
}

.hero-card > * {
  position: relative;
}

.hero-logo-img {
  width: 52px;
  margin-bottom: 6px;
  border-radius: 16px;
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.7),
    0 0 40px rgba(129, 140, 248, 0.7);
}

/* Sections */
.section {
  margin: 30px 0 10px;
}

.section h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

.section-lead {
  margin: 0 0 12px;
  font-size: 14px;
  color: #cbd5f5;
}

/* About */
.about-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.about-copy {
  flex: 1 1 260px;
  font-size: 14px;
  color: #e5e7eb;
}

.about-copy p {
  margin: 0 0 10px;
}

.about-highlights {
  flex: 1 1 220px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pill-stat {
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.5);
  font-size: 13px;
}

.pill-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9ca3af;
  margin-bottom: 2px;
}

.pill-value {
  font-size: 13px;
  color: #e5e7eb;
}

/* Grid / cards / projects / blog */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.card,
.project-card {
  background: rgba(15, 23, 42, 0.96);
  border-radius: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.8);
  transition: transform 0.16s ease-out, box-shadow 0.16s ease-out;
}

.card:hover,
.project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.95);
}

.card h3,
.project-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.card p,
.project-card p {
  margin: 0;
  font-size: 13px;
  color: #cbd5f5;
}

.project-card ul {
  margin: 10px 0 0;
  padding-left: 18px;
  font-size: 13px;
  color: #e5e7eb;
}

/* Blog */
.blog-grid {
  margin-top: 8px;
}

.blog-card {
  position: relative;
}

.blog-meta {
  display: inline-block;
  margin-top: 8px;
  font-size: 11px;
  color: #9ca3af;
}

.blog-link {
  text-decoration: none;
  color: inherit;
}

/* CozyReply Project Card */
.cozyreply-card {
  position: relative;
  padding-top: 28px;
  overflow: hidden;
  margin-bottom: 16px;
}

.cozyreply-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: conic-gradient(
    from 180deg,
    rgba(255, 145, 80, 0.12),
    rgba(255, 94, 91, 0.2),
    rgba(244, 63, 94, 0.12),
    transparent 70%
  );
  filter: blur(24px);
  opacity: 0.5;
  animation: card-glow 12s linear infinite;
}

.cozyreply-card > * {
  position: relative;
}

.cozyreply-logo {
  width: 80px;
  height: auto;
  display: block;
  margin-bottom: 10px;
  border-radius: 14px;
  box-shadow: 0 0 24px rgba(255, 145, 80, 0.5),
    0 0 32px rgba(255, 94, 91, 0.4);
  animation: logo-pulse 5s ease-in-out infinite;
}

.project-btn {
  margin-top: 12px;
  display: inline-block;
  padding: 10px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff9150, #ff5e5b, #f43f5e);
  color: #0f172a;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(255, 94, 91, 0.45);
  transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
}

.project-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(255, 94, 91, 0.55);
}

/* Quote (request a quote) */
.quote p {
  font-size: 14px;
  color: #cbd5f5;
}

.quote-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 520px;
  margin-top: 8px;
}

.field-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quote-form input,
.quote-form textarea,
.quote-form select {
  background: rgba(15, 23, 42, 0.96);
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  padding: 10px 12px;
  color: #e5e7eb;
  font-size: 14px;
  flex: 1 1 160px;
}

.quote-form input::placeholder,
.quote-form textarea::placeholder {
  color: #6b7280;
}

.quote-form button {
  align-self: flex-start;
  border: none;
  border-radius: 999px;
  padding: 9px 16px;
  background: linear-gradient(135deg, #38bdf8, #a855f7);
  color: #0b1120;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
}

/* Contact */
.contact p {
  font-size: 14px;
  color: #cbd5f5;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 420px;
  margin-top: 8px;
}

.contact-form input,
.contact-form textarea {
  background: rgba(15, 23, 42, 0.96);
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  padding: 10px 12px;
  color: #e5e7eb;
  font-size: 14px;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #6b7280;
}

.contact-form button {
  align-self: flex-start;
  border: none;
  border-radius: 999px;
  padding: 9px 16px;
  background: linear-gradient(135deg, #38bdf8, #a855f7);
  color: #0b1120;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
}

.contact-note {
  margin-top: 6px;
  font-size: 12px;
  color: #9ca3af;
}

.contact-email {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
}

/* Footer */
.footer {
  margin-top: 24px;
  padding-top: 10px;
  border-top: 1px solid rgba(55, 65, 81, 0.8);
  font-size: 12px;
  color: #9ca3af;
}

/* Animation utilities */
.animate-in {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.45s ease-out, transform 0.45s ease-out;
}

.animate-in.in-view {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 {
  transition-delay: 0.15s;
}

/* Animations */
@keyframes logo-pulse {
  0%,
  100% {
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.6),
      0 0 36px rgba(129, 140, 248, 0.6);
    transform: translateY(0);
  }
  50% {
    box-shadow: 0 0 26px rgba(56, 189, 248, 0.9),
      0 0 50px rgba(129, 140, 248, 0.9);
    transform: translateY(-1px);
  }
}

@keyframes card-glow {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Floating CTA */
.floating-cta {
  position: fixed;
  right: 18px;
  bottom: 18px;
  padding: 10px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #38bdf8, #a855f7);
  color: #020617;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
  z-index: 25;
  transition: transform 0.16s ease-out, box-shadow 0.16s ease-out;
}

.floating-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 1);
}

/* Article pages */
.article {
  margin-top: 20px;
  max-width: 720px;
}

.article-tag {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #9ca3af;
  margin-bottom: 6px;
}

.article h1 {
  font-size: 26px;
  margin: 0 0 6px;
}

.article-meta {
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 18px;
}

.article-body {
  font-size: 14px;
  color: #e5e7eb;
  line-height: 1.6;
}

.article-body h2 {
  font-size: 18px;
  margin-top: 18px;
  margin-bottom: 6px;
}

.article-body p {
  margin: 0 0 10px;
}

.article-body ul {
  margin: 0 0 10px 18px;
  padding: 0;
}

/* Mobile */
@media (max-width: 768px) {
  .nav {
    align-items: flex-start;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-top: 10px;
    width: 100%;
  }

  body.nav-open .nav-links {
    display: flex;
  }

  body.nav-open .nav-toggle span:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
  }

  body.nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  body.nav-open .nav-toggle span:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
  }

  .hero {
    flex-direction: column;
  }

  .hero-text h1 {
    font-size: 26px;
  }

  .hero-card {
    max-width: 100%;
  }

  .about-grid {
    flex-direction: column;
  }

  .field-row {
    flex-direction: column;
  }

  .floating-cta {
    right: 14px;
    bottom: 14px;
    padding: 9px 16px;
  }
}

@media (max-width: 480px) {
  .floating-cta {
    display: none;
  }
}