/*
Theme Name: Insight CPA 2026
Theme URI: https://insightscpa.ca
Description: Custom Kadence child theme for Insight Accounting CPA Professional Corporation — Accounting Intelligence
Author: Insight Accounting CPA
Author URI: https://insightscpa.ca
Template: kadence
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: insight-cpa-2026
*/

/* ============================================
   ROOT VARIABLES
   ============================================ */
:root {
  --insight-purple: #592d70;
  --insight-magenta: #b34165;
  --insight-dark: #1a1a2e;
  --insight-light: #f5f0f7;
  --insight-white: #ffffff;
  --insight-gray: #6b7280;
  --insight-gradient: linear-gradient(135deg, #592d70 0%, #b34165 100%);
  --insight-gradient-hover: linear-gradient(135deg, #6b3580 0%, #c94d75 100%);
  --insight-shadow: 0 4px 20px rgba(89, 45, 112, 0.15);
  --insight-shadow-hover: 0 8px 40px rgba(89, 45, 112, 0.25);
  --insight-radius: 12px;
  --insight-radius-sm: 8px;
  --insight-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --insight-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --insight-max-width: 1200px;
}

/* ============================================
   GLOBAL RESETS & BASE
   ============================================ */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--insight-font);
  color: var(--insight-dark);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--insight-font);
  font-weight: 600;
  line-height: 1.2;
  color: var(--insight-dark);
}

h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h4 { font-size: 1.375rem; }

p { margin-bottom: 1.25rem; color: #374151; }

a {
  color: var(--insight-purple);
  text-decoration: none;
  transition: var(--insight-transition);
}
a:hover { color: var(--insight-magenta); }

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary,
.wp-block-button__link,
.insight-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--insight-gradient);
  color: var(--insight-white) !important;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: var(--insight-transition);
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(89, 45, 112, 0.3);
}

.btn-primary:hover,
.wp-block-button__link:hover,
.insight-btn:hover {
  background: var(--insight-gradient-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(89, 45, 112, 0.4);
  color: var(--insight-white) !important;
}

.btn-secondary,
.insight-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: transparent;
  color: var(--insight-purple) !important;
  border: 2px solid var(--insight-purple);
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--insight-transition);
  text-decoration: none;
}

.btn-secondary:hover,
.insight-btn-outline:hover {
  background: var(--insight-purple);
  color: var(--insight-white) !important;
  transform: translateY(-2px);
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  transition: var(--insight-transition);
}

.site-header.is-sticky {
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(20px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

/* Header CTA button */
.header-cta-btn {
  background: var(--insight-gradient) !important;
  color: var(--insight-white) !important;
  padding: 10px 24px !important;
  border-radius: 50px !important;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
}

/* Navigation links */
#primary-navigation a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--insight-dark);
  transition: var(--insight-transition);
}

#primary-navigation a:hover {
  color: var(--insight-magenta);
}

/* Dropdown menus */
.sub-menu, .kadence-mega-menu {
  border-top: 3px solid var(--insight-magenta);
  border-radius: 0 0 var(--insight-radius) var(--insight-radius);
  box-shadow: var(--insight-shadow);
}

/* ============================================
   HERO SECTION
   ============================================ */
.insight-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--insight-gradient);
  overflow: hidden;
  text-align: center;
  padding: 120px 20px 80px;
}

.insight-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(255,255,255,0.05) 1px, transparent 1px),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.04) 1px, transparent 1px),
    radial-gradient(circle at 50% 80%, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px, 80px 80px, 100px 100px;
  animation: subtleDrift 20s ease-in-out infinite;
}

@keyframes subtleDrift {
  0%, 100% { transform: translateX(0) translateY(0); }
  25% { transform: translateX(10px) translateY(-5px); }
  50% { transform: translateX(-5px) translateY(10px); }
  75% { transform: translateX(5px) translateY(5px); }
}

.insight-hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  color: var(--insight-white);
  margin-bottom: 1rem;
  animation: fadeInUp 1s ease-out;
}

.insight-hero .subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 0.5rem;
  font-weight: 300;
  animation: fadeInUp 1s ease-out 0.2s both;
}

.insight-hero .sub-subtitle {
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 2.5rem;
  animation: fadeInUp 1s ease-out 0.4s both;
}

.insight-hero .hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 1s ease-out 0.6s both;
}

.insight-hero .hero-buttons .btn-primary {
  background: var(--insight-white);
  color: var(--insight-purple) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.insight-hero .hero-buttons .btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.insight-hero .hero-buttons .btn-secondary {
  border-color: rgba(255, 255, 255, 0.6);
  color: var(--insight-white) !important;
}

.insight-hero .hero-buttons .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--insight-white);
}

.trust-bar {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  animation: fadeInUp 1s ease-out 0.8s both;
}

.trust-bar span {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
}

/* ============================================
   SECTION DEFAULTS
   ============================================ */
.insight-section {
  padding: 80px 20px;
  max-width: var(--insight-max-width);
  margin: 0 auto;
}

.insight-section-full {
  padding: 80px 20px;
  width: 100%;
}

.insight-section h2 {
  text-align: center;
  margin-bottom: 1rem;
  color: var(--insight-dark);
}

.insight-section .section-subtitle {
  text-align: center;
  color: var(--insight-gray);
  max-width: 600px;
  margin: 0 auto 3rem;
  font-size: 1.1rem;
}

/* ============================================
   SERVICE CARDS
   ============================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: var(--insight-max-width);
  margin: 0 auto;
}

.service-card {
  background: var(--insight-white);
  border-radius: var(--insight-radius);
  padding: 32px;
  border-left: 4px solid var(--insight-purple);
  box-shadow: var(--insight-shadow);
  transition: var(--insight-transition);
  text-decoration: none;
  display: block;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--insight-shadow-hover);
  border-left-color: var(--insight-magenta);
}

.service-card .card-icon {
  width: 48px;
  height: 48px;
  background: var(--insight-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 1.5rem;
}

.service-card h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: var(--insight-dark);
}

.service-card p {
  color: var(--insight-gray);
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.service-card .card-link {
  color: var(--insight-purple);
  font-weight: 600;
  font-size: 0.9rem;
}

.service-card:hover .card-link {
  color: var(--insight-magenta);
}

/* ============================================
   STATS COUNTER
   ============================================ */
.stats-section {
  background: var(--insight-gradient);
  padding: 60px 20px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  max-width: var(--insight-max-width);
  margin: 0 auto;
  text-align: center;
}

.stat-item .stat-number {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--insight-white);
  line-height: 1;
}

.stat-item .stat-label {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 8px;
}

/* ============================================
   TEAM SECTION
   ============================================ */
.team-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 32px;
  max-width: var(--insight-max-width);
  margin: 0 auto;
}

.team-card {
  text-align: center;
  transition: var(--insight-transition);
}

.team-card:hover { transform: translateY(-4px); }

.team-card img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid transparent;
  transition: var(--insight-transition);
  margin-bottom: 16px;
}

.team-card:hover img {
  border-color: var(--insight-magenta);
  box-shadow: 0 4px 20px rgba(179, 65, 101, 0.3);
}

.team-card h4 {
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.team-card .team-title {
  color: var(--insight-gray);
  font-size: 0.85rem;
}

/* ============================================
   TESTIMONIALS
   ============================================ */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: var(--insight-max-width);
  margin: 0 auto;
}

.testimonial-card {
  background: var(--insight-white);
  border-radius: var(--insight-radius);
  padding: 32px;
  box-shadow: var(--insight-shadow);
  position: relative;
}

.testimonial-card .stars {
  color: #f59e0b;
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.testimonial-card blockquote {
  font-style: italic;
  color: #4b5563;
  margin-bottom: 16px;
  line-height: 1.6;
  border: none;
  padding: 0;
}

.testimonial-card .author {
  font-weight: 600;
  color: var(--insight-dark);
}

.testimonial-card .author-title {
  color: var(--insight-gray);
  font-size: 0.85rem;
}

/* ============================================
   CTA BANNER
   ============================================ */
.cta-banner {
  background: var(--insight-gradient);
  padding: 80px 20px;
  text-align: center;
}

.cta-banner h2 {
  color: var(--insight-white);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: 1rem;
}

.cta-banner p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.cta-banner .phone-number {
  display: block;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--insight-white);
  margin-bottom: 1.5rem;
  text-decoration: none;
}

/* ============================================
   FAQ ACCORDION
   ============================================ */
.faq-item {
  border: 1px solid #e5e7eb;
  border-radius: var(--insight-radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-question {
  padding: 20px 24px;
  background: var(--insight-white);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: var(--insight-dark);
  transition: var(--insight-transition);
}

.faq-question:hover { background: var(--insight-light); }

.faq-answer {
  padding: 0 24px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: #4b5563;
  line-height: 1.7;
}

.faq-item.active .faq-answer {
  padding: 0 24px 20px;
  max-height: 500px;
}

/* ============================================
   INDUSTRIES / LOCATIONS GRID
   ============================================ */
.locations-grid, .industries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  max-width: var(--insight-max-width);
  margin: 0 auto;
}

.location-chip, .industry-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  background: var(--insight-white);
  border-radius: var(--insight-radius-sm);
  border: 1px solid #e5e7eb;
  transition: var(--insight-transition);
  text-decoration: none;
  color: var(--insight-dark);
  font-weight: 500;
}

.location-chip:hover, .industry-chip:hover {
  border-color: var(--insight-purple);
  background: var(--insight-light);
  transform: translateY(-2px);
  box-shadow: var(--insight-shadow);
  color: var(--insight-purple);
}

/* ============================================
   BLOG POST CARDS
   ============================================ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: var(--insight-max-width);
  margin: 0 auto;
}

.blog-card {
  background: var(--insight-white);
  border-radius: var(--insight-radius);
  overflow: hidden;
  box-shadow: var(--insight-shadow);
  transition: var(--insight-transition);
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--insight-shadow-hover);
}

.blog-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.blog-card .card-body {
  padding: 24px;
}

.blog-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.blog-card .excerpt {
  color: var(--insight-gray);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

/* ============================================
   SIDEBAR
   ============================================ */
.insight-sidebar .widget {
  background: var(--insight-white);
  border-radius: var(--insight-radius);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--insight-shadow);
}

.insight-sidebar .cta-widget {
  background: var(--insight-gradient);
  color: var(--insight-white);
  text-align: center;
}

.insight-sidebar .cta-widget h4 { color: var(--insight-white); }
.insight-sidebar .cta-widget p { color: rgba(255, 255, 255, 0.9); }

/* ============================================
   FOOTER
   ============================================ */
.site-footer, .insight-footer {
  background: #2d1540 !important;
  color: rgba(255, 255, 255, 0.85);
  padding: 60px 0 30px;
}

.insight-footer a { color: rgba(255, 255, 255, 0.7); }
.insight-footer a:hover { color: var(--insight-white); }

.insight-footer h4 {
  color: var(--insight-white);
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  margin-top: 40px;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ============================================
   BREADCRUMBS
   ============================================ */
.insight-breadcrumbs {
  padding: 16px 0;
  font-size: 0.85rem;
  color: var(--insight-gray);
}

.insight-breadcrumbs a { color: var(--insight-purple); }
.insight-breadcrumbs a:hover { color: var(--insight-magenta); }
.insight-breadcrumbs .separator { margin: 0 8px; }

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* ============================================
   BACK TO TOP
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  background: var(--insight-gradient);
  color: var(--insight-white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--insight-transition);
  z-index: 999;
  font-size: 1.2rem;
  box-shadow: 0 4px 15px rgba(89, 45, 112, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 25px rgba(89, 45, 112, 0.4);
}

/* ============================================
   CONTACT FORM
   ============================================ */
.insight-form input,
.insight-form textarea,
.insight-form select {
  border: 2px solid #e5e7eb;
  border-radius: var(--insight-radius-sm);
  padding: 12px 16px;
  font-family: var(--insight-font);
  font-size: 1rem;
  width: 100%;
  transition: var(--insight-transition);
}

.insight-form input:focus,
.insight-form textarea:focus,
.insight-form select:focus {
  border-color: var(--insight-purple);
  outline: none;
  box-shadow: 0 0 0 3px rgba(89, 45, 112, 0.1);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(3, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .services-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .insight-hero { min-height: 90vh; padding: 100px 20px 60px; }
  .trust-bar { gap: 12px; }
  .trust-bar span { font-size: 0.8rem; }
  .insight-section { padding: 60px 20px; }
}

@media (max-width: 480px) {
  .team-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .hero-buttons { flex-direction: column; align-items: center; }
}
