/* ═══════════════════════════════════════════════════════
   CLERKENWELL DIGITAL — Brand CSS
   Shared variables, typography, buttons, glass effects,
   and reusable components across all pages.
   ═══════════════════════════════════════════════════════ */

/* ── CSS Variables ──────────────────────────────────── */
:root {
  /* Brand palette */
  --cd-deep-green: #1B2E28;
  --cd-green-mid: #243830;
  --cd-green-light: #2C4A3E;
  --cd-copper: #C46F32;
  --cd-copper-hover: #D4813F;
  --cd-cream: #F5F2ED;
  --cd-white: #FFFFFF;
  --cd-charcoal: #333333;

  /* Typography */
  --cd-font-heading: 'Outfit', sans-serif;
  --cd-font-body: 'Inter', sans-serif;

  /* Glass tokens */
  --cd-glass-bg: rgba(255,255,255,0.04);
  --cd-glass-bg-hover: rgba(255,255,255,0.07);
  --cd-glass-border: rgba(255,255,255,0.08);
  --cd-glass-border-hover: rgba(255,255,255,0.14);
  --cd-glass-blur: 20px;

  /* Spacing */
  --cd-section-pad: clamp(80px, 10vw, 120px);
  --cd-container-max: 1200px;
  --cd-container-pad: clamp(24px, 5vw, 64px);
}


/* ── Base typography overrides ──────────────────────── */
body {
  font-family: var(--cd-font-body);
  color: var(--cd-charcoal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--cd-font-heading);
  color: var(--cd-deep-green);
  letter-spacing: -0.02em;
}


/* ── Container ──────────────────────────────────────── */
.cd-container {
  max-width: var(--cd-container-max);
  margin: 0 auto;
  padding: 0 var(--cd-container-pad);
}


/* ── Section backgrounds ────────────────────────────── */

/* Dark section — gradient mesh + noise */
.cd-section-dark {
  background: var(--cd-deep-green);
  position: relative;
  overflow: hidden;
}
.cd-section-dark::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(44,74,62,0.8) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 20% 80%, rgba(36,56,48,0.6) 0%, transparent 50%),
    radial-gradient(ellipse 50% 50% at 80% 70%, rgba(196,111,50,0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}
.cd-section-dark::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.35;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 0;
  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.5'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}
.cd-section-dark > * {
  position: relative;
  z-index: 1;
}

/* Cream section */
.cd-section-cream {
  background: var(--cd-cream);
}

/* White section */
.cd-section-white {
  background: var(--cd-white);
}


/* ── Ambient orbs (for hero/dark sections) ──────────── */
.cd-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  animation: cdOrbFloat 12s ease-in-out infinite;
}
.cd-orb--copper {
  background: rgba(196,111,50,0.07);
}
.cd-orb--green {
  background: rgba(44,74,62,0.4);
}
@keyframes cdOrbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(20px, -15px) scale(1.05); }
  66% { transform: translate(-10px, 10px) scale(0.98); }
}


/* ── Eyebrow label ──────────────────────────────────── */
.cd-eyebrow {
  font-family: var(--cd-font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: var(--cd-copper);
  margin-bottom: 24px;
}


/* ── Buttons ────────────────────────────────────────── */
.cd-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--cd-font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--cd-white);
  background: var(--cd-copper);
  padding: 15px 32px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: 0.2px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.cd-btn-primary:hover {
  background: var(--cd-copper-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(196,111,50,0.35);
  color: var(--cd-white);
  text-decoration: none;
}

.cd-btn-secondary {
  font-family: var(--cd-font-body);
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.55);
  padding: 15px 4px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.3s ease;
}
.cd-btn-secondary:hover {
  color: var(--cd-white);
  text-decoration: none;
}
.cd-btn-secondary .arrow {
  transition: transform 0.3s ease;
}
.cd-btn-secondary:hover .arrow {
  transform: translateX(4px);
}

.cd-btn-ghost {
  font-family: var(--cd-font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--cd-white);
  background: rgba(196,111,50,0.15);
  border: 1px solid rgba(196,111,50,0.35);
  padding: 9px 22px;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
}
.cd-btn-ghost:hover {
  background: var(--cd-copper);
  border-color: var(--cd-copper);
  box-shadow: 0 4px 20px rgba(196,111,50,0.3);
  color: var(--cd-white);
  text-decoration: none;
}

/* Link arrow style */
.cd-link-arrow {
  font-family: var(--cd-font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--cd-copper);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: gap 0.3s ease;
}
.cd-link-arrow:hover {
  gap: 14px;
  color: var(--cd-copper);
  text-decoration: none;
}


/* ── Glass card ─────────────────────────────────────── */
.cd-glass-card {
  background: var(--cd-glass-bg);
  backdrop-filter: blur(var(--cd-glass-blur)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--cd-glass-blur)) saturate(150%);
  border: 1px solid var(--cd-glass-border);
  border-radius: 16px;
  padding: 40px 36px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
/* Top highlight — Apple-style inner glow */
.cd-glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20px;
  right: 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1) 30%, rgba(255,255,255,0.1) 70%, transparent);
}
/* Bottom copper accent on hover */
.cd-glass-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cd-copper), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.cd-glass-card:hover {
  background: var(--cd-glass-bg-hover);
  border-color: var(--cd-glass-border-hover);
  transform: translateY(-2px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.06);
}
.cd-glass-card:hover::after {
  opacity: 1;
}

/* Glass panel (larger, for CTA sections) */
.cd-glass-panel {
  display: inline-block;
  background: var(--cd-glass-bg);
  backdrop-filter: blur(var(--cd-glass-blur));
  -webkit-backdrop-filter: blur(var(--cd-glass-blur));
  border: 1px solid var(--cd-glass-border);
  border-radius: 24px;
  padding: 64px 80px;
  position: relative;
}
.cd-glass-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 40px;
  right: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08) 30%, rgba(255,255,255,0.08) 70%, transparent);
}
@media (max-width: 768px) {
  .cd-glass-panel {
    padding: 48px 32px;
  }
}


/* ── Scroll reveal animations ───────────────────────── */
.cd-reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.cd-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.cd-reveal-delay-1 { transition-delay: 0.12s; }
.cd-reveal-delay-2 { transition-delay: 0.24s; }
.cd-reveal-delay-3 { transition-delay: 0.36s; }

.cd-reveal-left {
  opacity: 0;
  transform: translateX(-32px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.cd-reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.cd-reveal-right {
  opacity: 0;
  transform: translateX(32px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.cd-reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}


/* ── Icon box (for pillar cards) ────────────────────── */
.cd-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(196,111,50,0.12);
  border: 1px solid rgba(196,111,50,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  font-size: 18px;
  color: var(--cd-copper);
}


/* ── Dot accent ─────────────────────────────────────── */
.cd-dot {
  width: 10px;
  height: 10px;
  background: var(--cd-copper);
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(196,111,50,0.4);
}
.cd-dot--sm {
  width: 6px;
  height: 6px;
  box-shadow: 0 0 8px rgba(196,111,50,0.3);
}
