/* ============================================================
   Content Quality Audit Tool — Marketing site
   Dark "OpenAI-style" theme matching the app
   ============================================================ */

:root {
  --bg: #0d0d0d;
  --bg-elev: #171717;
  --bg-elev-2: #1f1f1f;
  --line: #2d2d2d;
  --line-2: #404040;
  --text: #ececec;
  --text-dim: #b4b4b4;
  --text-mute: #8e8e8e;
  --accent: #10a37f;
  --accent-hover: #0e8c6c;
  --accent-soft: rgba(16, 163, 127, 0.12);
  --blue: #3b82f6;
  --red: #ef4444;
  --radius: 14px;
  --radius-lg: 18px;
  --maxw: 1120px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s var(--ease);
  white-space: nowrap;
}

.btn-lg {
  padding: 15px 28px;
  font-size: 16px;
  border-radius: 12px;
}

.btn-primary {
  background: var(--accent);
  color: #06251d;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(16, 163, 127, 0.3);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-2);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--text);
  background: var(--accent-soft);
}

.btn .arrow {
  transition: transform 0.2s var(--ease);
}

.btn:hover .arrow {
  transform: translateX(4px);
}

/* ---------------- Nav ---------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(13, 13, 13, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.nav.scrolled {
  border-bottom-color: var(--line);
  background: rgba(13, 13, 13, 0.9);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.brand-mark {
  color: var(--accent);
  font-size: 18px;
}

.nav-links {
  display: flex;
  gap: 30px;
  font-size: 15px;
}

.nav-links a {
  color: var(--text-dim);
  transition: color 0.2s var(--ease);
}

.nav-links a:hover {
  color: var(--text);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s var(--ease);
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  padding: 88px 0 60px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -220px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 620px;
  background: radial-gradient(circle at center, rgba(16, 163, 127, 0.22), transparent 65%);
  filter: blur(30px);
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--text-dim);
  background: var(--bg-elev);
  transition: border-color 0.2s var(--ease);
}

.pill:hover {
  border-color: var(--accent);
}

.pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.hero-title {
  margin-top: 26px;
  font-size: clamp(2.3rem, 5.5vw, 4rem);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -0.035em;
  max-width: 900px;
}

.grad {
  background: linear-gradient(120deg, #10a37f 0%, #4ade80 60%, #6ee7b7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  margin-top: 22px;
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-dim);
  max-width: 640px;
}

.hero-cta {
  margin-top: 34px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-meta {
  margin-top: 22px;
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--text-mute);
  font-size: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-meta .dot {
  color: var(--line-2);
}

/* Hero preview card */
.hero-card {
  margin-top: 56px;
  width: 100%;
  max-width: 720px;
  background: linear-gradient(180deg, var(--bg-elev) 0%, var(--bg-elev-2) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px;
  text-align: left;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.hero-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.hc-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  color: var(--text-dim);
  font-size: 14px;
}

.hc-dotrow {
  display: inline-flex;
  gap: 6px;
}
.hc-dotrow i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line-2);
}
.hc-dotrow i:first-child {
  background: #ef4444a0;
}
.hc-dotrow i:nth-child(2) {
  background: #f59e0ba0;
}
.hc-dotrow i:last-child {
  background: #10a37fa0;
}

.hc-overall {
  text-align: right;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.hc-overall-num {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.03em;
}
.hc-overall-lbl {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-mute);
}

.hero-card-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.mini {
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
}

.mini-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.mini-top b {
  color: var(--text);
  font-size: 15px;
}

.bar {
  height: 7px;
  background: var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), #6ee7b7);
  border-radius: 4px;
  transition: width 1.1s var(--ease);
}
.mini.in-view .bar i {
  width: calc(var(--v) * 1%);
}

.rank-mini {
  grid-column: span 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--accent-soft), rgba(16, 163, 127, 0.03));
  border-color: rgba(16, 163, 127, 0.35);
}
.rank-flow {
  display: flex;
  align-items: center;
  gap: 14px;
}
.rk {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.rk-now {
  color: var(--red);
}
.rk-new {
  color: var(--accent);
}
.rk-arrow {
  color: var(--text-mute);
  font-size: 1.3rem;
}
.mini-lbl {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---------------- Stats ---------------- */
.stats {
  padding: 20px 0 10px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding-top: 30px;
  padding-bottom: 30px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat {
  text-align: center;
}
.stat-num {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}
.stat-lbl {
  margin-top: 6px;
  font-size: 13.5px;
  color: var(--text-mute);
}

/* ---------------- Sections ---------------- */
.section {
  padding: 90px 0;
}
.section-alt {
  background: linear-gradient(180deg, var(--bg) 0%, #0a0a0a 100%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 54px;
}
.eyebrow {
  display: inline-block;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.section-head h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.section-head p {
  margin-top: 16px;
  color: var(--text-dim);
  font-size: 1.05rem;
}

/* ---------------- Feature grid ---------------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.feature-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 16px 40px rgba(16, 163, 127, 0.15);
}
.feat-icon {
  font-size: 30px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid rgba(16, 163, 127, 0.25);
  margin-bottom: 18px;
}
.feature-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.feature-card p {
  color: var(--text-dim);
  font-size: 15px;
}

/* ---------------- Dimensions ---------------- */
.dim-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 900px;
  margin: 0 auto;
}
.dim {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 28px;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease);
}
.dim:hover {
  transform: translateX(6px);
  border-color: var(--accent);
}
.dim-index {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
  opacity: 0.85;
  font-variant-numeric: tabular-nums;
}
.dim-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.dim-body p {
  color: var(--text-dim);
  font-size: 14.5px;
}
.dim-tag {
  font-size: 12.5px;
  color: var(--text-mute);
  border: 1px solid var(--line-2);
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ---------------- Steps ---------------- */
.steps {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.step {
  flex: 1;
  min-width: 240px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  text-align: center;
}
.step-num {
  width: 46px;
  height: 46px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.15rem;
  color: #06251d;
  background: var(--accent);
}
.step h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}
.step p {
  color: var(--text-dim);
  font-size: 14.5px;
}
.step-line {
  align-self: center;
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.how-cta {
  margin-top: 48px;
  text-align: center;
}

/* ---------------- Workflow 3D stage ---------------- */
.workflow-stage {
  max-width: 760px;
  margin: 0 auto 56px;
}
.wf-canvas-wrap {
  position: relative;
  height: 440px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(16, 163, 127, 0.14), transparent 60%),
    linear-gradient(180deg, var(--bg-elev) 0%, #0b0b0b 100%);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}
#wf-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
}
#wf-canvas:active {
  cursor: grabbing;
}
.wf-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: rgba(13, 13, 13, 0.6);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  pointer-events: none;
}
.wf-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  animation: wfBlink 1.6s ease-in-out infinite;
}
@keyframes wfBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.wf-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-mute);
  font-size: 15px;
}

.wf-tabs {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 18px;
  flex-wrap: wrap;
}
.wf-tab {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 10px 18px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--bg-elev);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.wf-tab b {
  color: var(--accent);
  font-weight: 800;
  margin-right: 6px;
}
.wf-tab:hover {
  color: var(--text);
  border-color: var(--accent);
}
.wf-tab.active {
  color: var(--text);
  background: var(--accent-soft);
  border-color: var(--accent);
}

/* Active step highlight synced with the animation */
.step {
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}
.step.active {
  border-color: var(--accent);
  box-shadow: 0 12px 34px rgba(16, 163, 127, 0.18);
  transform: translateY(-4px);
}
.step.active .step-num {
  box-shadow: 0 0 0 6px var(--accent-soft);
}

/* ---------------- Tech stack ---------------- */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}
.stack-col {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.stack-col h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 16px;
}
.stack-col ul {
  list-style: none;
}
.stack-col li {
  padding: 9px 0;
  color: var(--text-dim);
  font-size: 15px;
  border-bottom: 1px solid var(--line);
}
.stack-col li:last-child {
  border-bottom: none;
}
.stack-col li::before {
  content: "▸";
  color: var(--accent);
  margin-right: 10px;
}

/* ---------------- CTA band ---------------- */
.cta-band {
  position: relative;
  padding: 100px 0;
  text-align: center;
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(16, 163, 127, 0.18), transparent 60%);
  pointer-events: none;
}
.cta-inner {
  position: relative;
  z-index: 1;
}
.cta-inner h2 {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  max-width: 760px;
  margin: 0 auto;
  line-height: 1.12;
}
.cta-inner p {
  margin: 18px auto 0;
  color: var(--text-dim);
  font-size: 1.1rem;
  max-width: 560px;
}
.cta-inner .hero-cta {
  margin-top: 34px;
}

/* ---------------- Footer ---------------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 60px 0 30px;
  background: #0a0a0a;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.3fr 2fr;
  gap: 40px;
}
.footer-brand p {
  margin-top: 14px;
  color: var(--text-mute);
  font-size: 14.5px;
  max-width: 300px;
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.footer-col h5 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  color: var(--text-mute);
  font-size: 14.5px;
  padding: 6px 0;
  transition: color 0.2s var(--ease);
}
.footer-col a:hover {
  color: var(--accent);
}
.footer-bottom {
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  color: var(--text-mute);
  font-size: 13.5px;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------------- Reveal animation ---------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.in-view {
  opacity: 1;
  transform: none;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .nav-links,
  .nav-actions {
    display: none;
  }
  .nav-toggle {
    display: flex;
  }
  .nav.menu-open .nav-links {
    display: flex;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--line);
    padding: 8px 24px 16px;
  }
  .nav.menu-open .nav-links a {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }
  .nav.menu-open .nav-actions {
    display: flex;
    position: absolute;
    top: calc(68px + 218px);
    left: 0;
    right: 0;
    padding: 16px 24px;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--line);
  }
  .nav.menu-open .nav-actions .btn {
    flex: 1;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 26px;
  }
  .stack-grid {
    grid-template-columns: 1fr;
  }
  .hero-card-grid {
    grid-template-columns: 1fr;
  }
  .rank-mini {
    grid-column: span 1;
  }
  .dim {
    grid-template-columns: auto 1fr;
    gap: 16px;
  }
  .dim-tag {
    display: none;
  }
  .step-line {
    display: none;
  }
  .footer-bottom {
    flex-direction: column;
  }
  .wf-canvas-wrap {
    height: 340px;
  }
  .wf-tab {
    padding: 9px 14px;
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
