/* ==========================================================================
   KIT KAT ALLEY RESCUE - CORE STYLESHEET
   Design Tokens, Layout, Component Systems & Responsive Utilities
   ========================================================================== */

:root {
    /* Color Palette - Warm Rust & Deep Teal on Warm Cream */
    --primary: #C85A32;
    --primary-hover: #AF4A25;
    --primary-light: #FBF0EC;
    
    --secondary: #1F6E73;
    --secondary-hover: #175458;
    --secondary-light: #E8F3F4;

    --accent-gold: #D97706;
    --accent-gold-light: #FEF3C7;

    --bg-cream: #FAF7F2;
    --surface-white: #FFFFFF;
    --surface-card: #FFFFFF;

    --text-dark: #222B2E;
    --text-muted: #5C686C;
    --text-light: #7E8C90;

    --border-color: #E6E0D6;
    --border-focus: #C85A32;

    --shadow-sm: 0 2px 4px rgba(34, 43, 46, 0.05);
    --shadow-md: 0 4px 12px rgba(34, 43, 46, 0.08);
    --shadow-lg: 0 12px 28px rgba(34, 43, 46, 0.12);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-cream);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-hover);
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.25;
    color: var(--text-dark);
    font-weight: 700;
}

h1 { font-size: clamp(2.2rem, 4.5vw, 3.25rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }

p {
    margin-bottom: 1rem;
}
p:last-child {
    margin-bottom: 0;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-narrow {
    max-width: 850px;
}

/* ==========================================================================
   HEADER & NAVBAR
   ========================================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--surface-white);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-dark);
}

.brand-logo img {
    height: 54px;
    width: auto;
}

.brand-title {
    display: flex;
    flex-direction: column;
}

.brand-title .main-name {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--secondary);
    line-height: 1.1;
}

.brand-title .sub-name {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    list-style: none;
}

.nav-link {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-dark);
    padding: 0.5rem 0;
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary);
    border-radius: 2px;
}

.nav-cta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Mobile Nav Drawer Toggle */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-dark);
}

.mobile-toggle svg {
    width: 28px;
    height: 28px;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--surface-white);
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    color: var(--surface-white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--secondary);
    color: var(--surface-white);
}
.btn-secondary:hover {
    background-color: var(--secondary-hover);
    color: var(--surface-white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--primary);
    color: var(--primary);
}
.btn-outline:hover {
    background-color: var(--primary);
    color: var(--surface-white);
}

.btn-outline-secondary {
    background-color: transparent;
    border-color: var(--secondary);
    color: var(--secondary);
}
.btn-outline-secondary:hover {
    background-color: var(--secondary);
    color: var(--surface-white);
}

.btn-donate-nav {
    background-color: var(--primary);
    color: var(--surface-white);
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    box-shadow: 0 2px 6px rgba(200, 90, 50, 0.3);
}
.btn-donate-nav:hover {
    background-color: var(--primary-hover);
    color: var(--surface-white);
    box-shadow: 0 4px 12px rgba(200, 90, 50, 0.4);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.hero-section {
    position: relative;
    background-color: #1A2426;
    color: var(--surface-white);
    padding: 5rem 0;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.35;
    filter: brightness(0.8);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.4rem 1.2rem;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    margin-bottom: 1.25rem;
    color: #FDE68A;
}

.hero-title {
    color: var(--surface-white);
    margin-bottom: 1.25rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.hero-subtitle {
    font-size: 1.2rem;
    line-height: 1.7;
    margin-bottom: 2.25rem;
    color: rgba(255, 255, 255, 0.92);
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ==========================================================================
   4 EQUAL PATH TILES
   ========================================================================== */

.path-tiles-section {
    padding: 3.5rem 0;
    background-color: var(--surface-white);
    border-bottom: 1px solid var(--border-color);
}

.path-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.path-tile {
    background-color: var(--bg-cream);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.path-tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.path-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    background-color: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.path-icon svg {
    width: 28px;
    height: 28px;
}

.path-tile h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.path-tile p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

/* ==========================================================================
   GIVING BAND / QUICK DONATION
   ========================================================================== */

.giving-band {
    background-color: var(--secondary);
    color: var(--surface-white);
    padding: 3.5rem 0;
}

.giving-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2.5rem;
}

.giving-info h2 {
    color: var(--surface-white);
    margin-bottom: 0.75rem;
}

.giving-info p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.05rem;
}

.giving-widget {
    background-color: var(--surface-white);
    color: var(--text-dark);
    padding: 1.75rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    min-width: 380px;
}

.giving-presets {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.giving-preset-btn {
    flex: 1;
    padding: 0.75rem 0.5rem;
    border: 2px solid var(--border-color);
    background: transparent;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-dark);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.giving-preset-btn.active, .giving-preset-btn:hover {
    border-color: var(--primary);
    background-color: var(--primary-light);
    color: var(--primary);
}

.giving-options {
    display: flex;
    justify-content: space-around;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
    color: var(--text-muted);
}

/* ==========================================================================
   CARDS & GRIDS
   ========================================================================== */

.section-padding {
    padding: 4.5rem 0;
}

.section-header {
    text-align: center;
    max-width: 750px;
    margin: 0 auto 3rem;
}

.section-header h2 {
    margin-bottom: 0.75rem;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.pet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.pet-card {
    background-color: var(--surface-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
}

.pet-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.pet-card-image {
    position: relative;
    height: 260px;
    overflow: hidden;
    background-color: #E2E8F0;
}

.pet-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.pet-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-cat {
    background-color: var(--secondary-light);
    color: var(--secondary);
    border: 1px solid rgba(31, 110, 115, 0.2);
}

.badge-dog {
    background-color: var(--primary-light);
    color: var(--primary);
    border: 1px solid rgba(200, 90, 50, 0.2);
}

.badge-todo {
    background-color: #FEF3C7;
    color: #92400E;
    border: 1px solid #FCD34D;
}

.pet-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.pet-card-body h3 {
    margin-bottom: 0.25rem;
    font-size: 1.4rem;
}

.pet-card-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.pet-card-story {
    font-size: 0.95rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* ==========================================================================
   FILTER BAR
   ========================================================================== */

.filter-bar {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background-color: var(--surface-white);
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-btn.active, .filter-btn:hover {
    background-color: var(--secondary);
    color: var(--surface-white);
    border-color: var(--secondary);
}

/* ==========================================================================
   FORMS & INPUTS
   ========================================================================== */

.form-card {
    background-color: var(--surface-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

label {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.required-star {
    color: var(--primary);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-dark);
    background-color: var(--bg-cream);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--border-focus);
    background-color: var(--surface-white);
    box-shadow: 0 0 0 3px rgba(200, 90, 50, 0.15);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.checkbox-group, .radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-top: 0.5rem;
}

.checkbox-label, .radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 400;
    cursor: pointer;
}

.checkbox-label input, .radio-label input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.form-success-banner {
    display: none;
    background-color: #D1FAE5;
    border: 1px solid #10B981;
    color: #065F46;
    padding: 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.form-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

/* ==========================================================================
   TRUST STRIP & FOOTER
   ========================================================================== */

.trust-banner {
    background-color: #EEFAF8;
    border-top: 1px solid #C4ECE8;
    border-bottom: 1px solid #C4ECE8;
    padding: 1.5rem 0;
    font-size: 0.95rem;
    color: var(--secondary-hover);
    text-align: center;
}

.site-footer {
    background-color: #172023;
    color: rgba(255, 255, 255, 0.85);
    padding: 4rem 0 2rem;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.footer-brand h3 {
    color: var(--surface-white);
    margin-bottom: 0.75rem;
    font-size: 1.3rem;
}

.footer-brand p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.25rem;
}

.footer-column h4 {
    color: var(--surface-white);
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-column h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--primary);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.6rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--surface-white);
}

.footer-contact-info p {
    font-size: 0.9rem;
    margin-bottom: 0.6rem;
    color: rgba(255, 255, 255, 0.75);
}

.footer-contact-info a {
    color: #81E6D9;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-trust-line {
    max-width: 900px;
    margin: 0 auto 1rem;
    line-height: 1.5;
}

/* ==========================================================================
   RESPONSIVE LAYOUT (MOBILE FIRST ENHANCEMENTS)
   ========================================================================== */

@media (max-width: 992px) {
    .path-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .giving-container {
        flex-direction: column;
        text-align: center;
    }
    .giving-widget {
        width: 100%;
        min-width: unset;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--surface-white);
        flex-direction: column;
        padding: 2.5rem 1.5rem;
        gap: 1.5rem;
        transition: left var(--transition-normal);
        box-shadow: var(--shadow-lg);
        align-items: flex-start;
        overflow-y: auto;
    }
    .nav-menu.active {
        left: 0;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .path-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* MOBILE OPTIMIZATION */
html, body { overflow-x: hidden; }
img, video, iframe { max-width: 100%; }

@media (max-width: 992px) {
  .navbar { height: 72px; }
  .brand-logo img { height: 44px; }
  .brand-title .main-name { font-size: 1rem; }
  .brand-title .sub-name { display: none; }
  .pet-grid { grid-template-columns: 1fr; }
  .giving-options { flex-wrap: wrap; gap: 0.5rem 1rem; }
}

@media (max-width: 768px) {
  .container { padding: 0 1rem; }
  .site-header { padding-top: env(safe-area-inset-top); }
  .navbar { height: 64px; gap: 0.5rem; }
  .nav-menu { top: 64px; height: calc(100dvh - 64px); z-index: 1001; padding: 1.25rem 1rem 2rem; }
  .nav-link { font-size: 1.15rem; padding: 0.85rem 0; width: 100%; border-bottom: 1px solid var(--border-color); }
  .btn-donate-nav { padding: 0.55rem 0.9rem; font-size: 0.9rem; }
  .hero-section { padding: 3rem 0 2.5rem; }
  .hero-badge { font-size: 0.78rem; padding: 0.35rem 0.8rem; max-width: 100%; }
  .hero-subtitle { font-size: 1.02rem; margin-bottom: 1.5rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn, .pet-card .btn, .form-card .btn { width: 100%; white-space: normal; }
  .section-padding { padding: 2.5rem 0; }
  .section-header { margin-bottom: 1.5rem; }
  .path-tiles-section { padding: 2rem 0; }
  .path-tile { padding: 1.25rem 1rem; }
  .path-tile:hover, .pet-card:hover { transform: none; }
  .giving-band { padding: 2rem 0; }
  .giving-widget { padding: 1.1rem; }
  .giving-presets { gap: 0.4rem; }
  .form-card { padding: 1.15rem; }
  input[type="text"], input[type="email"], input[type="tel"], input[type="number"], select, textarea { font-size: 16px; padding: 0.85rem 0.9rem; }
  .pet-card-image { height: 220px; }
  .pet-card-body { padding: 1.1rem; }
  .filter-bar { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; }
  .filter-btn { flex: 0 0 auto; }
  main [style*="grid-template-columns: 1fr 1fr"],
  main [style*="grid-template-columns: repeat(3"],
  main [style*="grid-template-columns: repeat(2"] { grid-template-columns: 1fr !important; }
  main [style*="height: 420px"] { height: 240px !important; }
}

@media (max-width: 380px) {
  .brand-title .main-name { font-size: 0.92rem; }
  .btn-donate-nav { padding: 0.5rem 0.7rem; }
}

