/* ═════════════════════════════════════════════════════════════════════════════
   CODERYX 3.0 — ULTRA-MODERN BENTO GRID & CRAFT DESIGN SYSTEM
   Inspired by Linear, Raycast, Stripe, and Awwwards Site of the Day Winners
   ═════════════════════════════════════════════════════════════════════════════ */

:root {
  --bento-bg: #06080e;
  --bento-bg-elevated: #0a0d16;
  --bento-surface: #0e1320;
  --bento-surface-hover: #131a2c;
  --bento-surface-card: rgba(14, 19, 32, 0.72);
  --bento-border: rgba(255, 255, 255, 0.08);
  --bento-border-hover: rgba(255, 255, 255, 0.18);
  --bento-border-highlight: rgba(34, 211, 238, 0.35);

  --bento-text: #f8fafc;
  --bento-muted: #94a3b8;
  --bento-dim: #64748b;

  --accent-cyan: #22d3ee;
  --accent-cyan-glow: rgba(34, 211, 238, 0.25);
  --accent-indigo: #6366f1;
  --accent-indigo-glow: rgba(99, 102, 241, 0.25);
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-violet: #a855f7;

  --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

body.modern-bento-theme {
  background-color: var(--bento-bg);
  color: var(--bento-text);
  font-family: var(--font-sans);
  overflow-x: clip;
  background-image: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(34, 211, 238, 0.12), transparent 70%),
    radial-gradient(ellipse 60% 40% at 85% 60%, rgba(99, 102, 241, 0.08), transparent 60%),
    radial-gradient(ellipse 50% 30% at 15% 40%, rgba(168, 85, 247, 0.06), transparent 50%);
  background-attachment: fixed;
}

/* ── Background Grid & Ambient Glow ─────────────────────────────────────────── */
.bento-grid-bg {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
                    linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 40%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}

/* ── Floating Glow Pill ──────────────────────────────────────────────────────── */
.bento-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 9999px;
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.25);
  color: #a5f3fc;
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.15);
  transition: all 0.3s ease;
}

.bento-badge .pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22d3ee;
  box-shadow: 0 0 8px #22d3ee;
  animation: bento-pulse 2s infinite;
}

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

/* ── Hero Styles ─────────────────────────────────────────────────────────────── */
.bento-hero {
  position: relative;
  padding: 8rem 1.5rem 5rem;
  max-width: 1240px;
  margin: 0 auto;
  text-align: center;
  z-index: 1;
}

.bento-hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.035em;
  margin: 1.5rem 0 1.25rem;
  color: #ffffff;
}

.bento-hero-title .gradient-text {
  background: linear-gradient(135deg, #ffffff 30%, #a5f3fc 65%, #6366f1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.bento-hero-subtitle {
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  color: var(--bento-muted);
  max-width: 720px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

.bento-hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

.btn-bento-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 1.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #040810;
  background: linear-gradient(135deg, #22d3ee, #38bdf8);
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(34, 211, 238, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-bento-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(34, 211, 238, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  color: #000;
}

.btn-bento-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 1.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--bento-text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--bento-border);
  border-radius: 12px;
  backdrop-filter: blur(12px);
  text-decoration: none;
  transition: all 0.25s ease;
}

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

/* ── Interactive Ecosystem Selector Bar ──────────────────────────────────────── */
.ecosystem-switcher {
  display: inline-flex;
  align-items: center;
  background: rgba(14, 19, 32, 0.85);
  border: 1px solid var(--bento-border);
  padding: 0.375rem;
  border-radius: 16px;
  backdrop-filter: blur(16px);
  gap: 0.25rem;
  max-width: 100%;
  overflow-x: auto;
}

.switcher-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.125rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--bento-muted);
  border: none;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.switcher-btn.active, .switcher-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.switcher-btn.active {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

/* ── Bento Grid Structure ────────────────────────────────────────────────────── */
.bento-section {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  padding: 2rem 1.5rem 6rem;
  z-index: 1;
}

.bento-section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.bento-section-header h2 {
  font-size: clamp(1.875rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #fff;
  margin: 0.75rem 0 1rem;
}

.bento-section-header p {
  color: var(--bento-muted);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto;
}

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

/* ── Bento Card Styles with Cursor Spotlight ─────────────────────────────────── */
.bento-card {
  position: relative;
  background: var(--bento-surface-card);
  border: 1px solid var(--bento-border);
  border-radius: 24px;
  padding: 2rem;
  overflow: hidden;
  backdrop-filter: blur(20px);
  transition: border-color 0.3s ease, transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

/* Spotlight Glow Overlay */
.bento-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.06), transparent 40%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.bento-card:hover::before {
  opacity: 1;
}

/* Specific Card Spans */
.card-col-8 { grid-column: span 8; }
.card-col-7 { grid-column: span 7; }
.card-col-6 { grid-column: span 6; }
.card-col-5 { grid-column: span 5; }
.card-col-4 { grid-column: span 4; }
.card-col-12 { grid-column: span 12; }

@media (max-width: 1024px) {
  .card-col-8, .card-col-7, .card-col-6, .card-col-5, .card-col-4 {
    grid-column: span 12;
  }
}

.card-header {
  margin-bottom: 1.5rem;
}

.card-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.625rem;
  border-radius: 6px;
  margin-bottom: 0.75rem;
}

.tag-cyan { background: rgba(34, 211, 238, 0.12); color: var(--accent-cyan); }
.tag-indigo { background: rgba(99, 102, 241, 0.12); color: var(--accent-indigo); }
.tag-violet { background: rgba(168, 85, 247, 0.12); color: var(--accent-violet); }
.tag-emerald { background: rgba(16, 185, 129, 0.12); color: var(--accent-emerald); }

.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.card-desc {
  color: var(--bento-muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}

/* ── Interactive Widget: TrustCheck Security Dial ────────────────────────────── */
.security-dial-widget {
  background: rgba(10, 14, 24, 0.85);
  border: 1px solid var(--bento-border);
  border-radius: 18px;
  padding: 1.5rem;
  margin-top: auto;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.5rem;
  align-items: center;
}

@media (max-width: 640px) {
  .security-dial-widget {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.dial-circle-wrap {
  position: relative;
  width: 130px;
  height: 130px;
  margin: 0 auto;
}

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

.dial-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.07);
  stroke-width: 10;
}

.dial-fill {
  fill: none;
  stroke: url(#cyan-gradient);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 326;
  stroke-dashoffset: 40;
  animation: dial-glow-anim 2.5s ease-out forwards;
}

@keyframes dial-glow-anim {
  from { stroke-dashoffset: 326; }
  to { stroke-dashoffset: 40; }
}

.dial-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.dial-num {
  font-size: 2rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #fff;
  line-height: 1;
}

.dial-label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-cyan);
  font-weight: 700;
  margin-top: 0.25rem;
}

.dial-details {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.dial-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  padding: 0.375rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-passed { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.status-active { background: rgba(34, 211, 238, 0.15); color: #38bdf8; }

/* ── Interactive Widget: LeadFlow ERP Kanban ─────────────────────────────────── */
.erp-kanban-widget {
  background: rgba(10, 14, 24, 0.85);
  border: 1px solid var(--bento-border);
  border-radius: 18px;
  padding: 1.25rem;
  margin-top: auto;
}

.kanban-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .kanban-cols {
    grid-template-columns: 1fr;
  }
}

.kanban-col {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 0.75rem;
}

.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--bento-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.kanban-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 0.625rem;
  margin-bottom: 0.5rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.kanban-item:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.4);
}

.kanban-item-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
}

.kanban-item-val {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #a5b4fc;
  margin-top: 0.25rem;
}

/* ── Interactive Widget: ProtoStudio Viewport ────────────────────────────────── */
.proto-viewport-widget {
  background: rgba(10, 14, 24, 0.95);
  border: 1px solid var(--bento-border);
  border-radius: 18px;
  padding: 1.25rem;
  margin-top: auto;
  position: relative;
}

.proto-screen-mockup {
  background: #060913;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.proto-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.proto-dots {
  display: flex;
  gap: 0.375rem;
}

.proto-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.proto-screen-tabs {
  display: flex;
  padding: 0.5rem;
  gap: 0.5rem;
}

.proto-tab {
  font-size: 0.75rem;
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.02);
  color: var(--bento-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.proto-tab.active {
  background: rgba(168, 85, 247, 0.15);
  border-color: rgba(168, 85, 247, 0.4);
  color: #e9d5ff;
}

.proto-content-area {
  padding: 1rem;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.5rem;
}

/* ── Metrics Stats Ticker ────────────────────────────────────────────────────── */
.bento-metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin: 4rem auto;
  max-width: 1240px;
  padding: 0 1.5rem;
}

@media (max-width: 860px) {
  .bento-metrics-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .bento-metrics-strip {
    grid-template-columns: 1fr;
  }
}

.metric-box {
  background: rgba(14, 19, 32, 0.5);
  border: 1px solid var(--bento-border);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  backdrop-filter: blur(12px);
}

.metric-number {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.metric-label {
  font-size: 0.875rem;
  color: var(--bento-muted);
  margin-top: 0.25rem;
}

/* ── Interactive Architecture / Features Row ─────────────────────────────────── */
.architecture-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

@media (max-width: 860px) {
  .architecture-feature-grid {
    grid-template-columns: 1fr;
  }
}

.arch-card {
  background: rgba(14, 19, 32, 0.6);
  border: 1px solid var(--bento-border);
  border-radius: 16px;
  padding: 1.5rem;
  transition: all 0.2s ease;
}

.arch-card:hover {
  border-color: var(--bento-border-hover);
  background: rgba(19, 26, 44, 0.7);
}

.arch-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  margin-bottom: 1rem;
}

.arch-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.375rem;
}

.arch-desc {
  font-size: 0.875rem;
  color: var(--bento-muted);
  line-height: 1.5;
}

/* ── Conversion Bottom CTA Banner ────────────────────────────────────────────── */
.bento-cta-box {
  position: relative;
  background: radial-gradient(circle at 50% 0%, rgba(34, 211, 238, 0.15), transparent 70%),
              var(--bento-surface);
  border: 1px solid var(--bento-border-highlight);
  border-radius: 28px;
  padding: 4.5rem 2rem;
  text-align: center;
  max-width: 1240px;
  margin: 3rem auto 6rem;
  overflow: hidden;
  box-shadow: 0 0 50px rgba(34, 211, 238, 0.08);
}

.bento-cta-box h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
}

.bento-cta-box p {
  color: var(--bento-muted);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto 2.25rem;
}
