/* =============================================
   BARE BAYSIDE LABS — Global Stylesheet
   GitHub Pages Site
   ============================================= */

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

/* === VARIABLES === */
:root {
  --bg: #080c14;
  --surface: #0d1525;
  --surface2: #131e30;
  --border: rgba(99,179,237,0.15);
  --border-subtle: rgba(255,255,255,0.04);
  --sky: #38bdf8;
  --emerald: #34d399;
  --gold: #f59e0b;
  --gold-bright: #f5c542;
  --text: #e2e8f0;
  --text2: #c4d5e8;
  --muted: #64748b;
  --subtle: #475569;
}

/* === RESET === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: var(--sky); text-decoration: none; transition: color 0.25s; }
a:hover { color: #7dd3fc; }

img { max-width: 100%; display: block; }

::selection { background: rgba(56,189,248,0.25); color: var(--text); }


/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Bebas Neue', sans-serif;
  color: var(--text);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 3px;
  line-height: 1.05;
}
h1 { font-size: clamp(44px, 6vw, 78px); letter-spacing: 4px; }
h2 { font-size: clamp(36px, 5vw, 58px); }
h3 { font-size: clamp(24px, 3vw, 34px); }
h4 { font-size: 26px; }
h5 { font-size: 22px; }
h6 { font-size: 18px; }

p { color: var(--text2); }

.gradient-text {
  background: linear-gradient(135deg, #e2e8f0 0%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mono {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--muted);
}


/* === LAYOUT === */
.section { padding: 100px 24px; position: relative; }
.section > * { position: relative; z-index: 1; }
.inner { max-width: 1200px; margin: 0 auto; }
.inner-narrow { max-width: 800px; margin: 0 auto; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 28px; }
.grid-hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 60px; align-items: center; }
.grid-featured { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 40px; align-items: center; }


/* === EYEBROW === */
.eyebrow {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-radius: 100px;
  padding: 8px 18px;
  margin-bottom: 20px;
}
.eyebrow-emerald { color: var(--emerald); background: rgba(52,211,153,0.08); border: 1px solid rgba(52,211,153,0.25); }
.eyebrow-sky { color: var(--sky); background: rgba(56,189,248,0.08); border: 1px solid rgba(56,189,248,0.25); }
.eyebrow-gold { color: var(--gold); background: rgba(245,158,11,0.08); border: 1px solid rgba(245,158,11,0.25); }


/* === SURFACES === */
.surface {
  background: rgba(13,21,37,0.6);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 24px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 28px;
  transition: border-color 0.4s cubic-bezier(0.32,0.72,0,1), transform 0.4s cubic-bezier(0.32,0.72,0,1);
}
.card:hover {
  border-color: rgba(56,189,248,0.2);
  transform: translateY(-4px);
}

.surface-cta {
  background: rgba(13,21,37,0.5);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  padding: 72px 48px;
  text-align: center;
}


/* === BUTTONS === */
.btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, #34d399, #38bdf8);
  color: var(--bg);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 18px;
  letter-spacing: 2px;
  padding: 18px 40px;
  border-radius: 10px;
  border: none;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.32,0.72,0,1);
}
.btn-primary:hover { transform: translateY(-2px); color: var(--bg); }
.btn-primary:active { transform: scale(0.98); }

.btn-secondary {
  display: inline-block;
  background: transparent;
  border: 1px solid rgba(56,189,248,0.3);
  color: var(--sky);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 18px;
  letter-spacing: 2px;
  padding: 18px 40px;
  border-radius: 10px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s;
}
.btn-secondary:hover { border-color: var(--sky); background: rgba(56,189,248,0.05); color: var(--sky); }


/* === NAV === */
.nav {
  position: sticky;
  top: 0;
  z-index: 9999;
  background: rgba(8,12,20,0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 24px;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
}
.nav-brand {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  letter-spacing: 4px;
  color: var(--text);
  text-decoration: none;
}
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-link {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 15px;
  letter-spacing: 2px;
  color: var(--muted);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.25s;
}
.nav-link:hover { color: var(--text); }
.nav-cta {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 14px;
  letter-spacing: 2px;
  color: var(--bg);
  text-decoration: none;
  background: var(--emerald);
  padding: 10px 24px;
  border-radius: 8px;
  text-transform: uppercase;
  transition: transform 0.2s;
}
.nav-cta:hover { transform: translateY(-1px); color: var(--bg); }

.burger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.burger span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; transition: transform 0.3s, opacity 0.3s; }

.mobile-menu {
  display: none;
  position: fixed;
  top: 72px; left: 0; right: 0; bottom: 0;
  background: rgba(8,12,20,0.97);
  backdrop-filter: blur(24px);
  z-index: 9998;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  letter-spacing: 4px;
  color: var(--text);
  text-decoration: none;
  text-transform: uppercase;
}
.mobile-menu a:hover { color: var(--sky); }


/* === FOOTER === */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border-subtle);
  padding: 64px 24px 32px;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  letter-spacing: 4px;
  color: var(--text);
  margin-bottom: 16px;
}
.footer-desc { font-size: 15px; color: var(--muted); line-height: 1.6; max-width: 280px; }
.footer-heading {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 16px;
  letter-spacing: 2px;
  color: var(--text);
  text-transform: uppercase;
  margin-bottom: 20px;
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: var(--muted); font-size: 15px; transition: color 0.25s; }
.footer-links a:hover { color: var(--text); }

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-copy {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--subtle);
  letter-spacing: 1px;
}
.footer-social { display: flex; gap: 16px; }
.footer-social a { color: var(--muted); transition: color 0.25s; }
.footer-social a:hover { color: var(--sky); }
.footer-social svg { width: 20px; height: 20px; fill: currentColor; }


/* === STARS === */
.stars { display: flex; gap: 3px; }
.star { width: 16px; height: 16px; }
.star svg { width: 100%; height: 100%; }

.google-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(13,21,37,0.6);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 12px 16px;
}
.google-g { font-size: 22px; font-weight: 700; font-family: 'Inter', sans-serif; }
.google-g span:nth-child(1) { color: #4285F4; }
.google-g span:nth-child(2) { color: #EA4335; }
.google-g span:nth-child(3) { color: #FBBC05; }


/* === ANIMATIONS === */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  filter: blur(4px);
  transition: opacity 0.9s cubic-bezier(0.16,1,0.3,1),
              transform 0.9s cubic-bezier(0.16,1,0.3,1),
              filter 0.9s cubic-bezier(0.16,1,0.3,1);
}
.reveal.revealed { opacity: 1; transform: translateY(0); filter: blur(0); }

.stagger-1 { transition-delay: 0.08s; }
.stagger-2 { transition-delay: 0.16s; }
.stagger-3 { transition-delay: 0.24s; }
.stagger-4 { transition-delay: 0.32s; }
.stagger-5 { transition-delay: 0.4s; }

/* Aurora */
.aurora { position: relative; overflow: hidden; }
.aurora::before {
  content: ''; position: absolute; top: -40%; left: -20%;
  width: 70%; height: 140%;
  background: radial-gradient(ellipse at center, rgba(52,211,153,0.06) 0%, transparent 70%);
  animation: aurora1 25s ease-in-out infinite alternate;
  pointer-events: none; z-index: 0;
}
.aurora::after {
  content: ''; position: absolute; top: -20%; right: -30%;
  width: 60%; height: 120%;
  background: radial-gradient(ellipse at center, rgba(56,189,248,0.05) 0%, transparent 70%);
  animation: aurora2 30s ease-in-out infinite alternate;
  pointer-events: none; z-index: 0;
}
@keyframes aurora1 {
  0% { transform: translate(0,0) scale(1); }
  50% { transform: translate(8%,5%) scale(1.1); }
  100% { transform: translate(-5%,-3%) scale(0.95); }
}
@keyframes aurora2 {
  0% { transform: translate(0,0) scale(1); }
  50% { transform: translate(-10%,8%) scale(1.05); }
  100% { transform: translate(5%,-5%) scale(1.1); }
}

/* Glow pulse */
.glow { animation: glow-breathe 3.5s ease-in-out infinite; }
@keyframes glow-breathe {
  0%, 100% { box-shadow: 0 0 20px rgba(52,211,153,0.15), 0 0 60px rgba(52,211,153,0.05); }
  50% { box-shadow: 0 0 30px rgba(52,211,153,0.3), 0 0 80px rgba(52,211,153,0.1); }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; filter: none; transition: none; }
  .aurora::before, .aurora::after { animation: none; }
  .glow { animation: none; }
}


/* === SCROLLBAR === */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }


/* === BLOG LAYOUT === */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
  max-width: 1200px;
  margin: 0 auto;
}
.article-main { max-width: 800px; }

.sidebar {
  position: sticky;
  top: 88px;
  align-self: start;
}
.sidebar-heading {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 16px;
  letter-spacing: 2px;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}
.sidebar-link {
  display: block;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text2);
  text-decoration: none;
  border-radius: 8px;
  border-left: 2px solid transparent;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  margin-bottom: 4px;
  line-height: 1.4;
}
.sidebar-link:hover { background: var(--surface); color: var(--text); }
.sidebar-link.active {
  background: var(--surface);
  border-left-color: var(--emerald);
  color: var(--text);
  font-weight: 600;
}
.sidebar-link.active-sky { border-left-color: var(--sky); }
.sidebar-link.active-gold { border-left-color: var(--gold); }

.breadcrumb {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 20px;
}
.breadcrumb a { color: var(--muted); text-decoration: none; transition: color 0.2s; }
.breadcrumb a:hover { color: var(--sky); }
.breadcrumb span { margin: 0 8px; opacity: 0.5; }

/* Category cards */
.category-card {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 36px 28px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: border-color 0.4s cubic-bezier(0.32,0.72,0,1), transform 0.4s cubic-bezier(0.32,0.72,0,1);
}
.category-card:hover {
  border-color: rgba(56,189,248,0.2);
  transform: translateY(-4px);
}
.category-count {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 48px;
  line-height: 1;
  margin-bottom: 12px;
}
.category-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 24px;
  letter-spacing: 3px;
  color: var(--text);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.category-desc { font-size: 15px; color: var(--text2); line-height: 1.6; }


/* === MOBILE === */
@media (max-width: 768px) {
  .section { padding: 60px 16px; }
  .grid-2, .grid-3, .grid-hero, .grid-featured { grid-template-columns: 1fr; }
  .grid-hero { gap: 40px; }
  .btn-primary, .btn-secondary { width: 100%; text-align: center; }
  .reveal { transform: translateY(24px); filter: blur(2px); }
  .nav-links { display: none; }
  .burger { display: block; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .surface-cta { padding: 48px 20px; }
  h1 { font-size: 36px !important; }
  h2 { font-size: 28px !important; }

  /* Hero logo: smaller on mobile */
  .hero-logo { height: 100px !important; }

  /* Hero badge row: stack vertically, hide divider line */
  .hero-badge-row { flex-direction: column; align-items: flex-start !important; gap: 16px !important; }
  .hero-badge-row > div[style*="width:1px"] { display: none; }

  /* Hero stats row: stack vertically, hide divider lines */
  .hero-stats { flex-direction: column; align-items: flex-start !important; gap: 16px !important; }
  .hero-stats > div[style*="width:1px"] { display: none; }

  /* 4-column stats grid → 2 columns on mobile */
  .stats-grid { grid-template-columns: 1fr 1fr !important; gap: 16px !important; }

  /* Client logo bar: smaller text */
  .logo-bar { gap: 20px !important; }
  .logo-bar span { font-size: 16px !important; letter-spacing: 2px !important; }

  /* Trust bars: stack vertically */
  .trust-bar { flex-direction: column; align-items: center; gap: 20px !important; }

  /* How It Works step rows: stack number above text */
  .step-row { flex-direction: column; gap: 16px !important; }

  /* Blog article layout: sidebar below content on mobile */
  .article-layout { grid-template-columns: 1fr; gap: 32px; }
  .sidebar { position: static; }
}
