/* =============================================
   The Ireland Street Cats — main.css
   Mobile-first, warm & cozy palette
   ============================================= */

/* --- Variables --- */
:root {
  --cream:       #fdf6ee;
  --cream-dark:  #f5e9d8;
  --terracotta:  #c8613c;
  --terra-dark:  #a34e2e;
  --sage:        #7a9e87;
  --sage-light:  #c8dcd0;
  --dusty-blue:  #6b8fa8;
  --blue-light:  #cce0ee;
  --charcoal:    #2e2e2e;
  --mid-gray:    #666;
  --border:      #e4d4c0;
  --radius:      12px;
  --radius-sm:   8px;
  --shadow:      0 2px 12px rgba(0,0,0,0.08);
  --font-head:   'Georgia', 'Palatino Linotype', serif;
  --font-body:   'Segoe UI', system-ui, -apple-system, sans-serif;
  --max-width:   1100px;
}

/* --- Reset & base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--charcoal);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a { color: var(--terracotta); text-decoration: underline; }
a:hover { color: var(--terra-dark); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.25;
  color: var(--charcoal);
}

h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.9rem); margin-top: 2rem; margin-bottom: .75rem; }
h3 { font-size: 1.2rem; margin-bottom: .5rem; }

p { margin-bottom: 1rem; }

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

.main-content {
  flex: 1;
  padding: 2rem 0 3rem;
}

/* --- Header --- */
.site-header {
  background: var(--cream-dark);
  border-bottom: 2px solid var(--border);
  padding: .9rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
}

.site-title {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--terracotta);
  text-decoration: none;
}
.site-title:hover { color: var(--terra-dark); }

.site-nav { display: flex; flex-wrap: wrap; gap: .5rem 1rem; }

.site-nav a {
  color: var(--charcoal);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 500;
  padding: .2rem .1rem;
  border-bottom: 2px solid transparent;
  transition: border-color .15s, color .15s;
}
.site-nav a:hover {
  color: var(--terracotta);
  border-bottom-color: var(--terracotta);
}

/* --- Hero / homepage --- */
.hero {
  background: linear-gradient(135deg, var(--cream-dark) 0%, var(--sage-light) 100%);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  margin-bottom: 2.5rem;
  text-align: center;
}

.hero__title { color: var(--terracotta); margin-bottom: .5rem; }
.hero__subtitle { font-size: 1.1rem; color: var(--mid-gray); margin-bottom: 1.5rem; }

.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: .65rem 1.4rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  transition: background .15s, transform .1s;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }

.btn--primary {
  background: var(--terracotta);
  color: #fff;
}
.btn--primary:hover { background: var(--terra-dark); color: #fff; }

.btn--secondary {
  background: transparent;
  color: var(--terracotta);
  border: 2px solid var(--terracotta);
}
.btn--secondary:hover { background: var(--cream-dark); }

/* --- Cat grid --- */
.section-title {
  font-family: var(--font-head);
  color: var(--terracotta);
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: 1.25rem;
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

/* --- Cat card --- */
.cat-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform .18s, box-shadow .18s;
  border: 1px solid var(--border);
}
.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.13);
}

.cat-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.cat-card__placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream-dark);
  font-size: 3.5rem;
}

.cat-card__body { padding: .85rem; }
.cat-card__name { font-size: 1.1rem; margin-bottom: .25rem; }
.cat-card__temperament { font-size: .85rem; color: var(--mid-gray); margin-bottom: .5rem; }

/* --- Badges --- */
.badges {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin: .5rem 0;
}

.badge {
  display: inline-block;
  padding: .2rem .55rem;
  border-radius: 99px;
  font-size: .78rem;
  font-weight: 600;
}

.badge--green  { background: #d4f0d4; color: #2d6a2d; }
.badge--blue   { background: var(--blue-light); color: #2a5a78; }
.badge--orange { background: #ffe5cc; color: #a05000; }
.badge--cream  { background: var(--cream-dark); color: var(--mid-gray); border: 1px solid var(--border); }
.badge--red    { background: #fdd; color: #a00; }

.badges--small .badge { font-size: .7rem; padding: .15rem .45rem; }

/* --- Cat profile page --- */
.cat-profile__hero {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (min-width: 600px) {
  .cat-profile__hero {
    flex-direction: row;
    align-items: flex-start;
  }
}

.cat-profile__photo {
  width: 100%;
  max-width: 320px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  object-fit: cover;
  aspect-ratio: 1 / 1;
}

.cat-profile__photo-placeholder {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1 / 1;
  background: var(--cream-dark);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6rem;
}

.cat-profile__intro { flex: 1; }
.cat-profile__name { color: var(--terracotta); margin-bottom: .25rem; }
.cat-profile__color { color: var(--mid-gray); margin-bottom: .75rem; font-style: italic; }

.cat-profile__bio {
  margin-bottom: 2rem;
  max-width: 70ch;
}

/* --- Tables --- */
.details-table,
.vax-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: .95rem;
}

.details-table th,
.details-table td,
.vax-table th,
.vax-table td {
  padding: .55rem .75rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.details-table th,
.vax-table th {
  font-weight: 600;
  color: var(--mid-gray);
  font-size: .85rem;
  background: var(--cream-dark);
}

.details-table tr:last-child td,
.vax-table tr:last-child td { border-bottom: none; }

/* --- QR section --- */
.cat-profile__qr { margin-top: 2rem; }
.qr-code {
  border: 4px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  margin-top: .75rem;
}

/* --- Content pages (help, sponsor, about, contact) --- */
.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border);
}
.page-header h1 { color: var(--terracotta); }

.content-body { max-width: 72ch; }
.content-body h2 { color: var(--terracotta); }
.content-body ul, .content-body ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.content-body li { margin-bottom: .35rem; }

.callout {
  background: var(--cream-dark);
  border-left: 4px solid var(--terracotta);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

/* --- Footer --- */
.site-footer {
  background: var(--cream-dark);
  border-top: 2px solid var(--border);
  padding: 1.5rem 0;
  text-align: center;
  font-size: .88rem;
  color: var(--mid-gray);
}

.footer-links { margin: .5rem 0; }
.footer-links a { color: var(--mid-gray); }
.footer-note { font-style: italic; font-size: .82rem; margin-top: .5rem; }

/* --- Utility --- */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
