/*
 * OphieAI — Product / Service Page Styles
 * Shared template for AI Implementation, SmartDoc, SmartTender, About, Insights.
 */

/* ============================================
   PAGE HERO
   ============================================ */

.page-hero {
  padding-top: calc(var(--nav-height) + var(--space-3xl));
  padding-bottom: var(--space-3xl);
  border-bottom: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
}

/* Subtle accent glow in the background */
.page-hero::before {
  content: '';
  position: absolute;
  top: -40%;
  left: -10%;
  width: 60%;
  height: 100%;
  background: radial-gradient(ellipse, var(--color-accent-soft) 0%, transparent 65%);
  pointer-events: none;
}

.page-hero-inner {
  position: relative;
}

.page-hero-title {
  font-family: var(--font-display);
  font-size: var(--text-5xl);
  font-weight: 400;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-ink);
  margin-bottom: var(--space-8);
  max-width: 14ch;
}

.page-hero-body {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--color-text-muted);
  max-width: 55ch;
  margin-bottom: var(--space-10);
}

.page-hero-body p + p {
  margin-top: var(--space-4);
}

.page-hero-cta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* ============================================
   CONTENT SECTIONS
   ============================================ */

.content-section {
  padding-block: var(--space-3xl);
  border-bottom: 1px solid var(--color-border);
}

.content-section:last-child {
  border-bottom: none;
}

.content-section-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 400;
  letter-spacing: var(--tracking-tight);
  color: var(--color-ink);
  margin-bottom: var(--space-6);
  line-height: var(--leading-snug);
}

.content-section-lead {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-text-muted);
  margin-bottom: var(--space-8);
  max-width: 60ch;
}

/* Body copy with natural paragraph flow */
.prose {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-text-muted);
  max-width: 65ch;
}

.prose p + p {
  margin-top: var(--space-5);
}

.prose strong {
  color: var(--color-ink);
  font-weight: 500;
}

/* ============================================
   WORKFLOW NARRATIVE (AI Implementation)
   ============================================ */

.week-narrative {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-text-muted);
  max-width: 65ch;
  padding: var(--space-8) var(--space-10);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  border-left: 3px solid var(--color-accent);
}

/* ============================================
   DEMO MOCK (SmartDoc interactive emulation)
   ============================================ */

.demo-container {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.demo-toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-6);
  background: var(--color-surface-high);
  border-bottom: 1px solid var(--color-border);
}

.demo-toolbar-dots {
  display: flex;
  gap: var(--space-2);
}

.demo-toolbar-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--color-border);
}

.demo-toolbar-dot:nth-child(1) { background: oklch(65% 0.18 25); }
.demo-toolbar-dot:nth-child(2) { background: oklch(75% 0.15 80); }
.demo-toolbar-dot:nth-child(3) { background: oklch(65% 0.16 145); }

.demo-toolbar-title {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-left: var(--space-2);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
}

.demo-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 480px;
}

.demo-pane {
  padding: var(--space-8);
}

.demo-pane + .demo-pane {
  border-left: 1px solid var(--color-border);
}

.demo-pane-title {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-text-subtle);
  margin-bottom: var(--space-6);
}

/* Upload area */
.demo-upload {
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-10);
  text-align: center;
  cursor: pointer;
  transition: border-color var(--dur-fast), background var(--dur-fast);
}

.demo-upload:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}

.demo-upload-icon {
  font-size: 28px;
  margin-bottom: var(--space-3);
  color: var(--color-text-subtle);
}

.demo-upload-text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.demo-upload-hint {
  font-size: var(--text-xs);
  color: var(--color-text-subtle);
}

/* Example doc buttons */
.demo-examples {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-6);
}

.demo-example-btn {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-high);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
  transition: border-color var(--dur-fast), background var(--dur-fast);
}

.demo-example-btn:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}

.demo-example-btn.is-active {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}

.demo-example-icon {
  font-size: 16px;
  color: var(--color-accent);
  flex-shrink: 0;
}

.demo-example-name {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-ink);
}

.demo-example-desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* Extraction results */
.demo-results {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.demo-field {
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-high);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity var(--dur-base) var(--ease-out),
    transform var(--dur-base) var(--ease-out);
}

.demo-field.is-visible {
  opacity: 1;
  transform: none;
}

.demo-field-name {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-subtle);
  margin-bottom: var(--space-1);
}

.demo-field-value {
  font-size: var(--text-sm);
  color: var(--color-ink);
  line-height: var(--leading-snug);
}

.demo-field-citation {
  font-size: var(--text-xs);
  color: var(--color-accent);
  margin-top: var(--space-1);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.demo-field-citation:hover {
  text-decoration: underline;
}

.demo-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: var(--space-3);
  color: var(--color-text-subtle);
  font-size: var(--text-sm);
  font-style: italic;
  text-align: center;
  min-height: 200px;
}

/* ============================================
   SCREENSHOT ROW (SmartTender workflow)
   ============================================ */

.screenshot-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  margin-top: var(--space-8);
}

.screenshot-item {
  aspect-ratio: 4/3;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  color: var(--color-text-subtle);
  text-align: center;
  padding: var(--space-3);
  position: relative;
  overflow: hidden;
}

.screenshot-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, var(--color-accent-soft) 0%, transparent 70%);
}

/* ============================================
   VIDEO EMBED
   ============================================ */

.video-embed {
  background: oklch(0% 0 0);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  color: var(--color-text-subtle);
}

.video-play-btn {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast);
}

.video-play-btn:hover {
  transform: scale(1.08);
  background: var(--color-accent-hover);
}

.video-play-icon {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 10px 0 10px 18px;
  border-color: transparent transparent transparent white;
  margin-left: 4px;
}

.video-label {
  font-size: var(--text-sm);
  color: var(--color-text-subtle);
  font-style: italic;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1100px) {
  .page-hero-title {
    font-size: var(--text-4xl);
  }
}

@media (max-width: 768px) {
  .page-hero {
    padding-top: calc(var(--nav-height) + var(--space-2xl));
    padding-bottom: var(--space-2xl);
  }

  .page-hero-title {
    font-size: var(--text-3xl);
    max-width: none;
  }

  .page-hero-body {
    font-size: var(--text-base);
  }

  .page-hero-cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .demo-body {
    grid-template-columns: 1fr;
  }

  .demo-pane + .demo-pane {
    border-left: none;
    border-top: 1px solid var(--color-border);
  }

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

  .week-narrative {
    padding: var(--space-6);
  }
}
