/* =========================================================
   Bean Development - Homepage frame
   Proper baseline matching bot pages + pill scrollbar
   ========================================================= */

/* 0) Global sizing + UA margin reset (bots already have this) */
html { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }
html, body { height: 100%; margin: 0; padding: 0; }

/* Scoped vars */
:root {
  --home-bg: #0b0f14;
  --home-panel: #111720;
  --home-panel-2: #0f141c;
  --home-text: #e7edf5;
  --home-muted: #a6b1c2;
  --home-brand: #16c7ff;
  --home-brand-2: #0ba6d6;
  --home-ring: rgba(22,199,255,0.35);
  --home-card: #121824;
  --home-card-muted: #0e1320;
  --home-border: #1f2a3a;
  --home-shadow: rgba(0,0,0,0.5);
  --home-glow: 0 0 20px rgba(22, 199, 255, 0.6);

  /* Press/active accent = exact inverse of brand gradient */
  --press-orange-1: #e93800; /* inverse of #16c7ff */
  --press-orange-2: #f45929; /* inverse of #0ba6d6 */

  /* Default orb colors (used by bg-lights script) */
  --orb-brand-1: var(--home-brand-2);
  --orb-brand-2: var(--home-brand);
  --orb-press-1: var(--press-orange-1);
  --orb-press-2: var(--press-orange-2);
}


/* Page frame */
.home-root {
  margin: 0;
  color: var(--home-text);
  background: radial-gradient(1200px 600px at 20% 0%, #0e1520 0%, #0b0f14 60%, #0b0f14 100%);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-top: 56px; /* matches .home-top-bar height below */
}

/* Unified glass top bar */
.home-top-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: rgba(11, 15, 20, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--home-border);
  z-index: 1400;
  pointer-events: none;
}

/* Main grows, bottom block pushed down */
.home-main { display: block; }
.home-bottom { margin-top: auto; }

/* Container */
.home-container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* A11y */
.home-skip { position: absolute; left: -9999px; top: auto; }
.home-skip:focus {
  left: 8px;
  top: 8px;
  background: var(--home-brand);
  color: #001018;
  padding: 8px 12px;
  border-radius: 6px;
  z-index: 2000;
}

/* Fixed pills — both at top: 12px */
.home-brand--fixed {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 1500;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--home-text);
  font-weight: 700;
  pointer-events: auto;
}

.home-nav--fixed {
  position: fixed;
  right: 12px;
  top: 12px;
  z-index: 1500;
  display: inline-flex;
  gap: 8px;
  flex-wrap: nowrap;
  pointer-events: auto;
}

/* Brand visuals */
.home-brand-badge {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--home-brand), var(--home-brand-2));
  color: #001018;
  border-radius: 10px;
  font-weight: 800;
  box-shadow: 0 6px 18px var(--home-ring);
}
.home-brand-text { font-size: 18px; letter-spacing: .3px; }

/* BUTTONS — GLOW + CLICK EFFECTS */
.home-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid transparent;
  user-select: none;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  color: #001018;
  position: relative;
  overflow: hidden;
}

/* TOP-RIGHT BUTTONS ONLY — equal top/bottom spacing */
.home-nav--fixed .home-btn {
  padding: 4px 10px;
  font-size: 13px;
  min-height: 28px;
  line-height: 1.2;
  border-radius: 7px;
}

.home-btn::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255, 255, 255, 0.15);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.home-btn:hover {
  box-shadow: var(--home-glow);
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.home-btn:hover::before { opacity: 1; }

/* Global active/press state using exact inverted gradient */
.home-btn:active {
  transform: translateY(1px);
  background: linear-gradient(145deg, var(--press-orange-1), var(--press-orange-2));
  color: #140a04 !important; /* dark text on orange */
  box-shadow: 0 0 26px rgba(249, 89, 41, 0.7);
  filter: none;
  transition: background 0.05s ease, box-shadow 0.05s ease, transform 0.05s ease;
}

.home-btn-primary {
  background: linear-gradient(145deg, var(--home-brand), var(--home-brand-2));
  box-shadow: 0 6px 20px var(--home-ring);
}

/* GHOST BUTTON — fixed: white text, no flicker */
.home-btn-ghost {
  background: transparent;
  border: 1px solid var(--home-border);
  color: var(--home-text) !important;
  box-shadow: none;
}
.home-btn-ghost:hover {
  border-color: var(--home-brand);
  color: var(--home-brand) !important;
  box-shadow: var(--home-glow);
  filter: brightness(1.1);
}
.home-btn-ghost::before { background: transparent !important; }

/* Links */
.home-btn,
.home-btn:visited {
  color: #001018;
}
.home-footer a,
.home-footer a:visited {
  color: var(--home-text);
}

/* Hero */
.home-hero {
  position: relative;
  padding: 72px 0 48px;
  border-bottom: 1px solid var(--home-border);
  background:
    radial-gradient(800px 300px at 80% -10%, rgba(22,199,255,0.2), transparent 60%),
    radial-gradient(600px 300px at 10% 10%, rgba(11,166,214,0.2), transparent 60%);
  text-align: center;
}
.home-hero-inner h1 {
  font-size: clamp(32px, 4vw, 48px);
  margin: 0 0 8px;
  letter-spacing: .3px;
}
.home-hero-sub { margin: 0 0 20px; color: var(--home-muted); }
.home-hero-actions {
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Sections */
.home-section { padding: 8px 0 40px; }
.home-section-title { font-size: 22px; margin: 28px 0 12px; }

/* Cards */
.home-card-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.home-card {
  grid-column: span 12;
  background: linear-gradient(180deg, var(--home-card), var(--home-panel-2));
  border: 1px solid var(--home-border);
  border-radius: 16px;
  box-shadow: 0 10px 24px var(--home-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.home-card-muted {
  background: linear-gradient(180deg, var(--home-card), var(--home-panel-2));
  opacity: 1;
}

.home-card-body { padding: 18px; flex: 1 1 auto; }
.home-card-title { margin: 0 0 6px; font-size: 18px; }
.home-card-title a {
  color: var(--home-text);
  text-decoration: none;
}
.home-card-title a:hover { color: var(--home-brand); }
.home-card-text {
  margin: 0;
  color: var(--home-text);
  opacity: 0.9;
}
.home-card-actions {
  padding: 0 18px 18px;
  display: flex;
  gap: 8px;
  justify-content: center;  /* center buttons horizontally */
}


/* CTA + footer */
.home-cta {
  border-top: 1px solid var(--home-border);
  border-bottom: 1px solid var(--home-border);
  background: linear-gradient(180deg, rgba(22,199,255,.08), transparent);
}
.home-cta-inner {
  padding: 28px 0;
  text-align: center;
}
.home-cta-inner h2 {
  margin: 0 0 6px;
  font-size: 22px;
}
.home-cta-inner p {
  margin: 0 0 16px;
  color: var(--home-text);
  opacity: 0.9;
}
.home-cta-actions {
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.home-footer {
  padding-top: 28px;
  background: var(--home-bg);
}
.home-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 0 0 12px;
  align-items: start;
}
.home-footer-col { min-width: 0; }
.home-footer-title {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--home-muted);
}
.home-footer-title a {
  color: var(--home-text);
  text-decoration: none;
}
.home-footer-title a:hover { color: var(--home-brand); }
.home-footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.home-footer-links a {
  color: var(--home-text);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.home-footer-links a:hover { color: var(--home-brand); }
.home-footer-text {
  color: var(--home-muted);
  margin: 8px 0 0;
}
.home-brand-footer .home-brand-badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}
.home-footer-bottom {
  border-top: 1px solid var(--home-border);
  padding: 12px 0 24px;
  text-align: center;
  color: var(--home-muted);
}
.home-legal { margin: 0; font-size: 13px; }

/* Responsive */
@media (min-width: 640px) {
  .home-card { grid-column: span 6; }
  .home-footer-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (min-width: 960px) {
  .home-card { grid-column: span 4; }
  .home-footer-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
}

/* =========================================================
   Top-right nav pills
   - All nav buttons are blue theme pills
   - On click: inverted orange (same as big buttons)
   - Current page: darker blue so you know where you are
   ========================================================= */

/* Base nav pill styling (color + shadow) */
.home-nav--fixed .home-btn {
  background: linear-gradient(145deg, var(--home-brand), var(--home-brand-2));
  color: #001018 !important;
  border: 1px solid transparent;
  box-shadow: 0 6px 16px var(--home-ring);
}

/* Hover: slightly brighter blue + glow */
.home-nav--fixed .home-btn:hover {
  filter: brightness(1.08);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.08),
    0 0 22px var(--home-ring);
}

/* Current page pill: slightly dimmed / “grayed out” look */
.home-nav--fixed .home-btn[aria-current="page"] {
  background: linear-gradient(145deg, #0c88b6, #076487); /* darker, less punchy */
  color: #001018 !important;          /* same as normal, not bright white */
  box-shadow: 0 2px 10px rgba(0,0,0,0.55); /* softer shadow so it feels less “active” */
  opacity: 0.8;                        /* subtle “disabled-ish” vibe without blocking clicks */
}


/* Pressed state for nav buttons: same inverse orange as other buttons */
.home-nav--fixed .home-btn:active {
  background: linear-gradient(145deg, var(--press-orange-1), var(--press-orange-2));
  color: #140a04 !important;
  box-shadow: 0 0 26px rgba(249, 89, 41, 0.7);
  transform: translateY(1px);
  filter: none; /* override hover brightness */
}


/* =========================================================
   Themed pill scrollbar (shows only when needed)
   ========================================================= */

/* Do not reserve gutter space */
:root {
  --scroll-size: 12px;
  --scroll-radius: 999px; /* pill */
}

/* WebKit/Blink theme */
::-webkit-scrollbar {
  width: var(--scroll-size);
  height: var(--scroll-size);
  background: transparent;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-corner {
  background: #0e1520;
}
/* Thumb (pill) */
::-webkit-scrollbar-thumb {
  border-radius: var(--scroll-radius);
  background: linear-gradient(145deg, var(--home-brand-2), var(--home-brand));
  border: 3px solid transparent;
  background-clip: padding-box;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(145deg, #11b7ec, #63dbff);
  box-shadow: 0 0 0 1px rgba(255,255,255,.10),
              0 0 12px rgba(22,199,255,.45);
}
/* Invert to orange while dragging */
::-webkit-scrollbar-thumb:active {
  background: linear-gradient(145deg, var(--press-orange-1), var(--press-orange-2));
  box-shadow: 0 0 0 1px rgba(0,0,0,.18),
              0 0 14px rgba(255,155,58,0.55);
}
/* Arrow pulse if present on platform */
::-webkit-scrollbar-button {
  width: var(--scroll-size);
  height: var(--scroll-size);
  background: transparent;
  border: 0;
}
@keyframes scrollPulse {
  0% { box-shadow: none; }
  35% { box-shadow: 0 0 10px rgba(22,199,255,.45); }
  100% { box-shadow: none; }
}
::-webkit-scrollbar-button:active { animation: scrollPulse 260ms ease-out; }

/* Firefox thin bars and colors */
html, body {
  scrollbar-width: thin;
  scrollbar-color: var(--home-brand) #0e1520;
}

/* Smaller on mobile */
@media (max-width: 640px) {
  :root { --scroll-size: 10px; }
}

/* === Background glow canvas (subtle, behind content) === */
.bg-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;            /* sits behind .home-root (z-index:1) */
  pointer-events: none;  /* never intercept clicks */
}

/* Ensure all page content sits above the canvas */
.home-root {
  position: relative;
  z-index: 1;            /* guarantees content above bg canvas */
}

/* If user prefers reduced motion, do not animate. Script respects this too. */
@media (prefers-reduced-motion: reduce) {
  .bg-canvas { display: none; }
}

/* Cookie Popup */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(17, 23, 32, 0.95);
  color: #e7edf5;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  font-size: 0.9rem;
  text-align: left;
  z-index: 9999;
  max-width: 420px; /* Increased from 320px */
  line-height: 1.45;
  animation: cookieFadeIn 0.4s ease;
  backdrop-filter: blur(8px);
}

.cookie-btn {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.4rem 1rem;
  background: #16c7ff;
  color: #0b0f14;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  transition: background 0.2s ease;
}

.cookie-btn:hover {
  background: #0ba6d6;
}

/* Mobile layout */
@media (max-width: 600px) {
  .cookie-banner {
    left: 50%;
    right: auto;
    bottom: 15px;
    transform: translateX(-50%);
    width: 90%;
    max-width: 90%;
    text-align: center;
    padding: 1rem;
    font-size: 0.85rem;
  }
  .cookie-btn {
    width: 100%;
    margin-top: 0.75rem;
  }
}

/* Smooth fade in */
@keyframes cookieFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

