/*
Theme Name: TAG Accountancy
Theme URI: https://tag-accountancy.co.uk
Author: TAG Accountancy
Author URI: https://tag-accountancy.co.uk
Description: Professional, modern homepage theme for TAG Accountancy Norwich — built with Tailwind CSS and Alpine.js.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: Proprietary
Text Domain: tag-accountancy
*/

/* ─── Base ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background: #ffffff;
  color: #1e293b;
  overflow-x: hidden;
  letter-spacing: -0.01em;
}

/* ─── Alpine cloak ──────────────────────────────────────── */
[x-cloak] { display: none !important; }

/* ─── Scroll margin for sticky nav ─────────────────────── */
section[id] {
  scroll-margin-top: 5rem;
}

/* ═══════════════════════════════════════════════════════════
   HERO BUTTONS
   ═══════════════════════════════════════════════════════════ */
.hero-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  background: linear-gradient(135deg, #ff813b 0%, #f96b1f 60%, #e04e0a 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 1rem;
  padding: 1rem 2rem;
  border-radius: 0.875rem;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow:
    0 4px 16px rgba(249, 107, 31, 0.45),
    0 1px 0 rgba(255,255,255,0.15) inset;
  letter-spacing: -0.01em;
}
.hero-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 32px rgba(249, 107, 31, 0.55),
    0 1px 0 rgba(255,255,255,0.15) inset;
  background: linear-gradient(135deg, #ff9050 0%, #ff7735 60%, #f06020 100%);
}
.hero-btn-primary:active { transform: translateY(0); }

.hero-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: rgba(255,255,255,0.85);
  font-weight: 600;
  font-size: 1rem;
  padding: 1rem 1.75rem;
  border-radius: 0.875rem;
  border: 1px solid rgba(255,255,255,0.14);
  text-decoration: none;
  transition: all 0.2s;
  letter-spacing: -0.01em;
}
.hero-btn-secondary:hover {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.25);
  color: #ffffff;
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════════
   MARQUEE — continuous scrolling strip
   ═══════════════════════════════════════════════════════════ */
@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 35s linear infinite;
  will-change: transform;
}
.marquee-track:hover { animation-play-state: paused; }

/* ═══════════════════════════════════════════════════════════
   NOISE TEXTURE OVERLAY (adds depth to light sections)
   ═══════════════════════════════════════════════════════════ */
.noise::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;
}

/* ═══════════════════════════════════════════════════════════
   COMPARISON TABLE (Why TAG section)
   ═══════════════════════════════════════════════════════════ */
.compare-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 0;
  padding: 0.875rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.compare-row:last-child { border-bottom: none; }
.compare-check-yes {
  width: 1.75rem;
  height: 1.75rem;
  background: rgba(52,211,153,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #10b981;
  flex-shrink: 0;
}
.compare-check-no {
  width: 1.75rem;
  height: 1.75rem;
  background: rgba(148,163,184,0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════
   GOOGLE REVIEW BADGE
   ═══════════════════════════════════════════════════════════ */
.google-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 0.875rem;
  padding: 0.75rem 1.25rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

/* ─── Hero grid background ──────────────────────────────── */
.hero-grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
}

/* ─── Orb drift animations ───────────────────────────────── */
@keyframes orb-drift-1 {
  0%   { transform: translate(0px, 0px)     scale(1);    }
  25%  { transform: translate(60px, -40px)  scale(1.08); }
  50%  { transform: translate(30px, -80px)  scale(0.95); }
  75%  { transform: translate(-40px, -30px) scale(1.05); }
  100% { transform: translate(0px, 0px)     scale(1);    }
}
@keyframes orb-drift-2 {
  0%   { transform: translate(0px, 0px)    scale(1);    }
  30%  { transform: translate(-50px, 40px) scale(1.1);  }
  60%  { transform: translate(40px, 60px)  scale(0.92); }
  100% { transform: translate(0px, 0px)    scale(1);    }
}
@keyframes orb-drift-3 {
  0%   { transform: translate(0px, 0px)   scale(1);    }
  40%  { transform: translate(70px, 30px) scale(1.06); }
  70%  { transform: translate(-30px, 50px) scale(0.96); }
  100% { transform: translate(0px, 0px)   scale(1);    }
}
@keyframes orb-drift-4 {
  0%   { transform: translate(0px, 0px)    scale(1);    }
  35%  { transform: translate(-60px, -50px) scale(1.12); }
  65%  { transform: translate(50px, -20px)  scale(0.94); }
  100% { transform: translate(0px, 0px)    scale(1);    }
}
@keyframes orb-hue {
  0%   { filter: blur(110px) hue-rotate(0deg);   }
  50%  { filter: blur(120px) hue-rotate(40deg);  }
  100% { filter: blur(110px) hue-rotate(0deg);   }
}

.orb-1 { animation: orb-drift-1 18s ease-in-out infinite, orb-hue 12s ease-in-out infinite; }
.orb-2 { animation: orb-drift-2 22s ease-in-out infinite; }
.orb-3 { animation: orb-drift-3 26s ease-in-out infinite, orb-hue 18s ease-in-out infinite reverse; }
.orb-4 { animation: orb-drift-4 20s ease-in-out infinite; }
.orb-5 { animation: orb-drift-1 30s ease-in-out infinite reverse; }

/* ─── Aurora mesh background (dark sections) ────────────── */
@keyframes aurora-shift {
  0%   { background-position: 0% 50%;   }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%;   }
}

.aurora-bg {
  background: linear-gradient(
    -45deg,
    #041e28 0%,
    #06253a 15%,
    #0b3a40 25%,
    #041e28 35%,
    #051828 50%,
    #0b2e3d 65%,
    #041e28 80%,
    #06253a 90%,
    #041e28 100%
  );
  background-size: 400% 400%;
  animation: aurora-shift 16s ease infinite;
}

/* ─── Prismatic mesh background (light sections) ────────── */
@keyframes mesh-drift {
  0%   { background-position: 0% 0%,   100% 100%, 50% 0%,   0% 100%; }
  50%  { background-position: 100% 50%, 0% 50%,   100% 100%, 50% 0%;  }
  100% { background-position: 0% 0%,   100% 100%, 50% 0%,   0% 100%; }
}

.prism-bg {
  background:
    radial-gradient(ellipse at 10% 20%, rgba(249, 107,  31, 0.10) 0%, transparent 45%),
    radial-gradient(ellipse at 85% 15%, rgba(167, 139, 250, 0.09) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 80%, rgba( 11, 158, 179, 0.10) 0%, transparent 45%),
    radial-gradient(ellipse at 90% 75%, rgba( 52, 211, 153, 0.07) 0%, transparent 35%),
    #ffffff;
  background-size: 200% 200%, 200% 200%, 200% 200%, 200% 200%, auto;
  animation: mesh-drift 20s ease infinite;
}

/* ─── Gradient text ─────────────────────────────────────── */
.gradient-text {
  /* Vivid orange → vivid teal — punchy, on-brand */
  background: linear-gradient(135deg, #ff813b 0%, #f96b1f 40%, #0b9eb3 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Service card hover line ───────────────────────────── */
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 1rem;
  border: 2px solid transparent;
  background: linear-gradient(135deg, #f96b1f, #0b9eb3) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.service-card:hover::before { opacity: 1; }

/* ─── Bar chart bars ────────────────────────────────────── */
.chart-bar {
  border-radius: 4px 4px 0 0;
  transition: height 1s ease-out;
}

/* ─── Testimonial transition ────────────────────────────── */
.testimonial-slide {
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* ─── Process connector line ────────────────────────────── */
.process-connector {
  position: absolute;
  top: 28px;
  left: calc(50% + 48px);
  right: calc(-50% + 48px);
  height: 2px;
  background: linear-gradient(90deg, #f96b1f, #0b9eb3);
  opacity: 0.4;
}

/* ─── Stat counter ──────────────────────────────────────── */
@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.stat-number {
  animation: countUp 0.5s ease-out forwards;
}

/* ─── CTA pulse ring ────────────────────────────────────── */
@keyframes pulseRing {
  0%   { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(1.6); opacity: 0; }
}

.pulse-ring::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: #f96b1f;
  animation: pulseRing 2s ease-out infinite;
}

/* ─── Floating card animation ───────────────────────────── */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-12px); }
}

.float-card {
  animation: float 6s ease-in-out infinite;
}

/* ─── Fade-up animation ─────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-up {
  animation: fadeUp 0.6s ease-out forwards;
}

.fade-up-delay-1 { animation-delay: 0.1s; opacity: 0; }
.fade-up-delay-2 { animation-delay: 0.2s; opacity: 0; }
.fade-up-delay-3 { animation-delay: 0.3s; opacity: 0; }
.fade-up-delay-4 { animation-delay: 0.4s; opacity: 0; }

/* ─── Number shine effect ───────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.shimmer-text {
  background: linear-gradient(90deg, #f96b1f 0%, #ffffff 45%, #17c4db 75%, #ffffff 85%, #f96b1f 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
}

/* ─── Custom scrollbar ──────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #041e28; }
::-webkit-scrollbar-thumb { background: #0b9eb3; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #f96b1f; }

/* ─── WordPress body classes ────────────────────────────── */
.admin-bar header { top: 32px; }

/* ─── Prose (rich text / the_content() output) ───────────── */
.tag-prose { color: #475569; line-height: 1.8; }

.tag-prose h1,
.tag-prose h2,
.tag-prose h3,
.tag-prose h4,
.tag-prose h5,
.tag-prose h6 {
  color: #0f172a;
  font-weight: 800;
  line-height: 1.25;
  margin-top: 2rem;
  margin-bottom: 1rem;
}
.tag-prose h1 { font-size: 2rem; }
.tag-prose h2 { font-size: 1.5rem; border-bottom: 2px solid #fee8d4; padding-bottom: 0.5rem; }
.tag-prose h3 { font-size: 1.25rem; }
.tag-prose h4 { font-size: 1.125rem; }
.tag-prose h5,
.tag-prose h6 { font-size: 1rem; }

.tag-prose p { margin-bottom: 1.25rem; }
.tag-prose p:last-child { margin-bottom: 0; }

.tag-prose a {
  color: #e04e0a;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
  transition: color 0.15s;
}
.tag-prose a:hover { color: #0b9eb3; }

.tag-prose strong { color: #0f172a; font-weight: 700; }
.tag-prose em     { font-style: italic; }

.tag-prose ul,
.tag-prose ol { padding-left: 1.75rem; margin-bottom: 1.25rem; }
.tag-prose ul { list-style-type: none; }
.tag-prose ul li { position: relative; padding-left: 0.25rem; margin-bottom: 0.5rem; }
.tag-prose ul li::before {
  content: '';
  position: absolute;
  left: -1.25rem;
  top: 0.5rem;
  width: 0.5rem;
  height: 0.5rem;
  background: #f96b1f;
  border-radius: 50%;
}
.tag-prose ol { list-style-type: decimal; }
.tag-prose ol li { margin-bottom: 0.5rem; }
.tag-prose li > ul,
.tag-prose li > ol { margin-top: 0.5rem; margin-bottom: 0.5rem; }

.tag-prose blockquote {
  border-left: 4px solid #f96b1f;
  background: #fff5ed;
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-radius: 0 0.5rem 0.5rem 0;
  font-style: italic;
  color: #334155;
}
.tag-prose blockquote p { margin-bottom: 0; }
.tag-prose blockquote cite {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #94a3b8;
  font-style: normal;
}

.tag-prose code {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  font-size: 0.875em;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-family: 'Consolas', 'Monaco', monospace;
}
.tag-prose pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 1.25rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  line-height: 1.7;
}
.tag-prose pre code {
  background: transparent;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.tag-prose hr {
  border: none;
  border-top: 2px solid #f1f5f9;
  margin: 2rem 0;
}

.tag-prose table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
}
.tag-prose th {
  background: #f8fafc;
  color: #0f172a;
  font-weight: 700;
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 2px solid #e2e8f0;
}
.tag-prose td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
}
.tag-prose tr:hover td { background: #fafbff; }

.tag-prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin: 1.5rem 0;
}
.tag-prose figure { margin: 1.5rem 0; }
.tag-prose figcaption {
  text-align: center;
  font-size: 0.875rem;
  color: #94a3b8;
  margin-top: 0.5rem;
}

/* ─── Archive pagination ────────────────────────────────── */
.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  margin: 0 0.25rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  text-decoration: none;
  transition: all 0.15s;
}
.page-numbers:hover   { background: #fffbeb; border-color: #fcd34d; color: #92400e; }
.page-numbers.current { background: #f96b1f; border-color: #f96b1f; color: #ffffff; font-weight: 700; }
.page-numbers.dots    { border: none; color: #94a3b8; cursor: default; }

/* ═══════════════════════════════════════════════════════════
   GLASSMORPHISM
   ═══════════════════════════════════════════════════════════ */

/* Dark glass — for hero / dark section panels */
.glass-dark {
  background: rgba(4, 20, 30, 0.55);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

/* Light glass — for cards on white/light backgrounds */
.glass-light {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(16px) saturate(200%);
  -webkit-backdrop-filter: blur(16px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Tinted glass (dark with subtle teal sheen) */
.glass-teal {
  background: rgba(11, 100, 120, 0.25);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(11, 158, 179, 0.25);
}

/* ═══════════════════════════════════════════════════════════
   PRISMATIC  
   ═══════════════════════════════════════════════════════════ */

/* Animated full-spectrum gradient keyframe */
@keyframes prism-shift {
  0%   { background-position: 0%   50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0%   50%; }
}

/* Prismatic text — full rainbow sweep */
.prism-text {
  background: linear-gradient(
    90deg,
    #f96b1f 0%,
    #f0abfc 18%,
    #a78bfa 33%,
    #0b9eb3 48%,
    #34d399 63%,
    #fbbf24 78%,
    #f96b1f 100%
  );
  background-size: 250% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: prism-shift 5s ease infinite;
}

/* Prismatic animated border — use on position:relative elements */
.prism-border {
  position: relative;
  isolation: isolate;
}
.prism-border::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1.5px solid transparent;
  background: linear-gradient(
      135deg,
      #f96b1f   0%,
      #f0abfc  20%,
      #a78bfa  35%,
      #0b9eb3  50%,
      #34d399  65%,
      #fbbf24  80%,
      #f96b1f 100%
    ) border-box;
  background-size: 300% 300%;
  animation: prism-shift 5s ease infinite;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  pointer-events: none;
}

/* Combined: glass + prismatic border (the showpiece class) */
.prism-card {
  background: rgba(4, 20, 30, 0.52);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  position: relative;
  isolation: isolate;
}
.prism-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1.5px solid transparent;
  background: linear-gradient(
      135deg,
      rgba(249, 107,  31, 0.9)  0%,
      rgba(240, 171, 252, 0.7) 20%,
      rgba(167, 139, 250, 0.8) 35%,
      rgba( 11, 158, 179, 0.9) 50%,
      rgba( 52, 211, 153, 0.7) 65%,
      rgba(251, 191,  36, 0.8) 80%,
      rgba(249, 107,  31, 0.9) 100%
    ) border-box;
  background-size: 300% 300%;
  animation: prism-shift 6s ease infinite;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  pointer-events: none;
}

/* Prismatic glow shadow (for floating/hero elements) */
.prism-glow {
  box-shadow:
    0  0  40px rgba(249, 107,  31, 0.20),
    0  0  80px rgba(167, 139, 250, 0.12),
    0  0 120px rgba( 11, 158, 179, 0.10);
}

/* Subtle prismatic inner sheen on glass panels */
.glass-sheen::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.10) 0%,
    rgba(240, 171, 252, 0.04) 30%,
    rgba( 11, 158, 179, 0.05) 60%,
    rgba(255, 255, 255, 0.02) 100%
  );
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════
   COMPARISON TABLE — override built-in sizes so Tailwind wins
   ═══════════════════════════════════════════════════════════ */
.compare-check-yes,
.compare-check-no {
  /* Reset width/height — let the inner Tailwind span control sizing */
  width: auto;
  height: auto;
  background: none;
  border-radius: 0;
  color: inherit;
}

/* ═══════════════════════════════════════════════════════════
   KEY TAKEAWAYS CALLOUT
   ═══════════════════════════════════════════════════════════ */
.tag-callout-takeaways {
  /* Reset list styles that the_content() might inherit */
}
.tag-callout-takeaways ul {
  list-style: none !important;
  padding-left: 0 !important;
  margin-bottom: 0 !important;
}
.tag-callout-takeaways ul li::before {
  display: none !important;
}

/* ═══════════════════════════════════════════════════════════
   TAG-PROSE HEADING IDs (for TOC anchor scrolling)
   ═══════════════════════════════════════════════════════════ */
.tag-prose h2[id],
.tag-prose h3[id] {
  scroll-margin-top: 6rem;
}

