/* ============================================
   TALKING DOG — Organic Design System
   ============================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  --cream: #FAF7F2;
  --sand: #F0EBE3;
  --bark: #3D3229;
  --moss: #5A6B4F;
  --sage: #8FA87F;
  --clay: #C4A882;
  --plum: #7B5EA7;
  --lavender: #B8A9D4;
  --mist: #E8E4F0;
  --warm: #F5F0EA;
  --night: #111111;

  --transition-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---------- Base & Selection ---------- */
::selection {
  background-color: rgba(123, 94, 167, 0.2);
  color: var(--bark);
}

html {
  scroll-behavior: smooth;
}

body {
  font-weight: 420;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Paper Grain Texture ---------- */
/* Subtle noise overlay on light sections for tactile warmth */
.grain-overlay {
  position: relative;
}

.grain-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.03;
  pointer-events: none;
  z-index: 1;
  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)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* ---------- Decorative Floating Shapes ---------- */
/* Soft blobs that echo the hero treatment across other sections */
.deco-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  pointer-events: none;
}

.deco-blob-plum {
  background: linear-gradient(135deg, rgba(123, 94, 167, 0.12), rgba(184, 169, 212, 0.08));
}

.deco-blob-lavender {
  background: linear-gradient(135deg, rgba(184, 169, 212, 0.1), rgba(232, 228, 240, 0.08));
}

.deco-blob-clay {
  background: linear-gradient(135deg, rgba(196, 168, 130, 0.1), rgba(240, 235, 227, 0.06));
}

.deco-blob-moss {
  background: linear-gradient(135deg, rgba(90, 107, 79, 0.08), rgba(143, 168, 127, 0.06));
}

/* ---------- Section Gradient Washes ---------- */
/* Soft color transitions at section boundaries for visual flow */
.section-wash-top::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 200px;
  pointer-events: none;
  z-index: 0;
}

.section-wash-bottom::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  pointer-events: none;
  z-index: 0;
}

.wash-warm-to-mist::before {
  background: linear-gradient(180deg, rgba(245, 240, 234, 0.5) 0%, transparent 100%);
}

.wash-mist-to-cream::before {
  background: linear-gradient(180deg, transparent 0%, rgba(232, 228, 240, 0.3) 100%);
}

.wash-cream-to-lavender::before {
  background: linear-gradient(180deg, transparent 0%, rgba(184, 169, 212, 0.06) 100%);
}

.wash-plum-glow::before {
  background: radial-gradient(ellipse at center top, rgba(123, 94, 167, 0.04) 0%, transparent 70%);
  height: 300px;
}

/* ---------- Section Curves ---------- */
.section-curve-top {
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  line-height: 0;
}

.section-curve-bottom {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  line-height: 0;
}

/* ---------- Navigation ---------- */
.nav-link {
  position: relative;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--bark);
  transition: color 0.3s var(--transition-smooth);
  padding: 0.25rem 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--plum);
  border-radius: 1px;
  transition: width 0.3s var(--transition-smooth);
}

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

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

.mobile-nav-link {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.5rem;
  color: var(--bark);
  transition: color 0.3s, transform 0.3s;
}

.mobile-nav-link:hover {
  color: var(--plum);
  transform: translateX(8px);
}

/* Header scrolled state */
.header-scrolled {
  background-color: rgba(250, 247, 242, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 20px rgba(61, 50, 41, 0.06);
}

/* Mobile menu states */
.mobile-menu-closed {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.5s var(--transition-smooth),
              opacity 0.3s var(--transition-smooth);
}

.mobile-menu-open {
  max-height: 400px;
  opacity: 1;
  transition: max-height 0.5s var(--transition-smooth),
              opacity 0.3s 0.1s var(--transition-smooth);
}

/* Hamburger animation */
.menu-active .menu-line:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}

.menu-active .menu-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.menu-active .menu-line:nth-child(3) {
  width: 1.5rem;
  transform: translateY(-4px) rotate(-45deg);
}

/* ---------- Buttons ---------- */
.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  background-color: var(--plum);
  color: white;
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: 100px;
  transition: all 0.4s var(--transition-smooth);
  box-shadow: 0 4px 24px rgba(123, 94, 167, 0.25);
  position: relative;
  overflow: hidden;
}

.cta-button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(123, 94, 167, 0.35);
  background-color: #6B4E97;
}

.cta-button:hover::before {
  opacity: 1;
}

.cta-button:active {
  transform: translateY(0);
}

.cta-button-sm {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.5rem;
  background-color: var(--plum);
  color: white;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 100px;
  transition: all 0.3s var(--transition-smooth);
  box-shadow: 0 2px 12px rgba(123, 94, 167, 0.2);
}

.cta-button-sm:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(123, 94, 167, 0.3);
  background-color: #6B4E97;
}

.cta-button-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  border: 2px solid var(--bark);
  color: var(--bark);
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: 100px;
  transition: all 0.3s var(--transition-smooth);
}

.cta-button-outline:hover {
  background-color: var(--bark);
  color: var(--cream);
  transform: translateY(-2px);
}

.cta-button-outline-dark {
  border-color: rgba(250, 247, 242, 0.5);
  color: var(--cream);
}

.cta-button-outline-dark:hover {
  background-color: var(--cream);
  color: var(--bark);
  border-color: var(--cream);
}

/* ---------- Hero ---------- */
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: blob-float 20s ease-in-out infinite;
}

.hero-blob-1 {
  width: 500px;
  height: 500px;
  background: linear-gradient(135deg, rgba(123, 94, 167, 0.25), rgba(184, 169, 212, 0.15));
  top: -10%;
  right: -10%;
  animation-delay: 0s;
}

.hero-blob-2 {
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, rgba(90, 107, 79, 0.15), rgba(143, 168, 127, 0.12));
  bottom: -5%;
  left: -5%;
  animation-delay: -7s;
}

.hero-blob-3 {
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, rgba(196, 168, 130, 0.18), rgba(240, 235, 227, 0.12));
  top: 40%;
  left: 30%;
  animation-delay: -14s;
}

@keyframes blob-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -50px) scale(1.05); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(40px, 30px) scale(1.03); }
}

/* Floating badge */
.floating-badge {
  animation: float-gentle 6s ease-in-out infinite;
}

@keyframes float-gentle {
  0%, 100% { transform: translateY(-50%) rotate(0deg); }
  50% { transform: translateY(calc(-50% - 12px)) rotate(3deg); }
}

/* Scroll indicator */
.scroll-indicator {
  animation: fade-pulse 2s ease-in-out infinite;
}

.scroll-dot {
  animation: scroll-bounce 2s ease-in-out infinite;
}

@keyframes fade-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@keyframes scroll-bounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(6px); opacity: 0.3; }
}

/* ---------- Pain Cards ---------- */
.pain-card {
  background: white;
  padding: 2rem;
  border-radius: 1.5rem;
  border: 1px solid rgba(61, 50, 41, 0.06);
  transition: all 0.4s var(--transition-smooth);
  box-shadow: 0 2px 16px rgba(61, 50, 41, 0.04);
  position: relative;
  overflow: hidden;
  padding-top: 3.5rem;
}

.pain-card:hover {
  box-shadow: 0 12px 40px rgba(61, 50, 41, 0.08);
  border-color: rgba(123, 94, 167, 0.15);
}

/* Big opening quote mark — top-left, bleeds into corner */
.pain-quote {
  position: absolute;
  top: -0.25rem;
  left: 0.75rem;
  font-family: 'DM Serif Display', serif;
  font-size: 8rem;
  line-height: 1;
  color: var(--plum);
  opacity: 0.6;
  user-select: none;
  pointer-events: none;
  transition: opacity 0.5s var(--transition-smooth), transform 0.5s var(--transition-smooth);
}

.pain-card:hover .pain-quote {
  opacity: 0.15;
  transform: scale(1.05);
}

/* Detail text — always visible */
.pain-detail {
  margin-top: 0.5rem;
}

/* ---------- Service Cards ---------- */
.service-card {
  background: white;
  padding: 2.5rem;
  border-radius: 2rem;
  border: 1px solid rgba(61, 50, 41, 0.06);
  transition: all 0.5s var(--transition-smooth);
  box-shadow: 0 2px 20px rgba(61, 50, 41, 0.04);
  position: relative;
  overflow: hidden;
}

/* Top color bar — always visible, grows on hover */
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  transform: scaleX(0.3);
  transform-origin: left;
  transition: transform 0.5s var(--transition-smooth), height 0.5s var(--transition-smooth);
  border-radius: 2rem 2rem 0 0;
}

.service-card:nth-child(1)::before { background: linear-gradient(90deg, var(--plum), var(--lavender)); }
.service-card:nth-child(2)::before { background: linear-gradient(90deg, #C76BAF, #d99cc8); }
.service-card:nth-child(3)::before { background: linear-gradient(90deg, #D4849A, #e0a8b8); }
.service-card:nth-child(4)::before { background: linear-gradient(90deg, var(--clay), #d4be9e); }

/* Per-card subtle background tint */
.service-card:nth-child(1) { background: linear-gradient(165deg, rgba(123, 94, 167, 0.02) 0%, white 40%); }
.service-card:nth-child(2) { background: linear-gradient(155deg, rgba(199, 107, 175, 0.02) 0%, white 40%); }
.service-card:nth-child(3) { background: linear-gradient(170deg, rgba(212, 132, 154, 0.02) 0%, white 40%); }
.service-card:nth-child(4) { background: linear-gradient(160deg, rgba(196, 168, 130, 0.025) 0%, white 40%); }

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(61, 50, 41, 0.1);
}

.service-card:hover::before {
  transform: scaleX(1);
  height: 5px;
}

/* Full-card color flood — appears on hover */
.service-card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s var(--transition-smooth);
  border-radius: inherit;
}

.service-card:hover::after {
  opacity: 1;
}

.service-card:nth-child(1)::after { background: rgba(123, 94, 167, 0.05); }
.service-card:nth-child(2)::after { background: rgba(199, 107, 175, 0.05); }
.service-card:nth-child(3)::after { background: rgba(212, 132, 154, 0.05); }
.service-card:nth-child(4)::after { background: rgba(196, 168, 130, 0.06); }

.service-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.service-feature {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(61, 50, 41, 0.7);
  font-size: 0.9375rem;
}

/* ---------- Process Cards ---------- */
.process-card {
  position: relative;
  padding: 2rem;
  border-radius: 1.5rem;
  border: 1px solid rgba(250, 247, 242, 0.1);
  background: rgba(250, 247, 242, 0.05);
  transition: all 0.4s var(--transition-smooth);
}

.process-card:hover {
  background: rgba(250, 247, 242, 0.08);
  border-color: rgba(184, 169, 212, 0.2);
  transform: translateY(-4px);
}

.process-number {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 3rem;
  color: rgba(184, 169, 212, 0.6);
  line-height: 1;
  margin-bottom: 1rem;
}

/* Light variant for process cards on mist background */
.process-card-light {
  border-color: rgba(123, 94, 167, 0.1);
  background: rgba(255, 255, 255, 0.5);
}

.process-card-light:hover {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(123, 94, 167, 0.2);
}

.process-card-light .process-number {
  color: rgba(123, 94, 167, 0.35);
}

/* ---------- Testimonial Cards ---------- */
/* ---------- Client Logos ---------- */
.client-logo {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.125rem;
  color: rgba(61, 50, 41, 0.25);
  transition: color 0.3s var(--transition-smooth);
  white-space: nowrap;
}

.client-logo:hover {
  color: rgba(61, 50, 41, 0.55);
}

/* Dark variant for client logos on night background */
.client-logo-dark {
  color: rgba(250, 247, 242, 0.3);
}

.client-logo-dark:hover {
  color: rgba(250, 247, 242, 0.7);
}

@media (min-width: 768px) {
  .client-logo {
    font-size: 1.25rem;
  }
}

/* ---------- Hero Image ---------- */
.hero-image-wrapper {
  position: relative;
}

.hero-image-wrapper img {
  transition: transform 0.6s var(--transition-smooth);
}

.hero-image-wrapper:hover img {
  transform: scale(1.02);
}

/* ---------- About Section ---------- */
.about-image-frame {
  position: relative;
}

.about-image-frame::before {
  content: '';
  position: absolute;
  top: -12px;
  right: -12px;
  bottom: 12px;
  left: 12px;
  border: 2px solid var(--lavender);
  border-radius: 3rem;
  opacity: 0.5;
}

.about-image-frame img {
  transition: transform 0.6s var(--transition-smooth);
}

.about-image-frame:hover img {
  transform: scale(1.03);
}

.tool-tag {
  display: inline-block;
  padding: 0.375rem 1rem;
  background-color: rgba(123, 94, 167, 0.08);
  color: var(--plum);
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 100px;
  transition: all 0.3s;
}

.tool-tag:hover {
  background-color: rgba(123, 94, 167, 0.15);
  transform: translateY(-1px);
}

/* ---------- Footer ---------- */
.footer-link {
  color: rgba(250, 247, 242, 0.5);
  font-size: 0.9375rem;
  transition: color 0.3s, transform 0.3s;
  display: inline-block;
}

.footer-link:hover {
  color: rgba(250, 247, 242, 0.9);
  transform: translateX(4px);
}

/* ---------- Scroll Animations ---------- */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--transition-smooth),
              transform 0.8s var(--transition-smooth);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-delay-1 { transition-delay: 0.1s; }
.fade-delay-2 { transition-delay: 0.2s; }
.fade-delay-3 { transition-delay: 0.3s; }

/* ---------- Counter Animation ---------- */
@keyframes count-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Responsive Adjustments ---------- */
@media (max-width: 768px) {
  .hero-blob {
    opacity: 0.3;
  }

  .hero-blob-1 {
    width: 300px;
    height: 300px;
  }

  .hero-blob-2 {
    width: 250px;
    height: 250px;
  }

  .hero-blob-3 {
    width: 200px;
    height: 200px;
  }

  .section-curve-top svg,
  .section-curve-bottom svg {
    height: 3rem;
  }

  .pain-card {
    padding: 1.5rem;
    padding-top: 3rem;
  }

  .pain-quote {
    font-size: 5rem;
  }

  .service-card,
  .process-card {
    padding: 1.5rem;
  }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero-blob {
    animation: none;
  }

  .floating-badge {
    animation: none;
  }

  .scroll-indicator,
  .scroll-dot {
    animation: none;
  }

  .fade-up {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .cta-button:hover,
  .cta-button-outline:hover,
  .pain-card:hover,
  .service-card:hover,
  .process-card:hover {
    transform: none;
  }
}

/* ---------- Smooth Scroll Padding ---------- */
section[id] {
  scroll-margin-top: 80px;
}
