/* ===== DEMO PAGE — kristianshapiro.de ===== */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --accent: #f97316;
  --accent-dark: #ea580c;
  
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --bg-card: #ffffff;
  --text: #1e293b;
  --text-secondary: #64748b;
  --text-light: #94a3b8;
  --border: #e2e8f0;
  --glass-bg: rgba(255,255,255,0.7);
  --glass-border: rgba(255,255,255,0.3);
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
  --hero-gradient: linear-gradient(135deg, #1e3a5f 0%, #2563eb 50%, #3b82f6 100%);
  --radius: 12px;
  --radius-lg: 20px;
}

[data-theme="dark"] {
  --bg: #0f172a;
  --bg-alt: #1e293b;
  --bg-card: #1e293b;
  --text: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-light: #64748b;
  --border: #334155;
  --glass-bg: rgba(30,41,59,0.7);
  --glass-border: rgba(255,255,255,0.08);
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.4);
  --hero-gradient: linear-gradient(135deg, #0c1929 0%, #1e3a5f 50%, #2563eb 100%);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
  overflow-x: hidden;
}

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

/* ===== HEADER ===== */
.demo-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s, box-shadow 0.3s;
}
[data-theme="dark"] .demo-header {
  background: rgba(15,23,42,0.9);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.demo-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--primary);
  font-weight: 700;
  font-size: 1.25rem;
}
.logo-icon { font-size: 1.5rem; }
.logo-accent { color: var(--accent); margin: 0 2px; }

.demo-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-list-demo {
  display: flex;
  gap: 24px;
  list-style: none;
}
.nav-link-demo {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.2s;
}
.nav-link-demo:hover,
.nav-link-demo:focus { color: var(--primary); }

.theme-btn-demo {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: background 0.2s;
}
.theme-btn-demo:hover { background: var(--border); }
.theme-icon-light { display: none; }
[data-theme="dark"] .theme-icon-dark { display: none; }
[data-theme="dark"] .theme-icon-light { display: inline; }

.menu-btn-demo {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  padding: 8px;
  min-width: 38px;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}
.menu-btn-demo:hover,
.menu-btn-demo:focus-visible {
  background: var(--border);
  border-color: var(--primary);
}
.menu-btn-demo span {
  display: block;
  width: 22px;
  height: 3px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.menu-btn-demo.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.menu-btn-demo.open span:nth-child(2) {
  opacity: 0;
}
.menu-btn-demo.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ===== HERO ===== */
.hero-demo {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: var(--hero-gradient);
  opacity: 0.08;
  z-index: 0;
}
.hero-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: 
    linear-gradient(rgba(37,99,235,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37,99,235,0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridDrift 20s linear infinite;
}
@keyframes gridDrift {
  0% { transform: translate(0, 0); }
  100% { transform: translate(60px, 60px); }
}
.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  padding: 60px 0;
}
.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: var(--primary);
  color: #fff;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
  letter-spacing: 0.5px;
  animation: badgePulse 3s ease-in-out infinite;
  box-shadow: 0 2px 12px rgba(37,99,235,0.3);
}
@keyframes badgePulse {
  0%, 100% { transform: scale(1); box-shadow: 0 2px 12px rgba(37,99,235,0.3); }
  50% { transform: scale(1.03); box-shadow: 0 4px 24px rgba(37,99,235,0.4); }
}
.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
}
.hero-pre {
  display: block;
  color: var(--text);
  margin-bottom: 8px;
}
.hero-typewriter {
  display: inline;
  color: var(--primary);
}
.hero-cursor {
  display: inline;
  color: var(--primary);
  animation: blink 0.8s step-end infinite;
  font-weight: 300;
}
@keyframes blink {
  50% { opacity: 0; }
}
.hero-sub {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 36px;
  line-height: 1.5;
}
.hero-location {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 12px;
  background: rgba(37,99,235,0.08);
  border-radius: 20px;
  font-weight: 600;
  color: var(--primary);
  font-size: 0.9rem;
}
.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.25s;
}
.btn-lg { padding: 14px 36px; font-size: 1.05rem; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(37,99,235,0.3); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }
.btn-accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-accent:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(249,115,22,0.3); }
.btn-accent.pulse {
  animation: ctaPulse 2s ease-in-out infinite;
}
@keyframes ctaPulse {
  0%, 100% { box-shadow: 0 4px 16px rgba(249,115,22,0.3); }
  50% { box-shadow: 0 8px 32px rgba(249,115,22,0.5); transform: translateY(-2px); }
}

.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-light);
  font-size: 0.8rem;
  animation: float 2s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}
.scroll-arrow { font-size: 1.5rem; }

/* ===== STATS ===== */
.stats-section {
  padding: 80px 0;
  background: var(--bg-alt);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.stat-card {
  text-align: center;
  padding: 32px 16px;
}
.stat-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}
.stat-plus, .stat-percent {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  vertical-align: super;
}
.stat-label {
  display: block;
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ===== SECTION COMMON ===== */
.section-label {
  display: inline-block;
  padding: 4px 14px;
  background: var(--primary);
  color: #fff;
  border-radius: 16px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}
.section-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}
.section-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 48px;
  max-width: 600px;
}

/* ===== SERVICE FINDER ===== */
.finder-section {
  padding: 100px 0;
}
.finder-container {
  max-width: 720px;
  margin: 0 auto;
}
.finder-steps {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 48px;
  position: relative;
}
.finder-steps::after {
  content: '';
  position: absolute;
  top: 24px;
  left: 15%;
  right: 15%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}
.finder-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
  flex: 1;
}
.step-num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: 2px solid var(--border);
  color: var(--text-light);
  font-weight: 700;
  font-size: 1.1rem;
  transition: all 0.3s;
}
.finder-step.active .step-num {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}
.finder-step.done .step-num {
  background: #10b981;
  border-color: #10b981;
  color: #fff;
}
.step-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.finder-step.active .step-label { color: var(--primary); }

.finder-step-content { display: none; }
.finder-step-content.active { display: block; animation: fadeIn 0.3s ease; }

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

.finder-step-content h3 {
  text-align: center;
  margin-bottom: 28px;
  font-size: 1.4rem;
}

.finder-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.finder-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 16px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.25s;
  font-family: inherit;
  color: inherit;
}
.finder-option:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.finder-option.selected {
  border-color: var(--primary);
  background: rgba(37,99,235,0.08);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.2);
}
.option-icon { font-size: 2.2rem; margin-bottom: 12px; }
.option-title { font-weight: 700; font-size: 1.05rem; margin-bottom: 4px; }
.option-desc { font-size: 0.85rem; color: var(--text-secondary); }

/* Finder Result */
.finder-result {
  text-align: center;
  padding: 48px 32px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  animation: fadeIn 0.4s ease;
}
.result-icon { font-size: 3rem; margin-bottom: 16px; }
.result-details {
  max-width: 400px;
  margin: 24px auto;
}
.result-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.result-label { color: var(--text-secondary); }
.result-value { font-weight: 600; }
.result-price-row { border-bottom: none; padding-top: 16px; }
.result-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
}
.result-note {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 24px;
}
.result-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== PORTFOLIO ===== */
.portfolio-section {
  padding: 100px 0;
  background: var(--bg-alt);
}
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.portfolio-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  position: relative;
}
.portfolio-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--primary), transparent, var(--accent));
  opacity: 0;
  z-index: -1;
  transition: opacity 0.4s;
}
.portfolio-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.portfolio-card:hover::before {
  opacity: 1;
}
.card-image {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}
.card-icon { font-size: 3rem; }
.card-body { padding: 24px; }
.card-tag {
  display: inline-block;
  padding: 2px 10px;
  background: rgba(37,99,235,0.1);
  color: var(--primary);
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 12px;
}
.card-body h3 { font-size: 1.15rem; margin-bottom: 8px; }
.card-body p { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 16px; line-height: 1.5; }
.card-specs {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.card-specs span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ===== TECH DEMO ===== */
.tech-section {
  padding: 100px 0;
}
.tech-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}
.tech-card {
  padding: 28px 24px;
  border-radius: var(--radius);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}
.tech-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0;
  transition: opacity 0.3s;
}
.tech-card:hover { 
  transform: translateY(-4px); 
  box-shadow: var(--shadow-lg);
}
.tech-card:hover::after { opacity: 1; }
.tech-icon { font-size: 2rem; margin-bottom: 12px; }
.tech-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.tech-card p { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 12px; line-height: 1.5; }
.tech-stack {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 600;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.dark-demo-card {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.dark-demo-info { flex: 1; }
.dark-demo-info h3 { font-size: 1.2rem; margin-bottom: 8px; }
.dark-demo-info p { font-size: 0.9rem; color: var(--text-secondary); }
.dark-demo-preview {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}
.preview-box {
  padding: 16px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
}
.light-preview { background: #fff; color: #1e293b; border: 1px solid #e2e8f0; }
.dark-preview { background: #0f172a; color: #f1f5f9; border: 1px solid #334155; }
.preview-arrow { font-size: 1.5rem; color: var(--text-light); }

/* ===== CTA ===== */
.cta-section {
  padding: 100px 0;
  background: var(--bg-alt);
}
.cta-card {
  text-align: center;
  padding: 64px 32px;
  background: var(--hero-gradient);
  border-radius: var(--radius-lg);
  color: #fff;
}
.cta-card h2 { font-size: 2rem; margin-bottom: 12px; }
.cta-card p { font-size: 1.1rem; opacity: 0.9; margin-bottom: 32px; }
.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.cta-card .btn-outline { border-color: rgba(255,255,255,0.5); color: #fff; }
.cta-card .btn-outline:hover { background: rgba(255,255,255,0.15); }
.cta-note { font-size: 0.9rem; opacity: 0.75; }

/* ===== FOOTER ===== */
.demo-footer {
  padding: 48px 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.footer-brand {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}
.footer-links {
  display: flex;
  gap: 24px;
}
.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
}
.footer-links a:hover { color: var(--primary); }
.footer-note {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .tech-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .hero-title { font-size: 2.2rem; }
  .section-title { font-size: 1.6rem; }
  
  .nav-list-demo {
    position: fixed;
    top: 64px;
    right: -100%;
    width: 260px;
    height: 100vh;
    flex-direction: column;
    background: var(--bg);
    padding: 24px;
    box-shadow: -4px 0 24px rgba(0,0,0,0.1);
    transition: right 0.3s;
    gap: 0;
  }
  .nav-list-demo.open { right: 0; }
  .nav-list-demo li { padding: 12px 0; }
  .nav-link-demo { font-size: 1.1rem; }
  
  .menu-btn-demo { display: flex; }
  
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .stat-number { font-size: 2.2rem; }
  
  .finder-options { grid-template-columns: 1fr; }
  
  .portfolio-grid { grid-template-columns: 1fr; }
  .tech-grid { grid-template-columns: 1fr; }
  
  .dark-demo-card { flex-direction: column; text-align: center; }
  
  .cta-card h2 { font-size: 1.5rem; }
  .cta-card { padding: 40px 20px; }
  
  .step-num { width: 40px; height: 40px; font-size: 1rem; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 1.8rem; }
  .hero-sub { font-size: 1rem; }
  .hero-actions { flex-direction: column; }
  .btn-lg { width: 100%; justify-content: center; }
  
  .stats-grid { gap: 8px; }
  .stat-card { padding: 20px 8px; }
  .stat-number { font-size: 1.8rem; }
  .stat-label { font-size: 0.8rem; }
  
  .result-actions { flex-direction: column; }
  .cta-buttons { flex-direction: column; }
  .cta-card .btn { width: 100%; justify-content: center; }
}

/* ===== REVEAL ANIMATIONS ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
