/* Adopt a Ferret - site styles. Mobile-first, no framework. */
:root {
  --bg: #fbf8f4;
  --surface: #ffffff;
  --ink: #2a2230;
  --muted: #6b6172;
  --line: #e8e1ea;
  --brand: #5b2a86;
  --brand-dark: #431d63;
  --brand-tint: #f1eaf7;
  --accent: #e8a33d;
  --ok: #1f7a4d;
  --ok-tint: #e5f4ec;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(42, 34, 48, .06), 0 4px 16px rgba(42, 34, 48, .06);
  --max: 1160px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--font); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-dark); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-top: 1.6em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 780px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--brand); color: #fff; padding: 8px 14px; z-index: 10; }
.skip:focus { left: 8px; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.logo { font-weight: 800; font-size: 1.2rem; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.logo span { color: var(--brand); }
.nav { display: none; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; align-items: center; }
.nav a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--brand-tint); color: var(--brand-dark); }
.nav .btn { color: #fff; padding: 10px 18px; margin-left: 6px; border-radius: 999px; }
.nav .btn:hover { background: var(--brand-dark); color: #fff; }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; font-weight: 700; }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] .menu-panel { display: block; }
.menu-panel { display: none; position: absolute; right: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 240px; padding: 8px; }
.menu-panel a { display: block; padding: 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 600; }
.menu-panel a:hover { background: var(--brand-tint); }
@media (min-width: 960px) {
  .nav { display: block; }
  .menu { display: none; }
}

/* Buttons */
.btn { display: inline-block; padding: 13px 22px; border-radius: 999px; background: var(--brand); color: #fff; font-weight: 700; text-decoration: none; border: 2px solid var(--brand); cursor: pointer; font-size: 1rem; }
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--brand); }
.btn-ghost:hover { background: var(--brand-tint); color: var(--brand-dark); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0; }

/* Breadcrumbs */
.crumbs { font-size: .9rem; color: var(--muted); padding: 14px 0 0; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "›"; margin-right: 6px; color: var(--muted); }
.crumbs a { color: var(--muted); }

/* Sections */
main { padding-bottom: 48px; }
.section { padding: 40px 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 720px; }
.page-head { padding: 24px 0 8px; }

/* Hero */
.hero { padding: 36px 0 24px; }
.hero .wrap { display: grid; gap: 28px; align-items: center; }
.hero img { border-radius: 20px; box-shadow: var(--shadow); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 16px 0 0; }
.hero-facts li { background: var(--brand-tint); color: var(--brand-dark); border-radius: 999px; padding: 6px 14px; font-weight: 600; font-size: .92rem; }
@media (min-width: 860px) { .hero .wrap { grid-template-columns: 1.1fr .9fr; } }

/* Cards */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; text-decoration: none; color: var(--ink); transition: transform .15s ease; }
.card:hover { transform: translateY(-2px); color: var(--ink); }
.card img, .card .noimg { aspect-ratio: 1 / 1; object-fit: cover; width: 100%; background: var(--brand-tint); }
.noimg { display: grid; place-items: center; color: var(--brand-dark); font-weight: 700; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card h3 { margin: 0; font-size: 1.2rem; }
.card .meta { color: var(--muted); font-size: .95rem; margin: 0; }
.card .price { font-weight: 800; margin-top: auto; padding-top: 8px; display: flex; justify-content: space-between; align-items: center; }
.badge { display: inline-block; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--ok-tint); color: var(--ok); text-transform: uppercase; letter-spacing: .03em; }
.badge.reserved { background: #fdf1dc; color: #8a5a10; }
.badge.adopted { background: #eee; color: #555; }

/* Category tiles */
.tiles { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.tile { display: block; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.tile strong { display: block; font-size: 1.25rem; color: var(--brand-dark); }
.tile span { color: var(--muted); }

/* Feature list */
.features { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); list-style: none; padding: 0; margin: 0; }
.features li { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.features strong { display: block; margin-bottom: 4px; }

/* Steps */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li { counter-increment: step; position: relative; padding: 16px 16px 16px 64px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.steps li::before { content: counter(step); position: absolute; left: 16px; top: 14px; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; }

/* Detail page */
.detail { display: grid; gap: 28px; padding-top: 16px; }
.detail .photo img, .detail .photo .noimg { border-radius: 18px; box-shadow: var(--shadow); width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.detail .price-big { font-size: 1.8rem; font-weight: 800; margin: 8px 0 0; }
.detail .price-big small { font-size: 1rem; color: var(--muted); font-weight: 600; }
.facts { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.facts th, .facts td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.facts tr:last-child th, .facts tr:last-child td { border-bottom: 0; }
.facts th { width: 42%; color: var(--muted); font-weight: 600; }
@media (min-width: 860px) { .detail { grid-template-columns: 1fr 1fr; align-items: start; } }

.note { background: #fff8ec; border: 1px solid #f1dcb4; border-radius: var(--radius); padding: 16px 18px; }
.note strong { color: #7a4f0e; }

/* Prose */
.prose { max-width: 760px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0 1.5em; background: var(--surface); font-size: .97rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.prose thead th { background: var(--brand-tint); }
.answer { font-size: 1.12rem; background: var(--surface); border-left: 4px solid var(--brand); padding: 14px 18px; border-radius: 0 var(--radius) var(--radius) 0; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin: 1em 0 1.5em; }
.toc ol { margin: 6px 0 0; }
.updated { color: var(--muted); font-size: .92rem; }

/* FAQ */
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 16px 18px; font-weight: 700; }
.faq details > div { padding: 0 18px 14px; }

/* Forms */
.form { display: grid; gap: 16px; max-width: 720px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.form label { font-weight: 700; display: block; margin-bottom: 6px; }
.form .hint { font-weight: 400; color: var(--muted); font-size: .9rem; }
.form input, .form select, .form textarea { width: 100%; font: inherit; padding: 12px; border: 1px solid #cfc6d4; border-radius: 10px; background: #fff; color: var(--ink); }
.form textarea { min-height: 120px; }
.form .row { display: grid; gap: 16px; }
.form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.form .check input { width: auto; margin-top: 5px; }
@media (min-width: 640px) { .form .row { grid-template-columns: 1fr 1fr; } }

/* CTA band */
.cta-band { background: var(--brand); color: #fff; border-radius: 20px; padding: 28px; display: grid; gap: 12px; margin-top: 40px; }
.cta-band h2 { margin: 0; color: #fff; }
.cta-band p { margin: 0; color: #eadff3; }
.cta-band .btn { background: #fff; color: var(--brand-dark); border-color: #fff; justify-self: start; }

/* Footer */
.site-footer { background: #241c2a; color: #d9d0de; padding: 40px 0 28px; font-size: .95rem; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.site-footer h2 { font-size: 1rem; color: #fff; margin: 0 0 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.fine { border-top: 1px solid #3a3040; margin-top: 28px; padding-top: 16px; color: #a99fb0; }
