/* CRUSTED team styles. */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem;
  margin-top: 2.5rem;
}
.team-section {
  border-top: 4px double var(--rust);
  background: var(--off-white);
}
.team-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3rem;
}
.team-grid article {
  border-top: 2px solid var(--blue);
  padding-top: 1.5rem;
}
.team-grid h3 {
  margin: 0.5rem 0 1rem;
  font-size: 1.6rem;
  letter-spacing: -0.03em;
}
.team-role {
  color: var(--rust);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.team-grid blockquote {
  margin: 1.5rem 0 0;
  color: var(--blue);
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.5;
}
.team-closing {
  margin: 3rem 0 0 !important;
  color: var(--blue);
  font-weight: 700;
}
@media (max-width: 760px) {
  .team-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}
.team-grid h3 {
  letter-spacing: normal;
}
.team-grid blockquote {
  font-style: normal;
}
.team-grid blockquote,
.team-role,
.team-closing {
  font-weight: 900;
}
.yearbook-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  border-bottom: 1px solid var(--blue);
}
.yearbook-heading h3 {
  font-size: 1.6rem;
  margin: 0 0 1rem;
}
.yearbook-heading p {
  font-size: 0.85rem;
  color: var(--rust);
}
.team-grid.yearbook-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.team-grid .yearbook-profile {
  padding: 0;
  border: 0;
  text-align: center;
}
.profile-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 12px 4px;
  border: 0;
  border-radius: 12px;
  color: var(--ink);
  background: transparent;
  font: inherit;
  cursor: pointer;
}
.portrait {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 174px;
  aspect-ratio: 1;
  border: 5px double var(--blue);
  border-radius: 50%;
  background: var(--cream);
  color: var(--blue);
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 3.2rem;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.profile-button:hover .portrait,
.profile-button:focus-visible .portrait {
  transform: rotate(-4deg) translateY(-4px);
  box-shadow: 5px 6px 0 var(--blue);
}
.team-grid .profile-button h3 {
  font-size: 1.35rem;
  margin: 1.1rem 0 0.5rem;
  line-height: 1.25;
}
.profile-button .team-role {
  font-size: 0.75rem;
  line-height: 1.5;
  margin: 0 0 1rem;
}
.store-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 3rem;
  margin-top: 4rem;
  padding: 2.5rem;
  border: 4px double var(--blue);
  background: var(--cream);
}
.content-section .store-card h3 {
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  margin: 0.75rem 0 0;
}
.store-contact {
  display: inline-block;
  padding: 8px 0;
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 5px;
}
.modal-open {
  overflow: hidden;
}
.profile-modal {
  width: min(580px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 2.5rem;
  border: 4px double var(--blue);
  border-radius: 12px;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 900;
  line-height: 1.65;
  overscroll-behavior: contain;
}
.profile-modal::backdrop {
  background: rgba(62, 58, 54, 0.72);
  backdrop-filter: blur(4px);
}
.profile-modal form {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}
.modal-close {
  min-height: 44px;
  padding: 0.5rem 1rem;
  border: 1px solid var(--blue);
  border-radius: 999px;
  background: transparent;
  color: var(--blue);
  font: inherit;
  cursor: pointer;
}
.modal-close:hover {
  color: var(--cream);
  background: var(--blue);
}
.modal-portrait {
  width: 116px;
  font-size: 2.4rem;
  margin-bottom: 1.5rem;
}
.profile-modal .script-kicker {
  font: inherit;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.profile-modal h2 {
  margin: 0.5rem 0;
  font-size: 2.3rem;
  line-height: 1.15;
  color: var(--blue);
}
.profile-modal .team-role {
  margin: 0 0 1.5rem;
}
.profile-modal blockquote {
  margin: 1.5rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--blue);
  color: var(--blue);
  font-size: 1.2rem;
}
@media (max-width: 1000px) {
  .team-grid.yearbook-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .store-carousel {
    grid-template-columns: 1fr;
  }
  .team-grid.yearbook-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem 1rem;
  }
  .yearbook-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
  }
  .portrait {
    max-width: 150px;
  }
  .store-card {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
  }
  .profile-modal {
    padding: 1.25rem;
  }
  .profile-modal h2 {
    font-size: 1.8rem;
  }
}

/* Final responsive carousel layout. */
.team-grid.paged-carousel {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(var(--team-columns, 5), minmax(0, 1fr));
  gap: 1rem;
  transform: none;
  transition: none;
}
.team-grid.paged-carousel .yearbook-profile {
  width: auto;
  min-width: 0;
  padding: 0;
  flex: initial;
}
.team-grid.paged-carousel + .carousel-controls {
  display: flex;
}
.store-carousel {
  display: flex;
  width: 100%;
  gap: 0;
  transition: transform 0.45s ease;
}
.store-carousel .store-card {
  width: auto;
  min-width: 0;
  flex: 0 0 calc(100% / var(--stores-per-view, 2));
}
@media (min-width: 1001px) {
  .team-grid.paged-carousel + .carousel-controls {
    display: none;
  }
}
@media (min-width: 761px) {
  .location-controls {
    display: none;
  }
}
@media (max-width: 620px) {
  .team-grid.paged-carousel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (prefers-reduced-motion: reduce) {
  .store-carousel {
    transition: none;
  }
}

/* Responsive, single-row team carousel. */
.team-grid.paged-carousel {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(var(--team-columns, 5), minmax(0, 1fr));
  gap: 1rem;
  transform: none;
}
.team-grid.paged-carousel .yearbook-profile {
  width: auto;
  min-width: 0;
  padding: 0;
}
.team-grid.paged-carousel .yearbook-profile[hidden] {
  display: none;
}
@keyframes team-leave-left {
  to {
    opacity: 0;
    transform: translateX(-35%);
  }
}
@keyframes team-enter-right {
  from {
    opacity: 0;
    transform: translateX(35%);
  }
}
@keyframes team-leave-right {
  to {
    opacity: 0;
    transform: translateX(35%);
  }
}
@keyframes team-enter-left {
  from {
    opacity: 0;
    transform: translateX(-35%);
  }
}
.team-grid.is-leaving-left {
  animation: team-leave-left 0.28s ease-in forwards;
}
.team-grid.is-entering-right {
  animation: team-enter-right 0.32s ease-out;
}
.team-grid.is-leaving-right {
  animation: team-leave-right 0.28s ease-in forwards;
}
.team-grid.is-entering-left {
  animation: team-enter-left 0.32s ease-out;
}

/* Two locations on larger screens and one sliding card on phones. */
.store-carousel {
  display: flex;
  width: 100%;
  gap: 0;
  transition: transform 0.45s ease;
}
.store-carousel .store-card {
  width: auto;
  min-width: 0;
  flex: 0 0 calc(100% / var(--stores-per-view, 2));
  border-radius: 18px;
}
@media (min-width: 761px) {
  .location-controls {
    display: none;
  }
}
@media (max-width: 620px) {
  .team-grid.paged-carousel {
    grid-template-columns: repeat(var(--team-columns, 2), minmax(0, 1fr));
  }
  .team-grid.paged-carousel + .carousel-controls {
    display: flex;
  }
  .team-grid.paged-carousel .portrait {
    width: min(100%, 108px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .team-grid.is-leaving-left,
  .team-grid.is-entering-right,
  .team-grid.is-leaving-right,
  .team-grid.is-entering-left {
    animation: none;
  }
  .store-carousel {
    transition: none;
  }
}

.team-section h1 {
  margin: 0 0 1.5rem;
  color: var(--blue);
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: normal;
  font-style: normal;
  text-shadow: none;
}
.team-section {
  min-height: 70svh;
  background: var(--off-white);
}

.team-section .content-section {
  overflow: hidden;
}
.team-grid.paged-carousel {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  margin-top: 2rem;
  overflow: visible;
}
.team-grid.paged-carousel {
  width: 200%;
  transition: transform 0.8s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.team-grid.paged-carousel .yearbook-profile {
  width: 10%;
  flex: 0 0 10%;
  padding-inline: 0.6rem;
}
.team-grid.paged-carousel .profile-button {
  min-width: 0;
}
.team-grid.paged-carousel .profile-button {
  padding: 1rem 0.5rem;
  border: 2px solid rgba(42, 52, 146, 0.35);
  background: rgba(255, 252, 227, 0.72);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.team-grid.paged-carousel .profile-button:hover,
.team-grid.paged-carousel .profile-button:focus-visible {
  transform: translateY(-4px);
  box-shadow: 5px 6px 0 rgba(42, 52, 146, 0.2);
}
.store-carousel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.store-carousel .store-card {
  width: auto;
  min-width: 0;
  margin-top: 0;
}
.carousel-controls {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1rem;
}
.carousel-controls button {
  min-width: 44px;
  min-height: 40px;
  border: 1px solid var(--blue);
  border-radius: 999px;
  color: var(--blue);
  background: var(--cream);
  font: inherit;
  cursor: pointer;
}
.carousel-controls button:hover,
.carousel-controls button:focus-visible {
  color: var(--cream);
  background: var(--blue);
}
.carousel-controls button {
  font-size: 1.7rem;
  line-height: 1;
}
.location-heading {
  margin-top: 3.5rem;
  border-bottom: 1px solid var(--blue);
}
.location-heading h3 {
  margin: 0 0 0.8rem;
  color: var(--blue);
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 400;
}
.location-controls {
  justify-content: center;
  margin-top: 1.1rem;
}

/* Tall store location card. */
.store-carousel {
  align-items: stretch;
}
.store-carousel .store-card {
  display: flex;
  width: auto;
  min-height: 500px;
  padding: 0;
  align-items: stretch;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  border: 2px solid var(--blue);
  border-radius: 18px;
  background: var(--cream);
  box-shadow: 7px 8px 0 var(--blue);
}
.team-grid .profile-button h3 {
  display: inline-block;
  margin: 1.1rem 0 0.5rem;
  padding: 0.45rem 0.7rem;
  border: 2px solid var(--blue);
  border-radius: 4px;
  color: var(--blue);
  background: var(--cream);
  font-size: 1.15rem;
  line-height: 1.2;
}
.store-cover {
  width: 100%;
  height: 300px;
  object-fit: cover;
}
.store-card-body {
  display: flex;
  flex: 1;
  padding: 1.35rem;
  align-items: flex-start;
  flex-direction: column;
}
.content-section .store-card-body h3 {
  margin: 0;
  color: var(--blue);
  font-size: 1.55rem;
  line-height: 1.15;
}
.store-card-body p {
  margin: 0.65rem 0 1.25rem;
  color: var(--rust);
  font-size: 0.85rem;
  line-height: 1.5;
}
.store-visit {
  display: inline-flex;
  min-height: 42px;
  margin-top: auto;
  padding: 0.65rem 1rem;
  align-items: center;
  gap: 0.5rem;
  border-radius: 999px;
  color: var(--cream);
  background: var(--blue);
  font-size: 0.78rem;
  text-transform: uppercase;
  transition:
    transform 0.2s ease,
    background 0.2s ease;
}
.store-visit:hover,
.store-visit:focus-visible {
  background: var(--rust);
  transform: translateY(-2px);
}
.store-visit {
  width: 100%;
  justify-content: center;
}
.store-visit span {
  display: none;
}
.store-visit.is-disabled {
  color: rgba(62, 58, 54, 0.5);
  background: rgba(62, 58, 54, 0.15);
  cursor: not-allowed;
  pointer-events: none;
}
.coming-soon-card .store-card-body {
  justify-content: center;
  text-align: center;
}
.coming-soon-card .store-card-body p {
  margin-bottom: 0;
}
@media (prefers-reduced-motion: reduce) {
  .team-grid.paged-carousel {
    transition: none;
  }
}

/* Tablet and phone layout: readable cards take priority over the desktop carousel. */
@media (max-width: 1000px) {
  .team-grid.paged-carousel {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    transform: none !important;
  }
  .team-grid.paged-carousel .yearbook-profile {
    width: auto;
    min-width: 0;
    padding: 0;
  }
  .team-grid.paged-carousel .yearbook-profile:nth-child(n + 6) {
    display: none;
  }
  .team-grid.paged-carousel + .carousel-controls {
    display: none;
  }
}

@media (max-width: 620px) {
  .team-grid.paged-carousel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
  }
  .team-grid.paged-carousel .profile-button {
    padding: 0.9rem 0.45rem;
  }
  .team-grid.paged-carousel .portrait {
    max-width: 112px;
    border-width: 3px;
    font-size: 2rem;
  }
  .team-grid.paged-carousel .profile-button h3 {
    width: 100%;
    margin-top: 0.8rem;
    padding: 0.4rem 0.3rem;
    overflow-wrap: anywhere;
    font-size: 0.92rem;
  }
  .team-grid.paged-carousel .team-role {
    margin-bottom: 0;
    font-size: 0.65rem;
    line-height: 1.4;
  }
  .store-carousel .store-card {
    min-height: 440px;
  }
  .store-cover {
    height: 240px;
  }
}

@media (max-width: 350px) {
  .team-grid.paged-carousel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .store-carousel {
    grid-template-columns: 1fr;
  }
  .store-carousel .store-card {
    width: 100%;
  }
}

/* Adaptive carousel overrides. */
.team-grid.paged-carousel {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(var(--team-columns, 5), minmax(0, 1fr));
  gap: 1rem;
  transform: none;
  transition: none;
}
.team-grid.paged-carousel .yearbook-profile {
  width: auto;
  min-width: 0;
  padding: 0;
  flex: initial;
}
.team-grid.paged-carousel + .carousel-controls {
  display: flex;
}
.store-carousel {
  display: flex;
  width: 100%;
  gap: 0;
  transition: transform 0.45s ease;
}
.store-carousel .store-card {
  width: auto;
  min-width: 0;
  flex: 0 0 calc(100% / var(--stores-per-view, 2));
}
@media (min-width: 1001px) {
  .team-grid.paged-carousel + .carousel-controls {
    display: none;
  }
}
@media (min-width: 761px) {
  .location-controls {
    display: none;
  }
}
@media (max-width: 620px) {
  .team-grid.paged-carousel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (prefers-reduced-motion: reduce) {
  .store-carousel {
    transition: none;
  }
}
