/* Waypoint Dogs – Main Stylesheet */
/* Google Fonts loaded here so Tailwind config can reference them */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400;1,700&family=DM+Sans:wght@300;400;500;600&family=DM+Mono:wght@400;500&display=swap');

/* ─── Reset & Base ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'DM Sans', system-ui, sans-serif;
    background-color: #FDF6EC;
    color: #2C1A0E;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* ─── Paw-print texture overlay ────────────────── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%238B5E3C' fill-opacity='0.03'%3E%3Ccircle cx='20' cy='20' r='4'/%3E%3Ccircle cx='30' cy='15' r='2.5'/%3E%3Ccircle cx='12' cy='14' r='2.5'/%3E%3Cellipse cx='20' cy='30' rx='7' ry='8'/%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

/* ─── Header ────────────────────────────────────── */
.site-header {
    background: linear-gradient(135deg, #7c2d12 0%, #9a3412 40%, #c2410c 100%);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(124,45,18,0.35);
}

.site-header__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: .75rem;
    text-decoration: none;
    color: #FDF6EC;
}

.site-logo__icon {
    font-size: 2rem;
    line-height: 1;
}

.site-logo__text {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: 1.5rem;
    letter-spacing: -.02em;
    color: #FDF6EC;
}

.site-logo__sub {
    font-size: .7rem;
    font-weight: 400;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #fed7aa;
    display: block;
    line-height: 1;
    margin-top: .1rem;
}

/* Nav */
.primary-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 2rem;
}

.primary-nav a {
    color: #fed7aa;
    text-decoration: none;
    font-weight: 500;
    font-size: .95rem;
    letter-spacing: .03em;
    transition: color .2s;
    position: relative;
}

.primary-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #fdba74;
    transition: width .25s ease;
}

.primary-nav a:hover,
.primary-nav .current-menu-item a {
    color: #fff7ed;
}

.primary-nav a:hover::after,
.primary-nav .current-menu-item a::after {
    width: 100%;
}

/* ─── Main Wrapper ───────────────────────────────── */
.site-main {
    position: relative;
    z-index: 1;
    min-height: calc(100vh - 80px);
}

/* ─── Page Hero ─────────────────────────────────── */
.page-hero {
    background: linear-gradient(160deg, #fff7ed 0%, #ffedd5 60%, #fed7aa 100%);
    padding: 5rem 2rem 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 3px solid #fdba74;
}

.page-hero::after {
    content: '🐾';
    position: absolute;
    font-size: 18rem;
    opacity: .04;
    top: -2rem;
    right: -2rem;
    pointer-events: none;
    line-height: 1;
}

.page-hero__eyebrow {
    font-family: 'DM Mono', monospace;
    font-size: .8rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: #ea580c;
    margin-bottom: .75rem;
    display: block;
}

.page-hero__title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    line-height: 1.05;
    color: #7c2d12;
    margin: 0 0 1rem;
}

.page-hero__title em {
    font-style: italic;
    color: #c2410c;
}

.page-hero__desc {
    font-size: 1.1rem;
    color: #92400e;
    max-width: 560px;
    margin: 0 auto;
    font-weight: 300;
}

/* ─── Section wrappers ──────────────────────────── */
.section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 900;
    color: #7c2d12;
    margin: 0 0 .5rem;
}

.section-title span {
    color: #ea580c;
}

.section-subtitle {
    color: #92400e;
    font-size: 1rem;
    font-weight: 300;
    margin: 0 0 3rem;
}

/* ─── Birthday Section ──────────────────────────── */
.birthday-section {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    padding: 5rem 2rem;
    border-top: 4px solid #fb923c;
    border-bottom: 4px solid #fb923c;
}

.birthday-section__inner {
    max-width: 1280px;
    margin: 0 auto;
}

.birthday-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.birthday-header__month {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: #ea580c;
    color: #fff;
    font-family: 'DM Mono', monospace;
    font-size: .8rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: .4rem 1.2rem;
    border-radius: 100px;
    margin-bottom: 1rem;
}

/* Birthday Dog Card */
.birthday-card {
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(124,45,18,.12), 0 2px 8px rgba(124,45,18,.06);
    transition: transform .3s ease, box-shadow .3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.birthday-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(124,45,18,.18);
}

.birthday-card__ribbon {
    position: absolute;
    top: 16px;
    right: -8px;
    background: linear-gradient(135deg, #ea580c, #c2410c);
    color: #fff;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .06em;
    padding: .35rem .85rem .35rem .65rem;
    border-radius: 4px 0 0 4px;
    box-shadow: -2px 2px 8px rgba(0,0,0,.2);
    z-index: 2;
}

.birthday-card__ribbon::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 0;
    border-left: 8px solid #9a3412;
    border-bottom: 8px solid transparent;
}

.birthday-card__photo {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: linear-gradient(135deg, #ffedd5, #fed7aa);
    position: relative;
}

.birthday-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.birthday-card:hover .birthday-card__photo img {
    transform: scale(1.06);
}

.birthday-card__body {
    padding: 1.5rem;
    flex: 1;
}

.birthday-card__name {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #7c2d12;
    margin: 0 0 1rem;
}

.birthday-card__info-row {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    margin-bottom: .65rem;
    font-size: .9rem;
    color: #78350f;
}

.birthday-card__info-icon {
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: .05rem;
}

.allergy-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    font-size: .75rem;
    font-weight: 600;
    padding: .25rem .65rem;
    border-radius: 100px;
    margin-top: .5rem;
}

.no-birthday-message {
    text-align: center;
    padding: 4rem 2rem;
    color: #92400e;
}

.no-birthday-message__emoji {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
}

/* ─── All Dogs Page ─────────────────────────────── */

/* Featured (oldest) dog */
.featured-dog {
    background: linear-gradient(135deg, #7c2d12 0%, #9a3412 50%, #c2410c 100%);
    border-radius: 32px;
    padding: 2.5rem;
    margin-bottom: 4rem;
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 3rem;
    align-items: center;
    box-shadow: 0 24px 80px rgba(124,45,18,.35);
    position: relative;
    overflow: hidden;
    color: #fff;
}

.featured-dog::before {
    content: '👑';
    position: absolute;
    top: -1.5rem;
    right: -1.5rem;
    font-size: 12rem;
    opacity: .07;
    pointer-events: none;
    line-height: 1;
}

.featured-dog__badge {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    background: #fb923c;
    color: #fff;
    font-family: 'DM Mono', monospace;
    font-size: .7rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: .4rem 1rem;
    border-radius: 100px;
    font-weight: 500;
}

.featured-dog__photo {
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 1;
    box-shadow: 0 12px 40px rgba(0,0,0,.3);
    border: 4px solid rgba(255,255,255,.15);
}

.featured-dog__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-dog__content {
    padding-top: 2.5rem;
}

.featured-dog__name {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 900;
    color: #fff;
    margin: 0 0 .25rem;
    line-height: 1.05;
}

.featured-dog__age {
    font-family: 'DM Mono', monospace;
    font-size: .85rem;
    color: #fdba74;
    letter-spacing: .08em;
    margin-bottom: 1.5rem;
    display: block;
}

.featured-dog__meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

.featured-dog__meta-item {
    background: rgba(255,255,255,.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 12px;
    padding: .85rem 1.1rem;
}

.featured-dog__meta-label {
    font-size: .68rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #fdba74;
    font-family: 'DM Mono', monospace;
    margin-bottom: .3rem;
    display: block;
}

.featured-dog__meta-value {
    font-size: .95rem;
    color: #fff;
    font-weight: 500;
}

.featured-dog__allergy {
    background: rgba(220,38,38,.25);
    border: 1px solid rgba(220,38,38,.4);
    border-radius: 12px;
    padding: .85rem 1.1rem;
}

.featured-dog__allergy .featured-dog__meta-label {
    color: #fca5a5;
}

.featured-dog__allergy .featured-dog__meta-value {
    color: #fee2e2;
}

/* ─── Filters Bar ───────────────────────────────── */
.filters-bar {
    background: #fff;
    border: 2px solid #fed7aa;
    border-radius: 16px;
    padding: 1.25rem 1.75rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    box-shadow: 0 4px 16px rgba(124,45,18,.06);
}

.filters-bar__label {
    font-family: 'DM Mono', monospace;
    font-size: .75rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #92400e;
    white-space: nowrap;
}

.filters-bar__select {
    appearance: none;
    background: #fff7ed url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23c2410c' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right .75rem center;
    border: 1.5px solid #fdba74;
    border-radius: 10px;
    padding: .55rem 2.5rem .55rem 1rem;
    font-family: 'DM Sans', sans-serif;
    font-size: .9rem;
    color: #7c2d12;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
    min-width: 180px;
}

.filters-bar__select:focus {
    outline: none;
    border-color: #ea580c;
    box-shadow: 0 0 0 3px rgba(234,88,12,.15);
}

.filters-bar__toggle {
    display: flex;
    align-items: center;
    gap: .5rem;
    cursor: pointer;
    font-size: .9rem;
    color: #7c2d12;
    font-weight: 500;
    user-select: none;
}

.filters-bar__toggle input[type="checkbox"] {
    accent-color: #ea580c;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.filters-bar__count {
    margin-left: auto;
    font-family: 'DM Mono', monospace;
    font-size: .8rem;
    color: #92400e;
    background: #ffedd5;
    padding: .3rem .8rem;
    border-radius: 100px;
}

/* ─── Dog Grid ──────────────────────────────────── */
.dogs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

/* Dog Card */
.dog-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(124,45,18,.08);
    border: 1.5px solid #fed7aa;
    transition: transform .3s ease, box-shadow .3s ease;
    display: flex;
    flex-direction: column;
}

.dog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 48px rgba(124,45,18,.15);
    border-color: #fdba74;
}

.dog-card__photo {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    position: relative;
}

.dog-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.dog-card:hover .dog-card__photo img {
    transform: scale(1.05);
}

.dog-card__age-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(124,45,18,.85);
    backdrop-filter: blur(4px);
    color: #fff;
    font-family: 'DM Mono', monospace;
    font-size: .72rem;
    padding: .3rem .7rem;
    border-radius: 100px;
    letter-spacing: .06em;
}

.dog-card__body {
    padding: 1.4rem 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.dog-card__name {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #7c2d12;
    margin: 0;
}

.dog-card__breed {
    font-family: 'DM Mono', monospace;
    font-size: .75rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #c2410c;
    margin: 0;
}

.dog-card__divider {
    height: 1px;
    background: #ffedd5;
    margin: .25rem 0;
}

.dog-card__info {
    display: flex;
    flex-direction: column;
    gap: .4rem;
}

.dog-card__info-row {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    font-size: .875rem;
    color: #78350f;
}

.dog-card__info-icon {
    flex-shrink: 0;
    font-size: .9rem;
    margin-top: .1rem;
}

.dog-card__info-label {
    font-weight: 600;
    color: #92400e;
    min-width: 80px;
    font-size: .8rem;
}

.dog-card__allergy-warning {
    margin-top: .5rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: .5rem .75rem;
    display: flex;
    gap: .4rem;
    align-items: flex-start;
    font-size: .8rem;
    color: #dc2626;
}

.dog-card__allergy-icon {
    flex-shrink: 0;
    font-size: .9rem;
}

/* ─── No results ────────────────────────────────── */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: #92400e;
    font-size: 1rem;
}

/* ─── Footer ────────────────────────────────────── */
.site-footer {
    background: #2C1A0E;
    color: #D4A574;
    text-align: center;
    padding: 2.5rem 2rem;
    margin-top: 5rem;
    font-size: .875rem;
}

.site-footer a {
    color: #fb923c;
    text-decoration: none;
}

/* ─── Utilities ─────────────────────────────────── */
.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ─── Responsive ────────────────────────────────── */
@media (max-width: 900px) {
    .featured-dog {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .featured-dog__photo {
        max-width: 320px;
        margin: 0 auto;
    }
    .featured-dog__content {
        padding-top: 0;
    }
    .featured-dog__meta {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .site-header__inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem;
    }
    .page-hero {
        padding: 3rem 1.25rem 2.5rem;
    }
    .section {
        padding: 2.5rem 1.25rem;
    }
    .birthday-section {
        padding: 3rem 1.25rem;
    }
    .filters-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    .filters-bar__count {
        margin-left: 0;
    }
    .dogs-grid {
        grid-template-columns: 1fr;
    }
}

/* ─── Animations ────────────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.birthday-card,
.dog-card {
    animation: fadeUp .45s ease both;
}

.birthday-card:nth-child(1), .dog-card:nth-child(1) { animation-delay: .05s; }
.birthday-card:nth-child(2), .dog-card:nth-child(2) { animation-delay: .10s; }
.birthday-card:nth-child(3), .dog-card:nth-child(3) { animation-delay: .15s; }
.birthday-card:nth-child(4), .dog-card:nth-child(4) { animation-delay: .20s; }
.birthday-card:nth-child(5), .dog-card:nth-child(5) { animation-delay: .25s; }
.birthday-card:nth-child(6), .dog-card:nth-child(6) { animation-delay: .30s; }
.birthday-card:nth-child(7), .dog-card:nth-child(7) { animation-delay: .35s; }
.birthday-card:nth-child(8), .dog-card:nth-child(8) { animation-delay: .40s; }
