/* ==========================================================================
   Companion & Colony — independent cat-welfare reference, Southern Ontario
   Palette derived from the site's long-running violet + sage identity and
   modernised: deep aubergine, sage-olive, warm paper.
   ========================================================================== */

:root {
  --plum-900: #2b1338;
  --plum-800: #3b1c4d;
  --plum-700: #4a2361;
  --plum-600: #5b2d74;
  --plum-500: #6f3a8c;
  --plum-300: #a97fc2;
  --plum-100: #ead9f4;
  --plum-050: #f6eefb;

  --sage-800: #34411c;
  --sage-700: #47592a;
  --sage-600: #5c7238;
  --sage-400: #8ea45c;
  --sage-200: #cfdda6;
  --sage-100: #e4ecc8;

  --paper: #fcfaf5;
  --paper-2: #f5f1e7;
  --rule: #e2dccf;
  --rule-2: #cfc7b5;

  --ink: #241d2a;
  --ink-2: #4c4453;
  --ink-3: #6f6678;

  --clay: #b1552f;

  --serif: 'Alegreya', Georgia, 'Times New Roman', serif;
  --sans: 'Alegreya Sans', 'Helvetica Neue', Arial, sans-serif;

  --shell: 1180px;
  --rail: 236px;
}

/* Safeguard: nothing on this site may be hidden waiting on JavaScript. */
[data-aos] { opacity: 1 !important; transform: none !important; }

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

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.68;
  font-weight: 400;
}

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

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 60;
  background: var(--plum-700); color: #fff; padding: .6rem 1rem; border-radius: 0 0 6px 0;
}
.skip:focus { left: 0; }

/* ------------------------------------------------------------- masthead -- */
.masthead {
  background: var(--sage-200);
  border-bottom: 3px solid var(--sage-600);
}
.mast-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-top: 1.15rem; padding-bottom: 1.15rem;
}
.brand { display: flex; align-items: center; gap: .9rem; text-decoration: none; color: inherit; }
.brand-mark {
  flex: 0 0 auto;
  display: grid; place-items: center;
  width: 54px; height: 54px;
  background: var(--plum-700); color: var(--sage-200);
  font-family: var(--serif); font-weight: 700; font-size: 1.05rem; letter-spacing: .01em;
  border-radius: 10px;
}
.brand-words { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(1.5rem, 3.4vw, 2.05rem);
  color: var(--plum-800); letter-spacing: -.01em;
}
.brand-sub {
  font-size: .8125rem; color: var(--sage-800); text-transform: uppercase;
  letter-spacing: .085em; font-weight: 500; margin-top: .15rem;
}
.brand:hover .brand-name { color: var(--plum-600); }

.rail-toggle {
  display: none;
  align-items: center; gap: .55rem;
  background: var(--plum-700); color: #fff; border: 0; border-radius: 8px;
  padding: .55rem .9rem; font-size: .9rem; font-weight: 600; letter-spacing: .02em;
}
.rail-toggle-bars { display: inline-flex; flex-direction: column; gap: 3px; }
.rail-toggle-bars span { display: block; width: 17px; height: 2px; background: currentColor; }

/* ---------------------------------------------------------------- strip -- */
.strip {
  background: var(--plum-800); color: var(--plum-100);
  font-size: .8125rem; letter-spacing: .04em;
}
.strip .shell { padding-top: .5rem; padding-bottom: .5rem; }

/* --------------------------------------------------------------- layout -- */
.layout {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
  padding-top: 2.5rem;
  padding-bottom: 3.5rem;
}

.rail { display: block !important; }
.rail-inner {
  position: sticky; top: 1.5rem;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--plum-600);
  border-radius: 4px;
  padding: 1.15rem 1.1rem 1.35rem;
}
.rail-label {
  font-family: var(--sans); font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .13em;
  color: var(--sage-700);
  margin: 1.2rem 0 .4rem;
  padding-bottom: .3rem; border-bottom: 1px solid var(--rule-2);
}
.rail-list { list-style: none; margin: 0 0 .2rem; padding: 0; }
.rail-list li { margin: 0; }
.rail-list a {
  display: block;
  padding: .34rem 0 .34rem .05rem;
  color: var(--ink-2); text-decoration: none;
  font-size: .955rem; line-height: 1.35;
  border-bottom: 1px dotted transparent;
}
.rail-list a:hover { color: var(--plum-600); border-bottom-color: var(--plum-300); }
.rail-list a.is-current {
  color: var(--plum-800); font-weight: 700;
  box-shadow: inset 3px 0 0 var(--sage-600);
  padding-left: .6rem;
}

/* -------------------------------------------------------------- content -- */
.content { min-width: 0; }

.hero {
  margin: 0 0 2rem;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--rule);
  box-shadow: 0 1px 0 var(--rule-2);
}
.hero img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.prose { max-width: 68ch; }

.prose h1 {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(2.1rem, 5vw, 3rem);
  line-height: 1.1; letter-spacing: -.02em;
  color: var(--plum-800);
  margin: 0 0 1.15rem;
}
.prose h1::after {
  content: ""; display: block; width: 76px; height: 4px;
  background: var(--sage-400); margin-top: 1rem;
}

.prose h2 {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(1.45rem, 2.9vw, 1.85rem);
  line-height: 1.2; color: var(--plum-700);
  margin: 2.6rem 0 .85rem;
  padding-top: .9rem;
  border-top: 1px solid var(--rule);
}
.prose h3 {
  font-family: var(--serif); font-weight: 700;
  font-size: 1.25rem; color: var(--sage-800);
  margin: 1.9rem 0 .6rem;
}

.prose p { margin: 0 0 1.15rem; }

.prose .lede {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.3vw, 1.4rem);
  line-height: 1.5; color: var(--plum-700);
  margin-bottom: 1.7rem;
}

.prose a { color: var(--plum-600); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.prose a:hover { color: var(--clay); }

.prose ul, .prose ol { margin: 0 0 1.3rem; padding-left: 1.35rem; }
.prose li { margin-bottom: .55rem; }
.prose ul { list-style: none; padding-left: 1.2rem; }
.prose ul li { position: relative; }
.prose ul li::before {
  content: ""; position: absolute; left: -1.2rem; top: .62em;
  width: 7px; height: 7px; background: var(--sage-400); border-radius: 1px;
}
.prose ol li::marker { color: var(--sage-600); font-weight: 700; }
.prose strong { font-weight: 700; color: var(--plum-800); }
.prose em { font-style: italic; }

.prose .linklist li::before { background: var(--plum-300); }

/* home card grid */
.cardgrid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(238px, 1fr));
  gap: 1.1rem; margin: 1.6rem 0 2rem;
}
.card {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--plum-600);
  border-radius: 3px;
  padding: 1.1rem 1.15rem 1.05rem;
}
.card h3 { margin: 0 0 .5rem; font-family: var(--serif); font-size: 1.2rem; color: var(--plum-700); }
.card h3 a { color: inherit; text-decoration: none; border-bottom: 2px solid var(--sage-200); }
.card h3 a:hover { border-bottom-color: var(--sage-400); }
.card p { margin: 0; font-size: .965rem; color: var(--ink-2); line-height: 1.6; }

/* notice */
.notice {
  background: var(--plum-050);
  border: 1px solid var(--plum-100);
  border-left: 4px solid var(--plum-600);
  border-radius: 3px;
  padding: 1.05rem 1.15rem .1rem;
  margin: 1.5rem 0 1.8rem;
}
.notice p { color: var(--plum-800); }

/* contact form */
.contactform {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 1.35rem 1.35rem 1.5rem;
  margin: 1.5rem 0 2rem;
  max-width: 34rem;
}
.contactform .field { margin-bottom: 1rem; }
.contactform label {
  display: block; font-size: .82rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--sage-800); margin-bottom: .3rem;
}
.contactform input, .contactform textarea {
  width: 100%; padding: .55rem .7rem;
  border: 1px solid var(--rule-2); border-radius: 3px;
  background: #fff; color: var(--ink);
  font-family: var(--sans); font-size: 1rem;
}
.contactform input:focus, .contactform textarea:focus {
  outline: 2px solid var(--plum-300); outline-offset: 1px; border-color: var(--plum-500);
}
.btn {
  background: var(--plum-700); color: #fff; border: 0; border-radius: 3px;
  padding: .62rem 1.35rem; font-family: var(--sans); font-weight: 700;
  font-size: .95rem; letter-spacing: .03em; cursor: pointer;
}
.btn:hover { background: var(--plum-600); }

/* related */
.related {
  max-width: 68ch;
  margin: 3rem 0 0;
  padding: 1.25rem 1.3rem 1.1rem;
  background: var(--sage-100);
  border: 1px solid var(--sage-200);
  border-radius: 3px;
}
.related h2 {
  margin: 0 0 .7rem; padding: 0; border: 0;
  font-family: var(--sans); font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .13em; color: var(--sage-800);
}
.related ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem .8rem; }
.related li { margin: 0; }
.related a {
  display: inline-block; font-size: .93rem;
  color: var(--plum-700); text-decoration: none;
  border-bottom: 1px solid var(--sage-400); padding-bottom: 1px;
}
.related a:hover { color: var(--clay); border-bottom-color: var(--clay); }

/* --------------------------------------------------------------- footer -- */
.foot {
  background: var(--plum-900); color: var(--plum-100);
  padding: 2.5rem 0 2.75rem; margin-top: 1rem;
}
.foot-brand {
  font-family: var(--serif); font-weight: 700; font-size: 1.35rem;
  color: var(--sage-200); margin: 0 0 .9rem;
}
.foot-nav { font-size: .9rem; line-height: 2; margin-bottom: 1.2rem; }
.foot-nav a { color: var(--plum-100); text-decoration: none; border-bottom: 1px solid transparent; }
.foot-nav a:hover { color: #fff; border-bottom-color: var(--sage-400); }
.foot-nav .dot { color: var(--plum-500); margin: 0 .1rem; }
.foot-note {
  font-size: .845rem; line-height: 1.6; color: #c3a9d4;
  max-width: 72ch; margin: 0 0 1rem;
  padding-top: 1rem; border-top: 1px solid #47275c;
}
.foot-copy { font-size: .82rem; color: #a98cbd; margin: 0; }

/* ------------------------------------------------------------ responsive -- */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; gap: 1.5rem; padding-top: 1.5rem; }
  .rail { display: none !important; }
  .rail.show, .rail.collapsing { display: block !important; }
  .rail-inner { position: static; }
  .rail-toggle { display: inline-flex; }
  .prose, .related { max-width: none; }
}

@media (max-width: 560px) {
  body { font-size: 1.02rem; }
  .brand-mark { width: 46px; height: 46px; font-size: .92rem; }
  .brand-sub { font-size: .72rem; letter-spacing: .06em; }
  .strip { font-size: .74rem; }
  .hero img { aspect-ratio: 4 / 3; }
}

@media print {
  .rail, .strip, .rail-toggle, .related { display: none !important; }
  body { background: #fff; }
}
