/* ============================================================
   MIKE ADAIR — AI STRATEGY CONSULTANT
   Dark cinematic aesthetic. Editorial layout. Premium feel.
   ============================================================ */

:root {
  /* Colors — Stormy Morning palette */
  --bg-primary: #0C1117;         /* Deep dark, primary background */
  --bg-secondary: #111820;       /* Alternate sections — subtle shift */
  --bg-card: rgba(255,255,255,0.03); /* Cards — glass surfaces */
  --bg-card-hover: rgba(255,255,255,0.06);
  --text-primary: #C4D6E8;       /* Ice blue body text */
  --text-heading: #FFFFFF;       /* Pure white for headlines */
  --text-muted: #5A7A96;         /* Muted/secondary text */
  --accent: #6EB4F7;             /* Accent, CTAs, links */
  --accent-hover: #93CCFF;       /* Hover state — lighter */
  --accent-glow: rgba(110,180,247,0.15);
  --border: rgba(255,255,255,0.06); /* Subtle borders */
  --border-hover: rgba(255,255,255,0.12);

  /* Typography */
  --font-heading: 'Syne', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;

  /* Spacing */
  --section-padding: 140px;
  --section-padding-mobile: 80px;
  --container-max: 1200px;
  --container-narrow: 800px;
}

/* ============================================================
   BASE
   ============================================================ */

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  overflow-x: hidden;
}

/* Noise texture overlay */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

/* Subtle grid pattern overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.02;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 80px 80px;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
}

/* ============================================================
   SECTION SPACING & BACKGROUNDS
   ============================================================ */

.section {
  padding: var(--section-padding) 0;
  position: relative;
}

@media (max-width: 768px) {
  .section {
    padding: var(--section-padding-mobile) 0;
  }
}

/* Alternating section — gradient transition, not hard cut */
.section-alt {
  background: var(--bg-secondary);
  position: relative;
}

.section-alt::before {
  content: '';
  position: absolute;
  top: -80px;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent, var(--bg-secondary));
  pointer-events: none;
}

.section-alt::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom, var(--bg-secondary), transparent);
  pointer-events: none;
  z-index: 1;
}

/* ============================================================
   REVEAL ANIMATIONS — start state (GSAP animates TO visible)
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(40px);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.92);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-60px);
}

.reveal-right {
  opacity: 0;
  transform: translateX(60px);
}

.reveal-blur {
  opacity: 0;
  filter: blur(12px);
}

/* ============================================================
   NAVIGATION
   ============================================================ */

.site-nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  background: rgba(12,17,23,0.6);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: background 0.4s ease, border-color 0.4s ease;
}

.site-nav.scrolled {
  background: rgba(12,17,23,0.92);
  border-bottom-color: var(--border-hover);
}

.nav-link {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  transition: color 0.3s ease;
  position: relative;
}

.nav-link:hover {
  color: #fff;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-active {
  color: white !important;
}

.nav-active::after {
  width: 100% !important;
}

.nav-cta {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.5rem 1.25rem;
  background: var(--accent);
  color: var(--bg-primary);
  border-radius: 6px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.nav-cta:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 24px var(--accent-glow);
}

/* ============================================================
   HERO SECTION
   ============================================================ */

.hero-section {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 85vh;
  overflow: hidden;
}

/* Cinematic vignette */
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 40%, transparent 20%, var(--bg-primary) 75%);
  pointer-events: none;
  z-index: 1;
}

/* Aurora / gradient mesh behind hero */
.hero-glow {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.hero-glow::before {
  content: '';
  position: absolute;
  width: 140%;
  height: 140%;
  top: -30%;
  left: -20%;
  background:
    radial-gradient(ellipse 50% 40% at 30% 50%, rgba(110,180,247,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 40% 50% at 70% 40%, rgba(110,140,247,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 30% at 50% 70%, rgba(90,160,220,0.04) 0%, transparent 60%);
  animation: auroraShift 20s ease-in-out infinite alternate;
}

@keyframes auroraShift {
  0% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(2%, -1%) rotate(1deg); }
  66% { transform: translate(-1%, 2%) rotate(-0.5deg); }
  100% { transform: translate(1%, -1%) rotate(0.5deg); }
}

.hero-content {
  position: relative;
  z-index: 2;
}

/* ============================================================
   CARDS & SURFACES — Glassmorphism
   ============================================================ */

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.01));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  box-shadow: 0 8px 40px rgba(0,0,0,0.3), 0 0 60px var(--accent-glow);
  transform: translateY(-2px);
}

/* Methodology cards — numbered */
.method-card {
  position: relative;
}

.method-number {
  font-family: var(--font-heading);
  font-size: 4rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, rgba(110,180,247,0.3), rgba(110,180,247,0.05));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

/* ============================================================
   METHODOLOGY GRID — editorial asymmetric
   ============================================================ */

.methodology-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .methodology-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   DELIVERABLE GRID — staggered masonry feel
   ============================================================ */

.deliverable-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.deliverable-grid .glass-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

@media (max-width: 768px) {
  .deliverable-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   STAT CARDS — number counters
   ============================================================ */

.stat-card {
  text-align: center;
  padding: 2.5rem 1.5rem;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

/* ============================================================
   TAB COMPONENT — services page
   ============================================================ */

.tab-container {
  position: relative;
}

.tab-bar {
  display: flex;
  justify-content: center;
  gap: 0;
  position: relative;
  margin-bottom: 3rem;
}

.tab-bar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
}

.tab-btn {
  font-family: var(--font-heading);
  padding: 1rem 2rem;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  background: none;
  position: relative;
  z-index: 1;
}

.tab-btn:hover {
  color: #fff;
}

.tab-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transition: width 0.4s ease;
  border-radius: 2px;
}

.tab-btn:hover::after {
  width: 60%;
}

.tab-btn.tab-active {
  color: white;
}

.tab-btn.tab-active::after {
  width: 100%;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-hover), var(--accent), transparent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.tab-panel {
  animation: tabFadeIn 0.5s ease forwards;
}

@keyframes tabFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 480px) {
  .tab-btn {
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
  }
}

/* ============================================================
   PHASE INDICATOR
   ============================================================ */

.phase-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: rgba(110,180,247,0.08);
  border: 1px solid rgba(110,180,247,0.2);
  color: var(--accent);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 1rem;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn-accent {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.875rem 2rem;
  background: var(--accent);
  color: var(--bg-primary);
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  letter-spacing: 0.01em;
}

.btn-accent:hover {
  background: var(--accent-hover);
  color: var(--bg-primary);
  box-shadow: 0 4px 24px var(--accent-glow), 0 0 60px rgba(110,180,247,0.08);
  transform: translateY(-1px);
}

.link-accent {
  color: var(--accent);
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.3s ease;
  position: relative;
}

.link-accent:hover {
  color: var(--accent-hover);
}

.link-accent::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.link-accent:hover::after {
  width: 100%;
}

/* ============================================================
   CASE STUDY TEASER — editorial card
   ============================================================ */

.case-teaser {
  position: relative;
  padding: 3rem;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
}

.case-teaser::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 50%;
  bottom: 0;
  background: linear-gradient(135deg, rgba(110,180,247,0.04), transparent);
  pointer-events: none;
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  position: relative;
  background: var(--bg-primary);
  padding: 4rem 0;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(to bottom, transparent, var(--bg-primary));
  pointer-events: none;
}

/* ============================================================
   PROSE — long-form text (About, Case Study)
   ============================================================ */

.prose-custom p {
  margin-bottom: 1.5rem;
  line-height: 1.85;
  font-size: 1rem;
}

.prose-custom p:last-child {
  margin-bottom: 0;
}

/* ============================================================
   TABLE — case study
   ============================================================ */

.styled-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.styled-table thead tr {
  border-bottom: 1px solid var(--border-hover);
}

.styled-table th {
  text-align: left;
  padding: 0.875rem 0;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.styled-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease;
}

.styled-table tbody tr:hover {
  background: rgba(255,255,255,0.02);
}

.styled-table td {
  padding: 1rem 0;
  padding-right: 1.5rem;
  color: var(--text-primary);
}

@media (max-width: 640px) {
  .styled-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ============================================================
   ABOUT PAGE — photo placeholder
   ============================================================ */

.photo-placeholder {
  width: 12rem;
  height: 12rem;
  border-radius: 50%;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 3rem;
  position: relative;
}

.photo-placeholder::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(110,180,247,0.15), transparent, rgba(110,180,247,0.08));
  z-index: -1;
}

/* ============================================================
   SECTION DECORATIVE ELEMENTS
   ============================================================ */

.section-glow {
  position: absolute;
  width: 600px;
  height: 400px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.04;
  pointer-events: none;
  background: var(--accent);
}

/* ============================================================
   CTA SECTION
   ============================================================ */

.cta-section {
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(110,180,247,0.05), transparent 60%);
  pointer-events: none;
}

/* ============================================================
   MOBILE RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
  .methodology-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .hero-section {
    min-height: 70vh;
  }

  .method-number {
    font-size: 3rem;
  }

  .stat-number {
    font-size: 2.5rem;
  }

  .case-teaser {
    padding: 2rem;
  }
}

/* ============================================================
   HORIZONTAL RULE — section dividers
   ============================================================ */

.divider {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-hover), transparent);
  margin: 0;
}

/* ============================================================
   SECTION NUMBER — case study section headers
   ============================================================ */

.section-number {
  font-family: var(--font-heading);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

/* ============================================================
   PLACEHOLDER NOTICE
   ============================================================ */

.placeholder-notice {
  background: rgba(110,180,247,0.06);
  border: 1px solid rgba(110,180,247,0.15);
  border-radius: 8px;
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
}

.placeholder-notice p {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ============================================================
   SCROLL PROGRESS (optional enhancement)
   ============================================================ */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  z-index: 200;
  transform-origin: left;
  transform: scaleX(0);
}
