/* RealIntel One — Demo Site (Light Theme)
   Completely independent from style.css (dark dashboard) */

/* ── Variables ── */
:root {
  --bg: #ffffff;
  --bg-subtle: #f8f9fc;
  --bg-accent: #eef3ff;
  --surface: #ffffff;
  --border: #e2e5ed;
  --border-light: #f0f1f5;
  --text: #1a1d27;
  --text-secondary: #5a5f73;
  --text-dim: #8b8fa3;
  --accent: #4f8cff;
  --accent-hover: #3a75e8;
  --accent-light: rgba(79, 140, 255, 0.08);
  --green: #22c55e;
  --green-light: rgba(34, 197, 94, 0.1);
  --yellow: #eab308;
  --yellow-light: rgba(234, 179, 8, 0.1);
  --red: #ef4444;
  --red-light: rgba(239, 68, 68, 0.1);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "SF Mono", "Fira Code", "Consolas", monospace;
}

/* ── Reset + Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

img { max-width: 100%; display: block; }

/* ── Nav ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  padding: 0 24px;
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
}

.nav-logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  border-radius: var(--radius-sm);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s;
}

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

.nav-signin {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent) !important;
  padding: 8px 16px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  transition: background 0.15s, color 0.15s;
}

.nav-signin:hover {
  background: var(--accent);
  color: #fff !important;
}

/* ── Hamburger button (hidden on desktop) ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Section containers ── */
.section {
  padding: 80px 24px;
}

.section-inner {
  max-width: 1120px;
  margin: 0 auto;
}

.section-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 8px;
}

.section-title {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.6;
}

/* ── Hero ── */
.hero {
  background: linear-gradient(180deg, #ffffff 0%, #f0f4ff 100%);
  padding: 100px 24px 80px;
  text-align: center;
}

.hero-inner {
  max-width: 780px;
  margin: 0 auto;
}

.hero-title {
  font-size: 52px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.hero-title .highlight {
  background: linear-gradient(135deg, var(--accent) 0%, #7c5cff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 19px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 580px;
  margin: 0 auto 32px;
}

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

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font);
}

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

.btn-primary:hover { background: var(--accent-hover); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-lg {
  padding: 14px 32px;
  font-size: 16px;
}

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

/* ── Features Grid ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 40px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--accent-light);
  font-size: 20px;
  margin-bottom: 14px;
}

.feature-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.feature-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ── How It Works ── */
.steps {
  display: flex;
  gap: 32px;
  margin-top: 48px;
}

.step {
  flex: 1;
  text-align: center;
  position: relative;
}

.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 28px;
  right: -16px;
  width: 32px;
  height: 2px;
  background: var(--border);
}

.step-number {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 16px;
}

.step h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.step p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Coverage ── */
.coverage-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.coverage-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
}

.coverage-chip-icon {
  font-size: 16px;
}

.coverage-chip--large {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.coverage-note {
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-dim);
}

/* ── Try It (Demo) ── */
.try-it {
  background: var(--bg-subtle);
}

.demo-form {
  max-width: 640px;
  margin: 40px auto 0;
}

.demo-input-group {
  display: flex;
  gap: 12px;
}

.demo-input {
  flex: 1;
  padding: 14px 18px;
  font-size: 15px;
  font-family: var(--font);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}

.demo-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.demo-input::placeholder { color: var(--text-dim); }

.demo-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.demo-example-chip {
  padding: 6px 12px;
  font-size: 12px;
  font-family: var(--font);
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 100px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.15s;
}

.demo-example-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.demo-note {
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 12px;
}

/* ── Pipeline Animation ── */
.pipeline-progress {
  max-width: 480px;
  margin: 32px auto 0;
}

.pipeline-progress.hidden { display: none; }

.pipeline-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-secondary);
  opacity: 0;
  animation: fadeInStep 0.3s ease forwards;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1s ease-in-out infinite;
  flex-shrink: 0;
}

.pulse-dot--done {
  background: var(--green);
  animation: none;
}

.pipeline-step--done {
  color: var(--text-dim);
}

.pipeline-step--done::after {
  content: "Done";
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@keyframes fadeInStep {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.75); }
}

/* ── Demo Error ── */
.demo-error {
  max-width: 640px;
  margin: 20px auto 0;
  padding: 14px 18px;
  background: var(--red-light);
  border: 1px solid var(--red);
  border-radius: var(--radius-sm);
  color: var(--red);
  font-size: 14px;
  font-weight: 500;
}

.demo-error.hidden { display: none; }

/* ── Results ── */
.demo-results {
  max-width: 800px;
  margin: 40px auto 0;
}

.demo-results.hidden { display: none; }

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.results-header h3 {
  font-size: 20px;
  font-weight: 700;
}

.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.result-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 24px;
}

.result-card--wide {
  grid-column: 1 / -1;
}

.result-card-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.result-card h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}

/* ── Score Bar ── */
.score-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.score-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  min-width: 90px;
}

.score-bar {
  flex: 1;
  height: 8px;
  background: var(--bg-subtle);
  border-radius: 4px;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s ease;
}

.score-bar-fill--green { background: var(--green); }
.score-bar-fill--yellow { background: var(--yellow); }
.score-bar-fill--red { background: var(--red); }

.score-value {
  font-size: 14px;
  font-weight: 700;
  min-width: 32px;
  text-align: right;
}

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge--green { background: var(--green-light); color: var(--green); }
.badge--yellow { background: var(--yellow-light); color: var(--yellow); }
.badge--red { background: var(--red-light); color: var(--red); }
.badge--blue { background: var(--accent-light); color: var(--accent); }
.badge--gray { background: var(--bg-subtle); color: var(--text-dim); }

/* ── Parcel Info ── */
.parcel-detail {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--border-light);
}

.parcel-detail:last-child { border-bottom: none; }

.parcel-detail-key {
  color: var(--text-secondary);
}

.parcel-detail-value {
  font-weight: 600;
  font-family: var(--mono);
  font-size: 13px;
}

/* ── AI Narrative ── */
.narrative-block {
  position: relative;
  background: var(--accent-light);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 20px 24px;
  margin-top: 8px;
}

.narrative-block p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
}

.narrative-label {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--yellow-light);
  color: var(--yellow);
  padding: 3px 8px;
  border-radius: 4px;
}

/* ── Data Sources Status ── */
.sources-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.source-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 500;
  background: var(--bg-subtle);
  border-radius: 100px;
  border: 1px solid var(--border-light);
}

.source-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.source-dot--ok { background: var(--green); }
.source-dot--err { background: var(--red); }

/* ── Compliance Banner ── */
.compliance {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  padding: 32px 24px;
  text-align: center;
}

.compliance-items {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.compliance-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
}

.compliance-icon {
  font-size: 20px;
}

/* ── CTA Section ── */
.cta-section {
  text-align: center;
  padding: 80px 24px;
}

.cta-section h2 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 12px;
}

.cta-section p {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.cta-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

/* ── Footer ── */
.footer {
  padding: 24px;
  text-align: center;
  border-top: 1px solid var(--border-light);
  font-size: 13px;
  color: var(--text-dim);
}

.footer a { color: var(--text-secondary); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero { padding: 64px 24px 48px; }
  .hero-title { font-size: 36px; }
  .hero-subtitle { font-size: 16px; }

  .section { padding: 48px 24px; }
  .section-title { font-size: 26px; }

  .features-grid { grid-template-columns: 1fr; }

  .steps { flex-direction: column; gap: 24px; }
  .step:not(:last-child)::after { display: none; }

  .results-grid { grid-template-columns: 1fr; }

  .demo-input-group { flex-direction: column; }

  .compliance-items { gap: 20px; }

  .nav-hamburger { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border-light);
    flex-direction: column;
    padding: 16px 24px;
    gap: 12px;
    box-shadow: var(--shadow-md);
  }

  .nav-links.open { display: flex; }

  .nav-links li { list-style: none; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 28px; }
}

/* ── Accessibility: reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pipeline-step { animation: none; opacity: 1; }
  .pulse-dot { animation: none; }
  .score-bar-fill { transition: none; }
}

/* ── Dark mode ── */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1117;
    --bg-subtle: #1a1d27;
    --bg-accent: #1e2436;
    --surface: #1a1d27;
    --border: #2a2d3a;
    --border-light: #22252f;
    --text: #e4e6ed;
    --text-secondary: #9ca0b0;
    --text-dim: #6b6f80;
    --accent-light: rgba(79, 140, 255, 0.15);
    --green-light: rgba(34, 197, 94, 0.15);
    --yellow-light: rgba(234, 179, 8, 0.15);
    --red-light: rgba(239, 68, 68, 0.15);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  }
  .nav { background: rgba(15, 17, 23, 0.92); }
  .hero { background: linear-gradient(180deg, #0f1117 0%, #1a1f30 100%); }
  .demo-input { background: var(--bg); }
}

/* ── Print ── */
@media print {
  .nav, .hero-actions, .cta-section, .cta-actions, .demo-form,
  .demo-examples, .demo-note, .pipeline-progress, .demo-error,
  .nav-signin, .footer, .compliance { display: none !important; }
  .section { padding: 24px 0; }
  .hero { padding: 24px 0; background: none; }
  .hero-title .highlight { -webkit-text-fill-color: #4f8cff; }
  body { background: #fff; color: #000; }
  .result-card { border: 1px solid #ccc; break-inside: avoid; }
  .narrative-block { background: #f0f0f0; }
}
