/*
Theme Name: Mutate SEO Theme
Theme URI: https://mutate.com
Author: Attaullah Khan
Author URI: https://marketing180.com
Description: Custom WordPress theme converted from Lovable React/Tailwind. Japandi-inspired SEO agency theme.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: Private
Text Domain: mutate
*/

@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;1,9..40,300&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');

@font-face {
  font-family: 'Mutate Display';
  src: url('assets/fonts/MUTATEDISPLAY-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Forma DJR Banner';
  src: url('assets/fonts/FormaDJRBanner-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Forma DJR Banner';
  src: url('assets/fonts/FormaDJRBanner-Italic.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Forma DJR Banner';
  src: url('assets/fonts/FormaDJRBanner-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Forma DJR Banner';
  src: url('assets/fonts/FormaDJRBanner-BoldItalic.ttf') format('truetype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* ============================================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================================ */
:root {
  --font-brand: 'Mutate Display', serif;
  --font-display: 'Space Grotesk', 'Forma DJR Banner', sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;

  --background: 40 20% 97%;
  --foreground: 20 8% 15%;
  --card: 40 15% 95%;
  --card-foreground: 20 8% 15%;
  --popover: 40 20% 97%;
  --popover-foreground: 20 8% 15%;
  --primary: 25 18% 48%;
  --primary-foreground: 40 20% 97%;
  --secondary: 35 10% 93%;
  --secondary-foreground: 20 8% 15%;
  --muted: 35 8% 91%;
  --muted-foreground: 25 5% 50%;
  --accent: 25 18% 48%;
  --accent-foreground: 20 8% 15%;
  --destructive: 0 72% 51%;
  --destructive-foreground: 40 20% 97%;
  --border: 35 8% 89%;
  --input: 35 8% 89%;
  --ring: 25 18% 48%;
  --radius: 0.125rem;

  /* Japandi brand tokens */
  --ink: 20 10% 8%;
  --linen: 40 20% 97%;
  --warm-gray: 30 5% 82%;
  --bronze: 25 18% 48%;
  --bronze-light: 25 15% 62%;
  --stone: 25 5% 50%;
  --cream: 38 15% 94%;
  --charcoal: 20 8% 18%;
  --sand: 35 12% 88%;
  --washi: 40 25% 96%;
  --electric: 228 70% 60%;
  --electric-deep: 240 45% 28%;
}

.dark {
  --background: 20 10% 8%;
  --foreground: 40 20% 97%;
  --card: 20 8% 12%;
  --card-foreground: 40 20% 97%;
  --popover: 20 10% 8%;
  --popover-foreground: 40 20% 97%;
  --primary: 25 18% 48%;
  --primary-foreground: 20 10% 8%;
  --secondary: 20 8% 15%;
  --secondary-foreground: 40 20% 97%;
  --muted: 20 8% 15%;
  --muted-foreground: 25 8% 60%;
  --accent: 20 8% 15%;
  --accent-foreground: 40 20% 97%;
  --destructive: 0 62.8% 30.6%;
  --destructive-foreground: 40 20% 97%;
  --border: 20 8% 18%;
  --input: 20 8% 18%;
  --ring: 25 18% 48%;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.1;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: hsl(var(--warm-gray)); border-radius: 2px; }
::selection { background-color: hsl(var(--bronze) / 0.15); color: hsl(var(--ink)); }

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  width: 100%;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

.container-narrow {
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.container-wide {
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

@media (min-width: 1024px) {
  .container-wide { padding-left: 3rem; padding-right: 3rem; }
}

.site { min-height: 100vh; display: flex; flex-direction: column; }
.site-main { flex: 1; }

/* ============================================================
   SECTION PADDING
   ============================================================ */
.section-padding { padding-top: 4rem; padding-bottom: 4rem; }
@media (min-width: 768px) { .section-padding { padding-top: 7rem; padding-bottom: 7rem; } }
@media (min-width: 1024px) { .section-padding { padding-top: 9rem; padding-bottom: 9rem; } }

.section-padding-sm { padding-top: 2.5rem; padding-bottom: 2.5rem; }
@media (min-width: 768px) { .section-padding-sm { padding-top: 5rem; padding-bottom: 5rem; } }
@media (min-width: 1024px) { .section-padding-sm { padding-top: 6rem; padding-bottom: 6rem; } }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: hsl(var(--stone));
}

.heading-display {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 6rem);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.heading-section {
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 5vw, 3.75rem);
  font-weight: 500;
  line-height: 1.0;
  letter-spacing: -0.02em;
}

.heading-sub {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 1.875rem);
  font-weight: 500;
  line-height: 1.1;
}

.body-large { font-size: clamp(1rem, 2vw, 1.25rem); line-height: 1.7; font-weight: 300; }
.body-default { font-size: 1rem; line-height: 1.7; font-weight: 300; }
.font-brand { font-family: var(--font-brand); }
.japandi-divider { width: 3rem; height: 1px; background-color: hsl(var(--bronze) / 0.4); margin-left: auto; margin-right: auto; }

/* ============================================================
   BUTTONS
   ============================================================ */
.cta-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 3rem;
  padding: 0 1.75rem;
  background-color: hsl(var(--ink));
  color: hsl(var(--linen));
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all 0.5s ease;
  border: none;
  cursor: pointer;
  border-radius: var(--radius);
}
.cta-primary:hover {
  background-color: hsl(var(--charcoal));
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -8px hsl(var(--ink) / 0.4);
  color: hsl(var(--linen));
}

.cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 3rem;
  padding: 0 1.75rem;
  border: 1px solid hsl(var(--foreground) / 0.2);
  color: hsl(var(--foreground));
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all 0.5s ease;
  background: transparent;
  cursor: pointer;
  border-radius: var(--radius);
}
.cta-secondary:hover {
  border-color: hsl(var(--foreground) / 0.4);
  background-color: hsl(var(--ink) / 0.05);
  transform: translateY(-1px);
}

.cta-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 3rem;
  padding: 0 1.75rem;
  background-color: hsl(var(--linen));
  color: hsl(var(--ink));
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all 0.5s ease;
  border: none;
  cursor: pointer;
  border-radius: var(--radius);
}
.cta-light:hover {
  background-color: hsl(var(--cream));
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -8px hsl(var(--linen) / 0.3);
  color: hsl(var(--ink));
}

@media (min-width: 640px) {
  .cta-primary, .cta-secondary, .cta-light { height: 3.5rem; padding: 0 2.5rem; }
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: hsl(var(--background) / 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid hsl(var(--border));
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}
.site-logo { font-family: var(--font-brand); font-size: 1.25rem; color: hsl(var(--ink)); }
.primary-navigation ul { display: flex; align-items: center; gap: 2rem; }
.primary-navigation a {
  font-size: 0.875rem;
  font-weight: 400;
  color: hsl(var(--foreground) / 0.7);
  transition: color 0.2s;
  letter-spacing: 0.05em;
}
.primary-navigation a:hover { color: hsl(var(--foreground)); }

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid hsl(var(--border));
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  color: hsl(var(--foreground));
  font-size: 0.875rem;
}
.header-nav-cta { display: none; }

@media (min-width: 768px) {
  .header-nav-cta { display: inline-flex; }
}

@media (max-width: 767px) {
  .menu-toggle { display: flex; align-items: center; gap: 0.5rem; }
  .primary-navigation {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: hsl(var(--background));
    border-bottom: 1px solid hsl(var(--border));
    padding: 1.5rem;
    z-index: 49;
  }
  .primary-navigation.is-open { display: block; }
  .primary-navigation ul { flex-direction: column; align-items: flex-start; gap: 1rem; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background-color: hsl(var(--ink));
  color: hsl(var(--linen));
  padding: 4rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-heading {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: hsl(var(--linen) / 0.5);
  margin-bottom: 1rem;
}
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a {
  font-size: 0.875rem;
  color: hsl(var(--linen) / 0.7);
  transition: color 0.2s;
}
.footer-links a:hover { color: hsl(var(--linen)); }
.footer-bottom {
  border-top: 1px solid hsl(var(--linen) / 0.1);
  margin-top: 3rem;
  padding-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.75rem;
  color: hsl(var(--linen) / 0.5);
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.card:hover {
  box-shadow: 0 8px 32px -8px hsl(var(--ink) / 0.12);
  transform: translateY(-2px);
}

/* ============================================================
   COMPONENTS
   ============================================================ */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
@media (min-width: 768px) { .metrics-grid { grid-template-columns: repeat(4, 1fr); } }
.metric-value {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 500;
  color: hsl(var(--bronze));
  line-height: 1;
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background-color: hsl(var(--border));
}
@media (min-width: 640px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .services-grid { grid-template-columns: repeat(3, 1fr); } }
.service-item {
  background-color: hsl(var(--background));
  padding: 2rem;
  transition: background-color 0.3s;
}
.service-item:hover { background-color: hsl(var(--cream)); }

.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 768px) { .testimonials-grid { grid-template-columns: repeat(3, 1fr); } }
.testimonial-card {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  padding: 2rem;
  border-radius: var(--radius);
}

.case-studies-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 768px) { .case-studies-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .case-studies-grid { grid-template-columns: repeat(3, 1fr); } }

.industry-badges { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }
.industry-badge {
  padding: 0.5rem 1.25rem;
  border: 1px solid hsl(var(--border));
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: hsl(var(--stone));
  border-radius: var(--radius);
  transition: all 0.2s;
}
.industry-badge:hover { border-color: hsl(var(--bronze)); color: hsl(var(--bronze)); }

/* Comparison table */
.comparison-table { width: 100%; border-collapse: collapse; }
.comparison-table th,
.comparison-table td {
  padding: 1rem 1.5rem;
  text-align: left;
  border-bottom: 1px solid hsl(var(--border));
  font-size: 0.875rem;
}
.comparison-table th {
  font-family: var(--font-display);
  font-weight: 500;
  background-color: hsl(var(--sand));
}

/* Trust bar */
@keyframes scroll-logos {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.trust-bar-track { display: flex; animation: scroll-logos 30s linear infinite; }
.trust-bar-track:hover { animation-play-state: paused; }

/* Before/After */
.before-after-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 768px) { .before-after-grid { grid-template-columns: repeat(2, 1fr); } }

/* ============================================================
   WORDPRESS BLOCKS
   ============================================================ */
.wp-block-image { margin: 2rem 0; }
.wp-block-quote {
  border-left: 3px solid hsl(var(--bronze));
  padding-left: 1.5rem;
  font-style: italic;
  color: hsl(var(--stone));
}
.screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
  height: 1px; margin: -1px; overflow: hidden; padding: 0;
  position: absolute; width: 1px; word-wrap: normal !important;
}
.skip-link {
  position: absolute; top: -100%; left: 1rem;
  background: hsl(var(--ink)); color: hsl(var(--linen));
  padding: 0.5rem 1rem; z-index: 9999; transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

/* ============================================================
   AOS ANIMATION
   ============================================================ */
[data-aos] { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
[data-aos].aos-animate { opacity: 1; transform: translateY(0); }

/* ============================================================
   GLOBAL MOBILE RESPONSIVE FIXES
   Ensures all pages look good on every device
   ============================================================ */

/* Container: full-width padding on mobile */
@media (max-width: 767px) {
    .container-wide  { padding-left: 1.25rem !important; padding-right: 1.25rem !important; }
    .container-narrow { padding-left: 1.25rem !important; padding-right: 1.25rem !important; }
    .section-padding { padding-top: 3.5rem !important; padding-bottom: 3.5rem !important; }
}

/* Hero section mobile */
@media (max-width: 1023px) {
    .hero-grid { grid-template-columns: 1fr !important; }
    .hero-text-col { order: 1; }
    .hero-form-col { order: 2; }
}
@media (max-width: 767px) {
    .svc-hero-grid { grid-template-columns: 1fr !important; }
    .svc-hero { padding-top: 7rem !important; padding-bottom: 3rem !important; }
}

/* Service/location page hero form — stacks on mobile */
@media (max-width: 1023px) {
    .svc-hero-grid { grid-template-columns: 1fr !important; }
}

/* Before/After: 1 col mobile */
@media (max-width: 767px) {
    .ba-grid { grid-template-columns: 1fr !important; }
}

/* Industry badges: always at least 2 col */
.ind-cell { min-width: 0; }
@media (max-width: 479px) {
    .ind-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .ind-cell { padding: 1rem 0.75rem !important; }
}

/* Platform grid mobile */
@media (max-width: 639px) {
    .platform-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* Results carousel — full width on mobile */
@media (max-width: 639px) {
    #results-track { padding-left: 1rem !important; padding-right: 1rem !important; }
    .results-card { min-width: 85vw !important; }
}

/* ThreePartSystem — 1 col mobile */
@media (max-width: 767px) {
    .tp-grid { grid-template-columns: 1fr !important; }
    .tp-cell { padding: 2rem 1.5rem !important; }
}

/* ServicesGrid — 1 col mobile */
@media (max-width: 639px) {
    .svcg-grid { grid-template-columns: 1fr !important; }
}

/* Testimonials grid — 1 col mobile */
@media (max-width: 767px) {
    .test-grid { grid-template-columns: 1fr !important; }
}

/* ComparisonTable — horizontal scroll on mobile */
.overflow-x-auto, [style*="overflow-x:auto"] {
    -webkit-overflow-scrolling: touch;
}
@media (max-width: 767px) {
    table { min-width: 540px; }
}

/* Contact page: 2-col → 1 col */
@media (max-width: 639px) {
    .contact-2col { grid-template-columns: 1fr !important; }
}

/* Hero buttons: always side by side */
.hero-anim-6 { flex-wrap: nowrap !important; }
@media (max-width: 479px) {
    .hero-anim-6 { flex-wrap: wrap !important; }
    .hero-anim-6 .cta-primary,
    .hero-anim-6 .cta-secondary { width: 100%; justify-content: center; }
}

/* CTA buttons full width on very small screens */
@media (max-width: 479px) {
    .cta-primary, .cta-light, .cta-secondary { width: 100%; justify-content: center; text-align: center; }
}

/* Blog grid mobile */
@media (max-width: 639px) {
    .blog-grid { grid-template-columns: 1fr !important; }
    .blog-featured { grid-template-columns: 1fr !important; }
}

/* Footer mobile */
@media (max-width: 767px) {
    .footer-grid { grid-template-columns: 1fr 1fr !important; }
}
@media (max-width: 479px) {
    .footer-grid { grid-template-columns: 1fr !important; }
}

/* TrustBar: padding on mobile */
@media (max-width: 767px) {
    .tb-logo svg { height: 1.5rem !important; }
}

/* Prevent horizontal overflow site-wide */
body { overflow-x: hidden; }
img { max-width: 100%; height: auto; }

/* Metrics row: 1 col on small mobile */
@media (max-width: 639px) {
    .metrics-grid { grid-template-columns: 1fr !important; }
}

/* Fix three-part system grid class priority */
.tp-grid {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 1px;
    background: hsl(var(--linen) / 0.05);
}
@media (min-width: 768px) {
    .tp-grid { grid-template-columns: repeat(3, 1fr) !important; }
}

/* Fix services grid class priority */
.svcg-grid {
    display: grid !important;
    background: hsl(var(--border) / 0.3);
    gap: 1px;
}
@media (min-width: 768px)  { .svcg-grid { grid-template-columns: repeat(2, 1fr) !important; } }
@media (min-width: 1024px) { .svcg-grid { grid-template-columns: repeat(3, 1fr) !important; } }
