/* Cavapoo Corner — one stylesheet to rule them all.
   Palette borrowed from Biscuit: apricot, toffee, cream. */

:root {
  --cream: #fbf6ef;
  --paper: #fffdf9;
  --sand: #f3e6d4;
  --apricot: #e9b07c;
  --rust: #a8492e;
  --rust-dark: #853720;
  --cocoa: #3d2b20;
  --text: #2f241d;
  --muted: #6b5a4e;
  --sage: #5f7552;
  --line: #e6d6c2;
  --radius: 14px;
  --shadow: 0 2px 4px rgba(61, 43, 32, .06), 0 8px 24px rgba(61, 43, 32, .08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --measure: 70ch;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--cream);
}

img { max-width: 100%; height: auto; }

a { color: var(--rust); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover, a:focus { color: var(--rust-dark); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--apricot); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--serif); color: var(--cocoa); line-height: 1.25; font-weight: 700; }
h1 { font-size: clamp(2rem, 4.5vw, 2.9rem); margin: 0 0 .4em; letter-spacing: -.01em; }
h2 { font-size: clamp(1.45rem, 3vw, 1.8rem); margin: 2em 0 .5em; }
h3 { font-size: 1.2rem; margin: 1.6em 0 .4em; }

p, ul, ol, table, details, blockquote { margin: 0 0 1.1em; }
li { margin-bottom: .35em; }

.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }

.skip-link {
  position: absolute; left: -999px; top: .5rem;
  background: var(--cocoa); color: #fff; padding: .5rem 1rem; border-radius: 8px; z-index: 100;
}
.skip-link:focus { left: .5rem; color: #fff; }

/* ---------- header ---------- */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; gap: 1rem; padding: .7rem 0; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--cocoa); margin-right: auto; }
.brand:hover { color: var(--cocoa); }
.brand-text { font-family: var(--serif); font-weight: 700; font-size: 1.3rem; line-height: 1.1; }
.brand-text small { display: block; font-family: var(--font); font-weight: 400; font-size: .78rem; color: var(--muted); letter-spacing: .02em; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .15rem .2rem; }
.site-nav li { margin: 0; }
.site-nav a {
  display: block; padding: .35rem .6rem; border-radius: 999px;
  text-decoration: none; color: var(--cocoa); font-size: .93rem;
}
.site-nav a:hover { background: var(--sand); color: var(--cocoa); }
.site-nav a[aria-current="page"] { background: var(--rust); color: #fff; }

.nav-toggle {
  display: none; align-items: center; gap: .5rem;
  background: none; border: 1px solid var(--line); border-radius: 999px;
  padding: .4rem .85rem; font: inherit; font-size: .9rem; color: var(--cocoa); cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 18px; height: 2px; background: var(--cocoa); border-radius: 2px; position: relative; content: "";
}
.nav-toggle-bars::before { position: absolute; top: -6px; }
.nav-toggle-bars::after { position: absolute; top: 6px; }

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .js .site-nav { display: none; width: 100%; }
  .js .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; padding: .4rem 0 .6rem; }
  .site-nav a { border-radius: 10px; padding: .55rem .8rem; font-size: 1rem; }
}

/* ---------- page hero ---------- */
.page-hero {
  background: linear-gradient(180deg, var(--sand) 0%, var(--cream) 100%);
  border-bottom: 1px solid var(--line);
  padding: 2.8rem 0 2.2rem;
  position: relative; overflow: hidden;
}
.page-hero::after {
  content: ""; position: absolute; right: -30px; bottom: -20px; width: 220px; height: 220px;
  background: url("../img/paw-trail.svg") no-repeat center / contain; opacity: .35; pointer-events: none;
}
.page-hero .lede { font-size: 1.18rem; color: var(--muted); max-width: 62ch; margin: 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 600; color: var(--sage); margin: 0 0 .5rem; }
.updated { font-size: .85rem; color: var(--muted); margin-top: 1rem; }

/* ---------- article ---------- */
.content { padding: 2rem 0 1rem; }
.content > * { max-width: var(--measure); }
.content > .wide { max-width: none; }
.content > h2:first-child { margin-top: .5em; }

.content ul li::marker { color: var(--rust); }

.callout {
  background: var(--paper); border: 1px solid var(--line); border-left: 5px solid var(--apricot);
  border-radius: 10px; padding: 1rem 1.2rem; margin: 1.5rem 0;
}
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout.note { border-left-color: var(--sage); }
.callout.warn { border-left-color: var(--rust); }
.callout strong:first-child { color: var(--cocoa); }

.aside-biscuit {
  display: flex; gap: 1rem; align-items: flex-start;
  background: #fff7ec; border-radius: var(--radius); padding: 1rem 1.2rem; margin: 1.6rem 0;
  border: 1px dashed var(--apricot);
}
.aside-biscuit img { flex: 0 0 48px; margin-top: .2rem; }
.aside-biscuit p { margin: 0; }

figure { margin: 1.8rem 0; }
figure img { display: block; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); }
figcaption { font-size: .9rem; color: var(--muted); margin-top: .5rem; font-style: italic; }

/* tables */
.table-wrap { overflow-x: auto; margin: 1.2rem 0 1.6rem; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); }
table { border-collapse: collapse; width: 100%; font-size: .97rem; margin: 0; }
caption { text-align: left; padding: .8rem 1rem .2rem; font-weight: 600; color: var(--cocoa); }
th, td { text-align: left; padding: .65rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--sand); color: var(--cocoa); font-weight: 600; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tbody th { font-weight: 600; color: var(--cocoa); }

/* details / FAQ */
details {
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  padding: 0 1.1rem; margin-bottom: .8rem;
}
details[open] { padding-bottom: .6rem; box-shadow: var(--shadow); }
summary {
  cursor: pointer; list-style: none; padding: .95rem 2rem .95rem 0; position: relative;
  font-weight: 600; color: var(--cocoa);
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-size: 1.4rem; color: var(--rust); line-height: 1;
}
details[open] summary::after { content: "\2013"; }
details p:last-child { margin-bottom: .4rem; }

/* ---------- home ---------- */
.home-hero { background: var(--sand); border-bottom: 1px solid var(--line); padding: 3rem 0; }
.home-hero .wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: 2.5rem; align-items: center; }
.home-hero h1 { font-size: clamp(2.2rem, 5vw, 3.3rem); }
.home-hero .lede { font-size: 1.2rem; color: var(--muted); }
.home-hero img { width: 100%; max-width: 420px; justify-self: center; }
.btn {
  display: inline-block; background: var(--rust); color: #fff; text-decoration: none;
  padding: .7rem 1.3rem; border-radius: 999px; font-weight: 600; margin: .3rem .5rem .3rem 0;
}
.btn:hover, .btn:focus { background: var(--rust-dark); color: #fff; }
.btn.ghost { background: transparent; color: var(--rust); border: 2px solid var(--rust); }
.btn.ghost:hover { background: var(--rust); color: #fff; }
@media (max-width: 760px) {
  .home-hero .wrap { grid-template-columns: 1fr; }
  .home-hero img { max-width: 260px; order: -1; }
}

.section-title { text-align: center; margin-top: 2.8rem; }
.section-sub { text-align: center; color: var(--muted); max-width: 60ch; margin: 0 auto 1.8rem; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.2rem; list-style: none; padding: 0; margin: 0 0 2rem; }
.cards li { margin: 0; }
.card {
  display: flex; flex-direction: column; height: 100%;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.3rem 1.3rem 1.1rem; text-decoration: none; color: var(--text);
  box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover, .card:focus { transform: translateY(-3px); color: var(--text); box-shadow: 0 4px 8px rgba(61,43,32,.08), 0 14px 32px rgba(61,43,32,.12); }
.card img { width: 40px; height: 40px; margin-bottom: .6rem; }
.card h3 { margin: 0 0 .35rem; font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); font-size: .96rem; flex: 1; }
.card .more { margin-top: .8rem; color: var(--rust); font-weight: 600; font-size: .92rem; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }

.about-box {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem 1.6rem; margin: 2.5rem 0; box-shadow: var(--shadow);
}
.about-box h2 { margin-top: 0; }

.divider { display: block; margin: 2.5rem auto; width: 180px; opacity: .8; }

/* ---------- pager ---------- */
.pager { display: flex; justify-content: space-between; gap: 1rem; padding: 1.5rem 0 2.5rem; border-top: 1px solid var(--line); margin-top: 2rem; }
.pager a {
  flex: 1; max-width: 48%; text-decoration: none; background: var(--paper); border: 1px solid var(--line);
  border-radius: 12px; padding: .8rem 1rem; font-weight: 600; color: var(--cocoa);
}
.pager a:hover { border-color: var(--apricot); color: var(--rust); }
.pager span { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 500; }
.pager-next { text-align: right; margin-left: auto; }

/* ---------- footer ---------- */
.site-footer { background: var(--cocoa); color: #f1e6d8; padding: 2rem 0; margin-top: 2rem; text-align: center; font-size: .93rem; }
.site-footer p { margin: .3rem 0; }
.site-footer a { color: #f6c99c; }
.site-footer a:hover { color: #fff; }
.footer-paw { opacity: .85; margin-bottom: .2rem; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 4rem 0 3rem; }
.notfound img { width: 200px; margin-bottom: 1rem; }
.notfound .lede { color: var(--muted); font-size: 1.15rem; max-width: 50ch; margin: 0 auto 1.5rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card { transition: none; }
}

@media print {
  .site-header, .site-footer, .pager, .nav-toggle { display: none; }
  body { background: #fff; }
}
