/* ============================================
   沐安寵物善終 主題樣式
   ============================================ */

/* CSS Variables */
:root {
    --sage: #7A9C59;
    --sage-light: #9BB87A;
    --sage-dark: #5C7A40;
    --terracotta: #C4795A;
    --cream: #FDF8F0;
    --foreground: #3D2E22;
    --muted: #8B7364;
    --border: #E5DDD0;
    --background: #FDF8F0;
    --card: #FFFFFF;
    --muted-foreground: #8B7364;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
    margin: 0;
    overflow-x: hidden;
    font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--foreground);
    background: var(--background);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
:where(h1, h2, h3, h4, h5, h6, p, ul, ol, li, blockquote, figure) { margin: 0; }
:where(ul, ol) { padding: 0; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
.muan-container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* Header */
.muan-header { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; transition: all .3s ease; }
#site-header.is-scrolled { background: rgba(253,248,240,.95) !important; backdrop-filter: blur(12px); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
#site-header.is-scrolled #header-top-bar { max-height: 0 !important; opacity: 0 !important; }

.muan-nav-link { padding: 8px 14px; font-size: 14px; font-weight: 500; color: rgba(61,46,34,.7); border-radius: 6px; transition: all .2s; }
.muan-nav-link:hover, .muan-nav-link.active { color: var(--sage); background: rgba(122,156,89,.08); }

/* Buttons */
.muan-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 24px; border-radius: 999px; font-weight: 600; font-size: 14px; border: none; cursor: pointer; transition: all .2s; text-decoration: none; font-family: inherit; }
.muan-btn-primary { background: var(--sage); color: #fff; }
.muan-btn-primary:hover { background: var(--sage-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(122,156,89,.3); }
.muan-btn-outline { background: transparent; color: var(--sage); border: 1.5px solid rgba(122,156,89,.3); }
.muan-btn-outline:hover { background: rgba(122,156,89,.06); border-color: var(--sage); }
.muan-btn-white { background: #fff; color: var(--sage); }
.muan-btn-white:hover { background: var(--cream); }
.muan-btn-ghost { background: rgba(255,255,255,.1); backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,.3); color: #fff; }
.muan-btn-ghost:hover { background: rgba(255,255,255,.2); }
.muan-btn-lg { padding: 14px 32px; font-size: 15px; }

/* Footer */
.muan-footer { background: var(--foreground); }
.muan-footer-cta { background: var(--sage); }
.muan-footer-grid { display: grid; grid-template-columns: 1fr; gap: 40px; }
@media (min-width: 768px) { .muan-footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .muan-footer-grid { grid-template-columns: 1.2fr 0.8fr 1fr 1fr; } }
.muan-footer-col a:hover { color: var(--sage-light) !important; }

/* Content padding */
.site-content { min-height: 100vh; padding-top: 96px; }
@media (max-width: 767px) { .site-content { padding-top: 64px; } }

/* ── Hero Section ── */
.hero-section { position: relative; min-height: 85vh; display: flex; align-items: center; overflow: hidden; }
.hero-bg-img { position: absolute; inset: 0; }
.hero-bg-img img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to right, rgba(0,0,0,.6), rgba(0,0,0,.4), transparent); }
.hero-content { position: relative; z-index: 1; }

.hero-blob { position: absolute; border-radius: 50%; }
.hero-blob-1 { animation: blobFloat 8s ease-in-out infinite; }
.hero-blob-2 { animation: blobFloat 10s ease-in-out infinite 2s; }
.hero-blob-3 { animation: blobFloat 9s ease-in-out infinite 4s; }
.hero-blob-4 { animation: blobFloat 11s ease-in-out infinite 1s; }

@keyframes blobFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-15px) scale(1.05); }
}

.hero-noise { position: absolute; inset: 0; opacity: .03; pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 128px 128px;
}

/* Sub-hero for inner pages */
.sub-hero-section { position: relative; padding: 120px 0 80px; overflow: hidden; }
@media (min-width: 768px) { .sub-hero-section { padding: 140px 0 100px; } }
.sub-hero-bg { position: absolute; inset: 0; }
.sub-hero-bg img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.sub-hero-overlay { position: absolute; inset: 0; }

/* ── Card Enhancements ── */
.card-accent-top { position: relative; }
.card-accent-top::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--sage), var(--sage-light));
    border-radius: 12px 12px 0 0; opacity: 0; transition: opacity .3s;
}
.card-accent-top:hover::before { opacity: 1; }

.card-glow { transition: box-shadow .3s, transform .3s; }
.card-glow:hover { box-shadow: 0 20px 40px rgba(122,156,89,.12), 0 4px 12px rgba(0,0,0,.06); transform: translateY(-2px); }

/* ── Button Ripple ── */
.btn-ripple { position: relative; overflow: hidden; }
.btn-ripple::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle, rgba(255,255,255,.3) 0%, transparent 70%); opacity: 0; transition: opacity .3s; pointer-events: none; }
.btn-ripple:hover::after { opacity: 1; }

/* ── Pulse Ring ── */
.pulse-ring { position: relative; }
.pulse-ring::before { content: ''; position: absolute; inset: -4px; border-radius: inherit; border: 2px solid var(--sage); opacity: 0; animation: pulseRing 2s ease-out infinite; pointer-events: none; }
@keyframes pulseRing { 0% { opacity: .6; transform: scale(.95); } 100% { opacity: 0; transform: scale(1.15); } }

/* ── Float Animation ── */
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.animate-float { animation: float 4s ease-in-out infinite; }

/* ── Ping Animation ── */
@keyframes ping { 75%, 100% { transform: scale(2); opacity: 0; } }
.animate-ping { animation: ping 1s cubic-bezier(0,0,.2,1) infinite; }

/* ── Testimonial Quote ── */
.testimonial-quote-bg { position: relative; }
.testimonial-quote-bg::before {
    content: '\201C'; position: absolute; top: -10px; right: 20px;
    font-size: 140px; line-height: 1; font-family: Georgia, serif;
    color: rgba(122,156,89,.06); pointer-events: none; user-select: none;
}

/* ── Star Hover Group ── */
.star-hover-item { transition: transform .2s ease; }
.star-hover-group:hover .star-hover-item:nth-child(1) { transform: scale(1.2) rotate(-5deg); }
.star-hover-group:hover .star-hover-item:nth-child(2) { transform: scale(1.2) rotate(-2deg); }
.star-hover-group:hover .star-hover-item:nth-child(3) { transform: scale(1.25); }
.star-hover-group:hover .star-hover-item:nth-child(4) { transform: scale(1.2) rotate(2deg); }
.star-hover-group:hover .star-hover-item:nth-child(5) { transform: scale(1.2) rotate(5deg); }

/* ── Scroll Animations ── */
.muan-fade-up { opacity: 0; transform: translateY(30px); transition: all .7s cubic-bezier(.25,.1,.25,1); }
.muan-fade-up.visible { opacity: 1; transform: translateY(0); }

[data-animate] { opacity: 0; transform: translateY(40px); transition: opacity .7s ease, transform .7s ease; }
[data-animate].animated { opacity: 1; transform: translateY(0); }

/* ── Section Heading ── */
.muan-section-heading { text-align: center; margin-bottom: 48px; }
.muan-section-heading .badge { display: inline-block; padding: 4px 12px; background: rgba(122,156,89,.1); color: var(--sage); font-size: 12px; font-weight: 600; border-radius: 999px; margin-bottom: 12px; text-transform: uppercase; letter-spacing: .05em; }
.muan-section-heading h2 { font-size: 28px; font-weight: 700; color: var(--foreground); line-height: 1.3; margin-bottom: 12px; }
@media (min-width: 768px) { .muan-section-heading h2 { font-size: 36px; } }
.muan-section-heading .highlight { color: var(--sage); }
.muan-section-heading .subtitle { color: var(--muted-foreground); font-size: 15px; line-height: 1.7; max-width: 540px; margin: 0 auto; }

/* ── Utility ── */
.muan-section-badge { display: inline-block; padding: 6px 14px; background: rgba(122,156,89,.1); color: var(--sage); font-size: 12px; font-weight: 600; border-radius: 999px; margin-bottom: 16px; }
.text-sage-light { color: var(--sage-light); }
.drop-shadow-sm { filter: drop-shadow(0 1px 1px rgba(0,0,0,.2)); }

/* ── Accordion ── */
.faq-answer { display: none; }
.faq-item.open .faq-answer { display: block; }
.faq-item.open .faq-icon { transform: rotate(180deg); }
.faq-icon { transition: transform .3s ease; }

/* ── Pricing/Select Buttons ── */
.pricing-btn { padding: 8px 20px; border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer; border: 1.5px solid var(--border); background: transparent; color: var(--muted-foreground); transition: all .2s; font-family: inherit; }
.pricing-btn.active { background: var(--sage); color: #fff; border-color: var(--sage); }
.select-btn { padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 500; cursor: pointer; border: 1.5px solid var(--border); background: transparent; color: var(--muted-foreground); transition: all .2s; font-family: inherit; }
.select-btn.selected { background: rgba(122,156,89,.1); color: var(--sage); border-color: var(--sage); }

/* Image hover scale */
.img-hover-scale img { transition: transform .5s ease; }
.img-hover-scale:hover img { transform: scale(1.05); }

/* Preview parity overrides */
@keyframes hero-drift-1 {
  0%, 100% { transform: translate(0) scale(1); }
  25% { transform: translate(30px, -20px) scale(1.05); }
  50% { transform: translate(-10px, 20px) scale(.95); }
  75% { transform: translate(-30px, -10px) scale(1.02); }
}
@keyframes hero-drift-2 {
  0%, 100% { transform: translate(0) scale(1); }
  25% { transform: translate(-25px, 15px) scale(.97); }
  50% { transform: translate(20px, -25px) scale(1.04); }
  75% { transform: translate(15px, 20px) scale(.98); }
}
@keyframes hero-drift-3 {
  0%, 100% { transform: translate(0) scale(1); }
  33% { transform: translate(20px, 25px) scale(1.06); }
  66% { transform: translate(-20px, -15px) scale(.96); }
}
@keyframes hero-drift-4 {
  0%, 100% { transform: translate(0) scale(1); }
  20% { transform: translate(-15px, 20px) scale(1.03); }
  40% { transform: translate(25px, -10px) scale(.97); }
  60% { transform: translate(10px, 15px) scale(1.05); }
  80% { transform: translate(-20px, -20px) scale(.99); }
}
@keyframes hero-gradient-shift {
  0%, 100% { opacity: .6; }
  50% { opacity: 1; }
}
.hero-blob { will-change: transform; border-radius: 50%; position: absolute; }
.hero-blob-1 { animation: 15s ease-in-out infinite hero-drift-1; }
.hero-blob-2 { animation: 20s ease-in-out infinite hero-drift-2; }
.hero-blob-3 { animation: 25s ease-in-out infinite hero-drift-3; }
.hero-blob-4 { animation: 20s ease-in-out -8s infinite hero-drift-4; }
.hero-gradient-1 { animation: 10s ease-in-out infinite hero-gradient-shift; }
.hero-gradient-2 { animation: 12s ease-in-out -4s infinite hero-gradient-shift; }
.hero-gradient-3 { animation: 14s ease-in-out -8s infinite hero-gradient-shift; }
.hero-noise { opacity: .025; 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.85' 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: 200px 200px; }
.card-glow:hover { box-shadow: 0 0 20px rgba(122,156,89,.15), 0 8px 24px -8px rgba(0,0,0,.08); transform: translateY(-2px); }
.card-accent-top { position: relative; overflow: hidden; }
.card-accent-top::before { content: ''; z-index: 1; background: linear-gradient(90deg, #7a9c59, #9bb87a); height: 0; transition: height .3s; position: absolute; top: 0; left: 0; right: 0; border-radius: 0; opacity: 1; }
.card-accent-top:hover::before { height: 3px; }
.star-hover-group:hover .star-hover-item { transition: transform .2s; transform: scale(1.15); }
@media (prefers-reduced-motion: reduce) {
  .hero-blob-1, .hero-blob-2, .hero-blob-3, .hero-blob-4, .hero-gradient-1, .hero-gradient-2, .hero-gradient-3, .animate-float, .pulse-ring { animation: none !important; }
}

/* Preview parity fixes: buttons, spacing, centering, mobile drawer */
html { color-scheme: light; }
body { line-height: 1.5; }
main .text-xs, footer .text-xs { line-height: 1rem !important; }
main .text-sm, footer .text-sm { line-height: 1.25rem !important; }
main .text-base, footer .text-base { line-height: 1.5rem !important; }
main .text-lg, footer .text-lg { line-height: 1.75rem !important; }
main .leading-tight, footer .leading-tight { line-height: 1.25 !important; }
main .leading-relaxed, footer .leading-relaxed { line-height: 1.625 !important; }
main .text-sm.leading-relaxed, main .text-base.leading-relaxed, footer .text-sm.leading-relaxed, footer .text-base.leading-relaxed { line-height: 1.625 !important; }
footer .text-base.leading-relaxed { line-height: 1.5rem !important; }
@media (min-width: 768px) {
    footer .md\:text-base.leading-relaxed { line-height: 1.5rem !important; }
}
main button, main a, header button, header a, footer a { -webkit-tap-highlight-color: transparent; }
main button, main [data-slot="button"], main a[class*="inline-flex"], header a[class*="bg-sage"], footer a[class*="bg-sage"] {
    line-height: 1.25rem;
    white-space: nowrap;
}
main .bg-sage, main .hover\:bg-sage-dark:hover, main .hover\:bg-sage:hover,
header .bg-sage, header .hover\:bg-sage-dark:hover,
footer .bg-sage, footer .hover\:bg-sage-dark:hover {
    color: #fff !important;
}
main .bg-white.text-sage, footer .bg-white.text-sage { color: #7a9c59 !important; }
main .border-sage.text-sage:hover, main .border-sage\/30.text-sage:hover, main .hover\:bg-sage\/5:hover,
footer .bg-white.text-sage:hover { color: #7a9c59 !important; }
main section .max-w-2xl.mx-auto.text-center,
main section .max-w-3xl.mx-auto.text-center,
main section .text-center,
footer .text-center { text-align: center; }
main section .max-w-2xl.mx-auto.text-center > *,
main section .max-w-3xl.mx-auto.text-center > *,
footer .max-w-lg.mx-auto,
footer .max-w-xl.mx-auto { margin-left: auto; margin-right: auto; }
#mobile-sidebar { transform: translateX(100%); visibility: hidden; pointer-events: none; }
#mobile-sidebar.translate-x-0, #mobile-sidebar.is-open { transform: translateX(0); visibility: visible; pointer-events: auto; }
#mobile-sidebar-backdrop { opacity: 0; pointer-events: none; }
#mobile-sidebar-backdrop.opacity-100, #mobile-sidebar-backdrop.is-open { opacity: 1; pointer-events: auto; }
@media (min-width: 1024px) {
    #mobile-sidebar, #mobile-sidebar-backdrop, #mobile-menu-trigger { display: none !important; }
}
@media (min-width: 1024px) {
    main .grid.lg\:grid-cols-5.gap-10 > div:nth-child(1) { grid-column: span 3 / span 3; min-width: 0; }
    main .grid.lg\:grid-cols-5.gap-10 > div:nth-child(2) { grid-column: span 2 / span 2; min-width: 0; }
}@media (max-width: 640px) {
    main .flex-wrap { row-gap: 0.75rem; }
}
/* Tailwind spacing parity: keep preview margins outside Tailwind cascade layers */
main .mt-0, footer .mt-0 { margin-top: 0 !important; }
main .mt-0\.5, footer .mt-0\.5 { margin-top: 0.125rem !important; }
main .mt-1, footer .mt-1 { margin-top: 0.25rem !important; }
main .mt-1\.5, footer .mt-1\.5 { margin-top: 0.375rem !important; }
main .mt-2, footer .mt-2 { margin-top: 0.5rem !important; }
main .mt-3, footer .mt-3 { margin-top: 0.75rem !important; }
main .mt-4, footer .mt-4 { margin-top: 1rem !important; }
main .mt-5, footer .mt-5 { margin-top: 1.25rem !important; }
main .mt-6, footer .mt-6 { margin-top: 1.5rem !important; }
main .mt-8, footer .mt-8 { margin-top: 2rem !important; }
main .mt-10, footer .mt-10 { margin-top: 2.5rem !important; }
main .mt-12, footer .mt-12 { margin-top: 3rem !important; }
main .mt-16, footer .mt-16 { margin-top: 4rem !important; }
main .mb-0, footer .mb-0 { margin-bottom: 0 !important; }
main .mb-1, footer .mb-1 { margin-bottom: 0.25rem !important; }
main .mb-1\.5, footer .mb-1\.5 { margin-bottom: 0.375rem !important; }
main .mb-2, footer .mb-2 { margin-bottom: 0.5rem !important; }
main .mb-3, footer .mb-3 { margin-bottom: 0.75rem !important; }
main .mb-4, footer .mb-4 { margin-bottom: 1rem !important; }
main .mb-5, footer .mb-5 { margin-bottom: 1.25rem !important; }
main .mb-6, footer .mb-6 { margin-bottom: 1.5rem !important; }
main .mb-8, footer .mb-8 { margin-bottom: 2rem !important; }
main .mx-auto, footer .mx-auto { margin-left: auto !important; margin-right: auto !important; }
main .space-y-1 > :not(:last-child), footer .space-y-1 > :not(:last-child) { margin-bottom: 0.25rem !important; }
main .space-y-1\.5 > :not(:last-child), footer .space-y-1\.5 > :not(:last-child) { margin-bottom: 0.375rem !important; }
main .space-y-2 > :not(:last-child), footer .space-y-2 > :not(:last-child) { margin-bottom: 0.5rem !important; }
main .space-y-2\.5 > :not(:last-child), footer .space-y-2\.5 > :not(:last-child) { margin-bottom: 0.625rem !important; }
main .space-y-3 > :not(:last-child), footer .space-y-3 > :not(:last-child) { margin-bottom: 0.75rem !important; }
main .space-y-4 > :not(:last-child), footer .space-y-4 > :not(:last-child) { margin-bottom: 1rem !important; }
main .space-y-6 > :not(:last-child), footer .space-y-6 > :not(:last-child) { margin-bottom: 1.5rem !important; }