:root {
    /* Palette Requirements */
    --bg-primary: #F7F4EF;
    --bg-secondary: #EFE8DD;
    --bg-card: rgba(255, 255, 255, 0.78);
    --accent-primary: #8C4A32;
    --accent-secondary: #A35D44;
    --text-dark: #2D241F;
    --text-muted: #6E625B;
    --border-color: rgba(45, 36, 31, 0.08);
    --success: #6B7F57;

    /* Typography Scale */
    --font-heading: 'Bricolage Grotesque', sans-serif;
    --font-body: 'Manrope', sans-serif;
    --font-accent: 'Instrument Serif', serif;

    --fs-hero: clamp(2.25rem, 4.5vw + 1.25rem, 5.5rem);
    --fs-section: clamp(1.75rem, 2.5vw + 1rem, 3rem);
    --fs-card: clamp(1.15rem, 0.5vw + 1rem, 1.4rem);
    --fs-body: clamp(0.9375rem, 0.25vw + 0.875rem, 1.05rem);
    --fs-subpage: clamp(2rem, 3.5vw + 1rem, 4rem);
    --fs-h3: clamp(1.5rem, 1.5vw + 1.1rem, 2.5rem);
    --fs-stat: clamp(2rem, 3vw + 1rem, 3rem);
    --fs-plan-price: clamp(2rem, 3vw + 1rem, 3rem);

    --space-section: clamp(3.5rem, 6vw + 1rem, 6rem);
    --space-container: clamp(1rem, 3vw + 0.5rem, 4rem);
    --space-gap-xl: clamp(2rem, 4vw + 0.5rem, 6rem);
    --space-gap-lg: clamp(1.5rem, 3vw + 0.5rem, 4rem);
    --space-gap-md: clamp(1.25rem, 2vw + 0.5rem, 2.5rem);
    --space-gap-sm: clamp(0.75rem, 1vw + 0.5rem, 1.5rem);
    --radius-xl: clamp(24px, 3vw, 48px);
    --radius-lg: clamp(20px, 2vw, 32px);
    --radius-md: clamp(14px, 1.5vw, 24px);
    --nav-offset: clamp(0.75rem, 2vw, 2rem);

    --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Chrome, Edge, Safari */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #8C4A32;
    border-radius: 100px;
}

::-webkit-scrollbar-thumb:hover {
    background: #A35D44;
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #8C4A32 transparent;
}

/* Global Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: clamp(14px, 0.35vw + 13px, 16px);
}

body {
    background-color: var(--bg-primary);
    color: var(--text-dark);
    font-family: var(--font-body);
    font-size: var(--fs-body);
    line-height: 1.8;
    letter-spacing: -0.01em;
    overflow-x: hidden;
    overflow-wrap: break-word;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

p {
    color: var(--text-muted);
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-smooth);
}

button,
.btn {
    font-family: var(--font-body);
    cursor: pointer;
    border: none;
    outline: none;
    background: none;
    transition: var(--transition-smooth);
}

img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

/* Layout Utilities */
.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 var(--space-container);
    width: 100%;
}

section {
    padding: var(--space-section) 0;
    position: relative;
}

/* Focus & Accessibility */
*:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Premium Buttons */
.btn-group {
    display: flex;
    gap: var(--space-gap-sm);
    align-items: center;
    flex-wrap: wrap;
}

.btn-fill {
    background-color: var(--accent-primary);
    color: #ffffff;
    padding: clamp(0.85rem, 1vw + 0.6rem, 1.1rem) clamp(1.5rem, 2vw + 1rem, 2.4rem);
    border-radius: 100px;
    font-weight: 600;
    font-size: clamp(0.875rem, 0.5vw + 0.75rem, 1rem);
    position: relative;
    overflow: hidden;
}

.btn-fill:hover {
    background-color: var(--accent-secondary);
    transform: translateY(-2px);
}

.btn-outline {
    border: 1px solid var(--border-color);
    color: var(--text-dark);
    padding: clamp(0.85rem, 1vw + 0.6rem, 1.1rem) clamp(1.5rem, 2vw + 1rem, 2.4rem);
    border-radius: 100px;
    font-weight: 600;
    font-size: clamp(0.875rem, 0.5vw + 0.75rem, 1rem);
}

.btn-outline:hover {
    background-color: rgba(45, 36, 31, 0.04);
    transform: translateY(-2px);
}

/* Navbar Architecture */
.header-nav {
    position: fixed;
    top: var(--nav-offset);
    left: 50%;
    transform: translateX(-50%);
    width: min(calc(100% - var(--space-container) * 2), 1280px);
    max-width: 1280px;
    z-index: 1003;
    background: rgba(247, 244, 239, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    padding: clamp(0.5rem, 1vw + 0.25rem, 0.75rem) clamp(1rem, 2vw + 0.5rem, 2rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s;
}

.header-nav.nav-hidden {
    transform: translate(-50%, -150%);
}

.header-nav.nav-open {
    transform: translateX(-50%) !important;
}

.header-nav.nav-scrolled {
    background: rgba(247, 244, 239, 0.85);
    padding: clamp(0.4rem, 0.8vw + 0.2rem, 0.5rem) clamp(1rem, 2vw + 0.5rem, 2rem);
}

.logo {
    font-family: var(--font-heading);
    font-size: clamp(1.15rem, 1.5vw + 0.75rem, 1.6rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo span {
    color: var(--accent-primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 2vw + 0.25rem, 2.5rem);
}

.nav-links a {
    font-size: clamp(0.85rem, 0.5vw + 0.75rem, 0.95rem);
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-dark);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 1.5px;
    background-color: var(--accent-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: clamp(0.75rem, 1.5vw, 1.5rem);
}

.nav-donate {
    background-color: var(--text-dark);
    color: #ffffff;
    font-size: clamp(0.8rem, 0.5vw + 0.7rem, 0.9rem);
    font-weight: 600;
    padding: clamp(0.55rem, 0.8vw + 0.35rem, 0.75rem) clamp(1rem, 1.5vw + 0.5rem, 1.75rem);
    border-radius: 100px;
}

.nav-donate:hover {
    background-color: var(--accent-primary);
}

/* Hamburger Menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    width: 44px;
    height: 44px;
    padding: 10px;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1002;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-dark);
    transition: var(--transition-smooth);
}

/* Mobile Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: min(100vw, clamp(280px, 85vw, 400px));
    height: 100vh;
    height: 100dvh;
    background-color: var(--bg-primary);
    border-left: 1px solid var(--border-color);
    z-index: 1002;
    padding: clamp(5rem, 12vw, 8rem) clamp(1.5rem, 5vw, 4rem) clamp(2rem, 4vw, 4rem);
    display: flex;
    flex-direction: column;
    gap: clamp(1.5rem, 3vw, 2.5rem);
    transform: translateX(100%);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(20px);
}

.sidebar.active {
    transform: translateX(0);
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background-color: rgba(45, 36, 31, 0.15);
    backdrop-filter: blur(4px);
    z-index: 1001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.sidebar .nav-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: clamp(1.5rem, 3vw, 2rem);
}

.sidebar .nav-links a {
    font-size: clamp(1.15rem, 2vw + 0.75rem, 1.5rem);
    font-family: var(--font-heading);
    font-weight: 600;
}

/* Open/Close Menu States */
.menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    padding-top: clamp(5rem, 10vw + 2rem, 8rem);
    padding-bottom: clamp(2rem, 4vw, 4rem);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: var(--space-gap-lg);
    align-items: center;
    width: 100%;
}

.hero-content h1 {
    font-size: var(--fs-hero);
    margin-bottom: clamp(1.25rem, 2vw, 2rem);
    color: var(--text-dark);
}

.hero-content h1 span {
    font-family: var(--font-accent);
    font-weight: 400;
    font-style: italic;
    color: var(--accent-primary);
    display: block;
    margin-top: -0.5rem;
}

.hero-content p {
    font-size: clamp(1rem, 0.5vw + 0.9rem, 1.2rem);
    max-width: min(520px, 100%);
    margin-bottom: clamp(1.5rem, 3vw, 3rem);
}

/* Floating Space Composition */
.hero-visual {
    position: relative;
    height: clamp(320px, 45vw, 650px);
    width: 100%;
    max-width: 100%;
}

.decor-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(163, 93, 68, 0.05);
    filter: blur(40px);
    z-index: 1;
}

.decor-1 {
    width: clamp(150px, 22vw, 300px);
    height: clamp(150px, 22vw, 300px);
    top: 10%;
    right: 5%;
}

.decor-2 {
    width: clamp(120px, 18vw, 250px);
    height: clamp(120px, 18vw, 250px);
    bottom: 15%;
    left: 5%;
}

.float-card {
    position: absolute;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: clamp(0.5rem, 1vw, 1rem);
    width: clamp(120px, 14vw, 210px);
    z-index: 2;
    box-shadow: 0 10px 30px rgba(45, 36, 31, 0.03);
    animation: gentleFloat 6s ease-in-out infinite alternate;
}

.float-card img {
    width: 100%;
    height: clamp(90px, 12vw, 190px);
    border-radius: 16px;
    object-fit: cover;
    margin-bottom: 0.75rem;
}

.float-card-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.float-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.float-card h4 {
    font-size: clamp(0.85rem, 0.5vw + 0.7rem, 1.1rem);
    letter-spacing: -0.02em;
}

.float-card span.breed {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.float-card span.age {
    font-size: 0.8rem;
    background: var(--bg-secondary);
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
    font-weight: 600;
}

/* Custom Floating Arrangement Positions */
.fc-1 {
    top: 0;
    left: 10%;
    width: clamp(130px, 15vw, 220px);
    animation-delay: 0s;
    transform: rotate(-3deg);
}

.fc-2 {
    top: 8%;
    right: 5%;
    width: clamp(110px, 13vw, 190px);
    animation-delay: 0.5s;
    transform: rotate(4deg);
}

.fc-3 {
    top: 40%;
    left: 35%;
    width: clamp(130px, 16vw, 230px);
    animation-delay: 1s;
    transform: translateY(-50%) rotate(1deg);
    z-index: 3;
}

.fc-4 {
    bottom: 2%;
    left: 5%;
    width: clamp(100px, 12vw, 180px);
    animation-delay: 1.5s;
    transform: rotate(-5deg);
}

.fc-5 {
    bottom: 0;
    right: 8%;
    width: clamp(110px, 13vw, 200px);
    animation-delay: 2s;
    transform: rotate(3deg);
}

@keyframes gentleFloat {
    0% {
        transform: translateY(0px) rotate(var(--rot, 0deg));
    }

    100% {
        transform: translateY(-15px) rotate(calc(var(--rot, 0deg) + 2deg));
    }
}

/* Specific rotations preserved in animation via custom properties safely mapped */
.fc-1 {
    --rot: -3deg;
}

.fc-2 {
    --rot: 4deg;
}

.fc-3 {
    --rot: 1deg;
}

.fc-4 {
    --rot: -5deg;
}

.fc-5 {
    --rot: 3deg;
}

/* Section Headings Styling */
.section-header {
    margin-bottom: clamp(2.5rem, 5vw, 5rem);
    max-width: min(700px, 100%);
}

.section-header h2 {
    font-size: var(--fs-section);
    color: var(--text-dark);
    margin-bottom: clamp(0.75rem, 1.5vw, 1.5rem);
}

.section-header p {
    font-size: clamp(1rem, 0.5vw + 0.9rem, 1.15rem);
}

.section-header-centered {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: clamp(2.5rem, 5vw, 6rem);
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-gap-xl);
    align-items: center;
}

.about-left h3 {
    font-size: clamp(1.35rem, 1.5vw + 1rem, 2.2rem);
    line-height: 1.3;
    margin-bottom: 2rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.about-left h3 em {
    font-family: var(--font-accent);
    font-style: italic;
    color: var(--accent-primary);
    font-weight: 400;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
    gap: var(--space-gap-sm);
}

.stat-card {
    background-color: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: clamp(1.5rem, 2.5vw, 2.5rem) clamp(1.25rem, 2vw, 2rem);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border: 1px solid transparent;
    transition: var(--transition-smooth);
}

.stat-card:hover {
    border-color: var(--border-color);
    background-color: var(--bg-card);
}

.stat-number {
    font-family: var(--font-heading);
    font-size: var(--fs-stat);
    font-weight: 800;
    color: var(--accent-primary);
    line-height: 1;
    letter-spacing: -0.03em;
}

.stat-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* Pets Section */
.filters {
    display: flex;
    gap: clamp(0.5rem, 1vw, 1rem);
    margin-bottom: clamp(2rem, 4vw, 4rem);
    flex-wrap: wrap;
}

.filter-btn {
    padding: clamp(0.6rem, 1vw + 0.3rem, 0.75rem) clamp(1rem, 2vw + 0.5rem, 2rem);
    border-radius: 100px;
    background: var(--bg-secondary);
    color: var(--text-muted);
    font-weight: 600;
    font-size: clamp(0.8rem, 0.5vw + 0.7rem, 0.95rem);
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--text-dark);
    color: #ffffff;
}

/* Masonry-Inspired Arrangement Layout */
.pets-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--space-gap-md);
}

.pet-card {
    grid-column: span 4;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    padding: clamp(0.85rem, 1.5vw, 1.25rem);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

/* Alternating sizing structure for premium asymmetric masonry appearance */
.pet-card.wide {
    grid-column: span 5;
}

.pet-card.narrow {
    grid-column: span 3;
}

.pet-card.tall .pet-image-container {
    height: clamp(280px, 35vw, 420px);
}

.pet-image-container {
    position: relative;
    width: 100%;
    height: clamp(220px, 28vw, 320px);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.pet-image-container img {
    width: 100%;
    height: 100%;
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.pet-card:hover .pet-image-container img {
    transform: scale(1.05);
}

.pet-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-dark);
    padding: 0.4rem 1rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.fav-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.fav-btn:hover,
.fav-btn.active {
    color: var(--accent-primary);
    background: #ffffff;
}

.pet-info-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.pet-card h3 {
    font-size: var(--fs-card);
    color: var(--text-dark);
}

.pet-card .breed {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.pet-card .age-badge {
    background-color: var(--bg-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
}

.pet-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 1.25rem;
    margin-top: auto;
}

.pet-loc {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.adopt-btn {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.adopt-btn:hover {
    color: var(--text-dark);
}

.pet-card:hover {
    transform: translateY(-4px);
    border-color: rgba(45, 36, 31, 0.16);
}

/* Charity Section */
.charity-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: var(--space-gap-xl);
    align-items: center;
}

.charity-image img {
    border-radius: var(--radius-xl);
    width: 100%;
    height: clamp(280px, 45vw, 600px);
}

.charity-content h3 {
    font-size: var(--fs-h3);
    margin-bottom: clamp(1.5rem, 2.5vw, 2.5rem);
    letter-spacing: -0.02em;
}

.story-programs {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.program-item {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.program-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.program-title-row h4 {
    font-family: var(--font-body);
    font-size: 1.15rem;
    color: var(--text-dark);
}

.program-pct {
    color: var(--accent-primary);
    font-family: var(--font-heading);
    font-size: 1.2rem;
}

.progress-track {
    width: 100%;
    height: 4px;
    background-color: var(--bg-secondary);
    border-radius: 100px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--accent-primary);
    width: 0%;
    border-radius: 100px;
    transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.program-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Donation Plans Section */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, clamp(220px, 40vw, 280px)), 1fr));
    gap: var(--space-gap-md);
    align-items: stretch;
}

.plan-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: clamp(1.75rem, 3vw, 3rem) clamp(1.25rem, 2vw, 2rem);
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
    position: relative;
}

.plan-card.featured {
    transform: scale(1.03);
    background-color: var(--bg-secondary);
    border-color: var(--accent-primary);
}

.plan-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--accent-primary);
    letter-spacing: 0.05em;
}

.plan-name {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.plan-price {
    font-family: var(--font-heading);
    font-size: var(--fs-plan-price);
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
    line-height: 1;
}

.plan-price span {
    font-size: 1rem;
    font-family: var(--font-body);
    font-weight: 500;
    color: var(--text-muted);
}

.plan-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 3rem;
}

.plan-features li {
    font-size: 0.95rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.plan-features li::before {
    content: "✓";
    color: var(--success);
    font-weight: bold;
}

.plan-card .btn-outline {
    width: 100%;
    text-align: center;
    margin-top: auto;
    padding: 0.9rem;
}

.plan-card.featured .btn-fill {
    width: 100%;
    text-align: center;
    margin-top: auto;
    padding: 0.9rem;
}

.plan-card:hover:not(.featured) {
    border-color: var(--accent-primary);
}

/* Testimonials Section */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, clamp(260px, 30vw, 340px)), 1fr));
    gap: var(--space-gap-md);
}

.testimonial-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: clamp(1.75rem, 3vw, 3rem) clamp(1.5rem, 2.5vw, 2.5rem);
    display: flex;
    flex-direction: column;
    position: relative;
}

.quote-icon {
    font-family: var(--font-accent);
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 1;
    color: var(--accent-primary);
    opacity: 0.15;
    position: absolute;
    top: 1.5rem;
    left: 2rem;
}

.testimonial-msg {
    font-size: clamp(0.95rem, 0.5vw + 0.85rem, 1.1rem);
    color: var(--text-dark);
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 2;
}

.testimonial-user {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: auto;
}

.testimonial-user img {
    width: clamp(60px, 8vw, 90px);
    height: clamp(60px, 8vw, 90px);
    border-radius: 50%;
    object-fit: cover;
}

.user-info h4 {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
}

.user-info p {
    font-size: 0.85rem;
}

.stars {
    display: flex;
    gap: 2px;
    color: var(--accent-primary);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: var(--space-gap-xl);
}

.contact-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-info h3 {
    font-size: var(--fs-h3);
    margin-bottom: clamp(1rem, 1.5vw, 1.5rem);
}

.contact-methods {
    margin: clamp(1.5rem, 3vw, 3rem) 0;
    display: flex;
    flex-direction: column;
    gap: clamp(1.25rem, 2vw, 2rem);
}

.method-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.method-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.method-value {
    font-size: clamp(1rem, 1vw + 0.85rem, 1.3rem);
    font-family: var(--font-heading);
    color: var(--text-dark);
}

.social-row {
    display: flex;
    gap: clamp(0.75rem, 1.5vw, 1.5rem);
    flex-wrap: wrap;
}

.social-link {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
}

.social-link:hover {
    color: var(--accent-primary);
}

/* Premium Form Elements */
.contact-form {
    background-color: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: clamp(1.5rem, 4vw, 4rem);
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.form-control {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(45, 36, 31, 0.15);
    padding: 0.75rem 0;
    font-family: var(--font-body);
    font-size: 1.05rem;
    color: var(--text-dark);
    transition: var(--transition-smooth);
    width: 100%;
}

.form-control:focus {
    outline: none;
    border-bottom-color: var(--accent-primary);
}

textarea.form-control {
    height: 100px;
    resize: none;
}

.contact-form .btn-fill {
    align-self: flex-start;
    margin-top: 1rem;
    border: none;
}

/* Footer Section */
.footer {
    background-color: var(--text-dark);
    color: #EFE8DD;
    padding: var(--space-section) 0 clamp(1.5rem, 3vw, 3rem) 0;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, clamp(180px, 22vw, 240px)), 1fr));
    gap: clamp(2rem, 4vw, 4rem);
    margin-bottom: clamp(2.5rem, 5vw, 5rem);
}

.footer-brand h3 {
    font-size: clamp(1.5rem, 2vw + 1rem, 2rem);
    margin-bottom: 1.5rem;
    color: #ffffff;
}

.footer-brand p {
    color: #A35D44;
    max-width: min(260px, 100%);
}

.footer-col h4 {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.75rem;
    color: #ffffff;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-col ul a {
    color: #EFE8DD;
    opacity: 0.75;
    font-size: 0.95rem;
}

.footer-col ul a:hover {
    opacity: 1;
    color: var(--accent-secondary);
}

.newsletter-box {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.newsletter-box p {
    color: #EFE8DD;
    opacity: 0.75;
    font-size: 0.95rem;
}

.newsletter-form {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 0.5rem;
}

.newsletter-form input {
    background: transparent;
    border: none;
    color: #ffffff;
    font-family: var(--font-body);
    padding: 0.5rem 0;
    width: 100%;
}

.newsletter-form input:focus {
    outline: none;
}

.newsletter-form button {
    color: #ffffff;
    font-weight: 600;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: clamp(1.5rem, 2.5vw, 2.5rem);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: clamp(0.8rem, 0.5vw + 0.75rem, 0.9rem);
    opacity: 0.7;
}

.footer-meta-links {
    display: flex;
    gap: 2rem;
}

/* Success Toast */
.toast {
    position: fixed;
    bottom: clamp(1rem, 2vw, 2rem);
    right: clamp(1rem, 2vw, 2rem);
    max-width: min(420px, calc(100vw - 2rem));
    background-color: var(--text-dark);
    color: #ffffff;
    padding: clamp(0.75rem, 1.5vw, 1rem) clamp(1.25rem, 2vw, 2rem);
    border-radius: var(--radius-md);
    font-weight: 600;
    z-index: 10000;
    transform: translateY(150%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.toast.active {
    transform: translateY(0);
}

.toast-icon {
    color: var(--success);
}

/* Responsive Layout Breakpoints — structural only; sizing handled by clamp */
@media (max-width: 1200px) {
    .hero-grid,
    .about-grid,
    .charity-grid,
    .contact-grid {
        gap: var(--space-gap-lg);
    }
}

@media (max-width: 992px) {
    .header-nav > .nav-links {
        display: none;
    }

    .nav-actions .btn-fill {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: clamp(2.5rem, 6vw, 5rem);
    }

    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }

    .btn-group {
        justify-content: center;
    }

    .hero-visual {
        max-width: min(500px, 100%);
        margin: 0 auto;
    }

    .about-grid,
    .charity-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--space-gap-lg);
    }

    .pets-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pet-card,
    .pet-card.wide,
    .pet-card.narrow {
        grid-column: span 1;
    }

    .plan-card.featured {
        transform: none;
    }
}

@media (max-width: 640px) {
    .pets-grid {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        height: clamp(280px, 75vw, 400px);
        overflow: hidden;
    }

    .float-card {
        width: clamp(95px, 26vw, 140px) !important;
    }

    .float-card img {
        height: clamp(70px, 18vw, 110px);
    }

    .pet-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .footer-meta-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .contact-form .btn-fill {
        width: 100%;
        text-align: center;
        align-self: stretch;
    }

    .btn-group {
        flex-direction: column;
        width: 100%;
    }

    .btn-group .btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 400px) {
    .hero {
        min-height: auto;
    }

    .filter-btn {
        flex: 1 1 auto;
        text-align: center;
    }
}

@media (orientation: landscape) and (max-height: 600px) {
    .hero {
        min-height: auto;
        padding-top: clamp(4rem, 8vw, 6rem);
        padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
    }

    .subpage-hero {
        padding-top: clamp(5rem, 8vw, 7rem);
    }
}

/* ==========================================
   Subpage Styling Architecture
   ========================================== */
.subpage-hero {
    padding: clamp(7rem, 12vw + 2rem, 12rem) 0 var(--space-section) 0;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.subpage-hero .subpage-label {
    font-size: clamp(0.75rem, 0.5vw + 0.65rem, 0.85rem);
    text-transform: uppercase;
    font-weight: 700;
    color: var(--accent-primary);
    letter-spacing: 0.1em;
    display: inline-block;
    margin-bottom: 1rem;
}

.subpage-hero h1 {
    font-size: var(--fs-subpage);
    color: var(--text-dark);
    margin-bottom: clamp(1rem, 1.5vw, 1.5rem);
}

.subpage-hero p {
    font-size: clamp(1rem, 0.5vw + 0.9rem, 1.2rem);
    max-width: min(700px, 100%);
    margin: 0 auto;
    color: var(--text-muted);
    line-height: 1.6;
    padding: 0 var(--space-container);
}

.article-section {
    padding: var(--space-section) 0;
    background-color: var(--bg-primary);
}

.article-grid {
    display: grid;
    grid-template-columns: 0.8fr 2.2fr;
    gap: clamp(2rem, 5vw, 5rem);
    align-items: start;
}

/* Sticky Left Sidebar Navigation */
.article-sidebar {
    position: sticky;
    top: clamp(5rem, 8vw, 8rem);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: clamp(1.25rem, 2vw, 2rem);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.article-sidebar h4 {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sidebar-menu a {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 600;
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid transparent;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    color: var(--accent-primary);
}

/* Main Article Content Styles */
.article-content {
    display: flex;
    flex-direction: column;
    gap: clamp(2rem, 4vw, 3.5rem);
}

.article-block {
    scroll-margin-top: clamp(5rem, 8vw, 8rem);
}

.article-block h2 {
    font-size: clamp(1.35rem, 1.5vw + 1rem, 2.2rem);
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.article-block h3 {
    font-size: clamp(1.15rem, 1vw + 0.95rem, 1.5rem);
    color: var(--text-dark);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-block p {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.article-block ul,
.article-block ol {
    list-style: none;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.article-block ul li {
    position: relative;
    padding-left: 1.75rem;
    font-size: 1.05rem;
    color: var(--text-muted);
}

.article-block ul li::before {
    content: "•";
    position: absolute;
    left: 0.5rem;
    color: var(--accent-primary);
    font-weight: bold;
    font-size: 1.2rem;
}

.article-block ol {
    counter-reset: article-counter;
}

.article-block ol li {
    position: relative;
    padding-left: 2rem;
    font-size: 1.05rem;
    color: var(--text-muted);
    counter-increment: article-counter;
}

.article-block ol li::before {
    content: counter(article-counter) ".";
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-weight: 700;
}

.callout-box {
    background-color: var(--bg-secondary);
    border-left: 4px solid var(--accent-primary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: clamp(1rem, 2vw, 1.5rem) clamp(1.25rem, 2vw, 2rem);
    margin: clamp(1rem, 2vw, 2rem) 0;
}

.callout-box p {
    margin: 0;
    font-style: italic;
    color: var(--text-dark);
}

@media (max-width: 992px) {
    .article-grid {
        grid-template-columns: 1fr;
        gap: var(--space-gap-lg);
    }

    .article-sidebar {
        position: relative;
        top: 0;
    }
}

/* ==========================================
   Plan Checkout Pages (friend, guardian, hero, legacy)
   ========================================== */
.plan-checkout-wrapper {
    padding: clamp(6rem, 10vw + 2rem, 12rem) 0 clamp(3rem, 6vw, 8rem) 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: var(--space-gap-xl);
    align-items: start;
}

.plan-summary-sticky {
    position: sticky;
    top: clamp(6rem, 10vw, 12rem);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: clamp(1.5rem, 3vw, 3.5rem);
}

.premium-tag {
    display: inline-block;
    font-size: clamp(0.7rem, 0.5vw + 0.6rem, 0.75rem);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 700;
    color: #706f6c;
    margin-bottom: clamp(1rem, 1.5vw, 1.5rem);
}

.premium-tag.tag-hero {
    color: #b8860b;
}

.premium-tag.tag-legacy {
    color: #1a1a1a;
}

.checkout-plan-name {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 3vw + 1rem, 3rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: clamp(0.75rem, 1vw, 1rem);
}

.checkout-plan-price {
    font-family: var(--font-accent);
    font-size: clamp(2.25rem, 4vw + 1rem, 4rem);
    font-style: italic;
    line-height: 1;
    margin-bottom: clamp(1.5rem, 2.5vw, 2.5rem);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: clamp(1.25rem, 2vw, 2rem);
}

.checkout-plan-price span {
    font-family: var(--font-body);
    font-size: clamp(0.95rem, 0.5vw + 0.85rem, 1.1rem);
    font-style: normal;
    letter-spacing: 0;
    color: var(--text-muted);
}

.checkout-features {
    list-style: none;
    padding: 0;
    margin: 0 0 clamp(1.5rem, 3vw, 3rem) 0;
    display: flex;
    flex-direction: column;
    gap: clamp(0.85rem, 1.2vw, 1.2rem);
}

.checkout-features li {
    display: flex;
    align-items: center;
    gap: clamp(0.5rem, 1vw, 1rem);
    font-size: clamp(0.95rem, 0.5vw + 0.85rem, 1.05rem);
}

.checkout-features li::before {
    content: "✓";
    font-weight: 900;
    color: var(--text-dark);
    flex-shrink: 0;
}

.success-state-container {
    display: none;
    text-align: center;
    padding: clamp(2rem, 4vw, 4rem) clamp(1rem, 3vw, 2rem);
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.success-icon {
    width: clamp(60px, 10vw, 80px);
    height: clamp(60px, 10vw, 80px);
    background: var(--text-dark);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.25rem, 2vw, 2rem);
    margin: 0 auto clamp(1.5rem, 2.5vw, 2.5rem) auto;
}

.success-state-container h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 2.5vw + 1rem, 2.5rem);
    font-weight: 800;
    margin-bottom: clamp(1rem, 1.5vw, 1.5rem);
}

.success-state-container p {
    font-size: clamp(1rem, 0.5vw + 0.9rem, 1.15rem);
    max-width: min(500px, 100%);
    margin: 0 auto clamp(1.5rem, 3vw, 3rem) auto;
    color: var(--text-muted);
    line-height: 1.6;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 992px) {
    .checkout-grid {
        grid-template-columns: 1fr;
        gap: var(--space-gap-lg);
    }

    .plan-summary-sticky {
        position: relative;
        top: 0;
    }
}

.checkout-form-heading {
    font-family: var(--font-heading);
    font-size: clamp(1.25rem, 1.5vw + 1rem, 1.8rem);
    font-weight: 700;
    margin-bottom: clamp(1rem, 2vw, 2rem);
}

.checkout-form-note {
    font-size: clamp(0.8rem, 0.5vw + 0.75rem, 0.9rem);
    color: var(--text-muted);
    line-height: 1.5;
}

.checkout-form-panel {
    background: transparent;
    padding: 0;
}

.checkout-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: clamp(1rem, 2vw, 2rem);
}

.btn-block {
    width: 100%;
    margin-top: 1rem;
    text-align: center;
    justify-content: center;
}

.btn-inline {
    display: inline-flex;
}