/* Base and Resets */
:root {
    --gold: hsl(45, 95%, 55%);
    --gold-dark: hsl(45, 95%, 40%);
    --gold-hover: hsl(45, 95%, 48%);
    --bg-base: #0f0c29; /* Deep, colorful purple/blue base instead of flat dark grey */
    --bg-surface: rgba(255, 255, 255, 0.03); /* Glassy surface instead of solid color */
    --bg-glass: rgba(15, 12, 41, 0.82);
    --text-main: #f5f5f5;
    --text-muted: #a0a0a0;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Neon Colors for text accents */
    --neon-cyan: #00ffff;
    --neon-magenta: #ff00ff;
    
    /* Spacing & Layout */
    --container-max: 1200px;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px; /* Smooth transition between sections avoiding navbar overlap */
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e); /* Vibrant multi-color dark background */
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    
    /* Subtle hexagon pattern overlay */
    background-image: 
        radial-gradient(var(--gold) 1px, transparent 1px),
        radial-gradient(var(--gold) 1px, transparent 1px);
    background-size: 80px 80px;
    background-position: 0 0, 40px 40px;
    background-attachment: fixed;

    /* Smooth page load */
    animation: pageLoadFade 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes pageLoadFade {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* Dim the background pattern slightly less to reduce darkness */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-base);
    opacity: 0.92; /* Dimmed the lights down */
    z-index: -3; /* Keeps it behind backlight */
}

/* Intense Ambient Backlights */
.ambient-backlight {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
    overflow: hidden;
}

.ambient-backlight::before, .ambient-backlight::after, .ambient-backlight .orb3 {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.35; /* Dimmed the lights down */
    animation: float 20s infinite alternate ease-in-out;
}

.ambient-backlight::before {
    top: -10%;
    left: -10%;
    width: 70vw;
    height: 70vw;
    background: radial-gradient(circle, rgba(255, 0, 255, 0.7), transparent 60%);
}

.ambient-backlight::after {
    bottom: -10%;
    right: -10%;
    width: 80vw;
    height: 80vw;
    background: radial-gradient(circle, rgba(0, 255, 255, 0.7), transparent 60%);
    animation-delay: -10s;
    animation-direction: alternate-reverse;
}

.ambient-backlight .orb3 {
    top: 20%;
    left: 20%;
    width: 70vw;
    height: 70vw;
    background: radial-gradient(circle, rgba(255, 193, 7, 0.6), transparent 60%); /* Gold/Yellow backlight */
    animation-delay: -5s;
    animation-duration: 25s;
}

h1, h2, h3, h4, .logo {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-main);
}

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

ul {
    list-style: none;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 2rem;
}

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

/* Photos fill their frame. No clip-path corners. */
.hex-photo {
    clip-path: none;
    aspect-ratio: 4 / 5;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    transition: var(--transition-smooth);
    cursor: pointer;
    border: 2px solid transparent;
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background-color: var(--gold);
    color: #000;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.2);
}

.btn-primary:hover {
    background-color: var(--gold-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: var(--gold);
    border-color: var(--gold);
}

.btn-secondary:hover {
    background-color: var(--gold);
    color: #000;
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--gold);
    border-color: var(--text-muted);
}

.btn-outline:hover {
    border-color: var(--gold);
    background-color: rgba(255, 193, 7, 0.1);
}

.full-width {
    width: 100%;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: var(--transition-smooth);
}

.navbar.scrolled {
    background: var(--bg-glass);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 193, 7, 0.1);
}

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 3rem;
}

.nav-links a {
    color: var(--text-main);
    font-weight: 500;
    font-size: 1rem;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--gold);
    transition: var(--transition-smooth);
}

.nav-links a:hover::after {
    width: 100%;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.mobile-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--gold);
    margin: 5px 0;
    transition: var(--transition-smooth);
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    color: #fff;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    z-index: 1;
    overflow: hidden;
    will-change: transform;
}

.hero-bg-inner {
    width: 100%;
    height: 100%;
    background-image: url('assets/img/hero.jpeg');
    background-size: 140% 140%;
    background-repeat: no-repeat;
    animation: cineHero 16s linear infinite alternate;
}

@keyframes cineHero {
    0% { background-position: 0% 30%; }
    100% { background-position: 100% 70%; }
}

@keyframes cineA {
    0% { object-position: 8% 15%; }
    100% { object-position: 92% 80%; }
}

@keyframes cineB {
    0% { object-position: 90% 75%; }
    100% { object-position: 10% 20%; }
}

@keyframes cineC {
    0% { object-position: 50% 5%; }
    100% { object-position: 30% 95%; }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(8, 6, 18, 0.55) 0%, rgba(8, 6, 18, 0.18) 42%, rgba(8, 6, 18, 0.08) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: var(--container-max);
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    border: 1px solid var(--gold);
    color: var(--gold);
    border-radius: 50px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
    background: rgba(255, 193, 7, 0.05);
}

.hero h1 {
    font-size: clamp(3.5rem, 6vw, 5.5rem);
    font-weight: 600;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    color: #fff;
    text-shadow: 0 2px 28px rgba(0, 0, 0, 0.45);
    max-width: 640px;
}

.hero h1 span {
    color: var(--gold);
    font-style: italic;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    font-weight: 300;
    max-width: 600px;
    color: #efe8dc;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
}

/* Section Common */
section {
    padding: 8rem 0;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.section-title span {
    color: var(--gold);
    font-style: italic;
}

.lead-text {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    max-width: 600px;
}

/* About Section */
.about-section {
    position: relative;
    background: transparent;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.about-image-wrapper {
    position: relative;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    min-height: 0;
}

.photo-frame {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.photo-frame-tall {
    height: 400px;
}

.photo-frame-wide {
    height: 240px;
}

.about-img {
    filter: none;
    box-shadow: none;
    aspect-ratio: auto;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.main-img {
    width: 100%;
    height: 100%;
    border: 0;
}

.secondary-img {
    position: static;
    width: 100%;
    height: 100%;
    border: 0;
}

.cine-photo {
    object-fit: cover;
}

.cine-a {
    animation: cineA 11s linear infinite alternate;
}

.cine-b {
    animation: cineB 13s linear infinite alternate;
}

.poem-embed {
    display: flex;
    flex-direction: column;
    gap: 1.35rem;
    max-width: 600px;
}

.poem-stanza {
    display: flex;
    flex-direction: column;
    margin: 0;
}

.poem-stanza span {
    display: block;
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 1.15rem;
    line-height: 1.65;
    color: var(--text-muted);
    text-align: left;
}

/* Adopt Section */
.adopt-section {
    position: relative;
    background: transparent;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.filters {
    display: flex;
    gap: 1rem;
    margin-top: 2.5rem;
    background: var(--bg-surface);
    border: 1px solid rgba(255, 193, 7, 0.1);
    padding: 0.5rem;
    border-radius: 50px;
}

.filter-btn {
    padding: 0.75rem 2rem;
    border: none;
    background: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

.filter-btn:hover {
    color: var(--gold);
}

.filter-btn.active {
    background-color: var(--gold);
    color: #000;
}

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

.pet-card {
    background: var(--bg-surface);
    border-radius: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    transition: var(--transition-smooth);
    padding: 0;
    text-align: left;
}

.pet-card:hover {
    transform: none;
    border-color: rgba(255, 193, 7, 0.35);
    box-shadow: none;
}

.pet-img-container {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    margin: 0;
}

.pet-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: cineC 10s linear infinite alternate;
}

.pet-card:nth-child(even) .pet-img {
    animation-name: cineB;
    animation-duration: 12s;
}

.pet-card:nth-child(3n) .pet-img {
    animation-name: cineA;
    animation-duration: 9s;
}

.pet-card:nth-child(1) .pet-img { animation-delay: -2s; }
.pet-card:nth-child(2) .pet-img { animation-delay: -5s; }
.pet-card:nth-child(3) .pet-img { animation-delay: -3s; }
.pet-card:nth-child(4) .pet-img { animation-delay: -7s; }
.pet-card:nth-child(5) .pet-img { animation-delay: -1s; }
.pet-card:nth-child(6) .pet-img { animation-delay: -8s; }

.pet-tag {
    position: absolute;
    bottom: 12px;
    left: 12px;
    transform: none;
    padding: 0.3rem 0.7rem;
    background-color: var(--gold);
    color: #000;
    border-radius: 0;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 2;
    box-shadow: none;
}

.pet-info {
    padding: 1.25rem 1.25rem 1.5rem;
}

.pet-info h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.pet-meta {
    font-size: 0.85rem;
    color: var(--gold);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.pet-desc {
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
    padding: 0;
}

/* Footer */
.footer {
    background: hsl(0, 0%, 5%);
    border-top: 1px solid rgba(255, 193, 7, 0.1);
    color: #fff;
    padding: 6rem 0 2rem;
}

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

.footer-brand .logo {
    display: inline-block;
    margin-bottom: 1.5rem;
}

.footer-brand p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 350px;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.05);
    color: var(--text-muted);
    border: 1px solid rgba(255,255,255,0.1);
}

.social-links a:hover {
    background-color: var(--gold);
    color: #000;
    border-color: var(--gold);
    transform: translateY(-3px);
}

.footer h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    font-family: var(--font-body);
    color: var(--text-main);
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-links a {
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--gold);
    padding-left: 5px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255,255,255,0.1);
    background-color: rgba(0,0,0,0.3);
    color: #fff;
    font-family: var(--font-body);
    transition: var(--transition-smooth);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--gold);
    background-color: rgba(0,0,0,0.5);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Reveal Animations: stay visible so sections are never blank */
.reveal {
    opacity: 1;
    transform: none;
}

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

/* Responsive */
@media (max-width: 992px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 4rem;
    }
    
    .about-image-wrapper {
        max-width: 600px;
        margin: 0 auto;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .hero-content {
        padding: 0 2rem;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(15, 12, 41, 0.97);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: var(--transition-smooth);
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links a {
        color: var(--text-main);
        font-size: 1.5rem;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .mobile-toggle.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    
    .mobile-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-toggle.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .filters {
        flex-wrap: wrap;
        justify-content: center;
    }
}

.float-paw {
    position: fixed;
    pointer-events: none;
    z-index: 8;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    mix-blend-mode: normal;
    display: block;
    object-fit: contain;
}

@media (prefers-reduced-motion: reduce) {
    .hero-bg-inner {
        animation: none;
        background-position: 50% 40%;
        background-size: cover;
    }

    .cine-photo,
    .pet-img {
        animation: none;
        object-position: 50% 40%;
    }

    .hero-bg {
        transform: none !important;
    }
}
