/* =========================================================
   CottenPuffs Our Cats Page
========================================================= */

/* =========================================================
   Page Hero
========================================================= */

.cats-hero {
  position: relative;
  overflow: hidden;
  padding-block: 92px 120px;
  background:
    linear-gradient(
      90deg,
      rgba(233, 228, 220, 0.35),
      transparent 45%
    ),
    var(--background);
}

.cats-hero::before {
  position: absolute;
  top: -260px;
  left: -210px;
  width: 570px;
  height: 570px;
  border: 1px solid var(--border-light);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.cats-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(520px, 1fr);
  align-items: center;
  gap: clamp(60px, 8vw, 120px);
}

.cats-hero-content {
  max-width: 650px;
}

.cats-hero h1 {
  font-size: clamp(4.8rem, 7.5vw, 7.8rem);
}

.cats-hero-description {
  max-width: 530px;
  margin-bottom: 40px;
  color: var(--muted);
  font-size: 1rem;
}

.hero-scroll-link {
  display: inline-flex;
  align-items: center;
  gap: 25px;
  border-bottom: 1px solid var(--charcoal);
  padding-bottom: 8px;
  color: var(--charcoal);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.hero-scroll-arrow {
  transition: transform 180ms ease;
}

.hero-scroll-link:hover .hero-scroll-arrow {
  transform: translateY(5px);
}

/* =========================================================
   Editorial Hero Gallery
========================================================= */

.cats-hero-gallery {
  position: relative;
  display: grid;
  min-height: 650px;
  grid-template-columns: 1.2fr 0.7fr;
  grid-template-rows: repeat(2, 1fr);
  gap: 17px;
}

.cats-hero-gallery figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: var(--background-deep);
  box-shadow: var(--shadow-card);
}

.cats-hero-gallery img {
  height: 100%;
  object-fit: cover;
  filter: saturate(0.7);
  transition:
    transform 900ms cubic-bezier(0.2, 0.65, 0.3, 1),
    filter 300ms ease;
}

.cats-hero-gallery figure:hover img {
  transform: scale(1.035);
  filter: saturate(0.85);
}

.hero-gallery-main {
  grid-row: 1 / 3;
}

.hero-gallery-main img,
.hero-gallery-small img {
  object-position: center;
}

.cats-hero-gallery figcaption {
  position: absolute;
  right: 17px;
  bottom: 17px;
  left: 17px;
  padding: 14px 16px;
  background: rgba(250, 248, 244, 0.9);
  color: var(--charcoal);
  font-family: var(--serif);
  font-size: 1.35rem;
  line-height: 1;
  backdrop-filter: blur(12px);
}

.cats-hero-gallery figcaption span {
  display: block;
  margin-bottom: 5px;
  color: var(--olive-dark);
  font-family: var(--sans);
  font-size: 0.53rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.gallery-monogram {
  position: absolute;
  right: -28px;
  bottom: 50%;
  display: flex;
  width: 94px;
  height: 94px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--background-light);
  color: var(--charcoal);
  box-shadow: var(--shadow-card);
  transform: translateY(50%);
}

.gallery-monogram span {
  font-family: var(--serif);
  font-size: 2rem;
  line-height: 1;
}

.gallery-monogram small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.41rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

/* =========================================================
   Family Statement
========================================================= */

.family-statement {
  border-block: 1px solid var(--border);
  padding-block: 82px;
  background: var(--background-light);
}

.family-statement-grid {
  display: grid;
  grid-template-columns: 75px 1fr 0.62fr;
  align-items: start;
  gap: clamp(40px, 6vw, 90px);
}

.statement-number {
  margin: 11px 0 0;
  color: var(--olive-dark);
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.family-statement h2 {
  max-width: 660px;
  margin: 0;
  font-size: clamp(2.8rem, 4.4vw, 4.8rem);
}

.statement-copy {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

/* =========================================================
   Profile Heading and Filters
========================================================= */

.profiles-section {
  background: var(--background);
}

.profiles-heading {
  display: grid;
  grid-template-columns: 1fr 0.55fr;
  align-items: end;
  gap: 70px;
  margin-bottom: 48px;
}

.profiles-heading h2 {
  margin-bottom: 0;
}

.profiles-heading > p {
  max-width: 530px;
  margin: 0 0 8px;
  color: var(--muted);
}

.profile-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 52px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.profile-filter {
  min-height: 42px;
  border: 1px solid var(--border);
  padding: 10px 19px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.profile-filter:hover,
.profile-filter.active {
  border-color: var(--charcoal);
  background: var(--charcoal);
  color: #ffffff;
}

/* =========================================================
   Profile Cards
========================================================= */

.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 65px 21px;
}

.profile-card {
  position: relative;
  min-width: 0;
  cursor: pointer;
  outline: none;
  animation: profileFadeIn 420ms ease both;
}

.profile-card:nth-child(3n + 2) {
  transform: translateY(46px);
}

.profile-card.hidden {
  display: none;
}

.profile-card:focus-visible {
  outline: 2px solid var(--olive-dark);
  outline-offset: 8px;
}

.profile-card:focus-visible .profile-card-image {
  box-shadow:
    0 0 0 4px var(--background),
    0 0 0 6px var(--olive-dark),
    var(--shadow-soft);
}

.profile-card-image {
  position: relative;
  height: 510px;
  overflow: hidden;
  background: var(--background-deep);
  box-shadow: var(--shadow-card);
  transition:
    box-shadow 220ms ease,
    transform 220ms ease;
}

.profile-card-image::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to top,
      rgba(24, 24, 22, 0.4),
      transparent 42%
    );
  content: "";
  pointer-events: none;
}

.profile-card-image img {
  height: 100%;
  object-fit: cover;
  filter: saturate(0.72);
  transition:
    transform 850ms cubic-bezier(0.2, 0.65, 0.3, 1),
    filter 250ms ease;
}

.profile-card:hover .profile-card-image,
.profile-card:focus-visible .profile-card-image {
  box-shadow: var(--shadow-soft);
  transform: translateY(-4px);
}

.profile-card:hover .profile-card-image img,
.profile-card:focus-visible .profile-card-image img {
  transform: scale(1.045);
  filter: saturate(0.9);
}

.profile-card-number {
  position: absolute;
  z-index: 2;
  top: 18px;
  left: 18px;
  display: flex;
  min-width: 39px;
  height: 39px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(37, 37, 34, 0.45);
  color: #ffffff;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  backdrop-filter: blur(9px);
}

.profile-role-tag {
  position: absolute;
  z-index: 2;
  top: 18px;
  right: 18px;
  padding: 8px 11px;
  background: rgba(250, 248, 244, 0.92);
  color: var(--charcoal);
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.profile-image-name {
  position: absolute;
  z-index: 2;
  right: 24px;
  bottom: 21px;
  left: 24px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  color: #ffffff;
}

.profile-image-name h3 {
  margin: 0;
  color: #ffffff;
  font-size: 3.2rem;
  line-height: 0.9;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.22);
}

.profile-image-name span {
  max-width: 110px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.58rem;
  line-height: 1.4;
  text-align: right;
}

.profile-card-content {
  padding: 20px 4px 0;
}

.profile-card-category {
  margin-bottom: 9px;
  color: var(--olive-dark);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.profile-card-description {
  min-height: 76px;
  margin-bottom: 19px;
  color: var(--muted);
  font-size: 0.8rem;
}

/*
  This is now a visual label instead of a real button.
  The entire profile card is clickable.
*/

.profile-card-button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding: 17px 0 0;
  color: var(--charcoal);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-align: left;
  text-transform: uppercase;
}

.profile-card-button span {
  transition: transform 180ms ease;
}

.profile-card:hover .profile-card-button span,
.profile-card:focus-visible .profile-card-button span {
  transform: translateX(5px);
}

@keyframes profileFadeIn {
  from {
    opacity: 0;
    translate: 0 15px;
  }

  to {
    opacity: 1;
    translate: 0 0;
  }
}

/* =========================================================
   Health Program
========================================================= */

.health-program {
  margin-top: 70px;
  padding-block: 112px;
  background: var(--charcoal);
  color: rgba(255, 255, 255, 0.67);
}

.health-program-grid {
  display: grid;
  grid-template-columns: 0.9fr 1fr;
  align-items: end;
  gap: clamp(70px, 10vw, 150px);
}

.health-program h2 {
  max-width: 570px;
  margin-bottom: 0;
  color: #ffffff;
}

.health-program h2 em {
  color: var(--stone);
}

.health-program .eyebrow {
  color: var(--stone);
}

.health-program-copy > p {
  max-width: 580px;
  margin-bottom: 42px;
}

.health-markers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.health-markers > div {
  padding: 22px 20px 0 0;
}

.health-markers span {
  display: block;
  margin-bottom: 8px;
  color: var(--stone);
  font-family: var(--serif);
  font-size: 1.15rem;
}

.health-markers p {
  margin: 0;
  color: #ffffff;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* =========================================================
   Philosophy
========================================================= */

.cat-philosophy {
  background: var(--background-deep);
}

.philosophy-grid {
  display: grid;
  grid-template-columns: minmax(340px, 0.75fr) 1fr;
  align-items: center;
  gap: clamp(70px, 10vw, 145px);
}

.philosophy-photo {
  position: relative;
  height: 680px;
  overflow: hidden;
  background: var(--stone);
  box-shadow: var(--shadow-soft);
}

.philosophy-photo img {
  height: 100%;
  object-fit: cover;
  filter: saturate(0.66);
  transition: transform 900ms ease;
}

.philosophy-photo:hover img {
  transform: scale(1.025);
}

.philosophy-photo-label {
  position: absolute;
  right: 20px;
  bottom: 20px;
  padding: 12px 17px;
  background: rgba(250, 248, 244, 0.9);
  color: var(--charcoal);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.philosophy-content {
  max-width: 680px;
}

.philosophy-content h2 {
  font-size: clamp(3.3rem, 5vw, 5.4rem);
}

.philosophy-content > p:not(.eyebrow) {
  max-width: 600px;
  color: var(--muted);
}

.philosophy-content .text-link {
  margin-top: 18px;
}

/* =========================================================
   Profile Modal
========================================================= */

.profile-modal {
  position: fixed;
  z-index: 3000;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 35px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.profile-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.profile-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(22, 22, 20, 0.78);
  backdrop-filter: blur(12px);
}

.profile-modal-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(1120px, 100%);
  max-height: calc(100vh - 70px);
  grid-template-columns: 0.88fr 1fr;
  overflow: auto;
  background: var(--background-light);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.35);
  transform: translateY(22px) scale(0.985);
  transition: transform 250ms ease;
}

.profile-modal.open .profile-modal-dialog {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  z-index: 5;
  top: 20px;
  right: 20px;
  display: flex;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(250, 248, 244, 0.88);
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.modal-close span {
  position: absolute;
  width: 19px;
  height: 1px;
  background: var(--charcoal);
}

.modal-close span:first-child {
  transform: rotate(45deg);
}

.modal-close span:last-child {
  transform: rotate(-45deg);
}

.modal-profile-image {
  position: relative;
  min-height: 710px;
  overflow: hidden;
  background: var(--background-deep);
}

.modal-profile-image::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to top,
      rgba(22, 22, 20, 0.38),
      transparent 43%
    );
  content: "";
  pointer-events: none;
}

.modal-profile-image img {
  height: 100%;
  object-fit: cover;
  filter: saturate(0.76);
}

.modal-image-role {
  position: absolute;
  z-index: 2;
  top: 25px;
  left: 25px;
  padding: 9px 13px;
  background: rgba(250, 248, 244, 0.91);
  color: var(--charcoal);
  font-size: 0.57rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.modal-profile-number {
  position: absolute;
  z-index: 2;
  right: 25px;
  bottom: 22px;
  color: rgba(255, 255, 255, 0.86);
  font-family: var(--serif);
  font-size: 4rem;
  line-height: 1;
}

.modal-profile-content {
  display: flex;
  justify-content: center;
  flex-direction: column;
  padding: 75px 65px 60px;
}

.modal-category {
  margin-bottom: 17px;
  color: var(--olive-dark);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.modal-profile-content h2 {
  margin-bottom: 8px;
  font-size: clamp(4rem, 6vw, 6.5rem);
}

.modal-color {
  margin-bottom: 34px;
  color: var(--muted);
  font-size: 0.69rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.modal-quote {
  margin: 0 0 27px;
  padding-left: 22px;
  border-left: 1px solid var(--taupe);
  color: var(--taupe-dark);
  font-family: var(--serif);
  font-size: 1.7rem;
  font-style: italic;
  line-height: 1.15;
}

.modal-story {
  margin-bottom: 35px;
  color: var(--muted);
  font-size: 0.86rem;
}

.modal-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 0 37px;
  border-top: 1px solid var(--border);
}

.modal-details div {
  padding: 20px 17px 0 0;
}

.modal-details dt {
  margin-bottom: 7px;
  color: var(--olive-dark);
  font-size: 0.54rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.modal-details dd {
  margin: 0;
  color: var(--text);
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.25;
}

.modal-contact-button {
  align-self: flex-start;
}

body.modal-open {
  overflow: hidden;
}

/* =========================================================
   Responsive
========================================================= */

@media (max-width: 1080px) {
  .cats-hero-grid {
    grid-template-columns: 0.8fr 1fr;
    gap: 55px;
  }

  .cats-hero-gallery {
    min-height: 570px;
  }

  .profile-card-image {
    height: 430px;
  }

  .profile-image-name h3 {
    font-size: 2.6rem;
  }

  .modal-profile-content {
    padding: 65px 48px 50px;
  }
}

@media (max-width: 900px) {
  .cats-hero {
    padding-block: 75px 95px;
  }

  .cats-hero-grid {
    grid-template-columns: 1fr;
  }

  .cats-hero-content {
    max-width: 750px;
  }

  .cats-hero-gallery {
    width: min(100%, 680px);
    min-height: 650px;
    justify-self: center;
  }

  .family-statement-grid {
    grid-template-columns: 50px 1fr;
  }

  .statement-copy {
    grid-column: 2;
  }

  .profiles-heading {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .profile-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .profile-card:nth-child(3n + 2) {
    transform: none;
  }

  .profile-card:nth-child(even) {
    transform: translateY(35px);
  }

  .profile-card-image {
    height: 510px;
  }

  .health-program-grid {
    grid-template-columns: 1fr;
  }

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

  .philosophy-photo {
    width: min(100%, 620px);
    height: 680px;
  }

  .profile-modal-dialog {
    grid-template-columns: 1fr;
  }

  .modal-profile-image {
    min-height: 540px;
  }
}

@media (max-width: 640px) {
  .cats-hero {
    padding-block: 58px 74px;
  }

  .cats-hero h1 {
    font-size: clamp(3.7rem, 17vw, 5rem);
  }

  .cats-hero-gallery {
    min-height: 500px;
    grid-template-columns: 1fr 0.65fr;
    gap: 10px;
  }

  .gallery-monogram {
    right: -8px;
    width: 75px;
    height: 75px;
  }

  .gallery-monogram span {
    font-size: 1.55rem;
  }

  .gallery-monogram small {
    font-size: 0.32rem;
  }

  .cats-hero-gallery figcaption {
    right: 10px;
    bottom: 10px;
    left: 10px;
    padding: 11px;
    font-size: 1rem;
  }

  .family-statement {
    padding-block: 65px;
  }

  .family-statement-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .statement-copy {
    grid-column: auto;
  }

  .statement-number {
    margin-top: 0;
  }

  .profile-filters {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .profile-filter {
    width: 100%;
  }

  .profile-grid {
    grid-template-columns: 1fr;
    gap: 52px;
  }

  .profile-card:nth-child(even) {
    transform: none;
  }

  .profile-card-image {
    height: 540px;
  }

  .profile-card-description {
    min-height: auto;
  }

  .health-program {
    margin-top: 20px;
    padding-block: 80px;
  }

  .health-markers {
    grid-template-columns: 1fr;
  }

  .health-markers > div {
    padding-block: 17px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.13);
  }

  .philosophy-photo {
    height: 520px;
  }

  .profile-modal {
    padding: 0;
  }

  .profile-modal-dialog {
    width: 100%;
    max-height: 100vh;
    min-height: 100vh;
  }

  .modal-profile-image {
    min-height: 420px;
  }

  .modal-profile-content {
    padding: 50px 25px;
  }

  .modal-profile-content h2 {
    font-size: 4rem;
  }

  .modal-details {
    grid-template-columns: 1fr;
  }

  .modal-details div {
    padding-block: 15px;
    border-bottom: 1px solid var(--border);
  }

  .modal-contact-button {
    width: 100%;
  }
}

@media (max-width: 430px) {
  .cats-hero-gallery {
    min-height: 440px;
  }

  .profile-card-image {
    height: 480px;
  }
}