/* DogWalker - main stylesheet.
   Brand tokens at the root, components below. White-label tenant brand
   overrides are written into a <style> block at the document head from
   tenant API data, so this file holds the StanHattie defaults. */

:root {
    --primary: #16a34a;
    --primary-dark: #15803d;
    --accent: #0ea5e9;
    --bg: #f8fafc;
    --bg-soft: #f0fdf4;
    --card: #ffffff;
    --border: #dcfce7;
    --border-dark: #cbd5e1;
    --text: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --danger: #dc2626;
    --warning: #ea580c;
    --success: #16a34a;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px rgba(15,23,42,0.04);
    --shadow: 0 2px 12px rgba(15,23,42,0.06);
    --shadow-lg: 0 8px 28px rgba(15,23,42,0.10);
    --container: 1200px;
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

/* Skip link for screen readers */
.skip-link {
    position: absolute;
    left: -9999px;
    top: -9999px;
}
.skip-link:focus {
    left: 1rem;
    top: 1rem;
    background: var(--primary);
    color: #fff;
    padding: 0.5rem 1rem;
    z-index: 9999;
    border-radius: var(--radius-sm);
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* Layout */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.25rem;
}
.container-narrow {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Top nav */
.site-nav {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0.85rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.nav-brand {
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.nav-brand .brand-mark { color: var(--primary); }
.nav-brand:hover { text-decoration: none; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    list-style: none;
    padding: 0;
    margin: 0;
}
.nav-links a {
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
}
.nav-links a:hover { color: var(--primary); text-decoration: none; }
.nav-links .btn { font-weight: 600; }

.nav-hamburger {
    background: none;
    border: 1px solid var(--border);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: none;
    color: var(--text);
}
.nav-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text);
    display: none;
}
.nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.45);
    z-index: 99;
}
.nav-backdrop.active { display: block; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 0.7rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.15s, transform 0.05s;
    text-decoration: none;
    line-height: 1.2;
}
.btn:hover { background: var(--primary-dark); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-secondary {
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--border-dark);
}
.btn-secondary:hover { background: var(--bg-soft); }

.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #b91c1c; }

.btn-ghost {
    background: transparent;
    color: var(--primary);
    border: 1px solid transparent;
}
.btn-ghost:hover { background: var(--bg-soft); }

.btn-large { padding: 0.95rem 1.75rem; font-size: 1.05rem; }
.btn-block { width: 100%; justify-content: center; }

/* Hero */
.hero {
    padding: 4rem 1.25rem;
    text-align: center;
    background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
}
.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin: 0 0 1rem;
    line-height: 1.1;
    font-weight: 800;
}
.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 720px;
    margin: 0 auto 2rem;
}
.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Cards */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}
.card h3 { margin: 0 0 0.5rem; }

/* Sections */
.section {
    padding: 3.5rem 1.25rem;
}
.section h2 {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    margin: 0 0 1rem;
    text-align: center;
    font-weight: 800;
}
.section .section-sub {
    text-align: center;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 2.5rem;
    font-size: 1.05rem;
}

/* Walker card */
.walker-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: box-shadow 0.15s, transform 0.05s;
}
.walker-card:hover { box-shadow: var(--shadow); }
.walker-card .avatar {
    width: 64px;
    height: 64px;
    background: var(--bg-soft);
    border: 2px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-weight: 700;
    font-size: 1.5rem;
}
.walker-card .name { font-weight: 700; font-size: 1.1rem; }
.walker-card .meta { color: var(--text-muted); font-size: 0.9rem; }
.walker-card .badges {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    font-size: 0.8rem;
}
.badge {
    background: var(--bg-soft);
    color: var(--primary-dark);
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-weight: 600;
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.badge-tier-pro { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.badge-tier-adult { background: #dbeafe; color: #1e40af; border-color: #bfdbfe; }
.badge-tier-teen { background: #fce7f3; color: #9d174d; border-color: #fbcfe8; }
.badge-tier-kid { background: #ddd6fe; color: #5b21b6; border-color: #c4b5fd; }
.badge-success { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.badge-warning { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.badge-danger { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.badge-muted { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }

.walker-card .rating { display: flex; align-items: center; gap: 0.3rem; color: #f59e0b; font-weight: 600; }

/* Forms */
.form-row { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.1rem; }
.form-row.row-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
}
.form-row .required { color: var(--danger); }
.form-row input, .form-row select, .form-row textarea {
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    color: var(--text);
    background: #fff;
    width: 100%;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
    outline: 2px solid var(--primary);
    outline-offset: 1px;
    border-color: var(--primary);
}
.form-row .field-error {
    color: var(--danger);
    font-size: 0.85rem;
}
.form-row.error input, .form-row.error select, .form-row.error textarea {
    border: 2px solid var(--danger);
}
.form-row.success input, .form-row.success select, .form-row.success textarea {
    border-color: var(--success);
}
.form-help { color: var(--text-muted); font-size: 0.85rem; }
.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}
.checkbox-row input { width: auto; }

/* Pricing rows */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
}
.pricing-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    text-align: center;
    display: flex;
    flex-direction: column;
}
.pricing-card.featured {
    border: 2px solid var(--primary);
    box-shadow: var(--shadow);
    position: relative;
}
.pricing-card.featured::before {
    content: "Most popular";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #fff;
    padding: 0.2rem 0.8rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.pricing-card h3 { font-size: 1.5rem; margin: 0 0 0.5rem; }
.pricing-card .price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin: 0.5rem 0;
}
.pricing-card .price-note { color: var(--text-muted); font-size: 0.9rem; }
.pricing-card ul {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    text-align: left;
    flex-grow: 1;
}
.pricing-card li {
    padding: 0.4rem 0;
    color: var(--text);
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}
.pricing-card li .check { color: var(--primary); flex-shrink: 0; }

/* Tables (lightweight) */
.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table th {
    text-align: left;
    background: var(--bg-soft);
    padding: 0.7rem 0.85rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--border);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.data-table td {
    padding: 0.85rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}
.data-table tr:hover { background: var(--bg-soft); }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}
.empty-state .empty-icon {
    width: 56px;
    height: 56px;
    background: var(--bg-soft);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 1rem;
}
.empty-state h3 { color: var(--text); margin-bottom: 0.5rem; }

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--text);
    color: #fff;
    padding: 0.8rem 1.25rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    max-width: 380px;
    font-size: 0.95rem;
    animation: toast-in 0.2s;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.warning { background: var(--warning); }
@keyframes toast-in {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Utility */
.muted { color: var(--text-muted); }
.center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }
.flex { display: flex; }
.flex-row { display: flex; flex-direction: row; gap: 0.75rem; }
.flex-col { display: flex; flex-direction: column; gap: 0.75rem; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.flex-grow { flex-grow: 1; }

/* Footer */
.site-footer {
    background: var(--card);
    border-top: 1px solid var(--border);
    padding: 2.5rem 1.25rem;
    margin-top: 4rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.8;
    text-align: center;
}
.site-footer .footer-inner { max-width: var(--container); margin: 0 auto; }
.site-footer .footer-brand strong { color: var(--text); }
.site-footer .footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin: 1rem 0;
}
.site-footer .footer-links a { color: var(--text-muted); }
.site-footer .footer-links a:hover { color: var(--primary); }
.site-footer .footer-meta p { margin: 0.4rem 0; }
.site-footer .footer-badge { font-size: 0.85rem; }

/* Cookie banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--text);
    color: #fff;
    padding: 1rem 1.25rem;
    z-index: 9999;
    font-size: 0.9rem;
}
.cookie-banner-inner {
    max-width: var(--container);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.cookie-banner a { color: #93c5fd; }
.cookie-banner-actions { display: flex; gap: 0.5rem; }
.cookie-banner button {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.85rem;
}
.cookie-banner button.secondary {
    background: transparent;
    border: 1px solid #fff;
}

/* Modal */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.55);
    display: none;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.modal-backdrop.open { display: flex; }
.modal {
    background: #fff;
    border-radius: var(--radius);
    padding: 2rem;
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}
.modal h2 { margin-top: 0; }

/* Lucide icons */
.icon { width: 18px; height: 18px; vertical-align: middle; flex-shrink: 0; }
.icon-lg { width: 28px; height: 28px; }
.icon-xl { width: 40px; height: 40px; }

/* Responsive */
@media (max-width: 1024px) {
    .nav-hamburger { display: inline-flex; }
    .nav-close { display: inline-flex; }
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: min(85vw, 360px);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--card);
        padding: 4rem 1.5rem 1.5rem;
        box-shadow: -4px 0 16px rgba(15,23,42,0.15);
        transition: right 0.25s;
        z-index: 100;
    }
    .nav-links.nav-open { right: 0; }
    .nav-links a, .nav-links .btn { padding: 1rem 0; border-bottom: 1px solid var(--border); }
    .nav-links .nav-close { position: absolute; top: 1rem; right: 1rem; padding: 0.5rem; border-bottom: none; }
}

@media (max-width: 768px) {
    .form-row.row-grid { grid-template-columns: 1fr; }
    .container { padding: 0 1rem; }
    .hero { padding: 3rem 1rem; }
    .section { padding: 2.5rem 1rem; }
}
