@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* Pico CSS Customizing Variables */
:root {
  --pico-font-family-sans-serif: "Inter", system-ui, -apple-system, sans-serif;
  --pico-font-family-monospace: "JetBrains Mono", monospace;
  --pico-font-family: var(--pico-font-family-sans-serif);
  
  /* Color Palette Styling */
  --pico-primary: #3b82f6; /* Electric Blue */
  --pico-primary-background: #3b82f6;
  --pico-primary-hover: #2563eb;
  --pico-primary-focus: rgba(59, 130, 246, 0.25);
  
  /* Transition / Motion defaults */
  --pico-transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --pico-border-radius: 16px;
}

/* Light Theme Variables - "Light Glass Bento Grid" */
:root:not([data-theme="dark"]), 
[data-theme="light"] {
  --pico-background-color: #f1f5f9; /* Warm Slate gray */
  --pico-card-background-color: rgba(255, 255, 255, 0.75);
  --pico-color: #0f172a; /* Deep Slate Navy */
  --pico-muted-color: #475569;
  --pico-muted-border-color: #e2e8f0;
  --pico-border-color: #cbd5e1;
  --pico-card-border-color: rgba(226, 232, 240, 0.8);
  --pico-blockquote-border-color: #3b82f6;
  
  /* Custom Bento shadow */
  --bento-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.05), 0 0 0 1px rgba(15, 23, 42, 0.02);
  --bento-card-hover: rgba(255, 255, 255, 0.95);
  --bento-glow-color: rgba(59, 130, 246, 0.08);
}

/* Dark Theme Variables - "Hyper-Premium Sapphire Tech Bento" */
[data-theme="dark"] {
  --pico-background-color: #0b0f19; /* Ultra Deep Cosmic Slate Black */
  --pico-card-background-color: rgba(15, 23, 42, 0.65); /* Translucent graphite */
  --pico-color: #f8fafc; /* Crisp white-slate */
  --pico-muted-color: #94a3b8; /* Muted steel */
  --pico-muted-border-color: rgba(30, 41, 59, 0.7);
  --pico-border-color: #1e293b;
  --pico-card-border-color: rgba(30, 41, 59, 0.82);
  --pico-blockquote-border-color: #3b82f6;
  
  /* Custom Bento shadow */
  --bento-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04);
  --bento-card-hover: rgba(30, 41, 59, 0.85);
  --bento-glow-color: rgba(59, 130, 246, 0.12);
}

/* Base Body Modifications to support the ambient light & overflow */
body {
  font-family: var(--pico-font-family);
  background-color: var(--pico-background-color);
  color: var(--pico-color);
  margin: 0;
  padding: 0;
  position: relative;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* Ambient Radial Glow Overlays for awesome visual depth */
body::before {
  content: "";
  position: absolute;
  top: -150px;
  right: -100px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--bento-glow-color) 0%, transparent 70%);
  z-index: 0;
  pointer-events: none;
}

body::after {
  content: "";
  position: absolute;
  bottom: 10%;
  left: -200px;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, var(--bento-glow-color) 0%, transparent 70%);
  z-index: 0;
  pointer-events: none;
}

/* Structure and Alignments */
main {
  position: relative;
  z-index: 10;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Space Grotesk", var(--pico-font-family-sans-serif);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--pico-color);
  line-height: 1.2;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
}

p {
  line-height: 1.6;
}

/* Beautiful custom buttons matching Bento neon style */
button, input[type="submit"] {
  background-color: var(--pico-primary);
  border: 1px solid transparent;
  border-radius: 12px;
  color: #ffffff;
  padding: 0.8rem 1.6rem;
  font-weight: 600;
  box-shadow: 0 10px 20px -2px rgba(59, 130, 246, 0.25);
  transition: var(--pico-transition);
  cursor: pointer;
}

button:hover, input[type="submit"]:hover {
  background-color: var(--pico-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -2px rgba(59, 130, 246, 0.4);
}

button.secondary, button.outline.secondary {
  background-color: transparent !important;
  border: 1px solid var(--pico-border-color) !important;
  color: var(--pico-color) !important;
  box-shadow: none !important;
}

button.secondary:hover, button.outline.secondary:hover {
  background-color: var(--pico-muted-border-color) !important;
  border-color: var(--pico-border-color) !important;
  transform: translateY(-2px);
  color: var(--pico-color) !important;
}

/* Global Beautiful Bento Card styling for articles */
article, .bento-panel {
  background-color: var(--pico-card-background-color) !important;
  border: 1px solid var(--pico-card-border-color) !important;
  border-radius: 24px !important;
  box-shadow: var(--bento-shadow) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 2rem !important;
  transition: var(--pico-transition) !important;
  margin-bottom: 2rem;
}

article:hover, .bento-panel:hover {
  transform: translateY(-3px);
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.15), 0 0 0 1px var(--pico-primary) !important;
  border-color: rgba(59, 130, 246, 0.4) !important;
  background-color: var(--bento-card-hover) !important;
}

/* Highlight badge */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-family: var(--pico-font-family-monospace);
  font-weight: 600;
  background-color: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Drag & Drop Bento Box */
.dropzone {
  border: 2px dashed rgba(59, 130, 246, 0.4);
  border-radius: 16px;
  padding: 3rem 2rem;
  text-align: center;
  background-color: rgba(59, 130, 246, 0.02);
  transition: var(--pico-transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.dropzone:hover {
  background-color: rgba(59, 130, 246, 0.06);
  border-color: var(--pico-primary);
  transform: scale(1.01);
}

/* Custom visual utilities representing waves & encryption */
.waveform-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 48px;
}

.waveform-bar {
  width: 4px;
  background: var(--pico-primary);
  border-radius: 4px;
  height: 15%;
  animation: bounce 1.2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { height: 15%; }
  50% { height: 100%; }
}

.hero-layout {
  padding: 5rem 0 3rem;
  text-align: center;
}

/* General Grids structured with Bento feel */
.grid-3-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* Step diagram with Bento feel */
.steps-diagram {
  display: grid;
  grid-template-columns: 1fr auto 1.1fr auto 1fr;
  align-items: stretch;
  gap: 1rem;
  margin: 3.5rem 0;
}

@media (max-width: 991px) {
  .steps-diagram {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .step-arrow {
    transform: rotate(90deg);
    margin: 1rem 0;
    font-size: 2rem;
  }
}

.step-card {
  text-align: center;
  padding: 2rem 1.5rem;
  background-color: var(--pico-card-background-color);
  border: 1px solid var(--pico-card-border-color);
  border-radius: 20px;
  box-shadow: var(--bento-shadow);
  transition: var(--pico-transition);
}

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

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background-color: var(--pico-primary);
  color: #ffffff;
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Beautiful blockquotes for user voice */
blockquote {
  border-left: 4px solid var(--pico-blockquote-border-color);
  padding: 1rem 1.5rem;
  font-style: italic;
  font-weight: 400;
  margin-bottom: 1.5rem;
  background-color: rgba(59, 130, 246, 0.04);
  border-radius: 0 16px 16px 0;
}

.mono-tag {
  font-family: var(--pico-font-family-monospace);
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  background-color: var(--pico-muted-border-color);
  border-radius: 6px;
  color: var(--pico-muted-color);
  font-weight: 600;
}

/* Testimonial structural grid with bento boxes */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.75rem;
}

/* Navigation tabs in Bento Playground Sandbox */
.tab-nav {
  display: flex;
  background-color: var(--pico-muted-border-color);
  border-radius: 14px;
  padding: 0.4rem;
  margin-bottom: 2.25rem;
  gap: 0.25rem;
}

.tab-btn {
  flex: 1;
  background: none !important;
  border: none !important;
  padding: 0.6rem 1rem !important;
  font-weight: 600 !important;
  color: var(--pico-muted-color) !important;
  border-radius: 10px !important;
  font-size: 0.85rem !important;
  text-align: center !important;
  box-shadow: none !important;
  transition: var(--pico-transition) !important;
  margin: 0 !important;
  height: auto !important;
}

.tab-btn:hover {
  color: var(--pico-color) !important;
  background-color: rgba(255, 255, 255, 0.4) !important;
}

.tab-btn.active {
  color: #ffffff !important;
  background-color: var(--pico-primary) !important;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2) !important;
}

/* Dark mode tab enhancements */
[data-theme="dark"] .tab-btn:hover {
  background-color: rgba(255, 255, 255, 0.05) !important;
}

[data-theme="dark"] .tab-btn.active {
  background-color: var(--pico-primary) !important;
}

/* Input Fields & Textareas matching premium input states */
input[type="text"], 
input[type="email"], 
select {
  border-radius: 12px !important;
  border: 1px solid var(--pico-card-border-color) !important;
  background-color: rgba(0, 0, 0, 0.02) !important;
  color: var(--pico-color) !important;
  padding: 0.75rem 1rem !important;
  transition: var(--pico-transition) !important;
}

[data-theme="dark"] input[type="text"], 
[data-theme="dark"] input[type="email"], 
[data-theme="dark"] select {
  background-color: rgba(0, 0, 0, 0.2) !important;
}

input[type="text"]:focus, 
input[type="email"]:focus, 
select:focus {
  border-color: var(--pico-primary) !important;
  box-shadow: 0 0 0 3px var(--pico-primary-focus) !important;
  background-color: var(--pico-card-background-color) !important;
}

/* High-tech Pre/Codes styling for Sandbox */
pre {
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.4);
}

details {
  border: none !important;
  background-color: transparent !important;
  transition: var(--pico-transition);
}

details summary {
  list-style-type: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--pico-transition);
}

details summary::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--pico-primary);
  transition: var(--pico-transition);
}

details[open] summary::after {
  content: "−";
  transform: rotate(180deg);
}

/* Code layout responsiveness helper */
@media (max-width: 576px) {
  .sm\:grid-cols-1 {
    grid-template-columns: 1fr !important;
  }
  .sm\:flex-direction-col {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
  .sm\:align-items-start {
    align-items: flex-start !important;
  }
}
