﻿/* =========================================
   1. VARIABLES
   ========================================= */
:root {
  /* DEFAULT DARK THEME */
  --bg-deep: #050505;
  --bg-card: #0F0F11;
  --text-main: #FFFFFF;
  --text-muted: #9CA3AF; 
  --brand: #FF5C35;
  --brand-glow: rgba(255, 92, 53, 0.4);
  
  --glass-bg: rgba(5, 5, 5, 0.85);
  --glass-border: rgba(255, 255, 255, 0.08);
  
  /* Ambient light default (Dark) */
  --ambient-light: radial-gradient(
    circle at 50% 0%, 
    rgba(255, 92, 53, 0.15) 0%, 
    transparent 60%
  );
  --blur-amount: 12px;
}

/* LIGHT THEME OVERRIDES */
:root[data-theme="light"] {
  --bg-deep: #F3F4F6;        /* Light Gray Background */
  --bg-card: #FFFFFF;        /* White Cards */
  --text-main: #111827;      /* Dark Gray Text */
  --text-muted: #6B7280;     /* Muted Gray */
  
  /* Brand color stays same, but glow is softer */
  --brand-glow: rgba(255, 92, 53, 0.2); 

  --glass-bg: rgba(255, 255, 255, 0.90);
  --glass-border: rgba(0, 0, 0, 0.08);

  /* Subtle ambient light for light mode */
  --ambient-light: radial-gradient(
    circle at 50% 0%, 
    rgba(255, 92, 53, 0.08) 0%, 
    transparent 60%
  );
}

/* =========================================
   2. GLOBAL RESET & BASE
   ========================================= */
* { box-sizing: border-box; }

body {
  margin: 0;
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  background-image: 
    var(--ambient-light),
    linear-gradient(var(--glass-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--glass-border) 1px, transparent 1px);
  background-size: 100% 100%, 50px 50px, 50px 50px;
  background-repeat: no-repeat, repeat, repeat;
  background-attachment: fixed;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* =========================================
   3. THE HEADER (FIXED LAYOUT)
   ========================================= */
.hb-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur-amount));
  -webkit-backdrop-filter: blur(var(--blur-amount));
  border-bottom: 1px solid var(--glass-border); 
  width: 100%;
}

.hb-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  height: 80px;
}

/* BRAND */
a.hb-wordmark { 
  text-decoration: none !important; 
  display: flex; 
  align-items: center; 
  gap: 12px; /* Increased gap between logo and badge */
  z-index: 2;
}

/* Logo Text Group (ThrottleBot) */
.hb-logo-group {
  font-weight: 800; 
  font-size: 28px; /* Larger logo size */
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), text-shadow 0.3s ease;
}

.hb-logo-group span { color: var(--brand); }

/* Hover Glow Effect */
a.hb-wordmark:hover .hb-logo-group {
  transform: scale(1.05);
  text-shadow: 0 0 25px var(--brand-glow);
}

/* "for HubSpot" Badge */
.hb-for { 
  color: var(--text-muted); 
  font-size: 14px; 
  font-weight: 500; 
  margin-top: 4px;
  transition: color 0.2s;
}
a.hb-wordmark:hover .hb-for { color: var(--text-main); }


/* CENTER NAV */
.hb-nav--center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 40px;
  z-index: 1;
}

/* RIGHT NAV */
.hb-nav--right {
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 2;
}

/* LINKS */
.hb-link {
  text-decoration: none;
  color: var(--text-muted); 
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.hb-link:hover { 
  color: var(--brand);
  text-shadow: 0 0 15px var(--brand-glow); 
}

@media (max-width: 900px) {
  .hb-nav--center { display: none; }
}

/* =========================================
   4. THE HERO & SECTIONS
   ========================================= */
.hb-hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 40px 20px;
}

.hb-hero::after {
  content: "";
  position: absolute;
  width: 600px; height: 600px;
  background: var(--brand);
  opacity: 0.12; 
  filter: blur(120px);
  z-index: -1;
  border-radius: 50%;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
}

.hb-title {
  font-size: clamp(48px, 7vw, 96px);
  line-height: 1.05;
  font-weight: 800;
  margin-bottom: 24px;
  color: var(--text-main); 
  letter-spacing: -0.02em;
}

/* --- NEW: Interactive Text Animation (Twirl & Glow) --- */
.interactive-word {
  display: inline-block; 
  cursor: default;
  transition: color 0.2s ease, text-shadow 0.2s ease;
  will-change: transform;
}

.interactive-word:hover {
  color: var(--brand);
  text-shadow: 0 0 25px var(--brand-glow);
  animation: wordTwirl 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 10;
  position: relative;
}

@keyframes wordTwirl {
  0% { transform: scale(1) rotate(0deg); }
  30% { transform: scale(1.15) rotate(5deg); }
  60% { transform: scale(1.05) rotate(-3deg); }
  100% { transform: scale(1) rotate(0deg); }
}
/* --------------------------------------- */

.hb-sub {
  font-size: 22px; 
  color: var(--text-muted); 
  max-width: 680px;
  margin: 0 auto 48px;
  line-height: 1.6;
}

/* =========================================
   5. BUTTONS
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  white-space: nowrap;
  font-size: 16px;
  border: 1px solid transparent; 
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 4px 20px var(--brand-glow);
  border: 1px solid rgba(255,255,255,0.1);
}
.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 30px var(--brand-glow);
  color: #fff;
}

.btn-secondary {
  background: rgba(255,255,255,0.05);
  color: var(--text-main);
  border: 1px solid var(--glass-border);
}
:root[data-theme="light"] .btn-secondary {
  background: rgba(0,0,0,0.05);
  border-color: rgba(0,0,0,0.1);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text-main);
  border-color: rgba(255,255,255,0.3);
  transform: translateY(-2px);
}
:root[data-theme="light"] .btn-secondary:hover {
  background: rgba(0,0,0,0.1);
  border-color: rgba(0,0,0,0.2);
}

.hb-cta-row { display: flex; gap: 16px; justify-content: center; }

/* =========================================
   6. BENTO GRID & SECTIONS (More Interactive)
   ========================================= */
.hb-section { 
  padding: 140px 24px; 
}
.hb-container { max-width: 1200px; margin: 0 auto; }

.hb-section h2 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  margin-bottom: 24px;
  letter-spacing: -0.01em;
  color: var(--text-main);
}
.hb-section p.hb-sub {
  font-size: 22px;
  opacity: 0.9;
}

.hb-bento-grid {
  display: grid;
  gap: 32px; 
  grid-template-columns: 1fr; 
}

@media (min-width: 900px) {
  .hb-bento-grid {
    grid-template-columns: 1.5fr 1fr; 
    grid-template-rows: auto auto; 
  }
  .hb-card-large { grid-row: span 2; }
}

/* INTERACTIVE CARDS */
.hb-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  padding: 40px; 
  border-radius: 32px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
:root[data-theme="light"] .hb-card {
  box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

.hb-card:hover {
  transform: translateY(-8px) scale(1.01);
  border-color: var(--brand);
  box-shadow: 0 20px 50px -10px var(--brand-glow);
}

.hb-card h3 { 
  margin-top: 0; margin-bottom: 12px;
  font-size: 28px; font-weight: 700;
  color: var(--text-main); 
}
.hb-card p { 
  color: var(--text-muted); 
  line-height: 1.6; 
  font-size: 17px;
  margin: 0;
}

.hb-card-visual {
  margin-top: 32px;
  background-size: cover;
  background-position: center;
  border-radius: 16px;
  height: 340px;
  width: 100%;
  border: 1px solid var(--glass-border);
  transition: transform 0.5s ease;
}
.hb-card:hover .hb-card-visual {
  transform: scale(1.03); 
}

/* --- REPLACEMENT FOR STATIC IMAGE: FAKE DASHBOARD --- */
.dashboard-preview {
  margin-top: 32px;
  width: 100%;
  border-radius: 16px;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--glass-border);
  padding: 20px;
  transition: transform 0.5s ease;
  position: relative;
  overflow: hidden;
}
:root[data-theme="light"] .dashboard-preview {
  background: #F9FAFB;
  border-color: #E5E7EB;
}

.hb-card:hover .dashboard-preview {
  transform: scale(1.02);
  border-color: var(--brand);
}

.dash-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  margin-bottom: 8px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}
:root[data-theme="light"] .dash-row {
  background: #fff;
  border-color: #E5E7EB;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.dash-row:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.1);
  transform: translateX(4px);
}
:root[data-theme="light"] .dash-row:hover {
  background: #FDFDFD;
  border-color: var(--brand);
}

.dash-head {
  background: transparent !important;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 600;
  padding: 0 14px 10px;
  border: none !important;
  margin-bottom: 0;
  box-shadow: none !important;
}
.dash-head:hover { transform: none; }

.dash-info { display: flex; flex-direction: column; gap: 2px; }
.dash-name { font-weight: 600; font-size: 15px; color: var(--text-main); }
.dash-sub { font-size: 12px; color: var(--text-muted); }

.dash-cap { font-weight: 700; font-size: 16px; color: var(--text-main); width: 60px; text-align: center; }

.dash-status { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; min-width: 100px; }
.dash-badge { 
  font-size: 11px; padding: 2px 8px; border-radius: 99px; font-weight: 700; 
  text-transform: uppercase; letter-spacing: 0.5px;
}
.dash-badge.active { background: rgba(16, 185, 129, 0.2); color: #34D399; }
.dash-badge.completed { background: rgba(59, 130, 246, 0.2); color: #60A5FA; }

:root[data-theme="light"] .dash-badge.active { background: #DCFCE7; color: #166534; }
:root[data-theme="light"] .dash-badge.completed { background: #DBEAFE; color: #1E40AF; }

.dash-progress {
  width: 100%; height: 6px; background: rgba(255,255,255,0.1); border-radius: 99px; overflow: hidden;
}
:root[data-theme="light"] .dash-progress { background: #E5E7EB; }

.dash-fill { height: 100%; background: var(--brand); border-radius: 99px; }

/* Icon Animation on Hover */
.hb-icon-box {
  width: 64px; height: 64px; 
  background: rgba(255,255,255,0.05);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  margin-bottom: 24px;
  border: 1px solid var(--glass-border);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.3s;
}
:root[data-theme="light"] .hb-icon-box {
  background: rgba(0,0,0,0.05);
  border-color: rgba(0,0,0,0.1);
}

.hb-card:hover .hb-icon-box {
  transform: rotate(-10deg) scale(1.1);
  background: var(--brand);
  color: #fff;
  border-color: transparent;
}

.hb-footer {
  text-align: center;
  padding: 80px 0;
  color: var(--text-muted);
  border-top: 1px solid var(--glass-border);
  font-size: 15px;
}