/* ============================================================================
   BURD & CO. — San Diego Creative Directory
   css/style.css

   Table of Contents:
   01. Reset & CSS Variables (Light + Dark Mode)
   02. Base Typography & Body
   03. Scrollbar
   04. Background: Aurora Blobs + Grain
   05. Custom Cursor
   06. Navigation
   07. Hero Section
   08. Marquee Strip
   09. Filter Bar & Pills
   10. Directory Layout
   11. Listing Cards
   12. Buttons
   13. Footer
   14. Keyframe Animations
   15. Responsive Breakpoints
   ============================================================================ */


/* ── 01. RESET & CSS VARIABLES ──────────────────────────────────────────── */

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

/* ─── LIGHT MODE (default) ─── */
:root {
  /* Backgrounds */
  --bg:              #f3f3ef;
  --bg-alt:          #ececea;

  /* Glassmorphism surfaces */
  --surface:         rgba(255, 255, 255, 0.62);
  --surface-hover:   rgba(255, 255, 255, 0.82);

  /* Borders */
  --border:          rgba(0, 0, 0, 0.08);
  --border-hover:    rgba(0, 0, 0, 0.18);

  /* Text */
  --text:            #0a0a0a;
  --text-muted:      rgba(10, 10, 10, 0.52);
  --text-dim:        rgba(10, 10, 10, 0.30);

  /* Accent — cool slate, single colour, very restrained */
  --accent:          #3c4a5c;
  --accent-light:    rgba(60, 74, 92, 0.07);
  --accent-border:   rgba(60, 74, 92, 0.22);

  /* Aurora blob colours (light: subtle warm-cool puffs) */
  --blob-a: rgba(205, 210, 225, 0.7);
  --blob-b: rgba(215, 218, 232, 0.55);
  --blob-c: rgba(190, 198, 214, 0.5);

  /* Cursor */
  --cursor-dot:  #0a0a0a;
  --cursor-ring: rgba(10, 10, 10, 0.2);

  /* Fonts */
  --f-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --f-mono:    'DM Mono', 'Courier New', monospace;
  --f-body:    'Inter', system-ui, -apple-system, sans-serif;

  /* Layout */
  --max-w:    1180px;
  --gutter:   clamp(1.25rem, 4vw, 3.5rem);
  --radius:   14px;
  --radius-sm: 8px;

  /* Dynamic nav height (updated by JS) */
  --nav-h: 70px;
}

/* ─── DARK MODE ─── */
@media (prefers-color-scheme: dark) {
  :root {
	--bg:              #07070a;
	--bg-alt:          #0c0c10;

	--surface:         rgba(255, 255, 255, 0.04);
	--surface-hover:   rgba(255, 255, 255, 0.08);

	--border:          rgba(255, 255, 255, 0.08);
	--border-hover:    rgba(255, 255, 255, 0.18);

	--text:            #eeeeed;
	--text-muted:      rgba(238, 238, 237, 0.48);
	--text-dim:        rgba(238, 238, 237, 0.26);

	--accent:          #a8b6cc;
	--accent-light:    rgba(168, 182, 204, 0.08);
	--accent-border:   rgba(168, 182, 204, 0.22);

	/* Aurora blob colours (dark: deep indigo + slate) */
	--blob-a: rgba(48, 40, 130, 0.55);
	--blob-b: rgba(32, 52, 120, 0.42);
	--blob-c: rgba(70, 35, 115, 0.38);

	--cursor-dot:  #eeeeed;
	--cursor-ring: rgba(238, 238, 237, 0.2);
  }
}


/* ── 02. BASE TYPOGRAPHY & BODY ──────────────────────────────────────────── */

html {
  cursor: none;           /* Custom cursor; restores on touch via media query */
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Smooth bg/text transition when user changes system mode */
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* Restore cursor on touch devices */
@media (hover: none) {
  html { cursor: auto; }
  .c-dot, .c-ring { display: none !important; }
}


/* ── 03. SCROLLBAR ───────────────────────────────────────────────────────── */

::-webkit-scrollbar       { width: 2px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 2px; }


/* ── 04. BACKGROUND: AURORA BLOBS + GRAIN ────────────────────────────────── */

/* Container — fixed, behind everything */
.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(85px);
  will-change: transform; /* Hint to GPU */
}

/* Blob positions and colour (colours from CSS vars — auto dark/light) */
.blob-1 {
  width: 680px; height: 680px;
  background: radial-gradient(circle, var(--blob-a) 0%, transparent 65%);
  top: -15%; left: -10%;
  animation: drift1 28s ease-in-out infinite;
}

.blob-2 {
  width: 520px; height: 520px;
  background: radial-gradient(circle, var(--blob-b) 0%, transparent 65%);
  top: 8%; right: -8%;
  animation: drift2 34s ease-in-out infinite;
}

.blob-3 {
  width: 480px; height: 480px;
  background: radial-gradient(circle, var(--blob-c) 0%, transparent 65%);
  bottom: 0%; left: 30%;
  animation: drift3 24s ease-in-out infinite;
}

/* Film grain overlay — just enough texture to break flatness */
.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}


/* ── 05. CUSTOM CURSOR ───────────────────────────────────────────────────── */

.c-dot {
  position: fixed;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--cursor-dot);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width .15s, height .15s, background .2s;
}

.c-ring {
  position: fixed;
  width: 26px; height: 26px;
  border: 1px solid var(--cursor-ring);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition:
	width  .4s cubic-bezier(.16, 1, .3, 1),
	height .4s cubic-bezier(.16, 1, .3, 1),
	border-color .3s;
}

/* Expanded state on interactive elements */
body.is-hovering .c-dot  { width: 8px; height: 8px; background: var(--accent); }
body.is-hovering .c-ring { width: 44px; height: 44px; border-color: var(--accent-border); }


/* ── 06. NAVIGATION ──────────────────────────────────────────────────────── */

/* Page content sits above background layers */
.page {
  position: relative;
  z-index: 2;
}

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.8rem var(--gutter);
  gap: 1.5rem;
  transition: padding .4s ease, background .4s, backdrop-filter .4s, border-color .4s;
}

/* Scrolled: frosted glass appearance */
.nav.scrolled {
  padding: 1rem var(--gutter);
  background: var(--surface);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}

/* Logo image (when PNG is ready) */
.logo-img {
  height: 28px;
  width: auto;
  display: block;
}

/* Logo text fallback — styled to feel on-brand */
.logo-text {
  font-family: var(--f-display);
  font-size: 1.3rem;
  font-weight: 400;
  font-style: italic;
  letter-spacing: .01em;
  color: var(--text);
  text-decoration: none;
  line-height: 1;
}
.logo-text em {
  font-style: normal;
  color: var(--text-muted);
}
.footer-logo-text {
  font-size: 1rem;
}

/* Desktop nav links */
.nav-links {
  display: flex;
  gap: 1.8rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--f-mono);
  font-size: .6rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color .25s;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--text);
  outline: none;
}

/* Nav CTA button — smaller sizing override */
.nav-cta {
  font-size: .6rem !important;
  padding: .55rem 1.2rem !important;
}

/* Hide nav links on mobile */
@media (max-width: 820px) {
  .nav-links { display: none; }
}


/* ── 07. HERO SECTION ────────────────────────────────────────────────────── */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem var(--gutter) 6rem;
  position: relative;
}

/* Mono tag above title */
.hero-eyebrow {
  font-family: var(--f-mono);
  font-size: .62rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 2rem;
  opacity: 0;
  animation: riseUp .8s .2s ease both;
}

/* Display title — large Cormorant Garamond */
.hero-title {
  font-family: var(--f-display);
  font-weight: 300;
  font-size: clamp(4rem, 13vw, 10.5rem);
  line-height: .9;
  letter-spacing: -.02em;
  color: var(--text);
  opacity: 0;
  animation: riseUp 1s .4s ease both;
}

/* Italic ampersand for elegance */
.hero-amp {
  font-style: italic;
  font-weight: 300;
}

/* Muted period */
.hero-period {
  color: var(--text-muted);
}

/* Subtitle */
.hero-sub {
  margin-top: 2.2rem;
  max-width: 500px;
  font-size: clamp(.9rem, 1.4vw, 1.05rem);
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.85;
  opacity: 0;
  animation: riseUp 1s .6s ease both;
}

/* Stats strip */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-top: 3rem;
  opacity: 0;
  animation: riseUp 1s .8s ease both;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .2rem;
}

.stat-num {
  font-family: var(--f-display);
  font-size: 2rem;
  font-weight: 300;
  line-height: 1;
  color: var(--text);
}

.stat-label {
  font-family: var(--f-mono);
  font-size: .56rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.stat-divider {
  width: 1px;
  height: 34px;
  background: var(--border-hover);
  flex-shrink: 0;
}

/* Scroll hint at bottom of hero */
.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  opacity: 0;
  animation: riseUp 1s 1.2s ease both;
}

.scroll-hint span {
  font-family: var(--f-mono);
  font-size: .55rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.scroll-shaft {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--border-hover), transparent);
  animation: shaftPulse 2.2s ease-in-out infinite;
}


/* ── 08. MARQUEE STRIP ───────────────────────────────────────────────────── */

.marquee-wrap {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: .9rem 0;
}

.marquee-track {
  display: flex;
  gap: 2.5rem;
  white-space: nowrap;
  width: max-content;
  animation: marquee 30s linear infinite;
}

.marquee-item {
  font-family: var(--f-mono);
  font-size: .58rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: .9rem;
}

.marquee-item .sep {
  font-size: .45rem;
  color: var(--accent);
  opacity: 0.6;
}


/* ── 09. FILTER BAR & PILLS ──────────────────────────────────────────────── */

.filter-bar {
  position: sticky;
  /* Top is set dynamically by JS via --nav-h custom property */
  top: var(--nav-h);
  z-index: 50;
  background: var(--surface);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  padding: .8rem var(--gutter);
  transition: background .4s;
}

/* Horizontal scroll with hidden scrollbar */
.filter-inner {
  display: flex;
  gap: .6rem;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.filter-inner::-webkit-scrollbar { display: none; }

/* Individual category pill */
.pill {
  display: inline-flex;
  align-items: center;
  font-family: var(--f-mono);
  font-size: .58rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  white-space: nowrap;
  padding: .48rem 1rem;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: none;
  transition: all .25s ease;
}

.pill:hover,
.pill:focus-visible {
  border-color: var(--border-hover);
  color: var(--text);
  background: var(--accent-light);
  outline: none;
}

/* Active pill — inverted (text color on accent) */
.pill.active {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

@media (hover: none) {
  .pill { cursor: pointer; }
}


/* ── 10. DIRECTORY LAYOUT ────────────────────────────────────────────────── */

.directory {
  padding: 2.5rem var(--gutter) 6rem;
  max-width: var(--max-w);
  margin: 0 auto;
}

/* Each category section */
.dir-section {
  margin-bottom: 5rem;
  /* Entry animation: starts hidden, revealed by IntersectionObserver */
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .8s ease, transform .8s ease;
  /* Scroll offset accounts for sticky nav + filter bar */
  scroll-margin-top: calc(var(--nav-h) + 60px);
}

.dir-section.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Section header: num · title ····· count */
.dir-section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.8rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.dir-num {
  font-family: var(--f-mono);
  font-size: .58rem;
  letter-spacing: .22em;
  color: var(--text-dim);
  flex-shrink: 0;
}

.dir-title {
  font-family: var(--f-display);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 300;
  letter-spacing: .02em;
  color: var(--text);
  line-height: 1;
}

.dir-count {
  font-family: var(--f-mono);
  font-size: .56rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-left: auto;
  flex-shrink: 0;
}


/* ── 11. LISTING CARDS ───────────────────────────────────────────────────── */

/* 2-column responsive grid */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.1rem;
}

/* Individual card — horizontal flex layout */
.listing-card {
  display: flex;
  align-items: flex-start;
  gap: 1.4rem;
  padding: 1.7rem;

  /* Glassmorphism base */
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);

  /* Entry animation — stagger set by JS */
  opacity: 0;
  transform: translateY(16px);
  transition:
	opacity  .7s ease,
	transform .7s ease,
	background .3s,
	border-color .3s,
	box-shadow .3s;
}

.listing-card.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Hover state */
.listing-card:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  box-shadow: 0 8px 36px rgba(0, 0, 0, 0.07);
}

@media (prefers-color-scheme: dark) {
  .listing-card:hover {
	box-shadow: 0 8px 36px rgba(0, 0, 0, 0.32);
  }
}

/* Logo box — square with initials fallback */
.listing-logo {
  width: 66px;
  height: 66px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-alt);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* The actual logo image */
.listing-logo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
  z-index: 1;
  /* Hide the broken image icon while keeping layout */
  color: transparent;
}

/* Initials shown when image is missing/loading */
.logo-init {
  font-family: var(--f-display);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: .04em;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 0;
}

/* Text block next to logo */
.listing-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .45rem;
}

/* Company / professional name */
.listing-name {
  font-family: var(--f-display);
  font-size: 1.18rem;
  font-weight: 400;
  color: var(--text);
  letter-spacing: .01em;
  line-height: 1.2;
}

/* Short description */
.listing-desc {
  font-size: .865rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.72;
}

/* Outgoing website link */
.listing-link {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-family: var(--f-mono);
  font-size: .58rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  margin-top: .2rem;
  transition: color .25s, gap .2s;
}

.listing-link:hover,
.listing-link:focus-visible {
  color: var(--text);
  gap: .5rem;
  outline: none;
}

.listing-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}


/* ── 12. BUTTONS ─────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-family: var(--f-mono);
  font-size: .62rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  padding: .75rem 1.5rem;
  border-radius: 100px;
  border: 1px solid transparent;
  cursor: none;
  transition: all .3s ease;
  white-space: nowrap;
  line-height: 1;
}

.btn-outline {
  border-color: var(--border-hover);
  background: transparent;
  color: var(--text-muted);
}

.btn-outline:hover,
.btn-outline:focus-visible {
  border-color: var(--text);
  color: var(--text);
  outline: none;
}

.btn-sm {
  font-size: .56rem;
  padding: .6rem 1.1rem;
}

@media (hover: none) {
  .btn { cursor: pointer; }
}


/* ── 13. FOOTER ──────────────────────────────────────────────────────────── */

.footer {
  position: relative;
  z-index: 2;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 2.8rem var(--gutter);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: .45rem;
}

.footer-tagline {
  font-family: var(--f-mono);
  font-size: .55rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.footer-nav {
  display: flex;
  gap: 1.6rem;
  flex-wrap: wrap;
}

.footer-nav a {
  font-family: var(--f-mono);
  font-size: .56rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  transition: color .25s;
}

.footer-nav a:hover { color: var(--text); }

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .75rem;
}

.footer-copy {
  font-family: var(--f-mono);
  font-size: .54rem;
  letter-spacing: .15em;
  color: var(--text-dim);
}


/* ── 14. KEYFRAME ANIMATIONS ─────────────────────────────────────────────── */

/* Universal fade-up entrance */
@keyframes riseUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Scroll indicator pulse */
@keyframes shaftPulse {
  0%, 100% { opacity: .3; }
  50%       { opacity: .8; }
}

/* Aurora blob drift patterns */
@keyframes drift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(3%, 5%) scale(1.05); }
  66%      { transform: translate(-2%, 2%) scale(.97); }
}

@keyframes drift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(-4%, 3%) scale(1.04); }
  66%      { transform: translate(2%, -5%) scale(1.07); }
}

@keyframes drift3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(5%, -5%) scale(1.08); }
}

/* Marquee scroll */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}


/* ── 15. RESPONSIVE BREAKPOINTS ──────────────────────────────────────────── */

/* Tablet — single column cards */
@media (max-width: 860px) {
  .listings-grid {
	grid-template-columns: 1fr;
  }

  .footer-inner {
	flex-direction: column;
	align-items: flex-start;
  }

  .footer-right {
	align-items: flex-start;
  }
}

/* Mobile — tighter spacing */
@media (max-width: 560px) {
  .hero-stats {
	gap: 1.2rem;
  }

  .listing-card {
	padding: 1.3rem;
	gap: 1rem;
  }

  .listing-logo {
	width: 54px;
	height: 54px;
  }

  .footer-nav {
	display: none; /* Simplify footer on mobile */
  }
}