/* ============================================
   CONFLUENCE GROUP — confluencegroup.ai
   Dark, modern, content-first
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,300;1,9..40,400&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* --- Tokens --- */
:root {
  --color-bg: #0a0a12;
  --color-bg-raised: #10101c;
  --color-bg-card: #141425;
  --color-bg-card-hover: #1a1a30;
  --color-surface: #1c1c32;
  --color-border: rgba(255,255,255,0.06);
  --color-border-hover: rgba(255,255,255,0.12);
  
  --color-text: #e8e8f0;
  --color-text-secondary: #9898b0;
  --color-text-muted: #6a6a82;
  
  --color-brand: #2d8cf0;
  --color-brand-glow: rgba(45,140,240,0.15);
  --color-brand-soft: rgba(45,140,240,0.08);
  --color-accent: #4ecdc4;
  --color-accent-glow: rgba(78,205,196,0.12);
  
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --max-width: 1120px;
  --section-pad: clamp(80px, 10vw, 140px);
  --gutter: clamp(20px, 4vw, 40px);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

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

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  font-size: 16px;
  overflow-x: hidden;
}

a { color: var(--color-brand); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--color-accent); }

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

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

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

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 var(--gutter);
  background: rgba(10,10,18,0.8);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--color-border);
  transition: background 0.3s ease;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--color-text);
}

.nav-brand img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.nav-brand span {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  color: var(--color-text-secondary);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 0.2s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--color-brand);
  transition: width 0.3s var(--ease-out);
}

.nav-links a:hover { color: var(--color-text); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--color-text); }
.nav-links a.active::after { width: 100%; }

.nav-cta {
  background: var(--color-brand);
  color: #fff !important;
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all 0.2s ease;
}

.nav-cta::after { display: none !important; }
.nav-cta:hover { 
  background: #3a9af5;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(45,140,240,0.3);
}

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-text);
  cursor: pointer;
  padding: 8px;
}

.nav-toggle svg { width: 24px; height: 24px; }

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10,10,18,0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 40px;
    gap: 0;
    transform: translateX(100%);
    transition: transform 0.35s var(--ease-out);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links li { width: 100%; text-align: center; }
  .nav-links a { 
    display: block;
    padding: 18px 0;
    font-size: 18px;
  }
  .nav-links a::after { display: none; }
  .nav-cta {
    margin-top: 20px;
    display: inline-block;
  }
}

/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 72px;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: -20%;
  right: -15%;
  width: 700px;
  height: 700px;
  opacity: 0.12;
  pointer-events: none;
  animation: heroFloat 20s ease-in-out infinite;
}

@keyframes heroFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(-20px, 30px) rotate(3deg); }
  66% { transform: translate(15px, -20px) rotate(-2deg); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-brand);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 28px;
  opacity: 0;
  animation: fadeUp 0.7s var(--ease-out) 0.2s forwards;
}

.hero-label::before {
  content: '';
  width: 20px;
  height: 1.5px;
  background: var(--color-brand);
}

.hero h1 {
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp 0.7s var(--ease-out) 0.35s forwards;
}

.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--color-brand), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: clamp(17px, 2vw, 20px);
  color: var(--color-text-secondary);
  line-height: 1.6;
  max-width: 560px;
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeUp 0.7s var(--ease-out) 0.5s forwards;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.7s var(--ease-out) 0.65s forwards;
}

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

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
  text-decoration: none;
}

.btn-primary {
  background: var(--color-brand);
  color: #fff;
}
.btn-primary:hover {
  background: #3a9af5;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(45,140,240,0.35);
}

.btn-secondary {
  background: var(--color-bg-card);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn-secondary:hover {
  background: var(--color-bg-card-hover);
  color: var(--color-text);
  border-color: var(--color-border-hover);
  transform: translateY(-2px);
}

.btn-arrow::after {
  content: '→';
  transition: transform 0.2s ease;
}
.btn-arrow:hover::after {
  transform: translateX(4px);
}

/* --- Section Headers --- */
.section-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-brand);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-label::before {
  content: '';
  width: 16px;
  height: 1.5px;
  background: var(--color-brand);
}

.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 17px;
  color: var(--color-text-secondary);
  max-width: 560px;
  line-height: 1.65;
}

/* --- Thesis Section --- */
.thesis {
  border-top: 1px solid var(--color-border);
}

.thesis-content {
  max-width: 680px;
}

.thesis blockquote {
  font-size: clamp(19px, 2.5vw, 24px);
  line-height: 1.55;
  color: var(--color-text);
  border-left: 3px solid var(--color-brand);
  padding-left: 28px;
  margin: 32px 0;
  font-weight: 300;
}

.thesis p {
  color: var(--color-text-secondary);
  font-size: 17px;
  line-height: 1.7;
  margin-bottom: 16px;
}

/* --- Audience Cards --- */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

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

.audience-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 36px 32px;
  transition: all 0.35s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.audience-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-brand), var(--color-accent));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.audience-card:hover {
  border-color: var(--color-border-hover);
  background: var(--color-bg-card-hover);
  transform: translateY(-4px);
}

.audience-card:hover::before { opacity: 1; }

.audience-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--color-brand-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 20px;
}

.audience-card h3 {
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.audience-card .hook {
  font-size: 14px;
  color: var(--color-brand);
  font-weight: 500;
  margin-bottom: 12px;
  font-style: italic;
}

.audience-card p {
  font-size: 15px;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* --- Framework/Pillars --- */
.pillars {
  border-top: 1px solid var(--color-border);
}

.pillars-visual {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: 48px;
}

.pillar-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 0;
  align-items: stretch;
  min-height: 120px;
}

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

.pillar-label {
  display: flex;
  align-items: center;
  padding: 24px 28px;
  background: var(--color-brand-soft);
  border: 1px solid var(--color-border);
  border-right: none;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-brand);
  font-weight: 500;
}

@media (max-width: 768px) {
  .pillar-label {
    border-right: 1px solid var(--color-border);
    border-bottom: none;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
  }
}

.pillar-content {
  padding: 28px 32px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

@media (max-width: 768px) {
  .pillar-content {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
  }
}

.pillar-content h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.pillar-content p {
  font-size: 15px;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.pillar-row + .pillar-row { margin-top: 16px; }

.foundation-bar {
  margin-top: 24px;
  padding: 20px 28px;
  background: linear-gradient(135deg, var(--color-brand-soft), var(--color-accent-glow));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 16px;
}

.foundation-bar .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-brand);
  flex-shrink: 0;
}

.foundation-bar h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
}

.foundation-bar p {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-top: 2px;
}

/* --- Advisory Mention --- */
.advisory-mention {
  border-top: 1px solid var(--color-border);
}

.advisory-card {
  max-width: 700px;
  padding: 40px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

@media (max-width: 768px) {
  .advisory-card { flex-direction: column; gap: 20px; padding: 28px; }
}

.advisory-card .advisory-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.advisory-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.advisory-card p {
  font-size: 15px;
  color: var(--color-text-secondary);
  line-height: 1.65;
  margin-bottom: 16px;
}

.advisory-card a {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-brand);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.advisory-card a:hover { gap: 10px; }

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--color-border);
  padding: 48px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-brand img { width: 28px; height: 28px; border-radius: 50%; }
.footer-brand span { font-family: var(--font-mono); font-weight: 500; font-size: 14px; letter-spacing: 0.01em; }

.footer-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.footer-meta a { color: var(--color-text-muted); }
.footer-meta a:hover { color: var(--color-text-secondary); }

.footer-local {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: 20px;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

/* --- About Page --- */
.about-hero {
  padding-top: calc(72px + var(--section-pad));
  padding-bottom: var(--section-pad);
  border-bottom: 1px solid var(--color-border);
}

.about-intro {
  max-width: 680px;
}

.about-intro h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 24px;
}

.about-intro .lead {
  font-size: clamp(17px, 2vw, 20px);
  color: var(--color-text-secondary);
  line-height: 1.65;
}

.about-body {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 80px;
  align-items: start;
}

@media (max-width: 900px) {
  .about-body { grid-template-columns: 1fr; gap: 48px; }
}

.about-narrative h2 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  margin-top: 48px;
}

.about-narrative h2:first-child { margin-top: 0; }

.about-narrative p {
  font-size: 16px;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.about-narrative p strong {
  color: var(--color-text);
  font-weight: 600;
}

.about-sidebar {
  position: sticky;
  top: 100px;
}

.sidebar-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 32px;
  margin-bottom: 24px;
}

.sidebar-card h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-brand);
  margin-bottom: 16px;
}

.sidebar-card ul {
  list-style: none;
}

.sidebar-card li {
  font-size: 14px;
  color: var(--color-text-secondary);
  padding: 6px 0;
  border-bottom: 1px solid var(--color-border);
}

.sidebar-card li:last-child { border-bottom: none; }

.sidebar-card li strong {
  color: var(--color-text);
  font-weight: 500;
  display: block;
  font-size: 15px;
}

.sidebar-card .contact-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--color-text-secondary);
  padding: 8px 0;
}

.sidebar-card .contact-link:hover { color: var(--color-brand); }

/* --- Scroll Animations --- */
/* Elements start visible. JS adds .reveal-ready to hide them before animating. */
.reveal-ready .reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal-ready .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.reveal-ready .reveal-stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.reveal-ready .reveal-stagger.visible > *:nth-child(1) { transition-delay: 0s; }
.reveal-ready .reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.08s; }
.reveal-ready .reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.16s; }
.reveal-ready .reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.24s; }
.reveal-ready .reveal-stagger.visible > *:nth-child(5) { transition-delay: 0.32s; }

.reveal-ready .reveal-stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* --- Utility --- */
.mt-0 { margin-top: 0; }
.text-brand { color: var(--color-brand); }
