/* ==========================================================================
   RoastGuard — UI/UX Pro Max Design System
   Style: Dark Mode Cyberpunk / OLED Clean Glassmorphism
   Typography: Space Grotesk (Display/Headings) + DM Sans (Body)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Space+Grotesk:wght@500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Colors */
  --bg-canvas: #06080E;
  --bg-surface: #0B0F19;
  --bg-card: rgba(15, 21, 35, 0.72);
  --bg-card-hover: rgba(23, 31, 52, 0.85);
  --bg-card-solid: #101625;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(139, 92, 246, 0.4);
  --border-amber: rgba(245, 158, 11, 0.4);
  
  --accent-violet: #8B5CF6;
  --accent-violet-glow: rgba(139, 92, 246, 0.25);
  --accent-violet-light: #A78BFA;
  
  --accent-amber: #F59E0B;
  --accent-amber-glow: rgba(245, 158, 11, 0.25);
  
  --accent-flame: #EF4444;
  --accent-flame-glow: rgba(239, 68, 68, 0.25);
  
  --accent-emerald: #10B981;
  --accent-cyan: #06B6D4;
  
  --text-main: #F8FAFC;
  --text-secondary: #CBD5E1;
  --text-muted: #64748B;
  
  /* Typography */
  --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  /* Elevation & Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.6);
  --shadow-glow-violet: 0 0 35px rgba(139, 92, 246, 0.2);
  --shadow-glow-amber: 0 0 35px rgba(245, 158, 11, 0.2);
  
  /* Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 350ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-canvas);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(139, 92, 246, 0.12) 0%, transparent 60%),
    radial-gradient(circle at 85% 30%, rgba(245, 158, 11, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 15% 70%, rgba(6, 182, 212, 0.06) 0%, transparent 50%);
  background-attachment: fixed;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   Navbar
   ========================================================================== */

.navbar-wrapper {
  position: fixed;
  top: 16px;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 0 16px;
  pointer-events: none;
}

.navbar {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  background: rgba(15, 21, 35, 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 10px 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  transition: border-color var(--transition-normal);
  max-width: 980px;
  width: 100%;
}

.navbar:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.nav-logo-icon {
  width: 28px;
  height: 28px;
  color: var(--accent-amber);
}

.version-badge {
  font-size: 0.72rem;
  padding: 2px 8px;
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: var(--radius-pill);
  color: var(--accent-violet-light);
  font-family: var(--font-mono);
  font-weight: 600;
}

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

.nav-link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.nav-link:hover {
  color: var(--text-main);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-apk-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%);
  color: #FFFFFF;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.4);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-apk-nav:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
  padding: 140px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero-content {
  text-align: center;
  max-width: 860px;
  margin: 0 auto;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  color: #FBBF24;
  font-size: 0.86rem;
  font-weight: 600;
  margin-bottom: 24px;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.15);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 20px;
}

.gradient-text {
  background: linear-gradient(135deg, #FFFFFF 20%, #A78BFA 60%, #F59E0B 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 36px;
}

.hero-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 50%, #6D28D9 100%);
  color: #FFFFFF;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-size: 1.02rem;
  font-weight: 600;
  box-shadow: 0 6px 25px rgba(139, 92, 246, 0.45);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(139, 92, 246, 0.65);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 14px 26px;
  border-radius: var(--radius-pill);
  font-size: 1.02rem;
  font-weight: 600;
  transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.hero-card-container {
  position: relative;
  max-width: 1040px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  padding: 8px;
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.3) 0%, rgba(255, 255, 255, 0.05) 50%, rgba(245, 158, 11, 0.2) 100%);
  box-shadow: var(--shadow-lg), var(--shadow-glow-violet);
}

.hero-card-inner {
  border-radius: calc(var(--radius-lg) - 6px);
  overflow: hidden;
  position: relative;
  background: var(--bg-surface);
}

.hero-banner-img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-card-status-bar {
  position: absolute;
  bottom: 16px;
  left: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 18px;
  border-radius: var(--radius-pill);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-emerald);
  animation: pulse 2s infinite;
}

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

/* ==========================================================================
   Section Headers
   ========================================================================== */

.section {
  padding: 90px 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 56px;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-violet-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   Interactive Simulator Section
   ========================================================================== */

.simulator-wrapper {
  max-width: 840px;
  margin: 0 auto;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.simulator-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #8B5CF6, #F59E0B, #EF4444);
}

.sim-controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-bottom: 28px;
}

.sim-control-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sim-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sim-select, .sim-input {
  background-color: #101625;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 11px 14px;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.sim-select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A78BFA' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 42px;
  cursor: pointer;
}

.sim-select option {
  background-color: #0D121F;
  color: #F8FAFC;
  padding: 12px 14px;
  font-size: 0.95rem;
}

.sim-select option:checked {
  background-color: #1E283D;
  color: #A78BFA;
}

.sim-select:focus, .sim-input:focus {
  border-color: var(--accent-violet);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.sim-intensity-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.btn-intensity {
  padding: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.btn-intensity.active {
  background: rgba(139, 92, 246, 0.25);
  border-color: var(--accent-violet);
  color: #FFFFFF;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
}

.btn-intensity[data-level="nuclear"].active {
  background: rgba(239, 68, 68, 0.25);
  border-color: var(--accent-flame);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
}

.sim-slider {
  width: 100%;
  accent-color: var(--accent-violet);
}

.btn-trigger-roast {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #F59E0B 0%, #EF4444 100%);
  color: #FFFFFF;
  padding: 14px;
  border-radius: var(--radius-md);
  font-size: 1.05rem;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  margin-bottom: 24px;
}

.btn-trigger-roast:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 26px rgba(239, 68, 68, 0.6);
}

.sim-preview-box {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-amber);
  border-radius: var(--radius-md);
  padding: 24px;
  position: relative;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.sim-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sim-badge-sanitized {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.12);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.sim-roast-text {
  font-size: 1.18rem;
  font-weight: 600;
  line-height: 1.45;
  color: #FFFFFF;
  margin-bottom: 16px;
  font-style: italic;
}

.sim-overlay-actions {
  display: flex;
  gap: 10px;
}

.sim-btn-overlay {
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.sim-btn-close {
  background: #EF4444;
  color: #FFFFFF;
}

.sim-btn-dismiss {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
}

/* ==========================================================================
   Bento Grid Section
   ========================================================================== */

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}

.bento-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: border-color var(--transition-normal), transform var(--transition-normal);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.bento-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
}

.bento-col-8 { grid-column: span 8; }
.bento-col-4 { grid-column: span 4; }
.bento-col-6 { grid-column: span 6; }
.bento-col-12 { grid-column: span 12; }

.bento-icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--accent-violet-light);
}

.bento-icon-box.amber {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.3);
  color: var(--accent-amber);
}

.bento-icon-box.emerald {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--accent-emerald);
}

.bento-card-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: #FFFFFF;
}

.bento-card-desc {
  font-size: 0.96rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.bento-img-frame {
  margin-top: 24px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

/* Code block inside card */
.code-preview {
  margin-top: 20px;
  background: #05070B;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #A78BFA;
  overflow-x: auto;
}

/* ==========================================================================
   Architecture Section
   ========================================================================== */

.arch-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.arch-visual-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-lg), var(--shadow-glow-violet);
}

.arch-steps-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.arch-step-item {
  display: flex;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  transition: border-color var(--transition-fast);
}

.arch-step-item:hover {
  border-color: var(--border-hover);
}

.arch-step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.2);
  color: var(--accent-violet-light);
  font-family: var(--font-mono);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.arch-step-content h4 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: #FFFFFF;
}

.arch-step-content p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   Metrics Section
   ========================================================================== */

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

.metric-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  transition: transform var(--transition-normal);
}

.metric-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
}

.metric-value {
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 4vw, 3.2rem);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #FFFFFF, #A78BFA);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.metric-label {
  font-size: 0.92rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ==========================================================================
   CTA Banner Section
   ========================================================================== */

.cta-banner {
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.2) 0%, rgba(15, 21, 35, 0.85) 50%, rgba(245, 158, 11, 0.15) 100%);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: var(--radius-lg);
  padding: 60px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg), var(--shadow-glow-violet);
}

.cta-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 3.8vw, 3rem);
  font-weight: 700;
  margin-bottom: 16px;
  color: #FFFFFF;
}

.cta-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto 36px;
}

.cta-btn-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  padding: 60px 0 40px;
  border-top: 1px solid var(--border-subtle);
  background: #04060A;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-link {
  color: var(--text-muted);
  font-size: 0.92rem;
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--text-main);
}

.footer-bottom {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Responsive Breakpoints (Mobile, Tablet, Desktop)
   ========================================================================== */

@media (max-width: 1024px) {
  .bento-col-8, .bento-col-4, .bento-col-6 {
    grid-column: span 12;
  }
  .arch-layout {
    grid-template-columns: 1fr;
  }
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .hero-section {
    padding: 120px 0 60px;
  }
  .simulator-wrapper {
    padding: 24px;
  }
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  .cta-banner {
    padding: 40px 20px;
  }
}
