/* ==========================================================================
   Coffee Cat Café — main stylesheet

   CONTENTS
   1.  Design tokens (colours, fonts, shapes) — change the look here
   2.  Base
   3.  Layout helpers
   4.  Typography
   5.  Buttons
   6.  Header & navigation
   7.  Mobile tab bar (markup is added by js/script.js)
   8.  Hero
   9.  Sections & cards
   10. Stories, gallery, contact, notices
       (page-specific blocks for stories, mission, support and Cat Lounge sit just before the footer)
   11. Footer
   12. Animation
   13. Responsive: tablet (max 1000px), phone (max 760px), small phone (max 380px)
   ========================================================================== */


/* 1. DESIGN TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* Colours */
  --sage:        #738366;
  --sage-dark:   #526247;
  --sage-soft:   #dfe5d8;
  --cream:       #f7f2ea;
  --cream-deep:  #eee6da;
  --white:       #fffdf9;
  --tint:        #edf1e9;   /* pale green used for notices and bank details */
  --ink:         #293028;   /* main text */
  --text-soft:   #4f5a4f;   /* paragraphs inside cards, nav links */
  --muted:       #667066;   /* secondary text */
  --line:        rgba(82, 98, 71, .20);

  --footer-bg:    #3f4b39;
  --footer-text:  #edf1e9;
  --footer-muted: #cdd5ca;

  --gradient-hero: linear-gradient(135deg, #f8f4ed 0%, #eef1e9 100%);
  --highlight: linear-gradient(            /* soft "highlighter pen" stripe behind text */
    transparent 62%,
    rgba(115, 131, 102, .28) 62%,
    rgba(115, 131, 102, .28) 92%,
    transparent 92%
  );

  /* Fonts */
  --font-body:    Arial, Helvetica, sans-serif;
  --font-heading: Georgia, "Times New Roman", serif;
  --font-script:  "Segoe Script", "Brush Script MT", cursive;

  /* Corner radii */
  --radius-sm: 22px;
  --radius:    28px;
  --radius-lg: 36px;
  --radius-xl: 44px;

  /* Shadows */
  --shadow:    0 18px 45px rgba(65, 73, 59, .12);
  --shadow-sm: 0 10px 28px rgba(65, 73, 59, .07);

  /* Layout */
  --max:      1180px;   /* widest content width */
  --gutter:   40px;     /* total side space around content */
  --header-h: 86px;
}


/* 2. BASE
   -------------------------------------------------------------------------- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;   /* keeps anchor targets clear of the sticky header */
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.65;
}

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

/* Stops any stray element making the page scroll sideways. On phones, sideways
   overflow can make the browser zoom out, which switches off the phone layout. */
@supports (overflow: clip) {
  html,
  body { overflow-x: clip; }
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--sage);
  outline-offset: 3px;
  border-radius: 10px;
}


/* 3. LAYOUT HELPERS
   -------------------------------------------------------------------------- */
.container {
  width: min(calc(100% - var(--gutter)), var(--max));
  margin-inline: auto;
}

.section {
  position: relative;
  padding: 92px 0;
}

.section-alt {
  background: var(--sage-soft);
}

.section-title {
  max-width: 780px;
  margin: 0 auto 46px;
  text-align: center;
}

.section-title p {
  color: var(--muted);
  font-size: 1.08rem;
}

.split {                       /* two equal columns: text + photo */
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.cta-center {
  margin-top: 34px;
  text-align: center;
}


/* 4. TYPOGRAPHY
   -------------------------------------------------------------------------- */
h1, h2, h3 {
  margin: 0 0 18px;
  color: var(--sage-dark);
  font-family: var(--font-heading);
  line-height: 1.12;
}

h1 {
  font-size: clamp(3rem, 6vw, 5.4rem);
  letter-spacing: -.04em;
}

h2 {
  font-size: clamp(2.2rem, 4vw, 3.45rem);
}

h3 {
  font-size: 1.5rem;
}

.script {                      /* handwritten accent inside headings */
  font-family: var(--font-script);
  font-size: 1.3em;
  font-weight: 600;
  letter-spacing: -.02em;
}

.lead {
  max-width: 680px;
  color: var(--text-soft);
  font-size: 1.16rem;
}

.small {
  color: var(--muted);
  font-size: .9rem;
}

.quote {
  max-width: 850px;
  margin: 0 auto;
  color: var(--sage-dark);
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2.35rem);
  line-height: 1.35;
  text-align: center;
}

/* Small labels */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 6px 14px 6px 10px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--sage-dark);
  font-size: .88rem;
  font-weight: 700;
}

.eyebrow::before {
  content: "🐾";
  font-size: .95rem;
}

.kicker {
  color: var(--sage-dark);
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.pill {
  display: inline-block;
  margin-bottom: 12px;
  padding: 7px 14px;
  background: var(--sage-soft);
  border-radius: 999px;
  color: var(--sage-dark);
  font-size: .82rem;
  font-weight: 800;
}


/* 5. BUTTONS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: .2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--sage);
  color: #fff;
  box-shadow: 0 10px 24px rgba(82, 98, 71, .2);
}

.btn-primary:hover {
  background: var(--sage-dark);
}

.btn-secondary {
  background: rgba(255, 253, 249, .8);
  border-color: var(--line);
  color: var(--sage-dark);
}

.btn-outline-light {           /* for dark panels */
  border-color: rgba(255, 255, 255, .55);
  color: #fff;
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, .12);
}

.hero-actions {                /* row of buttons (also used outside the hero) */
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}


/* 6. HEADER & NAVIGATION
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(247, 242, 234, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 170px;
  text-decoration: none;
}

.brand img {
  width: 190px;
  height: 72px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 10px 13px;
  border-radius: 999px;
  color: var(--text-soft);
  font-size: .91rem;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: var(--sage-soft);
  color: var(--sage-dark);
}

.nav-links a.nav-cta {         /* the filled "Find Us" button */
  padding-inline: 18px;
  background: var(--sage);
  color: #fff;
  font-weight: 700;
}

.nav-links a.nav-cta:hover {
  background: var(--sage-dark);
}

.menu-toggle {                 /* hamburger, phones only */
  display: none;
  padding: 10px 14px;
  background: var(--sage-soft);
  border: 0;
  border-radius: 14px;
  color: var(--sage-dark);
  font-size: 1.2rem;
  cursor: pointer;
}


/* 7. MOBILE TAB BAR
   Hidden by default; shown on phones (see section 13).
   -------------------------------------------------------------------------- */
.tabbar {
  display: none;
}


/* 8. HERO
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 84px;
  background: var(--gradient-hero);
}

.hero::before,
.section-wave::before {        /* curved cream edge along the bottom */
  content: "";
  position: absolute;
  inset: auto -10% -70px -10%;
  height: 130px;
  background: var(--cream);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

.hero::after {                 /* large soft circle, top left */
  content: "";
  position: absolute;
  top: -180px;
  left: -260px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: var(--sage-soft);
  opacity: .7;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 54px;
  align-items: center;
}

.hero-copy .lead {
  font-size: 1.24rem;
}

/* Hero tagline: three lines, each with its own treatment
   line 1 = serif, line 2 = handwritten, line 3 = serif with a highlighter swipe */
.tagline {
  margin-bottom: 22px;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  line-height: 1.08;
  letter-spacing: -.03em;
  text-wrap: balance;
}

.tagline-line {
  display: block;
  animation: rise .7s ease both;          /* lines rise in one after another */
}

.tagline-line:nth-child(2) { animation-delay: .15s; }
.tagline-line:nth-child(3) { animation-delay: .3s; }

.tagline .script {
  margin-block: .04em;
  color: var(--sage);
  font-size: .9em;
  line-height: 1.2;
  letter-spacing: 0;
}

.tagline-mark {
  width: fit-content;
  padding-inline: .08em;
  background: var(--highlight);
}

.highlight {                   /* inline highlighter stripe for any phrase */
  padding-inline: .08em;
  background: var(--highlight);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

@media (min-width: 761px) {
  .tagline .script { padding-left: .35em; }   /* small indent for rhythm */
}

.hero-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 500px;
}

.hero-art::before {            /* circle behind the photo */
  content: "";
  position: absolute;
  width: 86%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--sage-soft);
}

.hero-card {
  position: relative;
  width: min(100%, 500px);
  padding: 24px;
  background: rgba(255, 253, 249, .88);
  border: 1px solid rgba(82, 98, 71, .14);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  transform: rotate(1.2deg);
}

.hero-card img {
  width: 100%;
  height: 440px;
  border-radius: var(--radius);
  object-fit: cover;
}

.hero-badge {
  position: absolute;
  bottom: -22px;
  left: -20px;
  max-width: 230px;
  padding: 15px 20px;
  background: var(--sage-dark);
  border-radius: 24px;
  box-shadow: var(--shadow);
  color: #fff;
  font-weight: 800;
  transform: rotate(-2deg);
}

.paw-cloud {                   /* faint decorative paw prints */
  position: absolute;
  inset: 0;
  z-index: 0;
  font-size: 42px;
  opacity: .16;
  pointer-events: none;
}

.paw-cloud span          { position: absolute; }
.paw-cloud span:nth-child(1) { top: 5%;     right: 8%; }
.paw-cloud span:nth-child(2) { top: 40%;    left: 2%;  }
.paw-cloud span:nth-child(3) { bottom: 9%;  right: 4%; }
.paw-cloud span:nth-child(4) { bottom: 28%; left: 8%;  }

.page-hero {                   /* banner at the top of inner pages */
  position: relative;
  overflow: hidden;
  padding: 70px 0 80px;
  background: var(--gradient-hero);
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero h1 { max-width: 900px; }
.page-hero p  { max-width: 760px; }


/* 9. SECTIONS & CARDS
   -------------------------------------------------------------------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.card {
  min-width: 0;
  padding: 30px;
  background: var(--white);
  border: 1px solid rgba(82, 98, 71, .12);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card h3 { margin-bottom: 10px; }

.card p {
  margin: 0;
  color: var(--text-soft);
}

.icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 18px;
  background: var(--sage);
  border-radius: 50%;
  font-size: 1.4rem;
}

.photo-frame {
  padding: 14px;
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  transform: rotate(-1deg);
}

.photo-frame img {
  width: 100%;
  height: 520px;
  border-radius: var(--radius);
  object-fit: cover;
}

.check-list,
.rule-list {
  margin: 25px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li,
.rule-list li {
  display: flex;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line);
}

.check-list li::before {
  content: "✓";
  color: var(--sage-dark);
  font-weight: 900;
}

.rule-list li::before {
  content: "🐾";
}

.banner {                      /* dark call-to-action strip */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 44px;
  background: var(--sage-dark);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  color: #fff;
}

.banner h2 {
  margin-bottom: 8px;
  color: #fff;
}

.banner p {
  max-width: 700px;
  margin: 0;
  color: #e7ece4;
}


/* Mission spotlight (mission page): the statement, big and centred
   -------------------------------------------------------------------------- */
.mission {
  position: relative;
  overflow: hidden;
  padding: 80px 56px;
  background: var(--sage-dark);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  color: #fff;
  text-align: center;
}

.mission::before {             /* faint paw watermark */
  content: "🐾";
  position: absolute;
  right: -1.5rem;
  bottom: -4.5rem;
  font-size: 16rem;
  line-height: 1;
  opacity: .08;
  transform: rotate(-16deg);
  pointer-events: none;
}

.mission > * {
  position: relative;          /* keep content above the watermark */
}

.mission-label {
  display: inline-block;
  padding: 7px 18px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.mission-text {
  max-width: 21em;
  margin: 26px auto 0;
  color: #fff;
  font-family: var(--font-heading);
  font-size: clamp(1.9rem, 4.2vw, 3.2rem);
  line-height: 1.25;
}

.mission-text .script {
  color: var(--sage-soft);
  font-size: 1.1em;
}

.mission-values {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}

.mission-values li {
  padding: 8px 20px;
  background: rgba(255, 255, 255, .13);
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  font-weight: 700;
}

.cards-2 {                     /* two cards side by side instead of three */
  grid-template-columns: repeat(2, 1fr);
}

.banner-actions {              /* group of buttons inside a banner */
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}


/* 10. STORIES, GALLERY, CONTACT, NOTICES  (used by the inner pages)
   -------------------------------------------------------------------------- */
.story-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
}

.story-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(82, 98, 71, .12);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.story-card img {
  width: 100%;
  height: 310px;
  object-fit: cover;
}

.story-body {
  padding: 25px;
}

.story-body p {
  color: var(--text-soft);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.gallery figure {
  margin: 0;
  overflow: hidden;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.gallery img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  transition: .35s;
}

.gallery figure:hover img {
  transform: scale(1.03);
}

.gallery figcaption {
  padding: 14px 18px;
  color: var(--sage-dark);
  font-weight: 700;
}

.gallery .wide   { grid-column: span 7; }
.gallery .normal { grid-column: span 5; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.contact-card {
  padding: 30px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.contact-item {
  display: flex;
  gap: 15px;
  padding: 17px 0;
  border-bottom: 1px dashed var(--line);
}

.contact-item:last-child {
  border-bottom: 0;
}

.contact-item strong {
  display: block;
  color: var(--sage-dark);
}

.contact-item a {
  color: var(--text-soft);
}

.map-wrap {
  min-height: 430px;
  overflow: hidden;
  background: var(--cream-deep);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.map-wrap iframe {
  width: 100%;
  height: 100%;
  min-height: 430px;
  border: 0;
}

.bank {
  margin-top: 22px;
  padding: 20px;
  background: var(--tint);
  border-radius: var(--radius-sm);
  font-size: .95rem;
}

.bank strong {
  color: var(--sage-dark);
}

.notice {
  margin: 25px 0;
  padding: 20px 22px;
  background: var(--tint);
  border-left: 5px solid var(--sage);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-soft);
}


/* Story list (rescue stories page): big photos, alternating sides
   -------------------------------------------------------------------------- */
.story-list {
  display: grid;
  gap: 84px;
}

.story {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.story:nth-child(even) .story-photo {   /* photo swaps to the right */
  order: 2;
  transform: rotate(1.4deg);
}

.story-photo {
  position: sticky;            /* photo stays in view while you read a long story */
  top: 112px;
  margin: 0 0 18px;
  padding: 12px;
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  transform: rotate(-1.4deg);
}

.story-photo img {
  width: 100%;
  height: 440px;
  border-radius: var(--radius);
  object-fit: cover;
}

.story-name {                  /* cat's name, like a collar tag on the photo */
  position: absolute;
  bottom: -18px;
  left: 28px;
  padding: 6px 20px 8px;
  background: var(--sage-dark);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  color: #fff;
  font-family: var(--font-script);
  font-size: 1.5rem;
  line-height: 1.3;
}

.story-name::before {
  content: "🐾 ";
  font-size: .85em;
}

.story-text h2 {
  font-size: clamp(1.9rem, 3.2vw, 2.7rem);
}

.story-text p {
  margin: 0 0 1.1em;
  color: var(--text-soft);
  font-size: 1.1rem;
}

.story-text p:last-child {
  margin-bottom: 0;
}

.story-text .story-teaser {    /* one-line summary under the title */
  margin: -6px 0 22px;
  color: var(--sage);
  font-family: var(--font-script);
  font-size: 1.3rem;
  line-height: 1.4;
}

.story-journey {               /* "Found -> Today" chips */
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
}

.journey-step {
  padding: 8px 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 22px;
  font-size: .95rem;
  line-height: 1.35;
}

.journey-step b {
  display: block;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 800;
}

.journey-step.is-today {
  background: var(--sage-dark);
  border-color: transparent;
  color: #fff;
}

.journey-step.is-today b {
  color: var(--sage-soft);
}

.journey-arrow {
  color: var(--sage);
  font-size: 1.4rem;
}

.story-text .story-punchline {   /* the emotional high point of each story */
  margin: 28px 0;
  color: var(--sage-dark);
  font-family: var(--font-script);
  font-size: 1.55rem;
  line-height: 1.5;
}

.story-text .story-lesson {      /* why the story matters: pull-quote */
  margin: 28px 0 0;
  padding: 4px 0 4px 18px;
  border-left: 4px solid var(--sage);
  color: var(--sage-dark);
  font-family: var(--font-heading);
  font-size: 1.12rem;
  font-style: italic;
}

.jump-links {                  /* row of links to each story */
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.jump-links a {
  padding: 9px 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--sage-dark);
  font-weight: 700;
  text-decoration: none;
  transition: background .2s ease, transform .2s ease;
}

.jump-links a:hover {
  background: var(--sage-soft);
  transform: translateY(-2px);
}

.quote-sign {                 /* handwritten line under a quote */
  margin: 24px 0 0;
  color: var(--sage);
  font-family: var(--font-script);
  font-size: 1.6rem;
  text-align: center;
}

.quote-icon {                  /* small paw above a closing quote */
  margin-bottom: 12px;
  font-size: 2rem;
  text-align: center;
  opacity: .5;
}


/* Support page: ways to give, EFT card, shop feature, FAQ
   -------------------------------------------------------------------------- */
.card.has-action {             /* card whose button sits at the bottom */
  display: flex;
  flex-direction: column;
}

.card.has-action p {
  margin-bottom: 20px;
}

.card.has-action .btn {
  margin-top: auto;
  align-self: flex-start;
}

/* EFT: steps on the left, bank card on the right */
.eft {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.eft-steps {
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.eft-steps li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 12px 0;
  counter-increment: step;
}

.eft-steps li::before {
  content: counter(step);
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: var(--sage);
  border-radius: 50%;
  color: #fff;
  font-weight: 800;
}

.bank-card {
  padding: 34px 34px 22px;
  background: var(--sage-dark);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  color: #fff;
}

.bank-card h3 {
  margin-bottom: 8px;
  color: #fff;
}

.bank-card .bank-note {
  margin: 18px 0 0;
  color: var(--footer-muted);
  font-size: .9rem;
}

.bank-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, .28);
}

.bank-label {
  display: block;
  color: var(--sage-soft);
  font-size: .82rem;
}

.bank-value {
  display: block;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: .04em;
  overflow-wrap: anywhere;
}

.copy-btn {
  flex: none;
  padding: 7px 16px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px;
  color: #fff;
  font: 700 .85rem var(--font-body);
  cursor: pointer;
  transition: background .2s ease;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, .26);
}

.copy-btn.is-copied {
  background: #fff;
  color: var(--sage-dark);
}

/* Shop feature: text and a cluster of gift tiles */
.shop-feature {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 56px;
  align-items: center;
}

.shop-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.shop-tile {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  font-size: 3.4rem;
}

.shop-tile:nth-child(1) { background: var(--sage-soft); transform: rotate(-3deg); }
.shop-tile:nth-child(2) { background: var(--sage);      transform: translateY(18px) rotate(2deg); }
.shop-tile:nth-child(3) { background: var(--cream-deep); transform: rotate(2deg); }
.shop-tile:nth-child(4) { background: var(--white); border: 1px solid var(--line); transform: translateY(18px) rotate(-2deg); }

/* FAQ: tap a question to open the answer */
.faq {
  display: grid;
  gap: 12px;
  max-width: 820px;
  margin: 0 auto;
}

.faq details {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.faq summary {
  position: relative;
  padding: 20px 64px 20px 24px;
  color: var(--sage-dark);
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--sage-soft);
  border-radius: 50%;
  font: 400 1.4rem var(--font-body);
  transform: translateY(-50%);
}

.faq details[open] summary::after {
  content: "−";
  background: var(--sage);
  color: #fff;
}

.faq-answer {
  padding: 0 24px 22px;
  color: var(--text-soft);
}

.faq-answer p {
  margin: 0;
}

.faq-answer a {
  color: var(--sage-dark);
  font-weight: 700;
}


/* Cat Lounge page: visit chips and the house rules
   -------------------------------------------------------------------------- */
.info-chips {                  /* small facts, as pills */
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.info-chips li {
  padding: 8px 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--sage-dark);
  font-size: .95rem;
  font-weight: 700;
}

.rules {                       /* "Please do" and "Please don't" side by side */
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.rules-group {
  padding: 30px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.rules-group h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}

.rules-group h3::before {      /* tick or cross badge */
  content: "✓";
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: var(--sage);
  border-radius: 50%;
  color: #fff;
  font: 800 1rem var(--font-body);
}

.rules-group.is-dont h3::before {
  content: "✕";
  background: var(--sage-dark);
}

.rules-list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.rules-list li {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--line);
  color: var(--text-soft);
}

.rules-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.rule-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  background: var(--sage-soft);
  border-radius: 50%;
  font-size: 1.35rem;
}

.rules-group.is-dont .rule-icon {
  background: var(--cream-deep);
}


/* Cat Rescue page: "what rescue can look like" tiles and social cards
   -------------------------------------------------------------------------- */
.rescue-path ,
.tile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rescue-path li ,
.tile-grid li {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  color: var(--sage-dark);
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.25;
}

.tile-grid {                   /* shop items: four across */
  grid-template-columns: repeat(4, 1fr);
}

.path-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  background: var(--sage-soft);
  border-radius: 50%;
  font-size: 1.5rem;
}

.rescue-path li.is-home ,
.tile-grid li.is-home {      /* the last step: the right home */
  background: var(--sage-dark);
  border-color: transparent;
  color: #fff;
}

.rescue-path li.is-home .path-icon ,
.tile-grid li.is-home .path-icon {
  background: rgba(255, 255, 255, .18);
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.social-card {                 /* the whole card is one big link */
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 32px 28px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  color: inherit;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}

.social-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.social-icon {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  background: var(--sage);
  border-radius: 50%;
  color: #fff;
  font-size: 1.6rem;
}

.social-icon svg {
  width: 30px;
  height: 30px;
}

.social-card h3 {
  margin: 8px 0 0;
}

.social-handle {
  color: var(--sage);
  font-weight: 700;
}

.social-card p {
  margin: 0;
  color: var(--text-soft);
}

.social-cta {
  margin-top: auto;
  padding-top: 14px;
  color: var(--sage-dark);
  font-weight: 800;
}

@media (prefers-reduced-motion: reduce) {
  .social-card:hover { transform: none; }
}


/* Contact page: quick-contact cards, copy chips and details
   -------------------------------------------------------------------------- */
.card.has-action p.contact-value {   /* phone number or email with a copy button */
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  color: var(--sage-dark);
  font-size: 1.05rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.copy-btn.on-light {           /* copy button for light backgrounds */
  background: var(--sage-soft);
  border-color: var(--line);
  color: var(--sage-dark);
}

.copy-btn.on-light:hover {
  background: var(--line);
}

.copy-btn.on-light.is-copied {
  background: var(--sage);
  border-color: var(--sage);
  color: #fff;
}

.card-actions {                /* one or more buttons at the bottom of a card */
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}

.card.has-action .card-actions .btn {
  margin-top: 0;
}

.section-title .info-chips {      /* centred chips under a section heading */
  justify-content: center;
}

.contact-card h2 {
  font-size: clamp(1.8rem, 3vw, 2.3rem);
}


/* 11. FOOTER
   -------------------------------------------------------------------------- */
.footer {
  position: relative;
  padding: 54px 0 24px;
  background: var(--footer-bg);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  color: var(--footer-text);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 38px;
}

.footer h3 {
  color: #fff;
  font-size: 1.25rem;
}

.footer p {
  color: var(--footer-muted);
}

.footer a {
  color: var(--footer-text);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* --- Footer lists, contact lines and social buttons --- */

.footer svg {
  flex: none;
  width: 22px;
  height: 22px;
}

.footer-links,
.footer-contact,
.footer-social {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links {
  display: grid;
  gap: 9px;
}

.footer-links a {
  display: inline-block;
  transition: transform .2s ease, color .2s ease;
}

.footer-links a:hover {
  color: #fff;
  transform: translateX(5px);
}

.footer-contact {
  display: grid;
  gap: 14px;
}

.footer-contact li {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-icon {                 /* round icon beside a contact line */
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, .12);
  border-radius: 50%;
  color: var(--sage-soft);
}

.footer-icon svg {
  width: 19px;
  height: 19px;
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.footer-social a {             /* round icon buttons */
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 50%;
  color: #fff;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.footer-social a:hover,
.footer-social a:focus-visible {
  background: var(--sage-soft);
  color: var(--sage-dark);
  text-decoration: none;
  transform: translateY(-3px);
}

@media (prefers-reduced-motion: reduce) {
  .footer-links a:hover,
  .footer-social a:hover { transform: none; }
}

/* --- Cute touches --- */

.footer::before {              /* a kitten peeking over the top edge */
  content: "";
  position: absolute;
  top: -58px;
  right: clamp(24px, 9%, 140px);
  width: 120px;
  height: 60px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 60'%3E%3Cpath d='M20 34 L28 4 L54 24 Z' fill='%233f4b39'/%3E%3Cpath d='M100 34 L92 4 L66 24 Z' fill='%233f4b39'/%3E%3Cpath d='M30 26 L31 12 L45 22 Z' fill='%23e8a9a9'/%3E%3Cpath d='M90 26 L89 12 L75 22 Z' fill='%23e8a9a9'/%3E%3Cellipse cx='60' cy='44' rx='44' ry='24' fill='%233f4b39'/%3E%3Ccircle cx='34' cy='49' r='4.5' fill='%23e8a9a9' opacity='.35'/%3E%3Ccircle cx='86' cy='49' r='4.5' fill='%23e8a9a9' opacity='.35'/%3E%3Ccircle cx='44' cy='40' r='6.5' fill='%23f7f2ea'/%3E%3Ccircle cx='76' cy='40' r='6.5' fill='%23f7f2ea'/%3E%3Ccircle cx='45' cy='41' r='3.6' fill='%23293028'/%3E%3Ccircle cx='75' cy='41' r='3.6' fill='%23293028'/%3E%3Ccircle cx='46.3' cy='39.6' r='1.2' fill='%23fff'/%3E%3Ccircle cx='76.3' cy='39.6' r='1.2' fill='%23fff'/%3E%3Cpath d='M57 48 H63 L60 52 Z' fill='%23e8a9a9'/%3E%3Cpath d='M60 52 Q56 57 51 54 M60 52 Q64 57 69 54' stroke='%23f7f2ea' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3Cpath d='M30 47 L10 43 M30 51 L10 53 M90 47 L110 43 M90 51 L110 53' stroke='%23f7f2ea' stroke-width='1.4' stroke-linecap='round' opacity='.7'/%3E%3Cellipse cx='34' cy='58' rx='11' ry='5' fill='%234d5c45'/%3E%3Cellipse cx='86' cy='58' rx='11' ry='5' fill='%234d5c45'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  animation: peek 4.5s ease-in-out infinite;
  pointer-events: none;
}

.footer::after {               /* a ball of yarn with a loose thread */
  content: "";
  position: absolute;
  top: -38px;
  left: clamp(24px, 8%, 120px);
  width: 84px;
  height: 40px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 84 40'%3E%3Cpath d='M40 30 Q58 40 70 28 T84 34' stroke='%23a9b89a' stroke-width='3' fill='none' stroke-linecap='round'/%3E%3Ccircle cx='22' cy='22' r='18' fill='%23a9b89a'/%3E%3Cpath d='M7 15 Q22 22 37 13 M5 25 Q22 33 39 24 M13 36 Q20 20 32 9' stroke='%23738366' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  pointer-events: none;
}

/* @keyframes peek {              kitten bobs up and down behind the edge */
  /* 0%, 100% { transform: translateY(6px); }
  50%      { transform: translateY(0); }
} */

/* .footer h3::before {
  content: "🐾 ";
  font-size: .75em;
} */

.footer-grid > div:first-child h3 + p {   /* tagline in the handwritten font */
  color: var(--sage-soft);
  font-family: var(--font-script);
  font-size: 1.2rem;
  line-height: 1.5;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  margin-top: 34px;
  padding-top: 18px;
  border-top: 2px dotted rgba(255, 255, 255, .22);   /* dotted like a paw trail */
  color: var(--footer-muted);
  font-size: .85rem;
}


/* 12. ANIMATION
   -------------------------------------------------------------------------- */
.reveal {
  animation: rise .7s ease both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(15px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal,
  .tagline-line,
  .footer::before { animation: none; }
  .btn:hover { transform: none; }
}


/* 13. RESPONSIVE
   -------------------------------------------------------------------------- */

/* Collapsed navigation: small laptops, tablets and phones ------------------
   The 9 menu links need about 1,170px, so below 1240px they move into the
   hamburger dropdown instead of squeezing or wrapping. */
@media (max-width: 1240px) {
  .menu-toggle { display: block; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    right: 12px;
    width: 280px;
    max-width: calc(100vw - 72px);          /* narrower, always leaves space on the left */
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    margin-top: 6px;
    padding: 10px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }

  .nav-links.open { display: flex; }
  .nav-links a { padding: 13px 16px; font-size: 1rem; }
  .nav-links a.nav-cta { text-align: center; }
}

/* Tablet and below ------------------------------------------------------- */
@media (max-width: 1000px) {
  .brand img { width: 165px; }

  .hero-grid,
  .split { grid-template-columns: 1fr; }
  .hero-art { min-height: 0; }

  .cards { grid-template-columns: 1fr 1fr; }
  .cards .card:last-child:nth-child(odd) { grid-column: 1 / -1; }   /* lone last card spans the row */
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }

  .gallery .wide,
  .gallery .normal { grid-column: span 6; }

  .story { grid-template-columns: 1fr; gap: 34px; }
  .story:nth-child(even) .story-photo { order: 0; }
  .eft,
  .shop-feature { grid-template-columns: 1fr; gap: 34px; }

  .social-grid { grid-template-columns: 1fr; }

  .tile-grid li { flex-direction: column; align-items: flex-start; gap: 10px; }

  .story-photo { position: relative; top: auto; }
  .story-photo img { height: 400px; }
}

/* Phones: "app mode" ---------------------------------------------------- */
@media (max-width: 760px) {
  :root {
    --gutter: 24px;
    --header-h: 64px;
  }

  body {
    padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px));   /* room for the tab bar */
  }

  /* Header */
  .brand { min-width: 0; }
  .brand img { width: 140px; height: 52px; }

  /* Hero becomes a rounded panel */
  .hero { padding: 16px 0 20px; background: var(--cream); }
  .hero::before,
  .hero::after,
  .hero-art::before,
  .paw-cloud { display: none; }

  .hero-grid {
    gap: 22px;
    padding: 26px 20px 22px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
  }

  h1 { font-size: 2.7rem; }
  h2 { font-size: 2rem; }
  .hero-copy .lead { font-size: 1.05rem; }
  .hero-actions { margin-top: 22px; }
  .hero-actions .btn { flex: 1 1 100%; }

  .hero-card {
    padding: 12px;
    background: var(--sage-soft);
    border-radius: var(--radius-lg);
    box-shadow: none;
    transform: none;
  }

  .hero-card img { height: 300px; border-radius: 24px; }

  .hero-badge {
    position: relative;
    bottom: 0;
    left: 0;
    max-width: none;
    margin-top: 12px;
    font-size: .92rem;
    transform: none;
  }

  /* Every section becomes a rounded panel */
  .section { padding: 12px 0; }

  .section .container {
    padding: 26px 20px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
  }

  .section-alt .container { background: var(--sage-soft); border-color: transparent; }
  .section:has(.banner) .container,
  .section:has(.mission) .container { padding: 0; background: none; border: 0; }

  .section-title { margin-bottom: 24px; text-align: left; }
  .split { gap: 26px; }

  /* Cards stack in one column */
  .cards { grid-template-columns: 1fr; gap: 16px; }
  .card { padding: 24px 20px; }

  /* Other components */
  .story-grid { grid-template-columns: 1fr; }

  .photo-frame { padding: 8px; border-radius: var(--radius); transform: none; }
  .photo-frame img { height: 300px; border-radius: 24px; }

  .banner { flex-direction: column; align-items: stretch; padding: 28px 22px; border-radius: var(--radius-lg); }
  .banner .btn { width: 100%; }

  .page-hero { padding: 34px 0 40px; }

  .mission { padding: 46px 22px; border-radius: var(--radius-lg); }
  .mission-label { font-size: .78rem; }
  .cards-2 { grid-template-columns: 1fr; }
  .banner-actions { flex-direction: column; }

  .story-list { gap: 52px; }
  .story { gap: 30px; }
  .story-photo,
  .story:nth-child(even) .story-photo { padding: 8px; border-radius: var(--radius); transform: none; }
  .story-photo img { height: 280px; border-radius: 24px; }
  .story-name { left: 20px; font-size: 1.3rem; }
  .story-journey { flex-direction: column; align-items: flex-start; gap: 4px; }
  .journey-arrow { margin-left: 22px; transform: rotate(90deg); }
  .story-text .story-punchline { font-size: 1.4rem; }

  .rules { grid-template-columns: 1fr; gap: 16px; }
  .rules-group { padding: 24px 18px; border-radius: var(--radius); }
  .rule-icon { width: 42px; height: 42px; font-size: 1.2rem; }

  .rescue-path ,
  .tile-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .rescue-path li ,
  .tile-grid li { flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px; font-size: 1.05rem; }
  .path-icon { width: 46px; height: 46px; font-size: 1.3rem; }
  .social-card { padding: 26px 22px; border-radius: var(--radius); }

  .bank-card { padding: 26px 20px 16px; border-radius: var(--radius-lg); }
  .bank-value { font-size: 1.02rem; }
  .shop-tile { font-size: 2.6rem; }
  .faq summary { padding: 18px 58px 18px 18px; font-size: 1.1rem; }
  .faq-answer { padding: 0 18px 20px; }
  .jump-links { gap: 8px; }

  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery .wide,
  .gallery .normal { grid-column: span 1; }
  .gallery img { height: 200px; }

  .footer { margin-top: 56px; padding-top: 40px; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .footer-grid { grid-template-columns: 1fr; }

  /* Floating bottom tab bar */
  .tabbar {
    display: flex;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    z-index: 60;
    padding: 6px;
    background: rgba(255, 253, 249, .94);
    backdrop-filter: blur(14px);
    border: 1px solid var(--line);
    border-radius: 30px;
    box-shadow: 0 10px 28px rgba(40, 50, 30, .2);
  }

  .tabbar a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 7px 0;
    background: none;
    border: 0;
    border-radius: 24px;
    color: var(--muted);
    font: 700 .72rem var(--font-body);
    text-decoration: none;
    cursor: pointer;
  }

  .tabbar span { font-size: 1.3rem; line-height: 1.3; }

  .tabbar [aria-current="page"] {
    background: var(--sage-soft);
    color: var(--sage-dark);
  }
}

/* Very small phones ------------------------------------------------------ */
@media (max-width: 380px) {
  h1 { font-size: 2.4rem; }
  .gallery { grid-template-columns: 1fr; }
}
