/* MeiMei Cattery — gallery style, warm Morandi palette */
:root {
  --bg: #F2EEE8; --sand: #E4DBD0; --line: #D8CCBE;
  --ink: #2E2823; --fg: #3A332D; --body: #5A5048; --mut: #6E635A; --accent: #7A5E40;
  --green: #1E2B26; --green-2: #2A3A33; --green-line: #4A5A52; --green-fg: #F2EEE8; --green-body: #CFC6B6; --green-mut: #B9B09F;
  --serif: "Cormorant Garamond", "Lora", Georgia, serif;
  --sans: "Inter", "Helvetica Neue", Arial, sans-serif;
  --pad: 28px; --max: 1240px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .55s; animation-timing-function: var(--ease); }
::view-transition-group(*) { animation-duration: .6s; animation-timing-function: var(--ease); }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--sans); font-size: 15px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
body.dark { background: var(--green); color: var(--green-fg); }
img, video { display: block; max-width: 100%; }
img { -webkit-user-drag: none; user-select: none; -webkit-touch-callout: none; }
a { color: inherit; }
a:hover { color: var(--accent); }
body.dark a:hover { color: #fff; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--fg); color: var(--bg); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }

/* type */
.eyebrow { margin: 0; font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: var(--mut); }
body.dark .eyebrow, .dark-section .eyebrow { color: var(--green-mut); }
.display { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(42px, 9vw, 84px); line-height: 1.02; letter-spacing: -.5px; color: var(--ink); }
.h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 6vw, 52px); line-height: 1.08; color: var(--ink); }
body.dark .display, body.dark .h2, .dark-section .h2 { color: var(--green-fg); }
em, .it { font-style: italic; }
.lead { margin: 0; font-size: 15px; line-height: 1.75; color: var(--body); max-width: 34em; }
body.dark .lead, .dark-section .lead { color: var(--green-body); }
.quote { margin: 0; font-family: var(--serif); font-style: italic; font-size: clamp(24px, 4vw, 34px); line-height: 1.35; color: var(--ink); max-width: 22em; }
body.dark .quote { color: var(--green-fg); }
.serif { font-family: var(--serif); }

/* layout */
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.section { padding-top: 64px; }
.section-lg { padding-top: 88px; }
.rule { border-top: 1px solid var(--line); }
body.dark .rule { border-color: var(--green-line); }
.dark-section { background: var(--green); color: var(--green-fg); }

/* header */
.site-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
body.dark .site-header { background: color-mix(in srgb, var(--green) 92%, transparent); }
.site-header .wrap { height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; }
.logo { text-decoration: none; text-align: center; line-height: 1; }
.logo b { display: block; font-family: var(--serif); font-weight: 400; font-size: 24px; letter-spacing: 6px; }
.logo small { display: block; margin-top: 4px; font-size: 9px; letter-spacing: 4px; color: var(--mut); }
body.dark .logo small { color: var(--green-mut); }
.icon-btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: none; padding: 0; text-decoration: none; }
.nav-desktop { display: none; gap: 32px; font-size: 12px; letter-spacing: 2px; text-transform: uppercase; }
.nav-desktop a { text-decoration: none; }
.menu { position: fixed; inset: 0; z-index: 60; background: var(--green); color: var(--green-fg); display: flex; flex-direction: column; padding: 20px var(--pad) 40px; opacity: 0; visibility: hidden; transition: opacity .5s var(--ease), visibility .5s; }
.menu.open { opacity: 1; visibility: visible; }
.menu-top { display: flex; justify-content: flex-end; }
.menu nav { margin-top: 48px; display: flex; flex-direction: column; gap: 6px; }
.menu nav a { font-family: var(--serif); font-size: 44px; line-height: 1.25; text-decoration: none; color: var(--green-fg); }
.menu .menu-foot { margin-top: auto; font-size: 12px; letter-spacing: 2px; color: var(--green-mut); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 28px; font-size: 12px; letter-spacing: 2px; text-transform: uppercase; text-decoration: none; border: 1px solid var(--fg); transition: background .4s var(--ease), color .4s var(--ease); }
.btn-solid { background: var(--fg); color: var(--bg); }
.btn-solid:hover { background: var(--ink); color: var(--bg); }
.btn-line:hover { background: var(--fg); color: var(--bg); }
.dark-section .btn, body.dark .btn { border-color: var(--green-mut); color: var(--green-fg); }
.dark-section .btn:hover, body.dark .btn:hover { background: var(--green-fg); color: var(--green); }
.btn-row { display: flex; flex-direction: column; gap: 12px; }
.text-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 12px; letter-spacing: 2px; text-transform: uppercase; text-decoration: none; }

/* reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal-img img { opacity: 0; transform: scale(1.03); transition: opacity 1.4s var(--ease), transform 1.8s var(--ease); }
.js .reveal-img.in img { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .js .reveal-img img { opacity: 1; transform: none; transition: none; }
  ::view-transition-group(*), ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* intro curtain (home only) */
.curtain { position: fixed; inset: 0; z-index: 90; background: var(--green); display: flex; align-items: center; justify-content: center; flex-direction: column; color: var(--green-fg); transition: opacity 1.2s var(--ease), visibility 1.2s; }
.curtain b { font-family: var(--serif); font-weight: 400; font-size: 44px; letter-spacing: 12px; opacity: 0; animation: fadein 1.2s .2s var(--ease) forwards; }
.curtain small { margin-top: 8px; font-size: 10px; letter-spacing: 6px; color: var(--green-mut); opacity: 0; animation: fadein 1.2s .5s var(--ease) forwards; }
.curtain.done { opacity: 0; visibility: hidden; }
@keyframes fadein { to { opacity: 1; } }

/* media frames */
.frame { overflow: hidden; background: var(--sand); }
body.dark .frame, .dark-section .frame { background: var(--green-2); }
.frame img, .frame video { width: 100%; height: 100%; object-fit: cover; }
.ratio-45 { aspect-ratio: 4 / 5; }
.ratio-32 { aspect-ratio: 3 / 2; }
.ratio-169 { aspect-ratio: 16 / 9; }
.matte { padding: 8px; border: 1px solid var(--green-line); }
.placeholder { display: flex; align-items: center; justify-content: center; font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--green-mut); }

/* home hero */
.hero-img { width: 100%; aspect-ratio: 4 / 5; max-height: 86vh; }
.hero-text { padding-top: 36px; }
.hero-text .lead { margin-top: 20px; }
.hero-text .btn-row { margin-top: 32px; }

/* carousel */
.rail { --edge: max(var(--pad), calc((100vw - var(--max)) / 2 + var(--pad))); display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: var(--edge); padding: 0 var(--edge) 4px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { flex: 0 0 72%; max-width: 340px; scroll-snap-align: start; }
.rail-progress { height: 1px; background: var(--line); margin-top: 28px; }
.rail-progress span { display: block; height: 1px; width: 25%; background: var(--fg); transition: transform .3s linear; transform-origin: left; }

/* kitten card */
.kcard { display: block; text-decoration: none; color: var(--fg); }
.kcard .frame { position: relative; aspect-ratio: 4 / 5; }
.kcard .frame img { transition: transform 1.2s var(--ease); }
.kcard:hover .frame img { transform: scale(1.03); }
.kcard .no { display: block; margin-top: 14px; font-size: 10px; letter-spacing: 2px; color: var(--mut); }
.kcard .nm { display: block; margin-top: 2px; font-family: var(--serif); font-size: 24px; line-height: 1.15; }
.kcard .meta { display: block; margin-top: 4px; font-size: 12px; line-height: 1.5; color: var(--body); }
.chip { position: absolute; left: 10px; top: 10px; display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 9px; background: var(--bg); color: var(--ink); font-size: 9px; letter-spacing: 1.6px; text-transform: uppercase; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--dot, #5E7356); }
.chip.available { --dot: #5E7356; } .chip.reserved { --dot: #A0675B; } .chip.home { --dot: #8A8178; }
.chip.lg { left: 20px; top: 20px; height: 30px; padding: 0 12px; font-size: 11px; }

/* grids */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 10px; row-gap: 36px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }

/* filters */
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 0 var(--pad); scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.pill { flex-shrink: 0; height: 40px; padding: 0 16px; border: 1px solid var(--fg); background: transparent; font-size: 12px; letter-spacing: 1px; transition: background .3s, color .3s; }
.pill[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.pill.swatch { border-color: var(--line); display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; }
.pill.swatch i { width: 12px; height: 12px; background: var(--sw); }
.pill.swatch[aria-pressed="true"] { border-color: var(--fg); background: var(--sand); color: var(--fg); }
.kgrid .kcard { transition: opacity .5s var(--ease); }
.kgrid .kcard[hidden] { display: none; }
.empty-note { display: none; margin-top: 8px; color: var(--body); }

/* colour tiles */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tiles a { text-decoration: none; }
.tiles span { display: block; height: 76px; background: var(--sw); transition: transform .6s var(--ease); }
.tiles a:hover span { transform: scale(.98); }
.tiles em { display: block; margin-top: 8px; font-style: normal; font-size: 13px; }

/* steps */
.steps { margin-top: 20px; border-top: 1px solid var(--line); }
.steps li { display: flex; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.steps ol { margin: 0; padding: 0; list-style: none; }
.steps .num { flex: 0 0 40px; font-family: var(--serif); font-size: 26px; color: var(--accent); line-height: 1.2; }
.steps b { display: block; font-weight: 500; }
.steps p { margin: 4px 0 0; font-size: 14px; color: var(--body); }

/* film */
.film { position: relative; width: 100%; aspect-ratio: 16 / 9; background: var(--green); overflow: hidden; border: 0; padding: 0; display: block; }
.film img, .film video, .film iframe { width: 100%; height: 100%; object-fit: cover; border: 0; }
.film .play { position: absolute; left: 18px; bottom: 18px; width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--green-fg); background: rgba(30,43,38,.35); display: flex; align-items: center; justify-content: center; transition: transform .5s var(--ease), background .5s; }
.film:hover .play { transform: scale(1.06); background: rgba(30,43,38,.6); }
.film .dur { position: absolute; right: 18px; bottom: 36px; font-size: 11px; letter-spacing: 2px; color: var(--green-fg); }

/* kitten detail */
.k-hero { position: relative; }
.k-slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; aspect-ratio: 4 / 5; max-height: 88vh; background: var(--sand); }
.k-slides::-webkit-scrollbar { display: none; }
.k-slides button { flex: 0 0 100%; scroll-snap-align: start; border: 0; padding: 0; background: none; height: 100%; cursor: zoom-in; }
.k-slides img { width: 100%; height: 100%; object-fit: cover; }
.k-count { position: absolute; right: 20px; bottom: 16px; font-size: 11px; letter-spacing: 2px; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.4); }
.facts { margin-top: 28px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.facts div { padding: 16px 0; border-bottom: 1px solid var(--line); }
.facts div:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--line); }
.facts dt { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--mut); }
.facts dd { margin: 6px 0 0; font-size: 15px; }
.facts small { display: block; font-size: 12px; color: var(--mut); }
body.dark .facts, body.dark .facts div { border-color: var(--green-line); }
body.dark .facts dt { color: var(--green-mut); }
.loop { position: relative; aspect-ratio: 4 / 5; max-width: 560px; }
.loop-tag { position: absolute; left: 14px; bottom: 14px; display: flex; align-items: center; gap: 8px; font-size: 10px; letter-spacing: 2px; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.45); }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.gallery button { border: 0; padding: 0; background: var(--sand); aspect-ratio: 4 / 5; overflow: hidden; cursor: zoom-in; }
.gallery button:first-child { grid-column: 1 / -1; aspect-ratio: 3 / 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.gallery button:hover img { transform: scale(1.03); }
.parents-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 28px; }
.pcard { display: block; text-decoration: none; color: var(--green-fg); }
.pcard .frame { aspect-ratio: 4 / 5; }
.pcard .role { display: block; margin-top: 12px; font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--green-mut); }
.pcard .nm { display: flex; justify-content: space-between; align-items: baseline; margin-top: 2px; font-family: var(--serif); font-size: 24px; }
.pcard .meta { display: block; margin-top: 2px; font-size: 12px; color: var(--green-mut); }
.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 24px auto 0; }
.contact-grid .btn { padding: 0 8px; }
.next { display: flex; align-items: center; gap: 16px; padding: 20px 0; text-decoration: none; }
.next img { width: 64px; height: 80px; object-fit: cover; }
.next .grow { flex: 1; }

/* parents */
.tabs { display: flex; border-bottom: 1px solid var(--green-line); margin-top: 28px; }
.tabs a { flex: 1; min-height: 44px; display: flex; align-items: center; justify-content: center; font-size: 12px; letter-spacing: 2px; text-decoration: none; color: var(--green-mut); border-bottom: 1px solid transparent; }
.tabs a.on, .tabs a:hover { color: var(--green-fg); border-color: var(--green-fg); }
.sires { display: grid; gap: 36px; }
.dams { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; row-gap: 32px; }
.detail-rows p { margin: 0; padding: 14px 0; display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--green-line); font-size: 14px; }
.detail-rows p span { color: var(--green-body); text-align: right; }
.detail-rows { border-top: 1px solid var(--green-line); margin-top: 14px; }
.hrail { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; padding: 0 var(--pad); }
.hrail::-webkit-scrollbar { display: none; }
.hrail > * { flex: 0 0 46%; max-width: 240px; }

/* contact */
.qr { display: flex; gap: 20px; align-items: center; padding: 24px; background: var(--sand); }
.qr .code { flex: 0 0 120px; width: 120px; height: 120px; background: var(--bg); display: flex; align-items: center; justify-content: center; text-align: center; font-size: 10px; letter-spacing: 1.5px; color: var(--mut); }
.qr .code img { width: 100%; height: 100%; object-fit: contain; }
.channels a { display: flex; align-items: center; justify-content: space-between; min-height: 76px; border-bottom: 1px solid var(--line); text-decoration: none; }
.channels small { display: block; font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--mut); }
.channels b { display: block; margin-top: 4px; font-family: var(--serif); font-weight: 400; font-size: 24px; }

/* footer */
.site-footer { margin-top: 80px; padding: 48px 0 40px; text-align: center; border-top: 1px solid var(--line); }
body.dark .site-footer { border-color: var(--green-line); }
.site-footer b { font-family: var(--serif); font-weight: 400; font-size: 22px; letter-spacing: 5px; }
.site-footer p { margin: 10px 0 0; font-size: 12px; color: var(--mut); }
body.dark .site-footer p { color: var(--green-mut); }
.foot-links { display: flex; justify-content: center; gap: 22px; margin-top: 16px; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; }
.foot-links a { text-decoration: none; }
.cta-band { background: var(--sand); padding: 64px var(--pad); text-align: center; }
.cta-band .btn { margin-top: 26px; width: 100%; max-width: 360px; }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(20, 24, 22, .97); display: none; touch-action: none; }
.lightbox.open { display: block; animation: lbin .4s var(--ease); }
@keyframes lbin { from { opacity: 0; } to { opacity: 1; } }
.lightbox .stage { position: absolute; inset: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; transform-origin: 0 0; will-change: transform; cursor: grab; }
.lightbox .wm { position: absolute; right: 18px; bottom: 18px; font-family: var(--serif); font-size: 13px; letter-spacing: 6px; color: rgba(255,255,255,.55); pointer-events: none; }
.lightbox .lb-close, .lightbox .lb-prev, .lightbox .lb-next { position: absolute; width: 48px; height: 48px; border: 0; background: rgba(0,0,0,.25); color: #fff; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.lightbox .lb-close { right: 14px; top: 14px; }
.lightbox .lb-prev { left: 12px; top: 50%; margin-top: -24px; }
.lightbox .lb-next { right: 12px; top: 50%; margin-top: -24px; }
.lightbox .lb-hint { position: absolute; left: 0; right: 0; top: 24px; text-align: center; font-size: 11px; letter-spacing: 2px; color: rgba(255,255,255,.6); pointer-events: none; }

/* ---------- larger screens ---------- */
@media (min-width: 760px) {
  :root { --pad: 48px; }
  .nav-desktop { display: flex; }
  .menu-btn { display: none; }
  .site-header .wrap { padding: 0 var(--pad); height: 76px; }
  .home-hero { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 64px; padding: 24px var(--pad) 0; max-width: var(--max); margin: 0 auto; }
  .home-hero .hero-img { max-height: 82vh; }
  .hero-text { padding: 0; }
  .btn-row { flex-direction: row; }
  .rail > * { flex: 0 0 38%; }
  .grid-2.kgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 20px; row-gap: 48px; }
  .grid-3 { gap: 14px; }
  .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
  .k-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: start; max-width: var(--max); margin: 0 auto; padding: 24px var(--pad) 0; }
  .k-layout .k-hero { position: sticky; top: 96px; }
  .k-layout .k-info .wrap { padding-left: 0; padding-right: 0; }
  .k-layout .k-info > .wrap:first-child { padding-top: 8px; }
  .k-slides { max-height: 82vh; }
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .parents-pair { gap: 28px; max-width: 760px; }
  .contact-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 760px; }
  .sires { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
  .dams { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 24px; }
  .hrail > * { flex: 0 0 22%; }
  .contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
}
@media (min-width: 1100px) {
  .grid-2.kgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rail > * { flex: 0 0 26%; }
}
