/* VISIBILITYPULSE PREMIUM — DESIGN SYSTEM & STYLESHEET */

:root {
  --bg-dark: #0a0a0f;
  --bg-card: #111118;
  --border-subtle: #1e1e2e;
  --accent-purple: #7c3aed;
  --accent-purple-glow: rgba(124, 58, 237, 0.3);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --color-success: #00ff87;
  --color-warning: #ff9100;
  --color-error: #ff1744;
  --font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-family);
  line-height: 1.6;
  overflow-x: hidden;
  padding-bottom: 5rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header & Logo */
header {
  padding: 2rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-text {
  font-weight: 800;
  letter-spacing: 0.05em;
  font-size: 1.25rem;
  background: linear-gradient(135deg, #fff 0%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 5rem 0 3rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.badge {
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid var(--accent-purple);
  color: #c084fc;
  padding: 0.35rem 1rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  display: inline-block;
  box-shadow: 0 0 15px var(--accent-purple-glow);
}

h1 {
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  background: linear-gradient(180deg, #ffffff 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  max-width: 800px;
}

.subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 3rem;
}

/* Domain Search Bar Form */
.search-form {
  width: 100%;
  max-width: 680px;
  display: flex;
  background: rgba(17, 17, 24, 0.7);
  border: 1px solid var(--border-subtle);
  padding: 0.5rem;
  border-radius: 9999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  transition: var(--transition-smooth);
  margin-bottom: 2rem;
}

.search-form:focus-within {
  border-color: var(--accent-purple);
  box-shadow: 0 0 25px var(--accent-purple-glow);
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 1.1rem;
  padding: 0.75rem 1.5rem;
  width: 100%;
}

.search-input::placeholder {
  color: #475569;
}

.search-btn {
  background: var(--accent-purple);
  color: #fff;
  border: none;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.search-btn:hover {
  background: #6d28d9;
  box-shadow: 0 0 15px rgba(124, 58, 237, 0.6);
}

.social-proof {
  display: flex;
  gap: 2rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 1rem;
}

.social-proof-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.social-proof-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-purple);
  border-radius: 50%;
}

/* Feature Callout Cards Section */
.features-callout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  padding: 4rem 0;
  border-top: 1px solid var(--border-subtle);
  margin-top: 4rem;
}

.callout-header {
  grid-column: 1 / -1;
  text-align: center;
  margin-bottom: 1rem;
}

.callout-title {
  font-size: 1.75rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 1.25rem;
  padding: 2rem;
  transition: var(--transition-smooth);
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: #312e81;
}

.feature-card-header {
  font-weight: 800;
  font-size: 1.2rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.feature-card-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.feature-card-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.feature-card-check {
  color: var(--color-success);
  font-weight: bold;
}

/* Audit Results Dashboard Layout */
.results-dashboard {
  display: none;
  animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.score-panel {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 1.5rem;
  padding: 3rem;
  margin-bottom: 3rem;
  align-items: center;
}

.score-circular-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.score-svg {
  width: 220px;
  height: 220px;
  transform: rotate(-90deg);
}

.score-track {
  fill: none;
  stroke: #161622;
  stroke-width: 16;
}

.score-fill {
  fill: none;
  stroke: var(--accent-purple);
  stroke-width: 16;
  stroke-linecap: round;
  stroke-dasharray: 628;
  stroke-dashoffset: 628; /* Animation offset will be computed in JS */
  transition: stroke-dashoffset 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.score-text-overlay {
  position: absolute;
  top: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.score-number {
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1;
}

.score-grade {
  font-size: 1.5rem;
  font-weight: 800;
  margin-top: 0.25rem;
}

.score-info-text {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.score-badge-status {
  align-self: flex-start;
  background: rgba(0, 255, 135, 0.1);
  color: var(--color-success);
  border: 1px solid rgba(0, 255, 135, 0.3);
  padding: 0.35rem 1rem;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.9rem;
}

.scores-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 1rem;
}

.split-score-card {
  background: #0d0d14;
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  padding: 1.5rem;
}

.split-score-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.split-score-val {
  font-size: 2rem;
  font-weight: 800;
}

/* Live Citation Engine Panel */
.citation-section {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 1.5rem;
  padding: 3rem;
  margin-bottom: 3rem;
}

.section-title-wrapper {
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.engine-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.engine-card {
  background: #0d0d14;
  border: 1px solid var(--border-subtle);
  border-radius: 1.25rem;
  padding: 2rem;
  transition: var(--transition-smooth);
}

.engine-card.active-audit {
  border-color: var(--accent-purple);
  box-shadow: 0 0 15px var(--accent-purple-glow);
}

.engine-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.engine-name-icon {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.15rem;
}

.citation-status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.status-cited {
  background: rgba(0, 255, 135, 0.1);
  color: var(--color-success);
  border: 1px solid rgba(0, 255, 135, 0.3);
}

.status-not-cited {
  background: rgba(255, 23, 68, 0.1);
  color: var(--color-error);
  border: 1px solid rgba(255, 23, 68, 0.3);
}

.status-pending {
  background: rgba(255, 145, 0, 0.1);
  color: var(--color-warning);
  border: 1px solid rgba(255, 145, 0, 0.3);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

.engine-represent {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.engine-queries-box {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 0.75rem;
  padding: 1rem;
  font-size: 0.85rem;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #161622;
}

.query-item {
  margin-bottom: 1rem;
  border-bottom: 1px dotted var(--border-subtle);
  padding-bottom: 0.5rem;
}

.query-item:last-child {
  margin-bottom: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.query-prompt {
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.query-response {
  color: var(--text-secondary);
  font-style: italic;
  white-space: pre-line;
}

/* Google Preferred Sources Callout */
.preferred-callout-panel {
  background: linear-gradient(135deg, #111118 0%, #1e1b4b 100%);
  border: 1px solid #4338ca;
  border-radius: 1.5rem;
  padding: 3rem;
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}

.preferred-info-content {
  max-width: 700px;
}

.preferred-header-badge {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid #f59e0b;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 1rem;
}

.preferred-btn-link {
  flex-shrink: 0;
}

.premium-badge-btn {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #000;
  border: none;
  font-weight: 800;
  padding: 1rem 2rem;
  border-radius: 9999px;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.premium-badge-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.6);
}

/* 15-Signal Breakdown Accordion Table */
.signals-section {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 1.5rem;
  padding: 3rem;
  margin-bottom: 3rem;
}

.signal-row {
  border-bottom: 1px solid var(--border-subtle);
  padding: 1.25rem 0;
}

.signal-row:last-child {
  border-bottom: none;
}

.signal-header-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.signal-name-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-weight: 700;
  font-size: 1.1rem;
}

.signal-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.status-dot-pass { background-color: var(--color-success); box-shadow: 0 0 10px var(--color-success); }
.status-dot-warn { background-color: var(--color-warning); box-shadow: 0 0 10px var(--color-warning); }
.status-dot-fail { background-color: var(--color-error); box-shadow: 0 0 10px var(--color-error); }

.signal-score-badge {
  font-weight: 700;
  color: var(--text-secondary);
}

.signal-details-expand {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.signal-details-content {
  padding: 1.5rem 0 0 2rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.signal-notes-list {
  margin: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.signal-note-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.signal-fix-block {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-subtle);
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin-top: 1rem;
}

.signal-fix-title {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  text-transform: uppercase;
}

/* Playbook Actions Section */
.playbook-section {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 1.5rem;
  padding: 3rem;
  margin-bottom: 3rem;
}

.playbook-item {
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  background: #0d0d14;
}

.playbook-item:last-child {
  margin-bottom: 0;
}

.playbook-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.playbook-title-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.playbook-num {
  background: var(--accent-purple);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  color: #fff;
}

.playbook-name {
  font-weight: 800;
  font-size: 1.1rem;
}

.playbook-impact-badge {
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 4px;
}

.impact-high { background-color: rgba(255, 23, 68, 0.15); color: var(--color-error); }
.impact-medium { background-color: rgba(255, 145, 0, 0.15); color: var(--color-warning); }

.playbook-time {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.playbook-issue {
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.playbook-fix-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  white-space: pre-line;
}

.playbook-relevance {
  font-size: 0.8rem;
  color: var(--text-secondary);
  border-top: 1px dotted var(--border-subtle);
  padding-top: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Action Controls Panel */
.action-controls-panel {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 4rem;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-weight: 700;
  padding: 1rem 2rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  background: var(--border-subtle);
  border-color: #475569;
}

.share-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.share-modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 1.5rem;
  padding: 2.5rem;
  max-width: 500px;
  width: 90%;
  text-align: center;
}

.share-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
}

.share-input-group {
  display: flex;
  background: #0d0d14;
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  padding: 0.25rem;
  margin-bottom: 1.5rem;
}

.share-link-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
}

.share-copy-btn {
  background: var(--accent-purple);
  color: #fff;
  border: none;
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.share-copy-btn:hover {
  background: #6d28d9;
}

/* Footer Section */
footer {
  text-align: center;
  padding: 4rem 0;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-subtle);
  margin-top: 6rem;
  font-size: 0.9rem;
}

/* Responsive Overrides */
@media (max-width: 768px) {
  h1 { font-size: 2.25rem; }
  .score-panel { grid-template-columns: 1fr; gap: 2rem; padding: 2rem; }
  .preferred-callout-panel { flex-direction: column; gap: 2rem; padding: 2rem; }
  .action-controls-panel { flex-direction: column; gap: 1rem; }
  .citation-section, .signals-section, .playbook-section { padding: 2rem; }
}
