/* NDT Hub — Light professional theme */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .hero-stagger > * { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
}

/* ─── Page background ─── */
.page-bg {
  background-color: #faf9fc;
  background-image:
    radial-gradient(ellipse 80% 60% at 0% 0%, rgba(196, 181, 253, 0.18), transparent 55%),
    radial-gradient(ellipse 70% 50% at 100% 5%, rgba(124, 58, 237, 0.08), transparent 50%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(227, 6, 19, 0.04), transparent 55%);
}

/* ─── Nav ─── */
.nav-light {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid #e9e5f5;
  transition: box-shadow 0.3s ease;
}
.nav-light.scrolled {
  box-shadow: 0 4px 24px rgba(124, 58, 237, 0.08);
}

.brand-logo {
  display: block;
  height: 2.75rem;
  width: auto;
  object-fit: contain;
}
@media (min-width: 640px) {
  .brand-logo { height: 3.25rem; }
}

.product-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  border: 1px solid rgba(124, 58, 237, 0.25);
  background: rgba(124, 58, 237, 0.06);
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6d28d9;
}

/* ─── Hero ─── */
.hero-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  animation: hero-in 0.65s ease-out forwards;
}
.hero-stagger > *:nth-child(1) { animation-delay: 0.05s; }
.hero-stagger > *:nth-child(2) { animation-delay: 0.12s; }
.hero-stagger > *:nth-child(3) { animation-delay: 0.19s; }
.hero-stagger > *:nth-child(4) { animation-delay: 0.26s; }
.hero-stagger > *:nth-child(5) { animation-delay: 0.33s; }
.hero-stagger > *:nth-child(6) { animation-delay: 0.4s; }

@keyframes hero-in {
  to { opacity: 1; transform: translateY(0); }
}

.text-gradient {
  background: linear-gradient(135deg, #7C3AED 0%, #E30613 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.pulse-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #7C3AED;
  animation: dot-pulse 2s ease-out infinite;
}
@keyframes dot-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Hero dashboard card */
.hero-card {
  border-radius: 1.25rem;
  border: 1px solid #e9e5f5;
  background: #fff;
  box-shadow: 0 20px 60px rgba(124, 58, 237, 0.1), 0 4px 16px rgba(15, 23, 42, 0.04);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.hero-card.tilt-active { transition: transform 0.1s ease; }

.metric-card {
  padding: 0.875rem;
  border-radius: 0.75rem;
  background: #f8f7fc;
  border: 1px solid #ede9fe;
}

.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 0.875rem;
  border-radius: 0.625rem;
  font-size: 0.75rem;
}

/* ─── Buttons ─── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 0.75rem;
  background: #7C3AED;
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
}
.btn-primary:hover {
  background: #6d28d9;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.25);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  font-weight: 600;
  font-size: 0.875rem;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  cursor: pointer;
}
.btn-secondary:hover {
  border-color: #c4b5fd;
  color: #6d28d9;
  background: #faf9fc;
}

/* ─── Marquee ─── */
.marquee-wrap {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}
.marquee-track {
  display: flex;
  gap: 2.5rem;
  width: max-content;
  animation: marquee 40s linear infinite;
}
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.marquee-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  font-size: 0.75rem;
  font-weight: 500;
  color: #64748b;
  letter-spacing: 0.04em;
}

/* ─── Feature cards ─── */
.feature-card {
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px solid #e9e5f5;
  background: #fff;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  cursor: default;
}
.feature-card:hover {
  transform: translateY(-3px);
  border-color: #c4b5fd;
  box-shadow: 0 12px 32px rgba(124, 58, 237, 0.08);
}
.feature-card--wide { grid-column: span 2; }
@media (max-width: 768px) {
  .feature-card--wide { grid-column: span 1; }
}

.feature-icon {
  width: 2.5rem; height: 2.5rem;
  border-radius: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.feature-icon--purple { background: #ede9fe; color: #7C3AED; }
.feature-icon--lilac { background: #f5f3ff; color: #8b5cf6; }
.feature-icon--red { background: #fef2f2; color: #E30613; }

/* ─── Module cards (ex roadmap) ─── */
.module-card {
  padding: 1.25rem;
  border-radius: 0.875rem;
  border: 1px solid #e9e5f5;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.module-card:hover {
  border-color: #c4b5fd;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.06);
}
.module-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #ecfdf5;
  color: #059669;
  margin-bottom: 0.5rem;
}
.module-badge svg { width: 0.75rem; height: 0.75rem; }

/* ─── Integration ─── */
.sync-feed-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  font-family: ui-monospace, monospace;
  font-size: 0.6875rem;
  color: #64748b;
}
.sync-tag { font-weight: 700; width: 2.5rem; flex-shrink: 0; }
.sync-tag--in { color: #059669; }
.sync-tag--out { color: #7C3AED; }
.sync-tag--cons { color: #E30613; }

.logo-partner-box {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  background: #fff;
  border: 1px solid #e9e5f5;
}

/* ─── Platform mock ─── */
.platform-shell {
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.08);
}
.platform-chrome {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
.chrome-dot { width: 10px; height: 10px; border-radius: 50%; }
.chrome-dot--red { background: #fca5a5; }
.chrome-dot--yellow { background: #fde047; }
.chrome-dot--green { background: #86efac; }

.platform-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  min-height: 420px;
}
@media (max-width: 768px) {
  .platform-layout { grid-template-columns: 1fr; }
  .platform-sidebar { display: none; }
}

.platform-sidebar {
  padding: 1rem 0.75rem;
  border-right: 1px solid #f1f5f9;
  background: #faf9fc;
}
.platform-nav-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  color: #64748b;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}
.platform-nav-item:hover { background: #f1f5f9; color: #334155; }
.platform-nav-item.active {
  background: #ede9fe;
  color: #6d28d9;
  font-weight: 500;
}

.platform-content { padding: 1.25rem; }
.platform-tab-panel { animation: tab-fade 0.3s ease-out; }
@keyframes tab-fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.mock-kpi {
  padding: 1rem;
  border-radius: 0.75rem;
  background: #f8f7fc;
  border: 1px solid #ede9fe;
}
.mock-table {
  width: 100%;
  font-size: 0.8125rem;
  border-collapse: collapse;
}
.mock-table th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  color: #64748b;
  font-weight: 500;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.75rem;
}
.mock-table td {
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
}

.status-pill {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
}
.status-pill--active { background: #ede9fe; color: #6d28d9; }
.status-pill--report { background: #fef3c7; color: #b45309; }
.status-pill--done { background: #dcfce7; color: #15803d; }
.status-pill--alert { background: #fee2e2; color: #dc2626; }

.progress-bar {
  height: 6px;
  border-radius: 9999px;
  background: #e9e5f5;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, #7C3AED, #a78bfa);
}

/* ─── Workflow ─── */
.workflow-track {
  display: flex;
  gap: 0;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}
.workflow-step {
  flex: 1;
  min-width: 110px;
  text-align: center;
  position: relative;
  padding: 0 0.5rem;
}
.workflow-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 1.25rem;
  right: -50%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #c4b5fd, #ede9fe);
  z-index: 0;
}
.workflow-dot {
  width: 2.5rem; height: 2.5rem;
  border-radius: 50%;
  background: #ede9fe;
  border: 2px solid #7C3AED;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
  position: relative;
  z-index: 1;
  font-size: 0.625rem;
  font-weight: 700;
  color: #6d28d9;
}

/* ─── Section alt bg ─── */
.section-alt {
  background: rgba(255, 255, 255, 0.6);
  border-top: 1px solid #ede9fe;
  border-bottom: 1px solid #ede9fe;
}

/* ─── Scroll reveal ─── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ─── Focus ─── */
a:focus-visible, button:focus-visible {
  outline: 2px solid #7C3AED;
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ─── FAQ ─── */
.faq-item {
  transition: border-color 0.2s, box-shadow 0.2s;
}
.faq-item[open] {
  border-color: #c4b5fd;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.06);
}
.faq-item summary {
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  float: right;
  font-weight: 400;
  color: #7C3AED;
  font-size: 1.125rem;
  line-height: 1.25rem;
}
.faq-item[open] summary::after { content: '−'; }
