/* Homepage — hero animation (matches login.nexttool.app auth page v16) */
.hero-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(64px);
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  animation-duration: 7s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}

.hero-orb-1 {
  width: min(560px, 85vw);
  height: min(560px, 85vw);
  background: rgba(0, 212, 170, .62);
  top: -20%;
  left: -15%;
  animation-name: nt-auth-drift-1;
}

.hero-orb-2 {
  width: min(480px, 75vw);
  height: min(480px, 75vw);
  background: rgba(56, 189, 248, .55);
  bottom: -18%;
  right: -12%;
  animation-name: nt-auth-drift-2;
  animation-delay: -2s;
  animation-duration: 9s;
}

.hero-orb-3 {
  width: min(340px, 58vw);
  height: min(340px, 58vw);
  background: rgba(167, 139, 250, .52);
  top: 38%;
  left: 48%;
  animation-name: nt-auth-drift-3;
  animation-delay: -4s;
  animation-duration: 8s;
}

.hero-grid {
  position: absolute;
  inset: -52px;
  background-image:
    linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 45%, black 15%, transparent 75%);
  transform: translate3d(0, 0, 0);
  animation: nt-auth-grid-pan 10s linear infinite;
}

@keyframes nt-auth-drift-1 {
  0%   { transform: translate3d(-12vw, -8vh, 0) scale(.94); opacity: .42; }
  50%  { transform: translate3d(16vw, 10vh, 0) scale(1.18); opacity: .72; }
  100% { transform: translate3d(-8vw, 16vh, 0) scale(.88); opacity: .38; }
}

@keyframes nt-auth-drift-2 {
  0%   { transform: translate3d(14vw, 8vh, 0) scale(1.08); opacity: .38; }
  50%  { transform: translate3d(-18vw, -12vh, 0) scale(.86); opacity: .68; }
  100% { transform: translate3d(10vw, -14vh, 0) scale(1.14); opacity: .4; }
}

@keyframes nt-auth-drift-3 {
  0%   { transform: translate3d(-14vw, 10vh, 0) scale(.9); opacity: .34; }
  50%  { transform: translate3d(18vw, -10vh, 0) scale(1.12); opacity: .62; }
  100% { transform: translate3d(-16vw, -12vh, 0) scale(1); opacity: .36; }
}

@keyframes nt-auth-grid-pan {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(52px, 52px, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-orb, .hero-grid { animation: none !important; }
}

/* Category bento */
.cat-bento {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.cat-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 22px 18px;
  transition: border-color .2s, transform .2s, box-shadow .2s;
  position: relative;
  overflow: hidden;
}

.cat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--cat-color, var(--accent));
  opacity: 0;
  transition: opacity .2s;
}

.cat-card:hover {
  border-color: rgba(0, 212, 170, .35);
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, .25);
}

.cat-card:hover::before { opacity: 1; }

.cat-icon {
  font-size: 26px;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, .04);
}

.cat-body { flex: 1; min-width: 0; }

.cat-body h3 {
  font-family: 'Sora', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--bright);
  margin-bottom: 6px;
}

.cat-body p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}

.cat-arrow {
  color: var(--accent);
  font-size: 18px;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .2s, transform .2s;
  flex-shrink: 0;
  align-self: center;
}

.cat-card:hover .cat-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* Platform grid */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.platform-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 26px 20px;
  transition: border-color .2s, transform .2s;
}

.platform-card:hover {
  border-color: rgba(0, 212, 170, .35);
  transform: translateY(-2px);
}

.platform-icon {
  font-size: 28px;
  margin-bottom: 14px;
}

.platform-card h3 {
  font-family: 'Sora', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--bright);
  margin-bottom: 8px;
}

.platform-card p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}

/* Legacy why-grid alias */
.why-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }

.why-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 24px 20px;
  transition: border-color .2s, transform .2s;
}

.why-card:hover {
  border-color: rgba(0, 212, 170, .35);
  transform: translateY(-2px);
}

.why-icon {
  font-size: 28px;
  margin-bottom: 12px;
}

.why-card h3 {
  font-family: 'Sora', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--bright);
  margin-bottom: 8px;
}

.why-card p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}

/* How it works */
.steps-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.step-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 22px 16px;
  text-align: center;
  position: relative;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(0, 212, 170, .12);
  border: 1px solid rgba(0, 212, 170, .25);
  color: var(--accent);
  font-family: 'Sora', sans-serif;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
}

.step-card h3 {
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  color: var(--bright);
  margin-bottom: 6px;
}

.step-card p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

/* Testimonials */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.testimonial-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.testimonial-stars {
  color: #fbbf24;
  font-size: 14px;
  letter-spacing: 2px;
}

.testimonial-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.65;
  flex: 1;
}

.testimonial-author {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.testimonial-name {
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--bright);
}

.testimonial-role {
  font-size: 12px;
  color: var(--muted);
}

/* Featured products — rich cards */
.featured-products-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.featured-product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .25s, transform .25s, box-shadow .25s;
}

.featured-product-card:hover {
  border-color: rgba(0, 212, 170, .35);
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, .28);
}

.fp-visual {
  position: relative;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.fp-visual-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, color-mix(in srgb, var(--fp-color) 45%, transparent), transparent 55%),
    radial-gradient(circle at 80% 70%, rgba(56, 189, 248, .22), transparent 50%),
    linear-gradient(145deg, rgba(255, 255, 255, .04), transparent 60%);
}

.fp-visual-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(to bottom, black, transparent);
}

.fp-visual-icon {
  position: relative;
  z-index: 1;
  font-size: 52px;
  line-height: 1;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, .35));
}

.fp-body {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 12px;
}

.fp-name {
  font-family: 'Sora', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--bright);
  line-height: 1.25;
}

.fp-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
  min-height: 4.5em;
}

.fp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.fp-tag {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--border);
  color: var(--text);
}

.fp-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 4px;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
}

@media (max-width: 1024px) {
  .featured-products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .featured-products-grid { grid-template-columns: 1fr; }
  .fp-visual { height: 120px; }
  .fp-visual-icon { font-size: 44px; }
  .fp-desc { min-height: auto; }
}

/* Legacy featured grid */
.home-featured-grid .bot-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.sec-foot-link {
  text-align: center;
  margin-top: 28px;
}

.sec-foot-link a {
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
}

.sec-alt { background: var(--bg2); }

/* Enhanced footer */
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 32px;
  align-items: start;
}

.footer-nav-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.footer-col h4 {
  font-family: 'Sora', sans-serif;
  font-size: 13px;
  color: var(--bright);
  margin-bottom: 12px;
}

.footer-col a {
  display: block;
  font-size: 13px;
  color: var(--muted);
  padding: 4px 0;
}

.footer-col a:hover { color: var(--accent); }

.footer-tagline {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.5;
  max-width: 280px;
}

@media (max-width: 1024px) {
  .cat-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .platform-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .why-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .testimonials-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .cat-bento { grid-template-columns: 1fr; }
  .platform-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .steps-row { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .footer-nav-cols { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .steps-row { grid-template-columns: 1fr; }
  .footer-nav-cols { grid-template-columns: 1fr; }
}

/* ── Mobile overflow & layout containment ── */
.hero-split-inner,
.cat-bento,
.platform-grid,
.why-grid,
.featured-products-grid,
.testimonials-grid,
.steps-row,
.footer-grid,
.pkg-grid {
  width: 100%;
  min-width: 0;
}

.cat-bento > *,
.platform-grid > *,
.why-grid > *,
.featured-products-grid > *,
.testimonials-grid > *,
.steps-row > *,
.footer-grid > *,
.pkg-grid > * {
  min-width: 0;
}

.cta-sec,
.footer {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .hero-orb {
    animation: none !important;
    filter: blur(48px);
  }

  .hero-orb-1 {
    width: min(320px, 70vw);
    height: min(320px, 70vw);
    left: -25%;
    top: -15%;
  }

  .hero-orb-2 {
    width: min(280px, 65vw);
    height: min(280px, 65vw);
    right: -20%;
    bottom: -12%;
  }

  .hero-orb-3 {
    width: min(220px, 50vw);
    height: min(220px, 50vw);
    left: 35%;
    top: 42%;
  }

  .hero-grid {
    inset: 0;
    animation: none !important;
  }

  .steps-row {
    grid-template-columns: 1fr;
  }

  .fp-body {
    padding: 18px 16px 20px;
  }

  .fp-actions {
    flex-direction: column;
  }

  .fp-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .cat-card {
    padding: 18px 14px;
  }

  .testimonial-card {
    padding: 20px 16px;
  }

  .cta-box {
    padding: 40px 16px;
  }
}

@media (max-width: 480px) {
  .hero-bento {
    grid-template-columns: 1fr;
  }

  .hero-bento-card:first-child {
    grid-column: span 1;
  }

  .hero-trust-pill {
    font-size: 11px;
    padding: 6px 10px;
  }
}
