/* ===================================================
   shared.css — Triple Eight AI design system
   Used by all landing pages. Homepage-specific styles
   (quiz, openclaw overlay, lobster, FOMO, section rail)
   are intentionally excluded.
   =================================================== */

/* ===== 1. CSS CUSTOM PROPERTIES ===== */
:root {
  --cream: #FAF7F2;
  --sand: #F5F0EB;
  --espresso: #3D2B1F;
  --gold: #C4965A;
  --sage: #8B9A7B;
  --graphite: #1A1A1A;
  --graphite-light: #2A2A2A;
  --ember: #E85D3A;
  --glass-blur: 24px;
  --glass-blur-heavy: 40px;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --mouse-x: 50%;
  --mouse-y: 50%;
}

/* ===== 2. BASE RESET & TYPOGRAPHY ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--espresso);
  overflow-x: hidden;
}
h1, h2, h3, h4, h5, h6 { font-family: 'Space Grotesk', sans-serif; }

/* ===== 3. GLASSMORPHISM SYSTEM ===== */
.glass-heavy {
  background: rgba(250, 247, 242, 0.55);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -1px 0 rgba(61, 43, 31, 0.04), 0 8px 32px rgba(61, 43, 31, 0.06), 0 2px 6px rgba(61, 43, 31, 0.08);
}
.glass-card {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 -1px 0 rgba(61, 43, 31, 0.03), 0 4px 24px rgba(61, 43, 31, 0.04), 0 1px 3px rgba(61, 43, 31, 0.06);
}
.glass-subtle {
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.glass-dark {
  background: rgba(42, 42, 42, 0.5);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.05);
}
.glass-elevated {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 12px 40px rgba(61, 43, 31, 0.1), 0 4px 12px rgba(61, 43, 31, 0.08);
  transform: translateY(-2px);
}

/* Glass noise texture */
.glass-card::before, .glass-heavy::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}
.glass-card, .glass-heavy { position: relative; }
.glass-card > *, .glass-heavy > * { position: relative; z-index: 1; }

/* ===== 12. ACCORDION ===== */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.accordion-content.open { max-height: 500px; }
.accordion-icon {
  transition: transform var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
}
.accordion-icon.open { transform: rotate(45deg); }

/* ===== 13. CARD INTERACTIONS ===== */
.service-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 16px 48px rgba(61, 43, 31, 0.1), 0 4px 12px rgba(61, 43, 31, 0.08);
}
.step-line {
  width: 2px; height: 40px;
  background: linear-gradient(to bottom, var(--gold), transparent);
}

/* ===== 17. MOBILE MENU ===== */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 45;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.mobile-menu.open { opacity: 1; pointer-events: auto; }
.mobile-menu-backdrop {
  position: absolute; inset: 0;
  background: rgba(61, 43, 31, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.mobile-menu-panel {
  position: absolute;
  top: 80px; left: 16px; right: 16px;
  background: rgba(250, 247, 242, 0.85);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: 0 24px 64px rgba(61, 43, 31, 0.15);
  transform: translateY(-16px);
  transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.2, 1);
}
.mobile-menu.open .mobile-menu-panel { transform: translateY(0); }
.mobile-menu-link {
  display: block;
  padding: 14px 0;
  font-weight: 500;
  color: var(--espresso);
  border-bottom: 1px solid rgba(61, 43, 31, 0.06);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease, color 0.2s ease;
}
.mobile-menu.open .mobile-menu-link { opacity: 1; transform: translateY(0); }
.mobile-menu.open .mobile-menu-link:nth-child(1) { transition-delay: 50ms; }
.mobile-menu.open .mobile-menu-link:nth-child(2) { transition-delay: 130ms; }
.mobile-menu.open .mobile-menu-link:nth-child(3) { transition-delay: 210ms; }
.mobile-menu.open .mobile-menu-link:nth-child(4) { transition-delay: 290ms; }

/* ===== 18. HAMBURGER ===== */
.hamburger {
  width: 44px; height: 44px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 5px; cursor: pointer;
  background: none; border: none; padding: 0;
}
.hamburger span {
  display: block;
  width: 20px; height: 2px;
  background: var(--espresso);
  border-radius: 1px;
  transition: all var(--transition-smooth);
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ===== 19. STAT GLOW ===== */
.stat-glow { position: relative; }
.stat-glow::before {
  content: '';
  position: absolute; inset: -20px;
  background: radial-gradient(circle, rgba(196, 150, 90, 0.08), transparent 70%);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.stat-glow.active::before { opacity: 1; }

/* ===== 20. FOCUS STYLES ===== */
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===== 21. BACKGROUND GRADIENTS ===== */
.bg-gradient-warm {
  background: var(--sand);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(196, 150, 90, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(139, 154, 123, 0.08) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 100%, rgba(196, 150, 90, 0.06) 0%, transparent 60%);
}
.bg-gradient-cream {
  background: var(--cream);
  background-image:
    radial-gradient(ellipse at 70% 80%, rgba(196, 150, 90, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 10% 30%, rgba(139, 154, 123, 0.07) 0%, transparent 40%),
    radial-gradient(ellipse at 90% 10%, rgba(232, 93, 58, 0.04) 0%, transparent 30%);
}

/* ===== SECTION HOVER GLOW ===== */
.section-glow-hover { position: relative; }
.section-glow-hover::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(196,150,90,0.04) 0%, transparent 60%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.section-glow-hover:hover::after { opacity: 1; }

/* ===== CLIENT LOGO SHIMMER ===== */
@keyframes logo-shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
.logo-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s ease;
}
.logo-card::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(196,150,90,0.18) 50%, transparent 65%);
  background-size: 250% 100%;
  animation: logo-shimmer 4s ease-in-out infinite;
  pointer-events: none;
  border-radius: inherit;
}
.logo-card:nth-child(2)::after { animation-delay: 1.35s; }
.logo-card:nth-child(3)::after { animation-delay: 2.7s; }
.logo-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(196,150,90,0.15); }

/* ===== BOOKING WIDGET ===== */
.booking-tab {
  background: rgba(255, 255, 255, 0.4);
  color: var(--espresso);
  opacity: 0.5;
  border: 1px solid rgba(61, 43, 31, 0.08);
}
.booking-tab.active {
  background: var(--espresso);
  color: var(--cream);
  opacity: 1;
  border-color: var(--espresso);
}
.booking-tab:hover:not(.active) { opacity: 0.7; }
.booking-day-btn {
  padding: 8px 4px;
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  border: 1px solid rgba(61, 43, 31, 0.08);
  background: rgba(255, 255, 255, 0.4);
  transition: all 0.2s ease;
  font-size: 12px;
}
.booking-day-btn:hover { border-color: rgba(196, 150, 90, 0.4); background: rgba(255, 255, 255, 0.6); }
.booking-day-btn.selected { border-color: var(--gold); background: rgba(196, 150, 90, 0.08); }
.booking-day-btn.today { border-color: rgba(196, 150, 90, 0.3); }
.booking-slot-btn {
  padding: 8px 12px;
  border-radius: 10px;
  text-align: center;
  cursor: pointer;
  border: 1px solid rgba(61, 43, 31, 0.08);
  background: rgba(255, 255, 255, 0.4);
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  color: var(--espresso);
  transition: all 0.2s ease;
}
.booking-slot-btn:hover { border-color: rgba(196, 150, 90, 0.4); background: rgba(255, 255, 255, 0.6); transform: translateY(-1px); }
.booking-slot-btn.selected { border-color: var(--gold); background: rgba(196, 150, 90, 0.1); }

/* ===== SIDE RAIL NAVIGATION ===== */
.side-rail {
  position: fixed;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
@media (max-width: 1280px) { .side-rail { display: none; } }
.side-rail-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}
.side-rail-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(61,43,31,0.2);
  transition: all 0.3s;
  flex-shrink: 0;
}
.side-rail-label {
  font-size: 0.625rem;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  color: rgba(61,43,31,0.35);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: all 0.3s;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-4px);
}
.side-rail-item:hover .side-rail-dot { background: rgba(61,43,31,0.5); }
.side-rail-item:hover .side-rail-label { opacity: 1; transform: translateX(0); }
.side-rail-item.active .side-rail-dot { background: #C4965A; transform: scale(1.4); }
.side-rail-item.active .side-rail-label { opacity: 1; transform: translateX(0); color: #C4965A; }

/* ===== REVEAL ANIMATIONS ===== */
/* Note: must be in a separate <style> tag on pages using Tailwind CDN
   because Tailwind CDN interferes. Include this block in a second
   <style id="reveal-styles"> tag after the Tailwind <script>. */
