/* ============================================================
   JERUSALEM TOP CATTERY

   The palette starts from the logo — its crimson (#BF191C) and
   olive-gold (#9F8F67) are exact samples — and opens out into
   the cobalt and turquoise of Jerusalem's ceramic tilework.

   Change these values and the whole site follows.
   ============================================================ */

:root {
  --red:      #BF191C;   /* logo crimson */
  --red-deep: #8E1114;   /* pressed / hover state */
  --gold:     #9F8F67;   /* logo olive-gold */
  --gold-lt:  #C9BC96;
  --cobalt:   #1B4B8F;   /* tile blue */
  --teal:     #17817C;   /* tile turquoise */
  --cream:    #FBF6EC;   /* glaze ground */
  --sand:     #F3EADA;   /* second ground */
  --ink:      #1F1A16;   /* text */
  --ink-soft: #5C5147;   /* secondary text */

  --measure: 36rem;
  --gap: clamp(1.25rem, 3vw, 2.5rem);
  --pad: clamp(1.25rem, 5vw, 5rem);

  --display: "Fraunces", Georgia, serif;
  --body: "Figtree", system-ui, sans-serif;
  --script: "Yellowtail", cursive;
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  --tile: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cpath d='M32 5 38.5 20.5 54 14 47.5 29.5 63 32 47.5 34.5 54 50 38.5 43.5 32 59 25.5 43.5 10 50 16.5 34.5 1 32 16.5 29.5 10 14 25.5 20.5Z' fill='none' stroke='%231B4B8F' stroke-width='1.1' opacity='0.16'/%3E%3C/svg%3E");
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

.mono {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.script {
  font-family: var(--script);
  font-weight: 400;
  color: var(--red);
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  line-height: 1.1;
  margin: 0 0 0.35rem;
}
.script--inline { display: inline; font-size: 1em; color: var(--red); }

.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: 1rem; top: 1rem; z-index: 60;
  background: var(--ink); color: var(--cream); padding: 0.6rem 1rem;
}

:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }

/* ---------- masthead ---------- */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem var(--pad);
  background: var(--cream);
  border-bottom: 3px solid var(--gold);
}

.wordmark { display: block; line-height: 0; }
.wordmark img { height: clamp(46px, 7vw, 66px); width: auto; }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(0.85rem, 2.4vw, 1.6rem);
  font-size: 0.97rem;
  font-weight: 500;
}
.nav a {
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
}
.nav a:hover { border-bottom-color: var(--red); }
.nav a[aria-current="page"] { border-bottom-color: var(--red); color: var(--red); }

.nav__cta {
  background: var(--red);
  color: var(--cream);
  border: 2px solid var(--red) !important;
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  font-weight: 700;
}
.nav__cta:hover { background: var(--red-deep); border-color: var(--red-deep) !important; color: var(--cream); }

/* ---------- shared ---------- */

.eyebrow {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 0.75rem;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.06;
  margin: 0 0 1rem;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.85rem, 3.8vw, 2.9rem); }
h3 { font-size: 1.3rem; line-height: 1.2; }

.lede { font-size: 1.14rem; max-width: var(--measure); color: var(--ink-soft); }

.btn {
  display: inline-block;
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  background: var(--red);
  color: var(--cream);
  border: 2px solid var(--red);
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}
.btn:hover { background: var(--red-deep); border-color: var(--red-deep); transform: translateY(-2px); }

.btn--ghost { background: transparent; color: var(--cobalt); border-color: var(--cobalt); }
.btn--ghost:hover { background: var(--cobalt); border-color: var(--cobalt); color: var(--cream); }

.btn--light { background: var(--cream); color: var(--red); border-color: var(--cream); }
.btn--light:hover { background: var(--gold-lt); border-color: var(--gold-lt); color: var(--ink); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--gap);
  align-items: center;
  padding: clamp(2.75rem, 7vw, 5.5rem) var(--pad);
  background: var(--sand) var(--tile);
  border-bottom: 3px solid var(--gold);
  overflow: hidden;
}
.hero__text { position: relative; z-index: 1; }
.hero h1 { margin-bottom: 1.1rem; }
.hero .lede { color: var(--ink); }
.hero__actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.9rem; }

.hero__portrait { margin: 0; position: relative; z-index: 1; }
.hero__portrait figcaption {
  margin-top: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.hero__portrait figcaption strong { font-family: var(--display); font-weight: 600; font-size: 1.1rem; }
.hero__portrait figcaption .mono { color: var(--ink-soft); }

/* photo panel — lettered until a real photo is dropped in */
.portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--cream) center/cover no-repeat;
  border: 3px solid var(--gold);
  border-radius: 14px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.portrait__mark {
  font-family: var(--script);
  font-size: clamp(4rem, 11vw, 7.5rem);
  color: var(--gold-lt);
  line-height: 1;
}
.portrait.has-photo .portrait__mark { display: none; }

/* ---------- data strip ---------- */

.strip {
  padding: 1.6rem var(--pad);
  background: var(--cobalt);
  color: var(--cream);
}
.strip dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 1.4rem;
}
.strip dt {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-lt);
  margin-bottom: 0.3rem;
}
.strip dd { margin: 0; font-family: var(--display); font-weight: 600; font-size: 1.3rem; }

/* ---------- prose sections ---------- */

.prose { padding: clamp(3rem, 8vw, 6rem) var(--pad); }
.prose p { max-width: var(--measure); }

.prose--deep {
  background: var(--teal) var(--tile);
  color: var(--cream);
  border-block: 3px solid var(--gold);
}
.prose--deep .eyebrow { color: var(--gold-lt); }
.prose--deep p { color: rgba(251,246,236,0.9); }

.facts { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; gap: 1.1rem; max-width: var(--measure); }
.facts li {
  position: relative;
  padding: 1rem 1.15rem 1rem 2.9rem;
  background: var(--sand);
  border-radius: 12px;
}
.facts__dot {
  position: absolute;
  left: 1.05rem; top: 1.35rem;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--gold);
}
.facts__dot[data-tone="cobalt"] { background: var(--cobalt); }
.facts__dot[data-tone="teal"]   { background: var(--teal); }
.facts__dot[data-tone="red"]    { background: var(--red); }

.steps { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; gap: 1.75rem; }
.steps li { display: grid; grid-template-columns: 3.25rem 1fr; gap: 1rem; max-width: 44rem; align-items: start; }
.step__no {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.85rem;
  display: grid;
  place-items: center;
  width: 2.7rem; height: 2.7rem;
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
}
.steps h3 { margin-bottom: 0.25rem; }
.steps p { margin: 0; }

/* ---------- callout ---------- */

.callout {
  background: var(--red);
  color: var(--cream);
  padding: clamp(2.75rem, 6vw, 4.5rem) var(--pad);
  text-align: center;
  border-block: 3px solid var(--gold);
}
.callout .script { color: var(--gold-lt); }
.callout h2 { margin: 0 auto 1.75rem; max-width: 22ch; }

/* ---------- contact ---------- */

.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
  margin-top: 2.25rem;
  max-width: 44rem;
}
.ccard {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.4rem 1.5rem;
  border-radius: 14px;
  background: var(--sand);
  border: 2px solid var(--gold-lt);
  text-decoration: none;
  transition: transform 0.18s, border-color 0.18s, background 0.18s;
}
.ccard__label { color: var(--ink-soft); }
.ccard__value { font-family: var(--display); font-weight: 600; font-size: 1.2rem; word-break: break-word; }
.ccard__go { font-weight: 700; font-size: 0.92rem; color: var(--red); }
.ccard__go--quiet { color: var(--ink-soft); font-weight: 400; }

.ccard--ig:hover { transform: translateY(-3px); border-color: var(--red); background: #fff; }

/* ---------- catalog ---------- */

.page-head {
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--pad);
  background: var(--sand) var(--tile);
  border-bottom: 3px solid var(--gold);
}

.filters {
  padding: 1.1rem var(--pad);
  background: var(--cobalt);
  display: flex;
  align-items: center;
  gap: 0.9rem 1.5rem;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 20;
}
.filters__row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.filters__count { color: var(--gold-lt); margin: 0; margin-left: auto; }

.chip {
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.87rem;
  background: transparent;
  color: var(--cream);
  border: 2px solid rgba(251,246,236,0.45);
  border-radius: 999px;
  padding: 0.42rem 1rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.chip:hover { border-color: var(--cream); }
.chip.is-on { background: var(--cream); border-color: var(--cream); color: var(--cobalt); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16.5rem, 1fr));
  gap: var(--gap);
  padding: clamp(2rem, 5vw, 3.5rem) var(--pad) clamp(2.5rem, 6vw, 4.5rem);
}

/* the cat card */
.card {
  background: #fff;
  border: 2px solid var(--gold-lt);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: rise 0.45s ease both;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 16px 32px -20px rgba(31,26,22,0.55); }

/* each card carries one of the tile colours as its band */
.card__band { height: 8px; background: var(--gold); }
.card[data-tone="cobalt"] .card__band { background: var(--cobalt); }
.card[data-tone="teal"]   .card__band { background: var(--teal); }
.card[data-tone="red"]    .card__band { background: var(--red); }
.card[data-tone="gold"]   .card__band { background: var(--gold); }

.card__photo { position: relative; }
.card__photo .portrait { border: 0; border-radius: 0; border-bottom: 2px solid var(--gold-lt); }

.card__status {
  position: absolute;
  top: 0.7rem; left: 0.7rem;
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.03em;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
}
.card__status[data-status="Available"] { background: var(--red); }
.card__status[data-status="Reserved"]  { background: var(--gold); color: var(--ink); }
.card__status[data-status="Breeding"]  { background: var(--teal); }
.card__status[data-status="Retired"]   { background: var(--cobalt); }

.card__body { padding: 1.1rem 1.2rem 1.35rem; display: flex; flex-direction: column; gap: 0.8rem; flex: 1; }
.card__name { font-family: var(--display); font-weight: 600; font-size: 1.3rem; line-height: 1.15; margin: 0; }
.card__role {
  display: inline-block;
  margin-top: 0.45rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.card__tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0; padding: 0; list-style: none; }
.card__tags li {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  background: var(--sand);
  color: var(--ink-soft);
}

.card__data { margin: 0; font-size: 0.85rem; display: grid; grid-template-columns: 4.5rem 1fr; gap: 0.25rem 0.75rem; }
.card__data dt { font-family: var(--mono); font-size: 0.63rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); padding-top: 0.15rem; }
.card__data dd { margin: 0; }

.card__note { margin: 0; font-size: 0.92rem; color: var(--ink-soft); border-top: 2px dotted var(--gold-lt); padding-top: 0.8rem; }

.empty { text-align: center; padding: 0 var(--pad) 4rem; color: var(--ink-soft); }
.linkish { background: none; border: 0; padding: 0; color: var(--red); cursor: pointer; font: inherit; font-weight: 700; text-decoration: underline; }

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

/* ---------- footer ---------- */

.footer {
  background: var(--ink);
  color: var(--gold-lt);
  padding: 2.25rem var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  flex-wrap: wrap;
}
.footer p { margin: 0; }
.footer__mark { color: var(--cream); font-size: 1.6rem; margin: 0; }

/* ---------- responsive ---------- */

@media (max-width: 780px) {
  .hero { grid-template-columns: 1fr; }
  .hero__portrait { order: -1; max-width: 19rem; }
  .filters { position: static; }
  .filters__count { margin-left: 0; }
  .masthead { justify-content: center; text-align: center; }
  .nav { justify-content: center; flex-wrap: wrap; font-size: 0.92rem; }
  .footer { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   ARABIC + RIGHT-TO-LEFT
   ============================================================ */

.lang {
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.9rem;
  background: transparent;
  color: var(--cobalt);
  border: 2px solid var(--cobalt);
  border-radius: 999px;
  padding: 0.42rem 0.95rem;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}
.lang:hover { background: var(--cobalt); color: var(--cream); }

/* Arabic typography */
html[lang="ar"] body { font-family: "Tajawal", system-ui, sans-serif; line-height: 1.85; }
html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] .card__name,
html[lang="ar"] .strip dd,
html[lang="ar"] .ccard__value,
html[lang="ar"] .hero__portrait figcaption strong {
  font-family: "Cairo", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.35;
}
/* the brush script has no Arabic — use Cairo, keep the colour */
html[lang="ar"] .script,
html[lang="ar"] .footer__mark {
  font-family: "Cairo", system-ui, sans-serif;
  font-weight: 600;
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
}
html[lang="ar"] .lang { font-family: var(--body); }
/* mono labels look wrong in Arabic — use the normal face */
html[lang="ar"] .mono,
html[lang="ar"] .eyebrow,
html[lang="ar"] .card__role,
html[lang="ar"] .card__data dt,
html[lang="ar"] .strip dt,
html[lang="ar"] .ccard__label {
  font-family: "Tajawal", system-ui, sans-serif;
  letter-spacing: 0;
  text-transform: none;
  font-size: 0.8rem;
}

/* mirrored bits that logical properties don't cover */
[dir="rtl"] .card__status { left: auto; right: 0.7rem; }
[dir="rtl"] .facts li { padding-left: 1.15rem; padding-right: 2.9rem; }
[dir="rtl"] .facts__dot { left: auto; right: 1.05rem; }
[dir="rtl"] .filters__count { margin-left: 0; margin-right: auto; }
[dir="rtl"] .steps li { grid-template-columns: 3.25rem 1fr; }
[dir="rtl"] .skip:focus { left: auto; right: 1rem; }
[dir="rtl"] .ccard__go { direction: rtl; }
