/* =============================================================
   CarneyDogs — Custom CSS
   Animations · Textures · Hover Effects · Responsive
   ============================================================= */

/* ── Google Fonts are loaded via functions.php enqueue ── */

/* ─────────────────────────────────────────────────────────
   1. CSS CUSTOM PROPERTIES (supplement theme.json)
   ───────────────────────────────────────────────────────── */
:root {
  --cd-forest:       #2B4C3F;
  --cd-forest-dark:  #1A3329;
  --cd-cream:        #EDE5D0;
  --cd-cream-light:  #F7F3EC;
  --cd-gold:         #B8966A;
  --cd-gold-light:   #D4B586;
  --cd-bark:         #2A2218;
  --cd-ease:         cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --cd-ease-out:     cubic-bezier(0.0, 0.0, 0.2, 1);
}


/* ─────────────────────────────────────────────────────────
   2. BASE & TYPOGRAPHY OVERRIDES
   ───────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Jost', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Cormorant Garamond', Georgia, serif;
}

/* Improved paragraph rendering */
p {
  font-family: 'Jost', system-ui, sans-serif;
}

/* Selection color */
::selection {
  background-color: var(--cd-gold);
  color: var(--cd-forest-dark);
}


/* ─────────────────────────────────────────────────────────
   3. SITE HEADER — sticky with blur backdrop
   ───────────────────────────────────────────────────────── */
.site-header {
  z-index: 1000;
  min-height: 68px;
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  transition: background-color 0.35s var(--cd-ease),
              box-shadow 0.35s var(--cd-ease),
              min-height 0.35s var(--cd-ease);
}

.site-header.scrolled {
  background-color: rgba(26, 51, 41, 0.96) !important;
  box-shadow: 0 1px 24px rgba(0, 0, 0, 0.18);
}

.site-header .header-site-title a {
  text-decoration: none;
  color: var(--cd-cream) !important;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.3rem;
  letter-spacing: 0.06em;
  transition: color 0.25s ease;
}

.site-header .header-site-title a:hover {
  color: var(--cd-gold) !important;
}

.primary-nav .wp-block-navigation__container {
  gap: 2rem;
}

.primary-nav .wp-block-navigation-item__content {
  color: rgba(237, 229, 208, 0.8);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  transition: color 0.22s ease;
  padding: 0;
  position: relative;
}

.primary-nav .wp-block-navigation-item__content::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--cd-gold);
  transition: width 0.3s var(--cd-ease);
}

.primary-nav .wp-block-navigation-item__content:hover {
  color: var(--cd-gold) !important;
}

.primary-nav .wp-block-navigation-item__content:hover::after {
  width: 100%;
}

/* Nav CTA item — special styling */
.nav-cta .wp-block-navigation-item__content {
  color: var(--cd-gold) !important;
  border: 1px solid rgba(184, 150, 106, 0.4);
  padding: 0.45rem 1rem;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.nav-cta .wp-block-navigation-item__content:hover {
  background-color: var(--cd-gold) !important;
  color: var(--cd-forest-dark) !important;
  border-color: var(--cd-gold);
}

.nav-cta .wp-block-navigation-item__content::after {
  display: none;
}

/* Mobile hamburger */
.wp-block-navigation__responsive-container-close,
.wp-block-navigation__responsive-container-open {
  color: var(--cd-cream) !important;
}


/* ─────────────────────────────────────────────────────────
   4. HERO SECTION — texture overlay + paw grain
   ───────────────────────────────────────────────────────── */
.hero-section {
  position: relative;
  overflow: hidden;
}

/* Subtle noise grain texture over hero */
.hero-section::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='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.035'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: 0.6;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: overlay;
}

/* Radial glow from center */
.hero-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 60% at 50% 45%, rgba(59, 100, 85, 0.35) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

.hero-section .wp-block-cover__inner-container {
  position: relative;
  z-index: 2;
}

.hero-eyebrow {
  opacity: 0;
  animation: fadeSlideUp 0.8s var(--cd-ease-out) 0.3s forwards;
}

.hero-heading {
  opacity: 0;
  animation: fadeSlideUp 0.9s var(--cd-ease-out) 0.5s forwards;
}

.hero-subtitle {
  opacity: 0;
  animation: fadeSlideUp 0.8s var(--cd-ease-out) 0.75s forwards;
}

.hero-buttons {
  opacity: 0;
  animation: fadeSlideUp 0.8s var(--cd-ease-out) 0.95s forwards;
}

.hero-scroll-hint {
  opacity: 0;
  animation: fadeIn 1s ease 1.4s forwards, bounceDown 2.5s ease 2s infinite;
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0);    }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes bounceDown {
  0%, 100% { transform: translateY(0);   }
  50%       { transform: translateY(6px); }
}


/* ─────────────────────────────────────────────────────────
   5. PHILOSOPHY STRIP
   ───────────────────────────────────────────────────────── */
.philosophy-strip {
  position: relative;
  overflow: hidden;
}

.philosophy-strip::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(138, 110, 69, 0.4) 0%, transparent 50%, rgba(138, 110, 69, 0.4) 100%);
  pointer-events: none;
}

.philosophy-strip p {
  position: relative;
  z-index: 1;
}


/* ─────────────────────────────────────────────────────────
   6. SCROLL REVEAL ANIMATIONS
   ───────────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.75s var(--cd-ease-out),
              transform 0.75s var(--cd-ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }


/* ─────────────────────────────────────────────────────────
   7. SERVICE CARDS
   ───────────────────────────────────────────────────────── */
.service-card {
  position: relative;
  transition: transform 0.3s var(--cd-ease),
              box-shadow 0.3s var(--cd-ease),
              border-color 0.3s ease !important;
  cursor: default;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--cd-gold);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s var(--cd-ease);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(43, 76, 63, 0.12);
  border-color: rgba(184, 150, 106, 0.5) !important;
}

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


/* ─────────────────────────────────────────────────────────
   8. PRICING SECTION
   ───────────────────────────────────────────────────────── */
.section-pricing .pricing-col {
  position: relative;
}

.section-pricing .pricing-col::after {
  content: '';
  position: absolute;
  top: 0;
  right: -1px;
  bottom: 0;
  width: 1px;
  background: rgba(184, 150, 106, 0.15);
}

.section-pricing .pricing-col:last-child::after {
  display: none;
}

/* Hover rows */
.section-pricing .wp-block-group:has(.has-bark-color):hover {
  background-color: rgba(184, 150, 106, 0.04);
  border-radius: 2px;
  margin-left: -0.5rem;
  margin-right: -0.5rem;
  padding-left: 0.5rem !important;
  padding-right: 0.5rem !important;
  transition: background-color 0.2s ease;
}

.pricing-notes {
  transition: border-color 0.3s ease;
}

.pricing-notes:hover {
  border-color: rgba(184, 150, 106, 0.45) !important;
}


/* ─────────────────────────────────────────────────────────
   9. PHILOSOPHY / ABOUT SPLIT SECTION
   ───────────────────────────────────────────────────────── */
.philosophy-logo-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  max-width: 320px;
  aspect-ratio: 1;
  transition: border-color 0.4s ease;
}

.philosophy-logo-circle:hover {
  border-color: rgba(184, 150, 106, 0.5) !important;
}

.philosophy-logo-circle .site-logo-block img {
  filter: brightness(0) invert(1) sepia(1) saturate(0.6) hue-rotate(25deg);
}

.philosophy-quote {
  border-left: 3px solid var(--cd-gold);
}


/* ─────────────────────────────────────────────────────────
   10. ABOUT SECTION
   ───────────────────────────────────────────────────────── */
.about-image-col .wp-block-image img {
  transition: transform 0.5s var(--cd-ease);
}

.about-image-col:hover .wp-block-image img {
  transform: scale(1.03);
}

/* Placeholder for missing image */
.about-image figure {
  background: linear-gradient(135deg, var(--cd-forest) 0%, var(--cd-forest-dark) 100%);
  min-height: 200px;
  width: 200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-image figure::after {
  content: 'CD';
  color: var(--cd-gold);
  font-family: 'Cormorant Garamond', serif;
  font-size: 3rem;
  font-weight: 300;
  opacity: 0.5;
}

.about-image figure img[src=""] {
  display: none;
}


/* ─────────────────────────────────────────────────────────
   11. CONTACT SECTION
   ───────────────────────────────────────────────────────── */
.contact-card {
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.contact-card:hover {
  border-color: rgba(184, 150, 106, 0.4) !important;
}

.contact-card--highlight {
  background: linear-gradient(135deg, rgba(43, 76, 63, 0.3) 0%, rgba(26, 51, 41, 0.15) 100%);
}


/* ─────────────────────────────────────────────────────────
   12. BUTTON ENHANCEMENTS
   ───────────────────────────────────────────────────────── */
.wp-block-button__link {
  transition: background-color 0.25s var(--cd-ease),
              color 0.25s var(--cd-ease),
              transform 0.2s var(--cd-ease),
              box-shadow 0.25s var(--cd-ease) !important;
  position: relative;
  overflow: hidden;
}

.wp-block-button__link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.wp-block-button__link:active {
  transform: translateY(0);
}

/* Outline button specific */
.is-style-outline .wp-block-button__link {
  background: transparent !important;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.2s ease !important;
}

.is-style-outline .wp-block-button__link:hover {
  background-color: rgba(237, 229, 208, 0.1) !important;
}


/* ─────────────────────────────────────────────────────────
   13. FOOTER
   ───────────────────────────────────────────────────────── */
.site-footer {
  position: relative;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 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.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.025'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  opacity: 0.4;
  pointer-events: none;
  mix-blend-mode: overlay;
}

.site-footer a:hover {
  color: var(--cd-gold-light) !important;
  text-decoration: none !important;
}

.footer-divider {
  margin-top: 3rem !important;
  margin-bottom: 1.5rem !important;
}


/* ─────────────────────────────────────────────────────────
   14. GENERAL SECTION STYLES
   ───────────────────────────────────────────────────────── */
.section-header {
  text-align: center;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

/* Separator / divider in content */
.wp-block-separator {
  border: none;
  border-top: 1px solid var(--cd-gold) !important;
  opacity: 0.3;
  max-width: 80px;
  margin-left: auto;
  margin-right: auto;
}

/* Site logo */
.site-logo-block img,
.wp-block-site-logo img {
  max-width: 44px !important;
  height: auto;
}

/* WordPress admin bar spacing */
html.wp-toolbar .site-header {
  top: 32px;
}


/* ─────────────────────────────────────────────────────────
   15. RESPONSIVE — TABLET (≤ 1024px)
   ───────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .section-philosophy .wp-block-columns {
    flex-direction: column;
  }

  .section-philosophy .wp-block-column {
    flex-basis: 100% !important;
    max-width: 100%;
    padding-left: var(--wp--preset--spacing--md) !important;
    padding-right: var(--wp--preset--spacing--md) !important;
  }

  .philosophy-image-col {
    min-height: 300px;
  }
}


/* ─────────────────────────────────────────────────────────
   16. RESPONSIVE — MOBILE (≤ 768px)
   ───────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Header */
  .site-header {
    min-height: 60px;
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }

  .header-tagline {
    display: none;
  }

  /* Hero */
  .hero-section {
    min-height: 100svh;
  }

  /* Service cards — stack 2 per row on mobile */
  .section-services .wp-block-columns {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .section-services .wp-block-column {
    flex-basis: auto !important;
    width: auto;
  }

  /* Pricing — stack */
  .section-pricing .wp-block-columns {
    flex-direction: column;
  }

  .section-pricing .pricing-col::after {
    display: none;
  }

  /* About — stack */
  .section-about .wp-block-columns {
    flex-direction: column;
  }

  .section-about .wp-block-column {
    flex-basis: 100% !important;
  }

  /* Contact — stack */
  .section-contact .wp-block-columns {
    flex-direction: column;
  }

  /* Footer */
  .site-footer .wp-block-columns {
    flex-direction: column;
  }

  .site-footer .wp-block-column {
    flex-basis: 100% !important;
  }
}

/* ─────────────────────────────────────────────────────────
   17. RESPONSIVE — SMALL MOBILE (≤ 480px)
   ───────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  /* Service cards — single column */
  .section-services .wp-block-columns {
    grid-template-columns: 1fr;
  }

  /* Buttons stack */
  .hero-buttons .wp-block-buttons {
    flex-direction: column;
    align-items: center;
  }

  .philosophy-logo-circle {
    width: 220px;
    min-height: 220px;
    padding: 1.5rem !important;
  }
}


/* ─────────────────────────────────────────────────────────
   18. PRINT STYLES
   ───────────────────────────────────────────────────────── */
@media print {
  .site-header,
  .hero-section::before,
  .hero-section::after,
  .hero-scroll-hint,
  .hero-buttons {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }
}


/* ─────────────────────────────────────────────────────────
   19. BLOCK EDITOR OVERRIDES (editor.css equivalent)
   ───────────────────────────────────────────────────────── */
.editor-styles-wrapper {
  font-family: 'Jost', system-ui, sans-serif;
}

.editor-styles-wrapper h1,
.editor-styles-wrapper h2,
.editor-styles-wrapper h3,
.editor-styles-wrapper h4 {
  font-family: 'Cormorant Garamond', Georgia, serif;
}


/* ─────────────────────────────────────────────────────────
   20. ACCESSIBILITY IMPROVEMENTS
   ───────────────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--cd-gold);
  outline-offset: 3px;
}

.wp-block-navigation-item__content:focus-visible {
  outline: 2px solid var(--cd-gold);
  outline-offset: 3px;
  border-radius: 0;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }
}
