/* Rakshak project site
   ------------------------------------------------------------------ */

:root {
  --bg: #0b0f17;
  --bg-soft: #111827;
  --bg-card: #141b28;
  --border: #1f2937;
  --border-bright: #2b3648;
  --text: #e6edf6;
  --text-dim: #9aa8bd;
  --text-faint: #6b7a91;
  --accent: #ff5a3c;
  --accent-soft: rgba(255, 90, 60, 0.12);
  --safe: #22c58b;
  --safe-soft: rgba(34, 197, 139, 0.12);
  --warn: #f5b942;
  --link: #6ea8ff;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --mono: "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono", Menlo, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  --maxw: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Ambient glow behind the hero. Pointer-events off so it never eats clicks. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(760px 420px at 12% -8%, rgba(255, 90, 60, 0.13), transparent 62%),
    radial-gradient(680px 400px at 92% 4%, rgba(110, 168, 255, 0.10), transparent 60%);
}

.wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: 20px;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

code {
  font-family: var(--mono);
  font-size: 0.88em;
}

/* ---- Navigation ---------------------------------------------------- */

header.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 15, 23, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 60px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 17px;
  color: var(--text);
  letter-spacing: -0.02em;
}

.brand:hover {
  text-decoration: none;
}

.brand svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 22px;
  margin-left: auto;
  align-items: center;
}

.nav-links a {
  color: var(--text-dim);
  font-size: 14.5px;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--text);
  text-decoration: none;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-bright);
  background: var(--bg-card);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: #3d4a61;
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: #ff6f55;
  border-color: #ff6f55;
}

.btn svg {
  width: 17px;
  height: 17px;
}

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

.hero {
  padding-block: 84px 60px;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid var(--border-bright);
  background: var(--bg-card);
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 22px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--safe);
  box-shadow: 0 0 0 3px var(--safe-soft);
}

.hero h1 {
  font-size: clamp(2.5rem, 7vw, 4.1rem);
  font-weight: 800;
  margin-bottom: 18px;
}

.hero h1 .accent {
  background: linear-gradient(100deg, var(--accent), #ffa23c);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero .lede {
  max-width: 660px;
  margin: 0 auto 30px;
  font-size: clamp(1rem, 2.4vw, 1.18rem);
  color: var(--text-dim);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 42px;
}

/* ---- Stat strip ---------------------------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 740px;
  margin: 0 auto;
}

.stat {
  padding: 16px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.stat b {
  display: block;
  font-size: clamp(1.3rem, 3.4vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

.stat span {
  font-size: 12.5px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---- Sections ------------------------------------------------------ */

section {
  padding-block: 62px;
  scroll-margin-top: 70px;
}

.section-head {
  max-width: 660px;
  margin-bottom: 32px;
}

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

.section-head h2 {
  font-size: clamp(1.7rem, 4.2vw, 2.3rem);
  font-weight: 750;
}

.section-head p {
  color: var(--text-dim);
  margin: 0;
  font-size: 1.02rem;
}

.kicker {
  display: block;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

/* ---- Demo ---------------------------------------------------------- */

.demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  padding: 20px;
}

.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 250px;
  padding: 24px;
  border: 2px dashed var(--border-bright);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.015);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
  overflow: hidden;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.dropzone svg {
  width: 34px;
  height: 34px;
  color: var(--text-faint);
}

.dropzone strong {
  font-size: 15px;
}

.dropzone small {
  color: var(--text-faint);
  font-size: 13px;
}

/* The preview image fills the dropzone once something is loaded. */
#preview {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #05080d;
  border-radius: inherit;
}

.dropzone.has-image #preview {
  display: block;
}

.dropzone.has-image .dz-prompt {
  display: none;
}

.samples {
  margin-top: 16px;
}

.samples p {
  margin: 0 0 9px;
  font-size: 13px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sample-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.sample-row button {
  position: relative;
  padding: 0;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--border-bright);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-soft);
  transition: border-color 0.12s ease, transform 0.12s ease;
}

.sample-row button:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.sample-row img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---- Result readout ------------------------------------------------ */

.verdict {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-bright);
  background: var(--bg-soft);
  margin-bottom: 18px;
}

.verdict-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--border);
  font-size: 20px;
}

.verdict-text b {
  display: block;
  font-size: 1.18rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.verdict-text span {
  font-size: 13.5px;
  color: var(--text-dim);
}

.verdict.is-accident {
  border-color: rgba(255, 90, 60, 0.45);
  background: var(--accent-soft);
}

.verdict.is-accident .verdict-icon {
  background: var(--accent);
}

.verdict.is-safe {
  border-color: rgba(34, 197, 139, 0.4);
  background: var(--safe-soft);
}

.verdict.is-safe .verdict-icon {
  background: var(--safe);
}

.bar-row {
  margin-bottom: 13px;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  margin-bottom: 5px;
  color: var(--text-dim);
}

.bar-label b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.bar {
  height: 8px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.bar > i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.bar.accident > i {
  background: linear-gradient(90deg, var(--accent), #ff8a3c);
}

.bar.safe > i {
  background: linear-gradient(90deg, var(--safe), #4fd6a5);
}

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-top: 13px;
  margin-top: 4px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-faint);
  font-family: var(--mono);
}

.status {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  color: var(--text-dim);
  min-height: 22px;
}

.status.error {
  color: var(--accent);
}

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid var(--border-bright);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.notice {
  margin-top: 18px;
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  border-left: 3px solid var(--warn);
  background: rgba(245, 185, 66, 0.06);
  font-size: 13.5px;
  color: var(--text-dim);
}

.notice strong {
  color: var(--text);
}

/* ---- Feature cards ------------------------------------------------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  gap: 16px;
}

.card {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.card:hover {
  border-color: var(--border-bright);
  transform: translateY(-2px);
}

.card .ico {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent-soft);
  margin-bottom: 13px;
  font-size: 18px;
}

.card h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

.card p {
  margin: 0;
  color: var(--text-dim);
  font-size: 14.5px;
}

/* ---- Pipeline ------------------------------------------------------ */

.pipeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 20px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 11px;
}

.step h4 {
  margin: 0 0 5px;
  font-size: 0.97rem;
  font-weight: 700;
}

.step p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-dim);
}

/* ---- Code ---------------------------------------------------------- */

.code {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #080c13;
  overflow: hidden;
}

.code-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
  font-size: 12.5px;
  color: var(--text-faint);
  font-family: var(--mono);
}

.code-head .lamps {
  display: flex;
  gap: 5px;
  margin-right: 5px;
}

.code-head .lamps i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-bright);
}

.copy-btn {
  margin-left: auto;
  padding: 3px 10px;
  font-size: 11.5px;
  font-family: inherit;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--border-bright);
  border-radius: 6px;
  cursor: pointer;
}

.copy-btn:hover {
  color: var(--text);
  border-color: #3d4a61;
}

.code pre {
  margin: 0;
  padding: 17px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13.2px;
  line-height: 1.75;
  color: #c9d6e8;
}

.code .c {
  color: #5f7186;
}

.code .k {
  color: #ff8a6b;
}

.code .s {
  color: #7ddba4;
}

.code .v {
  color: #8cb8ff;
}

/* ---- Results table ------------------------------------------------- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  min-width: 460px;
}

th,
td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  font-size: 12px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-faint);
  background: var(--bg-soft);
}

tbody tr:last-child td {
  border-bottom: none;
}

td.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

/* ---- Sponsor / CTA ------------------------------------------------- */

.cta {
  padding: 40px 32px;
  border: 1px solid var(--border-bright);
  border-radius: 18px;
  background:
    radial-gradient(600px 220px at 50% 0%, rgba(255, 90, 60, 0.14), transparent 70%),
    var(--bg-card);
  text-align: center;
}

.cta h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.cta p {
  max-width: 540px;
  margin: 0 auto 24px;
  color: var(--text-dim);
}

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

footer {
  border-top: 1px solid var(--border);
  padding-block: 30px 40px;
  margin-top: 40px;
}

.foot-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-faint);
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

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

@media (max-width: 860px) {
  .demo-grid {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .nav-links a:not(.nav-cta) {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero {
    padding-block: 54px 42px;
  }

  section {
    padding-block: 46px;
  }

  .sample-row {
    grid-template-columns: repeat(4, 1fr);
  }

  .cta {
    padding: 30px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}
