/* =====================================================
   NDTify – One-page marketplace
   HTML5 / CSS3 – no framework
   ===================================================== */

/* ---------- Design tokens ---------- */
:root {
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --bg: #ffffff;
  --bg-soft: #f6f7fb;
  --bg-dark: #0b1020;
  --surface: #ffffff;
  --border: #e6e8f0;

  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --on-dark: #e5e7ff;
  --on-dark-muted: #9aa3c7;

  --brand: #5b5bf6;
  --brand-600: #4f46e5;
  --brand-2: #22d3ee;
  --grad: linear-gradient(135deg, #6366f1 0%, #22d3ee 100%);

  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 3px rgba(15, 23, 42, .06);
  --shadow: 0 10px 30px -12px rgba(15, 23, 42, .18);
  --shadow-lg: 0 30px 60px -20px rgba(79, 70, 229, .35);

  --container: 1200px;
  --section-y: clamp(64px, 9vw, 120px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
address { font-style: normal; }
:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 3px; border-radius: 4px; }

/* ---------- Utilities ---------- */
.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.container--narrow { max-width: 820px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; top: -100px; left: 16px; z-index: 1000;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { top: 16px; }
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.bg-soft { background: var(--bg-soft); }
.bg-dark { background: var(--bg-dark); color: var(--on-dark); }

.section { padding-block: var(--section-y); }
.section-head { max-width: 720px; margin: 0 auto clamp(40px, 5vw, 64px); text-align: center; }
.section-head p:last-child { color: var(--muted); font-size: 1.0625rem; margin-top: 14px; }
.section-head--row {
  max-width: none; text-align: left;
  display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-end; justify-content: space-between;
}
.section-head--light { color: var(--on-dark); }
.section-head--light .kicker { color: var(--brand-2); }
.kicker {
  display: inline-block; font-size: .8125rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--brand); margin-bottom: 12px;
}
h1 { font-size: clamp(2.25rem, 5.2vw, 3.75rem); line-height: 1.08; font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.625rem); line-height: 1.15; font-weight: 800; letter-spacing: -.02em; }
h3 { font-size: 1.1875rem; font-weight: 700; line-height: 1.3; }

.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: .9375rem;
  border: 1.5px solid transparent; transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s, color .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-lg { padding: 16px 30px; font-size: 1.0625rem; }
.btn-sm { padding: 8px 16px; font-size: .875rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 20px -8px rgba(79, 70, 229, .6); }
.btn-primary:hover { box-shadow: 0 14px 28px -10px rgba(79, 70, 229, .7); }
.btn-ghost { color: var(--ink-2); }
.btn-ghost:hover { color: var(--brand); }
.btn-outline { color: #fff; border-color: rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .04); }
.btn-outline:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .5); }
.btn-outline-dark { color: var(--ink); border-color: var(--border); background: var(--surface); }
.btn-outline-dark:hover { border-color: var(--brand); color: var(--brand); }
.btn-light { background: #fff; color: var(--brand-600); }
.btn-light:hover { background: #f1f5ff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .8);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.site-header.is-scrolled { border-color: var(--border); box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 72px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; }
.logo-mark { flex: none; }
.site-nav ul { display: flex; gap: 6px; }
.site-nav a {
  display: block; padding: 8px 14px; border-radius: 999px; font-weight: 500; font-size: .9375rem; color: var(--ink-2);
  transition: background .2s, color .2s;
}
.site-nav a:hover, .site-nav a.is-active { background: var(--bg-soft); color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 6px; }

.nav-toggle { display: none; width: 44px; height: 44px; flex-direction: column; justify-content: center; align-items: center; gap: 5px; border-radius: 10px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s var(--ease), opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .header-actions .btn-ghost { display: none; }
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute; top: 72px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
    padding: 12px 20px 20px;
    transform: translateY(-8px); opacity: 0; visibility: hidden; pointer-events: none;
    transition: transform .25s var(--ease), opacity .25s, visibility .25s;
  }
  .site-nav.is-open { transform: none; opacity: 1; visibility: visible; pointer-events: auto; }
  .site-nav ul { flex-direction: column; gap: 2px; }
  .site-nav a { padding: 12px 14px; font-size: 1.0625rem; }
}
@media (max-width: 560px) { .header-actions .btn-primary { display: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--bg-dark); color: #fff; padding-block: clamp(72px, 10vw, 128px) clamp(64px, 8vw, 112px); }
.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 50% at 15% 10%, rgba(99, 102, 241, .45), transparent 60%),
    radial-gradient(50% 45% at 90% 20%, rgba(34, 211, 238, .28), transparent 60%),
    radial-gradient(60% 60% at 60% 110%, rgba(168, 85, 247, .25), transparent 60%);
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(70% 70% at 50% 40%, #000, transparent);
  -webkit-mask-image: radial-gradient(70% 70% at 50% 40%, #000, transparent);
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 8px; border-radius: 999px; font-size: .8125rem; font-weight: 600;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); color: var(--on-dark);
  margin-bottom: 24px;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-2); box-shadow: 0 0 0 4px rgba(34, 211, 238, .2); }
.hero h1 { margin-bottom: 22px; }
.lead { font-size: clamp(1.0625rem, 1.6vw, 1.25rem); color: var(--on-dark-muted); max-width: 560px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 28px; font-size: .9rem; color: var(--on-dark-muted); }

.hero-visual { position: relative; margin: 0; }
.hero-visual img {
  border-radius: 20px; box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, .08);
  aspect-ratio: 4 / 3; object-fit: cover; width: 100%;
}
.float-card {
  position: absolute; display: flex; flex-direction: column; gap: 2px;
  padding: 12px 16px; border-radius: 14px; font-size: .8125rem;
  background: rgba(255, 255, 255, .92); color: var(--ink); box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  animation: float 6s ease-in-out infinite;
}
.float-card strong { font-size: .9375rem; }
.float-card span { color: var(--muted); }
.float-1 { left: -6%; bottom: 14%; }
.float-2 { right: -4%; top: 10%; animation-delay: -3s; }
@keyframes float { 50% { transform: translateY(-10px); } }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { max-width: 560px; margin-top: 12px; }
  .float-1 { left: 4%; } .float-2 { right: 4%; }
}

/* ---------- Tech bar ---------- */
.tech-bar { padding: 28px 0; border-bottom: 1px solid var(--border); }
.tech-bar .container { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 40px; }
.tech-bar p { font-size: .875rem; color: var(--muted); flex: none; }
.tech-bar ul { display: flex; flex-wrap: wrap; gap: 12px 32px; font-weight: 700; color: #9aa3b8; font-size: 1.0625rem; letter-spacing: -.01em; }

/* ---------- Categories ---------- */
.cat-card {
  display: flex; flex-direction: column; gap: 12px;
  padding: 28px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
.cat-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.cat-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--grad); color: #fff; margin-bottom: 6px; }
.cat-icon svg { width: 26px; height: 26px; fill: currentColor; }
.cat-card p { color: var(--muted); font-size: .9375rem; flex: 1; }
.link-arrow { font-weight: 600; color: var(--brand); font-size: .9375rem; }

/* ---------- Products ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 5px; border-radius: 999px; background: #fff; border: 1px solid var(--border); }
.filter { padding: 8px 16px; border-radius: 999px; font-size: .875rem; font-weight: 600; color: var(--ink-2); transition: background .2s, color .2s; }
.filter:hover { color: var(--ink); background: var(--bg-soft); }
.filter.is-active { background: var(--ink); color: #fff; }

.product {
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.product:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.product.is-hidden { display: none; }
.product-media { position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 3; background: var(--bg-soft); }
.product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.product:hover .product-media img { transform: scale(1.04); }
.badge {
  position: absolute; top: 12px; left: 12px;
  padding: 4px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700;
  background: rgba(255, 255, 255, .92); color: var(--ink); backdrop-filter: blur(6px);
}
.product-body { display: flex; flex-direction: column; gap: 8px; padding: 20px 22px 22px; flex: 1; }
.product-body h3 { font-size: 1.0625rem; }
.product-body h3 a:hover { color: var(--brand); }
.product-body p { color: var(--muted); font-size: .9rem; flex: 1; }
.product-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--border); }
.price { font-weight: 800; font-size: 1.125rem; letter-spacing: -.01em; }
.price small { font-weight: 500; font-size: .8rem; color: var(--muted); }
.empty-state { text-align: center; color: var(--muted); padding: 40px 0; }

/* ---------- Features ---------- */
.feature { padding: 28px; border-radius: var(--radius); background: var(--bg-soft); transition: background .25s; }
.feature:hover { background: #eef0ff; }
.feature-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: #fff; box-shadow: var(--shadow-sm); font-size: 1.375rem; margin-bottom: 18px; }
.feature h3 { margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: .9375rem; }

/* ---------- Steps ---------- */
.steps { position: relative; overflow: hidden; }
.steps::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(50% 60% at 50% 0%, rgba(99, 102, 241, .35), transparent 70%);
}
.steps-list { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.step { padding: 32px 28px; border-radius: var(--radius); background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .1); }
.step-num { display: inline-block; font-size: .8125rem; font-weight: 800; letter-spacing: .1em; color: var(--brand-2); margin-bottom: 16px; }
.step h3 { color: #fff; margin-bottom: 10px; }
.step p { color: var(--on-dark-muted); font-size: .9375rem; }
@media (max-width: 900px) { .steps-list { grid-template-columns: 1fr; } }

/* ---------- Pricing ---------- */
.pricing-grid { align-items: stretch; }
.plan {
  position: relative; display: flex; flex-direction: column; gap: 14px;
  padding: 34px 30px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border);
}
.plan--featured { background: var(--bg-dark); color: #fff; border-color: transparent; box-shadow: var(--shadow-lg); }
.plan-tag {
  position: absolute; top: -14px; left: 30px;
  padding: 5px 12px; border-radius: 999px; font-size: .75rem; font-weight: 700; background: var(--grad); color: #fff;
}
.plan h3 { font-size: 1.25rem; }
.plan-desc { color: var(--muted); font-size: .9375rem; min-height: 3em; }
.plan--featured .plan-desc { color: var(--on-dark-muted); }
.plan-price { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin-top: 6px; }
.plan-price span { font-size: .9375rem; font-weight: 500; color: var(--muted); }
.plan-price small { font-size: .9375rem; font-weight: 500; color: var(--muted); }
.plan--featured .plan-price small, .plan--featured .plan-price span { color: var(--on-dark-muted); }
.plan-features { display: grid; gap: 10px; margin-block: 10px 14px; flex: 1; font-size: .9375rem; }
.plan-features li { padding-left: 28px; position: relative; }
.plan-features li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  font-size: .75rem; font-weight: 800; background: #eef0ff; color: var(--brand);
}
.plan--featured .plan-features li::before { background: rgba(255, 255, 255, .12); color: var(--brand-2); }
.pricing-note { text-align: center; color: var(--muted); font-size: .9rem; margin-top: 32px; }
@media (max-width: 1024px) { .pricing-grid { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; } }

/* ---------- Testimonials ---------- */
.testimonial {
  margin: 0; display: flex; flex-direction: column; gap: 22px;
  padding: 30px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
}
.testimonial > p { font-size: 1.0625rem; line-height: 1.6; flex: 1; }
.testimonial footer { display: flex; align-items: center; gap: 12px; }
.testimonial img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.testimonial cite { display: block; font-style: normal; font-weight: 700; font-size: .9375rem; }
.testimonial span { font-size: .8125rem; color: var(--muted); }

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 12px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; }
.faq-item summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 22px; font-weight: 600; font-size: 1.0625rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg-soft); color: var(--brand); font-weight: 700; transition: transform .25s var(--ease), background .25s;
}
.faq-item[open] summary::after { content: "–"; background: var(--brand); color: #fff; }
.faq-item p { padding: 0 22px 20px; color: var(--muted); }

/* ---------- CTA ---------- */
.cta { padding-top: 0; }
.cta-box {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center;
  padding: clamp(32px, 5vw, 56px); border-radius: 24px; background: var(--grad); color: #fff;
  box-shadow: var(--shadow-lg);
}
.cta-box h2 { font-size: clamp(1.5rem, 2.8vw, 2rem); margin-bottom: 10px; }
.cta-box p { color: rgba(255, 255, 255, .85); }
.cta-form { display: flex; gap: 10px; }
.cta-form input {
  flex: 1; min-width: 0; padding: 14px 18px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .3);
  background: rgba(255, 255, 255, .15); color: #fff;
}
.cta-form input::placeholder { color: rgba(255, 255, 255, .7); }
.cta-form input:focus { outline-color: #fff; background: rgba(255, 255, 255, .22); }
@media (max-width: 900px) { .cta-box { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .cta-form { flex-direction: column; } .cta-form .btn { width: 100%; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-dark); color: var(--on-dark-muted); padding-top: 64px; font-size: .9375rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 48px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.footer-brand .logo { color: #fff; margin-bottom: 16px; }
.footer-brand p { max-width: 340px; margin-bottom: 18px; }
.footer-brand a:hover { color: #fff; }
.site-footer h3 { color: #fff; font-size: .9375rem; margin-bottom: 16px; }
.site-footer nav li + li { margin-top: 10px; }
.site-footer nav a:hover { color: #fff; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-block: 22px; font-size: .875rem; }
.socials { display: flex; gap: 20px; }
.socials a:hover { color: #fff; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in-view { opacity: 1; transform: none; }
.reveal:nth-child(2) { transition-delay: .08s; }
.reveal:nth-child(3) { transition-delay: .16s; }
.reveal:nth-child(4) { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- FAQ footer note ---------- */
.faq-more { text-align: center; color: var(--muted); margin-top: 28px; }
.faq-more a { color: var(--brand); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
