/* ============================================
   AidSparks — Tech that supports and empowers.
   ============================================ */

:root {
  /* Brand palette — sampled from the AidSparks mark */
  --cream: #fbf7ee;
  --cream-soft: #f3ecdd;
  --paper: #fffdf8;
  --ink: #17142b;
  --ink-soft: #4a4560;
  --ink-faint: #837e98;

  --blue: #4338ea;
  --blue-dark: #2c22b8;
  --teal: #16c2a6;
  --teal-dark: #0e9c85;
  --coral: #f2524f;
  --coral-dark: #d63a3f;
  --violet: #6c56f0;

  --grad-spark: linear-gradient(160deg, var(--coral) 0%, var(--violet) 55%, var(--blue) 100%);
  --grad-brand: linear-gradient(135deg, var(--blue) 0%, var(--teal) 100%);

  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;

  --shadow-soft: 0 20px 60px -20px rgba(23, 20, 43, 0.18);
  --shadow-card: 0 12px 30px -12px rgba(23, 20, 43, 0.16);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --container: 1180px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-weight: 600;
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

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

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

button {
  font-family: inherit;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
}

.eyebrow::before {
  content: "";
  width: 16px;
  height: 2px;
  background: var(--grad-brand);
  border-radius: 2px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.35s var(--ease);
  white-space: nowrap;
}

.btn-primary {
  background: var(--ink);
  color: var(--cream);
  box-shadow: var(--shadow-card);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px -10px rgba(23, 20, 43, 0.4);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid rgba(23, 20, 43, 0.16);
}

.btn-ghost:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}

.btn-light {
  background: var(--cream);
  color: var(--ink);
}

.btn-light:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px -10px rgba(0, 0, 0, 0.35);
}

.btn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s var(--ease);
}

.btn:hover svg {
  transform: translateX(3px);
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease), padding 0.4s var(--ease);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-header.scrolled {
  padding: 12px 0;
  background: rgba(251, 247, 238, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 30px -18px rgba(23, 20, 43, 0.25);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-soft);
}

.nav-links a {
  position: relative;
  padding: 4px 0;
  transition: color 0.25s var(--ease);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0%;
  height: 2px;
  background: var(--grad-brand);
  border-radius: 2px;
  transition: width 0.3s var(--ease);
}

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

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

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

.nav-cta .btn {
  padding: 11px 22px;
  font-size: 14px;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--ink);
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 168px 0 120px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  inset: -10% -10% auto -10%;
  height: 900px;
  z-index: 0;
  pointer-events: none;
}

.hero-glow span {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
}

.hero-glow .g1 {
  width: 480px;
  height: 480px;
  background: var(--blue);
  top: -120px;
  left: -140px;
  opacity: 0.28;
}

.hero-glow .g2 {
  width: 520px;
  height: 520px;
  background: var(--teal);
  top: 40px;
  right: -180px;
  opacity: 0.28;
}

.hero-glow .g3 {
  width: 360px;
  height: 360px;
  background: var(--coral);
  top: 340px;
  left: 40%;
  opacity: 0.18;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 780px;
  margin: 0 auto;
}

.hero-mark {
  width: 96px;
  height: 96px;
  margin-bottom: 28px;
  border-radius: 24px;
  box-shadow: var(--shadow-card);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero h1 {
  font-size: clamp(2.4rem, 5.6vw, 4.4rem);
  font-weight: 700;
  color: var(--ink);
}

.hero h1 .grad {
  background: var(--grad-spark);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  margin-top: 24px;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 560px;
}

.hero-actions {
  margin-top: 40px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-stats {
  margin-top: 72px;
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-stats div {
  text-align: center;
}

.hero-stats strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.9rem;
  font-weight: 700;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-stats span {
  font-size: 13px;
  color: var(--ink-faint);
  font-weight: 500;
}

/* ---------- Reveal utility ---------- */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

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

.reveal-stagger.in-view > * {
  transition-delay: calc(var(--i, 0) * 90ms);
}

/* ---------- Section shared ---------- */

section {
  padding: 120px 0;
  position: relative;
}

.section-head {
  max-width: 640px;
  margin-bottom: 56px;
}

.section-head h2 {
  margin-top: 14px;
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
}

.section-head p {
  margin-top: 16px;
  font-size: 1.08rem;
  color: var(--ink-soft);
}

.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* ---------- About ---------- */

.about {
  background: var(--paper);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
}

.about-copy p {
  font-size: 1.08rem;
  color: var(--ink-soft);
}

.about-copy p + p {
  margin-top: 18px;
}

.about-copy strong {
  color: var(--ink);
}

.about-visual {
  position: relative;
  border-radius: var(--radius-lg);
  background: var(--grad-spark);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.about-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.35), transparent 55%);
}

.about-visual img {
  width: 42%;
  border-radius: 22px;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.28));
  position: relative;
  z-index: 1;
}

/* ---------- Portfolio ---------- */

.portfolio {
  background: var(--cream-soft);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 24px;
}

.product-card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 44px;
  overflow: hidden;
  isolation: isolate;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--paper);
  box-shadow: var(--shadow-card);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 50px -16px rgba(23, 20, 43, 0.35);
}

.product-card--featured {
  grid-column: span 4;
}

.product-card--small {
  grid-column: span 3;
}

.product-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.product-card--agendra .product-bg { background: linear-gradient(135deg, #d32f2f 0%, #b3261e 45%, #1e4fb3 100%); }
.product-card--zentra .product-bg { background: linear-gradient(135deg, #362cc9 0%, #4338ea 42%, #16c2a6 100%); }
.product-card--haven .product-bg { background: linear-gradient(135deg, #f2524f 0%, #d63a3f 100%); }
.product-card--pulse .product-bg { background: linear-gradient(135deg, #0e9c85 0%, #16c2a6 55%, #7be0cf 100%); }
.product-card--origin .product-bg { background: linear-gradient(135deg, #4a3ac9 0%, #6c56f0 60%, #a595f7 100%); }

.product-shine {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 85% 0%, rgba(255,255,255,0.28), transparent 55%);
  opacity: 0.9;
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease);
}

.product-card:hover .product-shine {
  transform: scale(1.15);
}

.product-glyph {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
}

.product-glyph svg {
  width: 22px;
  height: 22px;
}

.product-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.product-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
}

.product-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.product-body {
  margin-top: 28px;
}

.product-wordmark {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 2rem;
  letter-spacing: -0.01em;
}

.product-tagline {
  margin-top: 10px;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.86);
  max-width: 380px;
  line-height: 1.55;
}

.product-link {
  margin-top: 26px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14.5px;
  padding-bottom: 2px;
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.5);
  transition: border-color 0.3s var(--ease), gap 0.3s var(--ease);
  width: fit-content;
}

.product-link svg {
  width: 15px;
  height: 15px;
  transition: transform 0.3s var(--ease);
}

.product-card:hover .product-link {
  border-color: #fff;
  gap: 12px;
}

.product-card:hover .product-link svg {
  transform: translate(2px, -2px);
}

/* ---------- Values ---------- */

.values {
  background: var(--paper);
}

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

.value-card {
  padding: 32px 26px;
  border-radius: var(--radius-md);
  background: var(--cream);
  border: 1px solid rgba(23, 20, 43, 0.06);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}

.value-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card);
  border-color: transparent;
}

.value-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.value-icon svg {
  width: 22px;
  height: 22px;
  stroke: #fff;
}

.value-card:nth-child(1) .value-icon { background: var(--blue); }
.value-card:nth-child(2) .value-icon { background: var(--coral); }
.value-card:nth-child(3) .value-icon { background: var(--teal); }
.value-card:nth-child(4) .value-icon { background: var(--violet); }

.value-card h3 {
  font-size: 1.1rem;
}

.value-card p {
  margin-top: 10px;
  font-size: 0.96rem;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* ---------- Contact / Footer ---------- */

.contact {
  background: var(--ink);
  color: var(--cream);
  padding-top: 110px;
  padding-bottom: 0;
  overflow: hidden;
  position: relative;
}

.contact::before {
  content: "";
  position: absolute;
  top: -220px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 500px;
  background: var(--grad-spark);
  filter: blur(140px);
  opacity: 0.35;
  pointer-events: none;
}

.contact-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.contact-inner .eyebrow {
  color: var(--teal);
  justify-content: center;
}

.contact-inner h2 {
  margin-top: 16px;
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  color: var(--cream);
}

.contact-inner p {
  margin-top: 18px;
  font-size: 1.08rem;
  color: rgba(251, 247, 238, 0.68);
}

.contact-actions {
  margin-top: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.contact-actions .btn-ghost {
  border-color: rgba(251, 247, 238, 0.24);
  color: var(--cream);
}

.contact-actions .btn-ghost:hover {
  border-color: var(--cream);
}

.footer-bottom {
  position: relative;
  z-index: 1;
  margin-top: 100px;
  border-top: 1px solid rgba(251, 247, 238, 0.12);
  padding: 32px 0;
}

.footer-bottom .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  color: var(--cream);
  opacity: 0.85;
}

.footer-brand img {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}

.footer-meta {
  font-size: 13.5px;
  color: rgba(251, 247, 238, 0.5);
}

.social-links {
  display: flex;
  gap: 14px;
}

.social-links a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(251, 247, 238, 0.18);
  color: var(--cream);
  transition: background 0.3s var(--ease), transform 0.3s var(--ease), border-color 0.3s var(--ease);
}

.social-links a:hover {
  background: var(--cream);
  color: var(--ink);
  transform: translateY(-3px);
  border-color: var(--cream);
}

.social-links svg {
  width: 16px;
  height: 16px;
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
  .about-visual {
    max-width: 360px;
    margin: 0 auto;
    order: -1;
  }
  .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .product-card--featured,
  .product-card--small {
    grid-column: span 6;
  }
}

@media (max-width: 780px) {
  .nav-links,
  .nav-cta .btn-ghost {
    display: none;
  }
  .menu-toggle {
    display: inline-flex;
  }
  section {
    padding: 84px 0;
  }
  .hero {
    padding: 140px 0 80px;
  }
  .hero-stats {
    gap: 32px;
  }
}

@media (max-width: 560px) {
  .values-grid {
    grid-template-columns: 1fr;
  }
  .product-card {
    padding: 32px 26px;
  }
  .footer-bottom .container {
    flex-direction: column;
    text-align: center;
  }
}

/* Mobile nav drawer */

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.6rem;
  font-weight: 600;
  transform: translateY(-100%);
  transition: transform 0.5s var(--ease);
}

.mobile-nav.open {
  transform: translateY(0);
}

.mobile-nav a {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.mobile-nav.open a {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.15s;
}

.mobile-nav-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink);
}

.mobile-nav-close svg {
  width: 26px;
  height: 26px;
}
