/*
Theme Name: Good Pet Neighbor
Theme URI: https://goodpetneighbor.com
Author: Good Pet Neighbor
Description: A fast, accessible block theme for the Good Pet Neighbor pet care blog.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: goodpetneighbor
*/

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { height: auto; }
a { text-underline-offset: 3px; }
.wp-block-navigation a, .wp-block-site-title a, .wp-element-button, .gpn-card a, .gpn-cat a, .wp-block-post-title a, .gpn-footer-links a { text-decoration: none; }

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 99999; background: #fff; padding: .75rem 1rem; }
.skip-link:focus { left: 1rem; top: 1rem; }
:focus-visible { outline: 3px solid var(--wp--preset--color--sun); outline-offset: 2px; border-radius: 4px; }

/* Header */
.gpn-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 249, 241, .94); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--wp--preset--color--line); }
.admin-bar .gpn-header { top: 32px; }
.gpn-brand { display: flex; align-items: center; gap: .6rem; }
.gpn-brand svg { width: 38px; height: 38px; flex: none; }
.gpn-brand .wp-block-site-title { font-size: 1.35rem; margin: 0; letter-spacing: -.01em; }
.gpn-brand .wp-block-site-title a { color: var(--wp--preset--color--forest-dark); }
.gpn-nav .wp-block-navigation-item__content { padding: .45rem .15rem; border-bottom: 2px solid transparent; }
.gpn-nav .wp-block-navigation-item__content:hover, .gpn-nav .current-menu-item > a { border-bottom-color: var(--wp--preset--color--coral); color: var(--wp--preset--color--forest-dark); }
.gpn-cta .wp-block-navigation-item__content { background: var(--wp--preset--color--forest); color: #fff !important; padding: .6rem 1.2rem; border-radius: 999px; border-bottom: 0 !important; }
.gpn-cta .wp-block-navigation-item__content:hover { background: var(--wp--preset--color--coral); }

/* Hero */
.gpn-hero { background: radial-gradient(1200px 500px at 85% -10%, #fde7c8 0%, transparent 60%), var(--wp--preset--color--cream); overflow: hidden; }
.gpn-eyebrow { display: inline-block; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; font-size: .78rem; color: var(--wp--preset--color--coral); background: #fff; border: 1px solid var(--wp--preset--color--line); padding: .35rem .8rem; border-radius: 999px; margin: 0; width: fit-content; }
.gpn-hero h1 { margin: 0; }
.gpn-hero h1 em { font-style: italic; color: var(--wp--preset--color--coral); }
.gpn-hero-media { position: relative; }
.gpn-hero-media img { width: 100%; aspect-ratio: 5 / 4.4; object-fit: cover; border-radius: 28px 28px 120px 28px; box-shadow: var(--wp--custom--shadow); object-position: 50% 62%; }
.gpn-badge { position: absolute; left: -1.25rem; bottom: 1.5rem; background: #fff; border-radius: 16px; padding: .85rem 1.1rem; box-shadow: var(--wp--custom--shadow); max-width: 230px; border: 1px solid var(--wp--preset--color--line); }
.gpn-badge strong { display: block; font-family: var(--wp--preset--font-family--display); font-size: 2rem; line-height: 1; color: var(--wp--preset--color--forest); }
.gpn-badge span { font-size: .85rem; color: var(--wp--preset--color--muted); line-height: 1.35; display: block; margin-top: .25rem; }
@media (max-width: 781px) { .gpn-badge { left: .75rem; bottom: .75rem; } .gpn-hero-media img { border-radius: 24px 24px 80px 24px; } }

/* Stats band */
.gpn-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.gpn-stat { background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: var(--wp--custom--radius); padding: 1.4rem 1.3rem; }
.gpn-stat b { display: block; font-family: var(--wp--preset--font-family--display); font-size: clamp(2rem, 1.5rem + 1.6vw, 2.8rem); line-height: 1; color: var(--wp--preset--color--forest); }
.gpn-stat span { display: block; margin-top: .5rem; font-size: .95rem; color: var(--wp--preset--color--muted); line-height: 1.4; }
.gpn-stat:nth-child(2) b { color: var(--wp--preset--color--coral); }
.gpn-stat:nth-child(4) b { color: #b8860b; }
@media (max-width: 900px) { .gpn-stats { grid-template-columns: repeat(2, 1fr); } }
.gpn-source { font-size: .82rem; color: var(--wp--preset--color--muted); }

/* Section heading */
.gpn-kicker { text-transform: uppercase; letter-spacing: .12em; font-weight: 800; font-size: .78rem; color: var(--wp--preset--color--coral); margin: 0; }

/* Category cards */
.gpn-cats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; }
.gpn-cat { position: relative; border-radius: var(--wp--custom--radius); overflow: hidden; aspect-ratio: 4 / 5; background: var(--wp--preset--color--forest); }
.gpn-cat img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gpn-cat::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(8, 40, 38, .85)); }
.gpn-cat:hover img { transform: scale(1.06); }
.gpn-cat a { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: flex-end; padding: 1.1rem; color: #fff; }
.gpn-cat strong { font-family: var(--wp--preset--font-family--display); font-size: 1.35rem; line-height: 1.1; }
.gpn-cat small { opacity: .9; font-size: .85rem; margin-top: .25rem; }
@media (max-width: 1000px) { .gpn-cats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .gpn-cats { grid-template-columns: repeat(2, 1fr); } }

/* Post cards */
.gpn-card { background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: var(--wp--custom--radius); overflow: hidden; height: 100%; display: flex; flex-direction: column; transition: transform .25s ease, box-shadow .25s ease; }
.gpn-card:hover { transform: translateY(-4px); box-shadow: var(--wp--custom--shadow); }
.gpn-card .wp-block-post-featured-image { margin: 0; }
.gpn-card .wp-block-post-featured-image img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; }
.gpn-card-body { padding: 1.25rem 1.35rem 1.45rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.gpn-card .wp-block-post-title { margin: 0; font-size: 1.28rem; line-height: 1.25; }
.gpn-card .wp-block-post-title a { color: var(--wp--preset--color--forest-dark); }
.gpn-card .wp-block-post-title a:hover { color: var(--wp--preset--color--coral); }
.gpn-card .wp-block-post-excerpt { margin: 0; color: var(--wp--preset--color--muted); font-size: .98rem; }
.gpn-card .wp-block-post-excerpt__excerpt { margin: 0; }
.gpn-card .wp-block-post-terms a, .gpn-terms a { font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--wp--preset--color--coral); }
.gpn-meta { font-size: .85rem; color: var(--wp--preset--color--muted); margin-top: auto; }

/* Data section */
.gpn-data { background: var(--wp--preset--color--forest-dark); color: #e9f3f0; }
.gpn-data h2, .gpn-data h3 { color: #fff; }
.gpn-data a { color: var(--wp--preset--color--sun); }
.gpn-chart { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); border-radius: var(--wp--custom--radius); padding: 1.6rem; }
.gpn-chart h3 { margin: 0 0 1.1rem; font-size: 1.15rem; font-family: var(--wp--preset--font-family--body); font-weight: 800; }
.gpn-bar { margin: .95rem 0; }
.gpn-bar .lbl { display: flex; justify-content: space-between; font-weight: 700; font-size: .95rem; margin-bottom: .35rem; }
.gpn-bar .track { height: 14px; background: rgba(255, 255, 255, .14); border-radius: 99px; overflow: hidden; }
.gpn-bar .fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--wp--preset--color--sun), var(--wp--preset--color--coral)); }
.gpn-chart.light { background: #fff; color: var(--wp--preset--color--ink); border-color: var(--wp--preset--color--line); }
.gpn-chart.light h3 { color: var(--wp--preset--color--forest-dark); }
.gpn-chart.light .track { background: var(--wp--preset--color--sand); }
.gpn-chart.light .fill { background: linear-gradient(90deg, var(--wp--preset--color--forest), #2d8c86); }
.gpn-chart.light .fill.alt { background: linear-gradient(90deg, var(--wp--preset--color--coral), #f0955f); }
.gpn-donut-row { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; }
.gpn-donut { --p: 66; width: 130px; height: 130px; border-radius: 50%; background: conic-gradient(var(--wp--preset--color--sun) calc(var(--p) * 1%), rgba(255, 255, 255, .15) 0); display: grid; place-items: center; flex: none; }
.gpn-donut > span { width: 98px; height: 98px; border-radius: 50%; background: var(--wp--preset--color--forest-dark); display: grid; place-items: center; font-family: var(--wp--preset--font-family--display); font-size: 1.7rem; font-weight: 700; color: #fff; }
.gpn-chart.light .gpn-donut { background: conic-gradient(var(--wp--preset--color--coral) calc(var(--p) * 1%), var(--wp--preset--color--sand) 0); }
.gpn-chart.light .gpn-donut > span { background: #fff; color: var(--wp--preset--color--forest-dark); }

/* Checklist tiles */
.gpn-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.gpn-tile { background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: var(--wp--custom--radius); padding: 1.4rem; }
.gpn-tile .ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--wp--preset--color--mint); margin-bottom: .9rem; }
.gpn-tile .ico svg { width: 26px; height: 26px; stroke: var(--wp--preset--color--forest); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.gpn-tile h3 { font-size: 1.12rem; margin: 0 0 .35rem; }
.gpn-tile p { margin: 0; color: var(--wp--preset--color--muted); font-size: .96rem; }
@media (max-width: 900px) { .gpn-tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .gpn-tiles { grid-template-columns: 1fr; } }

/* Trust / principles */
.gpn-principle { background: #fff; border-radius: var(--wp--custom--radius); border: 1px solid var(--wp--preset--color--line); padding: 1.6rem; height: 100%; }
.gpn-principle .num { font-family: var(--wp--preset--font-family--display); font-size: 2.4rem; color: var(--wp--preset--color--coral); line-height: 1; }
.gpn-principle h3 { margin: .4rem 0 .4rem; font-size: 1.2rem; }
.gpn-principle p { margin: 0; color: var(--wp--preset--color--muted); }

/* CTA band */
.gpn-band { background: linear-gradient(135deg, var(--wp--preset--color--forest) 0%, var(--wp--preset--color--forest-dark) 100%); color: #fff; border-radius: 28px; }
.gpn-band h2 { color: #fff; }
.gpn-band a:not(.wp-element-button) { color: var(--wp--preset--color--sun); }

/* Articles */
.gpn-article-hero img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; border-radius: 24px; box-shadow: var(--wp--custom--shadow); }
.gpn-article .wp-block-post-content h2 { margin-top: 2.2rem; }
.gpn-article .wp-block-post-content h3 { margin-top: 1.6rem; }
.gpn-article .wp-block-post-content ul, .gpn-article .wp-block-post-content ol { padding-left: 1.3rem; }
.gpn-article .wp-block-post-content li { margin: .4rem 0; }
.gpn-callout { background: var(--wp--preset--color--mint); border-left: 5px solid var(--wp--preset--color--forest); border-radius: 0 14px 14px 0; padding: 1.1rem 1.4rem; }
.gpn-callout.warn { background: #fdece5; border-left-color: var(--wp--preset--color--coral); }
.gpn-callout > :first-child { margin-top: 0; }
.gpn-callout > :last-child { margin-bottom: 0; }
.gpn-callout .gpn-callout-title { font-weight: 800; margin: 0 0 .3rem; font-family: var(--wp--preset--font-family--display); font-size: 1.1rem; color: var(--wp--preset--color--forest-dark); }
.gpn-disclaimer { font-size: .92rem; color: var(--wp--preset--color--muted); background: var(--wp--preset--color--sand); border-radius: 14px; padding: 1rem 1.25rem; }
.gpn-disclaimer p { margin: 0; }
.wp-block-table table { border-collapse: collapse; width: 100%; font-size: .98rem; }
.wp-block-table th { background: var(--wp--preset--color--forest); color: #fff; text-align: left; padding: .7rem .9rem; }
.wp-block-table td { padding: .65rem .9rem; border-bottom: 1px solid var(--wp--preset--color--line); background: #fff; }
.wp-block-table figcaption { font-size: .85rem; color: var(--wp--preset--color--muted); }
.wp-block-table { overflow-x: auto; }
.gpn-sources { font-size: .92rem; color: var(--wp--preset--color--muted); }
.gpn-sources li { margin: .25rem 0; }

/* Page header band */
.gpn-pagehead { background: linear-gradient(180deg, var(--wp--preset--color--sand), var(--wp--preset--color--cream)); border-bottom: 1px solid var(--wp--preset--color--line); }
.gpn-pagehead h1 { margin: 0; }

/* Footer */
.gpn-footer { background: var(--wp--preset--color--forest-dark); color: #cfe3de; }
.gpn-footer h4 { color: #fff; font-family: var(--wp--preset--font-family--body); font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; margin: 0 0 .8rem; }
.gpn-footer a { color: #cfe3de; }
.gpn-footer a:hover { color: var(--wp--preset--color--sun); }
.gpn-footer-links { list-style: none; padding: 0; margin: 0; }
.gpn-footer-links li { margin: .45rem 0; }
.gpn-footer .gpn-brand .wp-block-site-title a { color: #fff; }
.gpn-footer .gpn-fineprint { font-size: .85rem; color: #98b9b2; border-top: 1px solid rgba(255, 255, 255, .14); }

/* Forms */
.gpn-form { display: grid; gap: 1rem; background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: var(--wp--custom--radius); padding: 1.6rem; }
.gpn-form label { font-weight: 700; display: block; margin-bottom: .3rem; font-size: .95rem; }
.gpn-form input[type=text], .gpn-form input[type=email], .gpn-form select, .gpn-form textarea { width: 100%; padding: .8rem 1rem; border: 1.5px solid var(--wp--preset--color--line); border-radius: 12px; font: inherit; background: var(--wp--preset--color--cream); color: inherit; box-sizing: border-box; }
.gpn-form input:focus, .gpn-form select:focus, .gpn-form textarea:focus { border-color: var(--wp--preset--color--forest); outline: none; box-shadow: 0 0 0 3px rgba(20, 82, 79, .18); }
.gpn-form .gpn-hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.gpn-form button { background: var(--wp--preset--color--coral); color: #fff; font: inherit; font-weight: 800; border: 0; border-radius: 999px; padding: .9rem 1.8rem; cursor: pointer; justify-self: start; }
.gpn-form button:hover { background: var(--wp--preset--color--forest); }
.gpn-note { padding: 1rem 1.2rem; border-radius: 12px; font-weight: 700; }
.gpn-note.ok { background: var(--wp--preset--color--mint); color: var(--wp--preset--color--forest-dark); }
.gpn-note.err { background: #fdece5; color: #8a2d12; }
.gpn-contact-card { background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: var(--wp--custom--radius); padding: 1.3rem 1.5rem; }
.gpn-contact-card h3 { margin: 0 0 .3rem; font-size: 1.1rem; }
.gpn-contact-card p { margin: 0; }

/* Cookie banner */
#gpn-consent { position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 99998; max-width: 760px; margin: 0 auto; background: #fff; color: var(--wp--preset--color--ink); border: 1px solid var(--wp--preset--color--line); border-radius: 18px; box-shadow: 0 18px 50px -12px rgba(12, 59, 57, .45); padding: 1.1rem 1.3rem; display: none; gap: 1rem; align-items: center; flex-wrap: wrap; font-size: .93rem; line-height: 1.5; }
#gpn-consent.show { display: flex; }
#gpn-consent p { margin: 0; flex: 1 1 320px; }
#gpn-consent .btns { display: flex; gap: .6rem; flex-wrap: wrap; }
#gpn-consent button { font: inherit; font-weight: 800; border-radius: 999px; padding: .6rem 1.2rem; cursor: pointer; border: 2px solid var(--wp--preset--color--forest); background: #fff; color: var(--wp--preset--color--forest); }
#gpn-consent button.primary { background: var(--wp--preset--color--forest); color: #fff; }

/* Misc */
.wp-block-query-pagination { gap: 1rem; font-weight: 700; }
.wp-block-search__button { background: var(--wp--preset--color--forest); color: #fff; border: 0; border-radius: 999px; padding: .6rem 1.2rem; }
.wp-block-search__input { border: 1.5px solid var(--wp--preset--color--line); border-radius: 999px; padding: .6rem 1.1rem; background: #fff; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
