/* ── Reloyalize Demo — Premium B&W ── */

:root {
  --bg: #000000;
  --surface: #0a0a0a;
  --surface-elevated: #111111;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #ededed;
  --text-secondary: rgba(255, 255, 255, 0.5);
  --text-tertiary: rgba(255, 255, 255, 0.3);
  --white: #ffffff;
  --green: #00d084;
  --green-soft: rgba(0, 208, 132, 0.12);
  --radius: 12px;
  --radius-lg: 16px;
  --font: 'Inter', -apple-system, 'Segoe UI', sans-serif;
}

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

html, body {
  height: 100%;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Page ── */

.demo-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Topbar ── */

.demo-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 56px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}

.brand-logo {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  object-fit: contain;
  background: var(--white);
}

.brand-name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ── Timeline (inline nav) ── */

.timeline {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.timeline::-webkit-scrollbar { display: none; }

.timeline button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-tertiary);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.timeline button:hover {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
}

.timeline button.active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.timeline-dot {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.5;
  flex-shrink: 0;
}

.timeline button.active .timeline-dot {
  background: var(--green);
  opacity: 1;
}

/* ── Actions ── */

.demo-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.demo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  min-width: 32px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.demo-btn:hover {
  border-color: var(--border-strong);
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

/* ── Stage ── */

.demo-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px 0 16px;
  gap: 16px;
}

.stage-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.stage-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
}

.step-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.stage-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
}

/* ── Device Frame ── */

.device-frame {
  position: relative;
  flex: 1;
  min-height: 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}

.shot {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 480px;
  padding: 20px;
}

/* ── Progress ── */

.stage-progress {
  flex-shrink: 0;
}

.global-track {
  height: 2px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.global-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--white);
  transition: width 0.1s linear;
}

/* ── Footer ── */

.demo-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.footer-copy {
  font-size: 13px;
  color: var(--text-tertiary);
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.footer-lead {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.lead-form {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lead-input {
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  width: 140px;
  outline: none;
  transition: border-color 0.15s;
}

.lead-input::placeholder {
  color: var(--text-tertiary);
}

.lead-input:focus {
  border-color: var(--border-strong);
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 16px;
  border: none;
  border-radius: 8px;
  background: var(--white);
  color: var(--bg);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: opacity 0.15s;
  flex-shrink: 0;
  white-space: nowrap;
}

.cta-btn:hover { opacity: 0.85; }

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

.lead-success {
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
}

/* ── Scene Shell ── */

.scene-shell {
  width: 100%;
  height: 100%;
  animation: fade-in 0.3s ease;
}

/* ── Scene Shared ── */

.s-grid {
  display: grid;
  gap: 12px;
  height: 100%;
}

.s-grid-2 { grid-template-columns: 1fr 1fr; }
.s-grid-60-40 { grid-template-columns: 1.2fr 0.8fr; }
.s-grid-40-60 { grid-template-columns: 0.8fr 1.2fr; }

.s-card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 16px;
  background: var(--surface);
}

.s-card.white {
  background: var(--white);
  color: #111;
  border-color: #e5e5e5;
}

.s-card.elevated {
  background: var(--surface-elevated);
}

.s-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.s-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.s-eyebrow {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.s-eyebrow.dark { color: #999; }

.s-h2 {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.s-h2.small { font-size: 16px; }

.s-h3 {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.s-body {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.s-body.dark { color: #777; }

.s-value {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}

.s-value.compact { font-size: 20px; }

.s-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.s-badge.ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
}

.s-badge.outline {
  border: 1px solid var(--border);
  color: var(--text-tertiary);
}

.s-badge.green {
  background: var(--green-soft);
  color: var(--green);
}

.s-badge.green-solid {
  background: var(--green);
  color: #000;
}

.s-badge.dark {
  background: #111;
  color: #fff;
}

.s-badge.blue {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
}

.s-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.s-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  animation: rise 0.35s ease both;
}

.s-list-row.white {
  background: #fafafa;
  border-color: #eee;
  color: #111;
}

/* ── Tables Grid ── */

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

.table-cell {
  display: grid;
  place-items: center;
  height: 52px;
  border-radius: 10px;
  border: 1px solid #e0e0e0;
  background: #fff;
  color: #111;
  font-size: 14px;
  font-weight: 700;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.table-cell.active {
  border-color: var(--green);
  box-shadow: 0 0 0 1px var(--green);
}

/* ── Menu Cards ── */

.menu-item {
  overflow: hidden;
  border-radius: 10px;
  background: #fafafa;
  border: 1px solid #eee;
  animation: rise 0.35s ease both;
}

.menu-item-art {
  height: 64px;
  border-radius: 8px;
  margin: 8px 8px 0;
}

.menu-item-body {
  padding: 10px;
}

.menu-item-name {
  font-size: 13px;
  font-weight: 700;
  color: #111;
}

.menu-item-price {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  margin-top: 6px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

/* ── Terminal ── */

.terminal-box {
  position: relative;
  width: 180px;
  margin: 0 auto;
  padding: 20px 16px;
  text-align: center;
  border-radius: 20px;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
}

.terminal-screen {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 20px;
  font-weight: 900;
  color: var(--text-secondary);
}

/* ── Progress Bar ── */

.progress-bar {
  height: 6px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.progress-bar.light {
  background: #eee;
}

.progress-bar > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--green);
}

/* ── Hook Hero ── */

.hook-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
  min-height: 440px;
  gap: 24px;
}

.hook-tagline {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  max-width: 520px;
}

.hook-sub {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 400px;
  line-height: 1.6;
}

.hook-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.hook-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  animation: rise 0.4s ease both;
}

.hook-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--green);
}

/* ── Customer Avatar ── */

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  font-weight: 800;
  font-size: 18px;
  color: var(--green);
  flex-shrink: 0;
}

.avatar.white {
  background: #f0f0f0;
  border-color: #e0e0e0;
  color: #111;
}

/* ── Device gradient border ── */

.device-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: linear-gradient(135deg, rgba(255,255,255,0.06), transparent 40%, transparent 60%, rgba(255,255,255,0.04));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
}

/* ── Animations ── */

@keyframes fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

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

/* ── Responsive ── */

@media (max-width: 768px) {
  .demo-page { padding: 0 14px; }

  .brand-name { display: none; }

  .demo-topbar { gap: 8px; }

  .timeline button { padding: 4px 8px; font-size: 11px; }
  .timeline-dot { display: none; }

  .stage-header { flex-direction: column; align-items: flex-start; gap: 8px; }

  .shot { min-height: 400px; padding: 14px; }

  .s-grid-2, .s-grid-60-40, .s-grid-40-60 { grid-template-columns: 1fr; }

  .tables-grid { grid-template-columns: repeat(3, 1fr); }

  .hook-tagline { font-size: 26px; }

  .demo-footer { flex-direction: column; height: auto; padding: 14px 0; gap: 10px; text-align: center; }

  .footer-copy { display: none; }

  .lead-form { flex-direction: column; width: 100%; }
  .lead-input { width: 100%; }
  .cta-btn { width: 100%; justify-content: center; }

  .terminal-box { width: 140px; padding: 14px 12px; }
  .terminal-screen { width: 44px; height: 44px; font-size: 16px; }
}

@media (max-width: 480px) {
  .timeline { gap: 0; }
  .timeline button { padding: 4px 6px; font-size: 10px; }

  .shot { min-height: 360px; padding: 10px; }
  .s-card { padding: 12px; }
  .s-value { font-size: 22px; }
  .s-h2 { font-size: 16px; }

  .hook-tagline { font-size: 22px; }
  .hook-pills { gap: 6px; }
  .hook-pill { height: 28px; padding: 0 10px; font-size: 11px; }
}
